agency-time
POST /v1/agency/time/projects/from-quote
Start a project from a free-quote request.
אימות
שלחו מפתח API כאסימון נושא (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 בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-API הפיזי כך שתוכל לראות את התגובה בפועל. פתח נקודת קצה זו במסוף ה-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