agency-time
POST /v1/agency/time/projects/from-quote
Start a project from a free-quote request.
المصادقة
أرسل مفتاح واجهة برمجة التطبيقات (API key) كرمز حامل (bearer token). يجب أن يحمل المفتاح إذن agency.time.manage؛ والمفتاح الذي لا يملكه يُرفض بالرمز 403 وليس 404.
حيث يتم إدخال معرف مؤسستك
تقبل هذه نقطة النهاية org_id حقلًا في نص JSON.
معرف مؤسستك موجود على شاشة مفاتيح واجهة برمجة التطبيقات (API) في لوحة تحكمك، بجوار المفتاح نفسه. وهو نفس المعرف في كل طلب تجريه.
جربه الآن
استبدل أي شيء بين أقواس زاوية بقيمك الخاصة، والعنصر النائب للمفتاح بمفتاح من لوحة تحكمك.
curl -X POST https://api.zinndigital.com/v1/agency/time/projects/from-quote \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "quote_id": <string> }'هل سجلت الدخول؟ تقوم وحدة تحكم واجهة برمجة التطبيقات في لوحة التحكم الخاصة بك بربط معرف مؤسستك الحقيقي ومفتاحك الخاص، وتنفذ الطلب مقابل واجهة برمجة التطبيقات المباشرة لتتمكن من رؤية الاستجابة الفعلية. افتح هذه النهاية الطرفية في وحدة تحكم API
التفاصيل
Zinn Digital®'s own organisation only (docs/670 §2). In one transaction: the requester becomes a client (found by e-mail, or created, carrying the request's country), a project board is opened with the brief, a time project is linked to both in the quoted currency, the quoted price becomes a fixed-price task, and the request is marked won — which is what stops the admin queue's charge conversion and the draft-from-quote invoice billing the same job again. Requires agency.time.manage in the organisation and the quotes.manage staff permission the admin queue requires. Idempotent per request: a second call returns the project the first one made, with created: false.
جسم الطلب
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
quote_id | string | نعم | — |
amount_minor | integer | لا | The agreed price, NET, in minor units — only for a request that has not been priced. On a priced request omit it; a different figure is refused. |
currency | string | لا | — |
country | string | لا | The client's ISO-2 country, used only when the request carries none (the public form does not ask). The bill on the checkout needs it; anything but two letters is refused. |
org_id | string | لا | — |
الاستجابة
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
project | TimeProject | نعم | — |
board_id | string | نعم | — |
client_id | string | نعم | — |
created | boolean | نعم | FALSE when a project for this request already existed and was returned. |
price_already_billed_on | string | لا | The reference of a bill already drafted straight from this request, when there was one — in which case the project carries no fixed price, because that bill charges it. |
الأخطاء التي يمكن أن تُرجعها نقطة النهاية هذه
401 · 403 · 422