client-reports
POST /v1/client-reports/clients/{client_id}/reports
Make a report for this client now.
Аутентификација
Пошаљите API кључ као bearer токен. Кључ мора имати дозволу sites.create; кључ без ње се одбија уз 403, а не 404.
Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
curl -X POST https://api.zinndigital.com/v1/client-reports/clients/{client_id}/reports \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
Counted against this month's reports at once; built in the background from data already collected (no supplier is called) and ready in seconds — poll GET /v1/client-reports/reports/{report_id} until state is ready. A report that fails is not counted. Requires sites.create.
Параметри
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
client_id (path) | string | Да | — |
Тело захтева
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
send_email | boolean | Не | E-mail it to the client's recipients when ready. |
period_start | string | Не | — |
period_end | string | Не | — |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
id | string | Да | — |
client_id | string | Да | — |
client_name | string | Да | — |
period_start | string | Да | — |
period_end | string | Да | — |
locale | string | Да | — |
state | string<building, ready, failed> | Да | — |
source | string<manual, schedule> | Да | — |
sections | ClientReportSectionKey[] | Да | — |
headline | ClientReportHeadline[] | Да | — |
changes | integer | Да | How many figures moved since the previous report. |
failure | ClientReportFailure | null | Да | Why a failed report failed, or why a ready one could not be e-mailed. |
share_url | object | Да | null once revoked or expired. |
share_expires_at | object | Да | — |
revoked | boolean | Да | — |
views | integer | Да | — |
emailed_at | object | Да | — |
emailed_to | string[] | Да | — |
created_at | string | Да | — |
finished_at | object | Да | — |
Грешке које ова крајња тачка може вратити
401 · 403 · 404 · 422 · 429 · 503