Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ошибка валидации даты-времени при получении Vacancy Periods #675

Open
skarpushin opened this issue Jul 15, 2024 · 1 comment

Comments

@skarpushin
Copy link

Добрый день!

Вопрос по API: https://api.huntflow.ru/v2/docs#get-/accounts/-account_id-/vacancies/-vacancy_id-/periods

Вроде бы передаю дату время, как указано в документации:
image

Но получаю ошибку валидации:

Запрос:

GET https://api.huntflow.ru/v2/accounts/55771/vacancies/2770988/periods?date_begin=2021-09-28T10:48:47+03:00&date_end=2024-07-15T10:43:39+03:00

HEADERS:

Accept: [application/json, application/*+json]
Content-Length: [0]
Authorization: (hashed) f0351fb3
User-Agent: [App/1.0 (***)]

RESPONSE HTTP 400 Bad Request

HEADERS:

Date: [Mon, 15 Jul 2024 07:43:41 GMT]
Content-Type: [application/json]
Content-Length: [252]
Connection: [keep-alive]
x-request-id: [173f3ad9-7b93-437c-b6a7-e70c86c19f6a]

BODY:

{"errors":[{"type":"value_error.datetime","title":"invalid datetime format","location":{"entity":"query","variable":"/date_begin"}},{"type":"value_error.datetime","title":"invalid datetime format","location":{"entity":"query","variable":"/date_end"}}]}

Вопрос: в каком формате нужно передавать значения?

@skarpushin
Copy link
Author

UPD: Методом проб и ошибок подобрал формат 2024-01-01 11:57:48. Но тогда вопрос -- в какой часовой зоне воспринимается эта дата/время?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant