> For the complete documentation index, see [llms.txt](https://sravni-labs-ru.gitbook.io/sravni-labs.ru-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sravni-labs-ru.gitbook.io/sravni-labs.ru-docs/rasschyotno-kassovoe-obsluzhivanie./metody-vzaimodeistviya/sozdanie-zayavki.md).

# Создание заявки

Созданные заявки можно будет получить через метод для получения заявок, а также получить статус по текущей заявке через метод для получения статуса заявки.

Авторизация осуществляется по токену с актуальным сроком действия. Его требуется передать в заголовке Authorization при выполнении запроса.

Базовый URL dev: [https://sravni-apigateway-service.dev.sravni-team.ru](https://sravni-apigateway-service.dev.sravni-team.ru/)\
Базовый URL prod: [https://api.sravni.ru](https://api.sravni.ru/)

## POST /agents/v1/rko

> Отправка заявки РКО и сохранение соответствующего черновика в агентский кабинет

```json
{"openapi":"3.0.1","info":{"title":"Sravni.ApiGateway.Service 1.0","version":"1.0"},"paths":{"/agents/v1/rko":{"post":{"tags":["Агентский кабинет"],"summary":"Отправка заявки РКО и сохранение соответствующего черновика в агентский кабинет","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sravni.ApiGateway.Service.Agents.Models.Rko.AgentsRkoSaveQueryRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/Sravni.ApiGateway.Service.Agents.Models.Rko.AgentsRkoSaveQueryRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Sravni.ApiGateway.Service.Agents.Models.Rko.AgentsRkoSaveQueryRequest"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Sravni.ApiGateway.Service.Agents.Models.Rko.SaveRkoQueryResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/Sravni.ApiGateway.Service.Agents.Models.Rko.SaveRkoQueryResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/Sravni.ApiGateway.Service.Agents.Models.Rko.SaveRkoQueryResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Sravni.Micro.Errors.ErrorModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Sravni.Micro.Errors.ErrorModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Sravni.Micro.Errors.ErrorModel"}}}},"500":{"description":"Internal Server Error","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Sravni.Micro.Errors.ErrorModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Sravni.Micro.Errors.ErrorModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Sravni.Micro.Errors.ErrorModel"}}}}}}}},"components":{"schemas":{"Sravni.ApiGateway.Service.Agents.Models.Rko.AgentsRkoSaveQueryRequest":{"required":["bankName","email","fiasId","fullName","inn","legalEntity","orgName","phone","price","productId","productName","region","regionFull","stringBankId"],"type":"object","properties":{"stringBankId":{"minLength":1,"type":"string","description":"Строковый идентификатор банка"},"numericBankId":{"type":"integer","description":"Целочисленный идентификатор банка","format":"int32"},"phone":{"minLength":1,"type":"string","description":"Номер телефона клиента"},"email":{"minLength":1,"type":"string","description":"Электронная почта клиента"},"fullName":{"minLength":1,"type":"string","description":"ФИО клиента"},"region":{"minLength":1,"type":"string","description":"Город клиента"},"inn":{"minLength":1,"type":"string","description":"ИНН клиента"},"bankName":{"minLength":1,"type":"string","description":"Название банка"},"productId":{"minLength":1,"type":"string","description":"Идентификатор предложения"},"productName":{"minLength":1,"type":"string","description":"Название предложения"},"price":{"type":"integer","description":"Стоимость услуги","format":"int32"},"orgName":{"minLength":1,"type":"string","description":"Название организации, для которой оформляется РКО"},"legalEntity":{"$ref":"#/components/schemas/Sravni.ApiGateway.Service.Agents.Models.Rko.Enums.LegalEntityType"},"fiasId":{"minLength":1,"type":"string","description":"Id ФИАС"},"regionFull":{"minLength":1,"type":"string","description":"Название субъекта РФ"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Sravni.ApiGateway.Service.Agents.Models.Rko.DocumentDto"},"description":"Документы","nullable":true},"passport":{"$ref":"#/components/schemas/Sravni.ApiGateway.Service.Agents.Models.Rko.PassportDto"}},"additionalProperties":false,"description":"Модель запроса на сохранение заявки РКО"},"Sravni.ApiGateway.Service.Agents.Models.Rko.Enums.LegalEntityType":{"enum":["unknown","ooo","ip"],"type":"string"},"Sravni.ApiGateway.Service.Agents.Models.Rko.DocumentDto":{"required":["publicId"],"type":"object","properties":{"publicId":{"minLength":1,"type":"string"}},"additionalProperties":false},"Sravni.ApiGateway.Service.Agents.Models.Rko.PassportDto":{"type":"object","properties":{"fullName":{"type":"string","description":"ФИО","nullable":true},"number":{"type":"string","description":"Серия и номер","nullable":true},"unitCode":{"type":"string","description":"Код подразделения","nullable":true},"birthDate":{"type":"string","description":"Дата рождения","format":"date-time","nullable":true},"issueDate":{"type":"string","description":"Когда выдан","format":"date-time","nullable":true},"issuedBy":{"type":"string","description":"Кем выдан","nullable":true},"registrationRegion":{"type":"string","description":"Регион адреса регистрации","nullable":true}},"additionalProperties":false,"description":"Паспорт"},"Sravni.ApiGateway.Service.Agents.Models.Rko.SaveRkoQueryResponse":{"type":"object","properties":{"fpTitle":{"type":"string","nullable":true},"fpHtml":{"type":"string","nullable":true},"id":{"type":"integer","description":"ИД заявки","format":"int64"},"guid":{"type":"string","description":"Guid заявки","format":"uuid"}},"additionalProperties":false,"description":"Модель ответа АК на запрос сохранения заявки РКО"},"Sravni.Micro.Errors.ErrorModel":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/Sravni.Micro.Errors.Error"}},"additionalProperties":false},"Sravni.Micro.Errors.Error":{"type":"object","properties":{"code":{"type":"string","nullable":true},"target":{"type":"string","nullable":true},"message":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"attemptedValue":{"type":"string","nullable":true},"details":{"type":"array","items":{"$ref":"#/components/schemas/Sravni.Micro.Errors.Error"},"nullable":true}},"additionalProperties":false}}}}
```
