agency-time

POST /v1/agency/time/rates

Set a rate.

Усі кінцеві точки agency-time

Автентифікація

Надішліть ключ API як маркер носія (bearer token). Ця кінцева точка не вказує конкретного дозволу в специфікації, тому надайте своєму ключу мінімально необхідні права та перевірте відповідь, замість того щоб припускати.

Де вказується ідентифікатор вашої організації

Цей ендпоінт приймає org_id як поле в тілі JSON.

Ідентифікатор вашої організації знаходиться на екрані API-ключів у вашій панелі керування, поруч із самим ключем. Це той самий ідентифікатор у кожному вашому запиті.

Спробувати

Замініть усе в кутових дужках власними значеннями, а заповнювач ключа — ключем із вашої панелі керування.

curl -X POST https://api.zinndigital.com/v1/agency/time/rates \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "scope": <string<task, project, client, org>>, "amount_minor": <integer>, "currency": <string>, "effective_from": <string> }'

Увійшли в систему? Консоль API у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого API, щоб ви могли побачити справжню відповідь. Відкрийте цю кінцеву точку в консолі API

Деталі

`amount_minor` is the price of ONE HOUR for `kind: hourly`, and the price of the whole job for `kind: fixed`. ⛔ A fixed price is billed **once** for the task it is set on, however many hours are logged against it — the minutes are still recorded and reported, they simply do not each carry money. It is not "an hourly rate of zero".

Тіло запиту

НазваТипОбов'язковеЩо це таке
scopestring<task, project, client, org>Так
scope_idstringНі
kindstring<hourly, fixed>Ні
amount_minorintegerТак
currencystringТак
effective_fromstringТак
org_idstringНі

Відповідь

НазваТипОбов'язковеЩо це таке
idstringТак
scopestring<task, project, client, org>Так
scope_idstringНіThe task/project/client this applies to. `null` exactly when scope is `org`.
kindstring<hourly, fixed>Так
amount_minorintegerТакMinor units. For `hourly`, the price of ONE HOUR — ⛔ never a price per minute, and never divided by 60 anywhere on this API.
currencystringТак
effective_fromstringТакApplies to work done on or after this date. Resolution is against the **work's** date, never today, so a rate rise does not re-price last month.
archivedbooleanТак

Помилки, які може повертати ця кінцева точка

401 · 403 · 422