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

post Add Or Update Ext Doc — Outgoing Invoice Create

/Metadata/AddOrUpdateExtDoc(4)

Создание или обновление исходящего счета-фактуры

Request Body

{
    "Ext_ID": {
        "required": true,
        "type": "string",
        "description": "ID внешней системы документа",
        "example": ""33B33""
    },
    "DocDate": {
        "required": true,
        "type": "string",
        "description": "Дата документа",
        "example": ""14.09.2023""
    },
    "DocNumber": {
        "required": true,
        "type": "string",
        "description": "Номер документа",
        "example": ""1-2""
    },
    "DocTypeId": {
        "required": true,
        "type": "integer",
        "description": "Тип документа:
1 – Поступление
2 – Реализация
4-Договор
5-Счет-фактура исходящий
6-Счет исходящий
7-Банк
8-Авансовый отчет
9-Отчет
10-Акт сверки
11-Входящая корреспонденция
12-Исходящая корреспонденция
13-Прочее
14-Счет входящий
15-Счет-фактура входящий
16-Необработанные
19-Служебная записка
20-Складской документ
21-Кадровый документ
22-Технический документ
", "format": "int32", "example": "8" }, "Source": { "required": true, "type": "string", "description": "Источник:
• Входящий
• Исходящий
", "example": ""Исходящий"" }, "RequestID": { "required": true, "type": "string", "description": "ИД запроса", "example": ""170D68C9-6B68-4176-A9B5-09A90799B64F"" }, "Currency": { "required": false, "type": "string", "description": "Валюта в формате буквенном ISO 4217", "example": ""RUR"" }, "Operation": { "required": false, "type": "string", "description": "Тип операции (текстовое значение)", "example": ""Операция с бумагами"" }, "Version1CExchange": { "required": false, "type": "integer", "description": "Версия 1с конфигурации", "format": "int32", "example": "2000" }, "AmountWOVAT": { "required": false, "type": "integer", "description": "Сумма без НДС", "format": "int32", "example": "80000" }, "Amount": { "required": true, "type": "integer", "description": "Сумма с НДС", "format": "int32", "example": "100000" }, "VAT": { "required": false, "type": "integer", "description": "Сумма НДС", "format": "int32", "example": "20000" }, "Contractor": { "required": true, "type": "object", "description": "Контрагент, структура", "properties": { ""Ext_ID"": { "type": "string", "description": "ID внешней системы контрагента", "example": ""44M44"" }, ""INN"": { "type": "string", "description": "ИНН контрагента", "example": ""9686961876"" }, ""Name"": { "type": "string", "description": "Название контрагента", "example": ""ООО Орион"" }, ""KPP"": { "type": "string", "description": "КПП контрагента", "example": ""968601000"" } } }, "Organization": { "required": true, "type": "object", "description": "Организация, структура", "properties": { ""Ext_ID"": { "type": "string", "example": ""45M45"", "description": "ID внешней системы организации" }, ""name"": { "type": "string", "example": ""ООО Ромашка"", "description": "Название организации" }, ""inn"": { "type": "string", "example": ""7799555551"", "description": "ИНН организации" }, ""kpp"": { "type": "string", "example": ""968601000"", "description": "КПП организации" } } }, "Contract": { "required": false, "type": "object", "description": "Договор, структура", "properties": { ""Ext_ID"": { "type": "string", "description": "ID внешней системы договора", "example": ""B4EEEB4C-9DC4-43D6-BE45-B56D2C1FA40E"" } } }, "Signed": { "required": false, "type": "boolean", "description": "Подписан документ или нет", "example": "" }, "PaymentNumber": { "required": true, "type": "string", "description": "Номер платежного поручения", "example": ""3-3"" }, "PaymentDate": { "required": true, "type": "string", "description": "Дата платежа", "example": ""15.09.2023"" }, "Binaries": { "required": true, "type": "string", "description": "Дата платежа", "example": ""15.09.2023"" } }

Example

{
    "Ext_ID": "33B33",
    "DocDate": "15.09.2023",
    "DocNumber": "1-2",
    "DocTypeId": 14,
    "Source": "Входящий",
    "RequestID": "170D68C9-6B68-4176-A9B5-09A90799B64F",
    "Currency": "RUR",
    "Operation": "Операция с бумагами",
    "Version1CExchange": 2000,
    "AmountWOVAT": 80000,
    "Amount": 100000,
    "VAT": 20000,
    "Contractor": {
        "Ext_ID": "44M44",
        "INN": "9686961876",
        "Name": "ООО Орион",
        "KPP": "968601000"
    },
    "Organization": {
        "name": "ООО Ромашка",
        "inn": "7799555551",
        "kpp": "968601000",
        "Ext_ID": "45M45"
    },
    "Contract": {
        "Ext_ID": "6P6"
    },
    "Signed": true,
    "PaymentNumber": "3-3",
    "PaymentDate": "15.09.2023",
    "MetaID": 48,
    "Binaries": [
        {
            "FileName": "",
            "FileBase64": ""
        }
    ]
}

Responses

Response 201: Created - Счет-фактура исходящий создан и оплачен

{
    "contractName": null,
    "contractId": null,
    "string1": null,
    "string2": null,
    "string3": null,
    "string4": null,
    "string5": null,
    "string6": null,
    "string7": null,
    "string8": null,
    "datetime1": null,
    "datetime2": null,
    "datetime3": null,
    "datetime4": null,
    "int1": null,
    "int2": null,
    "int3": null,
    "int4": null,
    "bool1": null,
    "bool2": null,
    "bool3": null,
    "bool4": null,
    "idKey": "Metadata48",
    "fileExists": true,
    "id": 48,
    "docNumber": "1-2",
    "docDate": "2023-09-15T12:00:00Z",
    "created": "0001-01-01T12:00:00Z",
    "modified": "2020-06-02T04:29:22Z",
    "modifiedBy": "ivanov@domain.ru",
    "createdBy": "ivanov@domain.ru",
    "docTypeId": 14,
    "docType": {
        "id": 14,
        "name": "Счет входящий",
        "reestr": "InputBills",
        "reestrRu": "Счета входящие"
    },
    "docTypeReestr": "InputBills",
    "ext_ID": "33B33",
    "deleted": false,
    "deletedBy": null,
    "deleteDate": null,
    "state": null,
    "ediId": null,
    "ediState": null,
    "ediProvider": null,
    "ediProcessed": false,
    "ediIsIncoming": false,
    "ediLocalSigned": false,
    "ediNeedExport": false,
    "stageName": null,
    "amount": 100000,
    "amountWOVAT": 80000,
    "vat": 20000,
    "currency": "RUR",
    "comment": null,
    "createdByUser": null,
    "documentType": 1,
    "clientId": 1,
    "client": null,
    "docKindId": null,
    "docKind": null,
    "contractorId": 25,
    "contractor": {
        "id": 25,
        "name": "",
        "inn": "7799555550",
        "kpp": "779901001",
        "ext_ID": "254866e8-54c5-11ec-a293-c860006e479a",
        "organizationId": 6,
        "organization": null,
        "diadocID": null,
        "type": null,
        "address": null,
        "contact": null,
        "phone": null,
        "fullName": null,
        "lawAddress": null,
        "bill": null,
        "bank": null,
        "bik": null,
        "email": null,
        "director": null,
        "ogrn": null,
        "manager": null,
        "code": null,
        "workKind": null,
        "clientId": 1,
        "client": null,
        "url": null,
        "comment": null
    },
    "organizationId": 6,
    "organization": {
        "id": 6,
        "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
    },
    "projectId": null,
    "project": null,
    "departmentId": null,
    "department": null,
    "employeeId": null,
    "employeeName": null,
    "employee": null,
    "packageID": null,
    "cardData": null,
    "tablePart": null,
    "source": "Входящий",
    "amountToPay": null,
    "docNumTaxInvoice": null,
    "docDateTaxInvoice": null,
    "docNumInvoice": null,
    "docDateInvoice": null,
    "paymentDate": "2023-09-15T12:00:00Z",
    "paymentNumber": "3-3",
    "uploadedTo1C": false,
    "signed": true,
    "paid": false,
    "periodFrom": null,
    "periodTo": null,
    "reciever": null,
    "address": null,
    "delivery": null,
    "contact": null,
    "notifyUser": null,
    "operation": "Операция с бумагами",
    "counter": null,
    "type": "Операция с бумагами",
    "name": null,
    "validityPeriod": null,
    "subject": null,
    "binaries": null,
    "metaID": null,
    "requestID": null,
    "existingContractID": null,
    "nonFormID": null,
    "version1CExchange": 0
}

Response 400

Unable to add the entity - Невозможно добавить объект

Response 401

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

Response 500

Internal Server Error - Database Failure - Внутренняя ошибка сервера

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