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 կարգավիճակով:
Որտեղ տեղադրվում է ձեր կազմակերպության ID-ն
Այս վերջնակետը JSON մարմնում որպես դաշտ վերցնում է org_id-ը։
Ձեր կազմակերպության ID-ն գտնվում է Ձեր ղեկավարման վահանակի API բանալիների էկրանին՝ բուն բանալու կողքին: Այն նույն ID-ն է Ձեր կատարած յուրաքանչյուր հարցման մեջ:
Փորձել
Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:
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 վահանակը լրացնում է ձեր իրական կազմակերպության ID-ն և ձեր սեփական բանալին և գործարկում է հարցումը ուղիղ 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