{"openapi":"3.1.0","info":{"title":"smz open API","version":"1"},"paths":{"/oauth/token":{"post":{"summary":"Issue","description":"Обмен `client_id` и `client_secret` на токен платформы. Только с сервера площадки.","operationId":"issue_oauth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"grant_type":{"type":"string","const":"client_credentials","title":"Grant Type"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},"type":"object","required":["grant_type","client_id","client_secret"],"title":"RequestToken"}},"application/json":{"schema":{"properties":{"grant_type":{"type":"string","const":"client_credentials","title":"Grant Type"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},"type":"object","required":["grant_type","client_id","client_secret"],"title":"RequestToken"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseToken"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/performers/lookup":{"get":{"summary":"Check","description":"Статус исполнителя по ПИНФЛ или телефону, ровно один параметр. Проверка видна исполнителю.","operationId":"check_performers_lookup_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"pinfl","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pinfl"}},{"name":"phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseLookup"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/registration-applications":{"post":{"summary":"Create","description":"Заявка на регистрацию. Человек сам пройдёт MyID по ссылке из ответа.","operationId":"create_registration_applications_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestApplication"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseApplicationCreated"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/registration-applications/{application_id}":{"get":{"summary":"Get","description":"Заявка этой платформы. Чужая — 404, как несуществующая.","operationId":"get_registration_applications__application_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseApplication"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdk-sessions":{"post":{"summary":"Create","description":"Токен для браузера на 15 минут. Выдаётся только серверу площадки: секрет на страницу не попадает.","operationId":"create_sdk_sessions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestSdkSession"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseSdkSession"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts":{"post":{"summary":"Create","description":"Рамочный договор. Заказчик и исполнитель подписывают в кабинетах через E-IMZO, суммы приходят с пакетами выплат.\n\nЗаказчик сам не зарегистрировался — 409 `CUSTOMER_NOT_REGISTERED`.","operationId":"create_contracts_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestFrameworkContract"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseFrameworkContract"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}":{"get":{"summary":"Get","description":"Договор этой площадки. Чужой — 404, как несуществующий.","operationId":"get_contracts__contract_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseFrameworkContract"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payout-batches":{"post":{"summary":"Create","description":"Пакет выплат: итог и один счёт. Ошибочные строки — в `fields`, а с `allow_partial` — в `rejected`.","operationId":"create_payout_batches_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestBatch"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseBatchCreated"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payout-batches/{batch_id}":{"get":{"summary":"Get","description":"Пакет этой площадки с итогом по строкам. Чужой — 404.","operationId":"get_payout_batches__batch_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseBatch"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"webhooks":{"performer.registered":{"post":{"summary":"Заявка закончена, человек — самозанятый.","description":"Подпись: `X-SMZ-Signature: sha256=<HMAC-SHA256 тела>`.","operationId":"_performer_registered_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"performer.status_changed":{"post":{"summary":"Статус изменился у исполнителя, которого привела площадка.","description":"Подпись: `X-SMZ-Signature: sha256=<HMAC-SHA256 тела>`.","operationId":"_performer_status_changed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"contract.state_changed":{"post":{"summary":"Рамочный договор площадки сменил состояние.","description":"Подпись: `X-SMZ-Signature: sha256=<HMAC-SHA256 тела>`.","operationId":"_contract_state_changed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"payout_batch.processed":{"post":{"summary":"Строки пакета обработаны. Итог по строкам — `GET /v1/payout-batches/{id}`.","description":"Подпись: `X-SMZ-Signature: sha256=<HMAC-SHA256 тела>`.","operationId":"_payout_batch_processed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ErrorBody":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"fields":{"items":{"$ref":"#/components/schemas/FieldError"},"type":"array","title":"Fields","default":[]},"checks":{"items":{"type":"string"},"type":"array","title":"Checks","default":[]},"request_id":{"type":"string","title":"Request Id"}},"type":"object","required":["code","message","request_id"],"title":"ErrorBody"},"FieldError":{"properties":{"field":{"type":"string","title":"Field"},"code":{"type":"string","title":"Code"}},"type":"object","required":["field","code"],"title":"FieldError"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"RequestApplication":{"properties":{"external_id":{"type":"string","maxLength":128,"minLength":1,"title":"External Id"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"return_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Url","description":"Обязателен для токена платформы, токену SDK запрещён"}},"additionalProperties":false,"type":"object","required":["external_id"],"title":"RequestApplication"},"RequestBatch":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RequestBatchItem"},"type":"array","minItems":1,"title":"Items"},"allow_partial":{"type":"boolean","title":"Allow Partial","description":"Создать пакет из верных строк, если есть ошибочные","default":false}},"additionalProperties":false,"type":"object","required":["items"],"title":"RequestBatch"},"RequestBatchItem":{"properties":{"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"amount":{"type":"integer","maximum":1000000000000000.0,"exclusiveMinimum":0.0,"title":"Amount","description":"Сумма S, комиссия начисляется сверх неё"}},"additionalProperties":false,"type":"object","required":["contract_id","amount"],"title":"RequestBatchItem"},"RequestFrameworkContract":{"properties":{"external_id":{"type":"string","maxLength":128,"minLength":1,"title":"External Id"},"performer_id":{"type":"string","format":"uuid","title":"Performer Id"},"customer_inn":{"type":"string","pattern":"^\\d{9}$","title":"Customer Inn","description":"Заказчик: организация или ИП, которые сами зарегистрировались через E-IMZO"},"activity_code":{"type":"string","title":"Activity Code"},"subject":{"type":"string","maxLength":500,"minLength":1,"title":"Subject"},"due_date":{"type":"string","format":"date","title":"Due Date","description":"Срок действия договора"},"language":{"type":"string","enum":["ru","uz-Cyrl","uz-Latn"],"title":"Language","default":"ru"}},"additionalProperties":false,"type":"object","required":["external_id","performer_id","customer_inn","activity_code","subject","due_date"],"title":"RequestFrameworkContract"},"RequestSdkSession":{"properties":{"origin":{"type":"string","title":"Origin","description":"Адрес страницы площадки: `https://host`. Должен быть заведён у платформы"}},"additionalProperties":false,"type":"object","required":["origin"],"title":"RequestSdkSession"},"ResponseApplication":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","enum":["created","in_progress","completed","expired","rejected"],"title":"Status"},"external_id":{"type":"string","title":"External Id"},"performer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Performer Id","description":"Только у заявки в статусе `completed`"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"version":{"type":"integer","title":"Version"}},"type":"object","required":["id","status","external_id","performer_id","expires_at","version"],"title":"ResponseApplication"},"ResponseApplicationCreated":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","enum":["created","in_progress","completed","expired","rejected"],"title":"Status"},"external_id":{"type":"string","title":"External Id"},"url":{"type":"string","title":"Url","description":"Ссылка для человека. Показывается только здесь"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["id","status","external_id","url","expires_at"],"title":"ResponseApplicationCreated"},"ResponseBatch":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"total":{"type":"integer","title":"Total"},"paid_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Paid Amount"},"version":{"type":"integer","title":"Version"},"rows":{"items":{"$ref":"#/components/schemas/ResponseBatchRow"},"type":"array","title":"Rows"}},"type":"object","required":["id","status","total","paid_amount","version","rows"],"title":"ResponseBatch"},"ResponseBatchCreated":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"total":{"type":"integer","title":"Total","description":"Итог к оплате одним платежом"},"rows":{"type":"integer","title":"Rows"},"pay_url":{"type":"string","title":"Pay Url"},"rejected":{"items":{"$ref":"#/components/schemas/ResponseRejectedRow"},"type":"array","title":"Rejected"}},"type":"object","required":["id","status","total","rows","pay_url","rejected"],"title":"ResponseBatchCreated"},"ResponseBatchRow":{"properties":{"payout_id":{"type":"string","format":"uuid","title":"Payout Id"},"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"status":{"type":"string","title":"Status"},"amount":{"type":"integer","title":"Amount"},"tax":{"type":"integer","title":"Tax"},"net":{"type":"integer","title":"Net"},"commission":{"type":"integer","title":"Commission"},"payable":{"type":"integer","title":"Payable"}},"type":"object","required":["payout_id","contract_id","status","amount","tax","net","commission","payable"],"title":"ResponseBatchRow"},"ResponseError":{"properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}},"type":"object","required":["error"],"title":"ResponseError"},"ResponseFrameworkContract":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"number":{"type":"string","title":"Number"},"kind":{"type":"string","title":"Kind"},"status":{"type":"string","title":"Status"},"external_id":{"type":"string","title":"External Id"},"performer_id":{"type":"string","format":"uuid","title":"Performer Id"},"failed_checks":{"items":{"type":"string"},"type":"array","title":"Failed Checks"},"labor_deferred":{"type":"boolean","title":"Labor Deferred"},"version":{"type":"integer","title":"Version"}},"type":"object","required":["id","number","kind","status","external_id","performer_id","failed_checks","labor_deferred","version"],"title":"ResponseFrameworkContract"},"ResponseLookup":{"properties":{"status":{"type":"string","title":"Status","description":"Статус в системе. Не найден — `not_registered`"},"smz_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smz Status","description":"`none`, `active`, `terminated`"},"activity_codes":{"items":{"type":"string"},"type":"array","title":"Activity Codes"},"performer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Performer Id"}},"type":"object","required":["status","smz_status","activity_codes","performer_id"],"title":"ResponseLookup"},"ResponseRejectedRow":{"properties":{"index":{"type":"integer","title":"Index"},"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"code":{"type":"string","title":"Code"}},"type":"object","required":["index","contract_id","code"],"title":"ResponseRejectedRow"},"ResponseSdkSession":{"properties":{"token":{"type":"string","title":"Token"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["token","expires_at","expires_in"],"title":"ResponseSdkSession"},"ResponseToken":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","const":"Bearer","title":"Token Type","default":"Bearer"},"expires_in":{"type":"integer","title":"Expires In"},"scope":{"type":"string","title":"Scope"}},"type":"object","required":["access_token","expires_in","scope"],"title":"ResponseToken"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookEvent":{"properties":{"type":{"type":"string","enum":["performer.registered","performer.status_changed","contract.state_changed","payout_batch.processed"],"title":"Type"},"event_id":{"type":"string","format":"uuid","title":"Event Id"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"object_id":{"type":"string","format":"uuid","title":"Object Id","description":"id исполнителя, договора или пакета: зависит от `type`"},"state":{"type":"string","title":"State","description":"Статус объекта, для исполнителя — статус СМЗ"},"version":{"type":"integer","title":"Version","description":"Версия объекта: порядок доставки не гарантирован, сверяйте её"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"}},"type":"object","required":["type","event_id","occurred_at","object_id","state","version","external_id","application_id"],"title":"WebhookEvent"}},"securitySchemes":{"HTTPBearer":{"type":"http","description":"Токен из `/v1/oauth/token` или `/v1/sdk-sessions`","scheme":"bearer"}}},"servers":[{"url":"/v1"}]}