Authentification
Envoyez une clé d'API en tant que jeton du porteur (bearer token). Cet endpoint n'indique pas de permission spécifique dans la spécification, attribuez donc à votre clé le minimum requis et vérifiez la réponse plutôt que de faire des suppositions.
Où insérer l'ID de votre organisation
Cet endpoint prend org_id comme champ dans le corps JSON.
L'identifiant de votre organisation se trouve sur l'écran des clés API de votre tableau de bord, à côté de la clé elle-même. Il s'agit du même identifiant pour chaque appel que vous effectuez.
Essayer
Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.
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> }'Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API
Détails
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".
Corps de la requête
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
scope | string<task, project, client, org> | Oui | — |
scope_id | string | Non | — |
kind | string<hourly, fixed> | Non | — |
amount_minor | integer | Oui | — |
currency | string | Oui | — |
effective_from | string | Oui | — |
org_id | string | Non | — |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
id | string | Oui | — |
scope | string<task, project, client, org> | Oui | — |
scope_id | string | Non | The task/project/client this applies to. null exactly when scope is org. |
kind | string<hourly, fixed> | Oui | — |
amount_minor | integer | Oui | 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 | Oui | — |
effective_from | string | Oui | 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 | Oui | — |
Erreurs que cet point de terminaison peut renvoyer
401 · 403 · 422