agency-time
POST /v1/agency/time/projects/from-quote
Start a project from a free-quote request.
Аутентификация
API кілтін bearer токені ретінде жіберіңіз. Кілтте agency.time.manage рұқсаты болуы тиіс; онсыз кілтке 404 емес, 403 қатесі қайтарылады.
Ұйымыңыздың идентификаторы орналасатын жер
Бұл соңғы нүкте JSON корпусында өріс ретінде org_id қабылдайды.
Сіздің ұйым идентификаторыңыз басқару панеліндегі 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.
Сұрау денесі
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
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 | Жоқ | — |
Жауап
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
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