Pengesahan
Hantar kunci API sebagai token pembawa. Titik akhir ini tidak menyatakan kebenaran tertentu dalam spesifikasi, jadi berikan kunci anda kebenaran minimum yang diperlukan dan semak respons tersebut daripada membuat andaian.
Tempat ID organisasi anda diletakkan
Titik akhir ini mengambil org_id sebagai medan dalam kandungan JSON.
ID organisasi anda terletak pada skrin kekunci API dalam papan pemuka anda, di sebelah kekunci itu sendiri. Ia adalah ID yang sama dalam setiap panggilan yang anda buat.
Cuba
Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.
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> }'Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API
Butiran
`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".
Badan permintaan
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
scope | string<task, project, client, org> | Ya | — |
scope_id | string | Tidak | — |
kind | string<hourly, fixed> | Tidak | — |
amount_minor | integer | Ya | — |
currency | string | Ya | — |
effective_from | string | Ya | — |
org_id | string | Tidak | — |
Respons
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
id | string | Ya | — |
scope | string<task, project, client, org> | Ya | — |
scope_id | string | Tidak | The task/project/client this applies to. `null` exactly when scope is `org`. |
kind | string<hourly, fixed> | Ya | — |
amount_minor | integer | Ya | Minor units. For `hourly`, the price of ONE HOUR — ⛔ never a price per minute, and never divided by 60 anywhere on this API. |
currency | string | Ya | — |
effective_from | string | Ya | 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. |
archived | boolean | Ya | — |
Ralat yang boleh dikembalikan oleh titik akhir ini
401 · 403 · 422