Навигационное меню

post Add Or Update Contractor

/Dictionaries/AddOrUpdateContractor

Создание или обновление контрагента

Request Body

{
    "RequestID": {
        "required": true,
        "type": "string",
        "description": "ИД запроса",
        "example": ""73344295-8f84-4cca-9f22-13f25b51041b""
    },
    "Ext_ID": {
        "required": true,
        "type": "string",
        "description": "ID внешней системы контрагента",
        "example": ""1""
    },
    "FullName": {
        "required": false,
        "type": "string",
        "description": "Полное название контрагента",
        "example": ""ИП Солнцева Людмила Васильевна""
    },
    "Name": {
        "required": true,
        "type": "string",
        "description": "Название контрагента",
        "example": ""ИП Солнцева Л.В.""
    },
    "INN": {
        "required": false,
        "type": "string",
        "description": "ИНН контрагента",
        "example": ""111111111111""
    },
    "KPP": {
        "required": false,
        "type": "string",
        "description": "КПП контрагента",
        "example": ""111111111""
    },
    "DiadocID": {
        "required": false,
        "type": "string",
        "description": "ID контрагента в Диадок",
        "example": """"
    },
    "Address": {
        "required": false,
        "type": "string",
        "description": "Адрес контрагента",
        "example": ""Москва""
    },
    "Contact": {
        "required": false,
        "type": "string",
        "description": "Контактное лицо контрагента",
        "example": ""Солнцева Л.В.""
    },
    "Phone": {
        "required": false,
        "type": "string",
        "description": "Номер телефона контрагента",
        "example": ""89999999999""
    },
    "Type": {
        "required": false,
        "type": "string",
        "description": "Тип контрагента:
- Юридическое лицо
- ИП
- Самозанятый
- Физическое лицо
- Государственный орган
- Обособленное подразделение
- Иностранное лицо
", "example": ""ИП"" }, "Bank": { "required": false, "type": "string", "description": "Название банка контрагента", "example": ""Лучший банк"" }, "Bik": { "required": false, "type": "string", "description": "БИК банка контрагента", "example": ""999999999"" }, "Bill": { "required": false, "type": "string", "description": "Расчетный счет", "example": ""2"" }, "LawAddress": { "required": false, "type": "string", "description": "Юридический адрес контрагента", "example": ""Город"" }, "Email": { "required": false, "type": "string", "description": "Адрес электронной почты контрагента", "example": ""solntseva@domain.ru"" }, "OGRN": { "required": false, "type": "string", "description": "ОГРН контрагента", "example": ""9191919191919"" }, "Director": { "required": false, "type": "string", "description": "Директор контрагента", "example": ""Солнцева Л.В."" }, "Manager": { "required": false, "type": "string", "description": "Менеджер", "example": ""name@domain.ru"" }, "Code": { "required": false, "type": "string", "description": "Код из внешней системы", "example": ""19"" }, "WorkKind": { "required": false, "type": "string", "description": "Вид деятельности контрагента", "example": ""торговля"" }, "URL": { "required": false, "type": "string", "description": "Сcылка на уставные документы", "example": ""https://vesna.ru/ustav.pdf"" }, "Comment": { "required": false, "type": "string", "description": "Комментарий", "example": ""главный контрагент"" }, "Organization": { "required": false, "type": "string", "description": "Комментарий", "example": ""главный контрагент"" } }

Example

{
    "RequestID": "73344295-8f84-4cca-9f22-13f25b51041b",
    "Ext_ID": "1",
    "FullName": "ИП Солнцева Людмила Васильевна",
    "Name": "ИП Солнцева Л.В.",
    "INN": "111111111111",
    "KPP": "111111111",
    "DiadocID": "",
    "Address": "Москва",
    "Contact": "Солнцева Л.В.",
    "Phone": "89999999999",
    "Type": "ИП",
    "Bank": "Лучший банк",
    "Bik": "999999999",
    "Bill": "",
    "Director": "Солнцева Л.В.",
    "Email": "solntseva@domain.ru",
    "LawAddress": "Город",
    "OGRN": "9191919191919",
    "Manager": "name@domain.ru",
    "Code": "19",
    "WorkKind": "торговля",
    "URL": "https://vesna.ru/ustav.pdf",
    "Comment": "главный контрагент",
    "Organization": {
        "Name": "ООО Ромашка",
        "INN": "7799555551",
        "KPP": "968601000",
        "Ext_ID": "45M45"
    }
}

Responses

Response 200: ОК - Контрагент создан

{
    "id": 310,
    "name": "ИП Солнцева Л.В.",
    "inn": "111111111111",
    "kpp": "111111111",
    "organizationId": 92,
    "organization": {
        "id": 92,
        "name": "ООО Ромашка",
        "inn": "7799555551",
        "kpp": "968601000",
        "ext_ID": "45M45",
        "clientId": 1,
        "client": null,
        "fullName": null,
        "lawAddress": null,
        "address": null,
        "bill": null,
        "bank": null,
        "bik": null,
        "phone": null,
        "email": null,
        "director": null,
        "ogrn": null
    },
    "ext_ID": "31",
    "buttonDTO": {
        "id": 310,
        "clientId": 0,
        "organizationId": 0,
        "userId": null,
        "itemId": "310"
    },
    "type": "ИП",
    "address": "ИП Солнцева Л.В.",
    "contact": "Солнцева Л.В.",
    "phone": "89999999999",
    "fullName": "ИП Солнцева Людмила Васильевна",
    "lawAddress": "Город",
    "bill": "",
    "bank": "Лучший банк",
    "bik": "999999999",
    "email": "solntseva@domain.ru",
    "director": "Солнцева Л.В.",
    "ogrn": "9191919191919",
    "manager": "name@domain.ru",
    "code": "19",
    "workKind": "торговля",
    "clientId": 1,
    "client": null,
    "url": "https://vesna.ru/ustav.pdf",
    "comment": "главный контрагент"
}

Response 400

No token received ( #err-30) - Токен не получен

Response 401

Could not find any client for this token ( #err-40) - Не найден клиент с данным токеном

EnDocs — единое информационное пространство для управления проектами, документами, задачами и сотрудниками