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

التفاصيل

`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