/api/lite/billing/documents

Запрос списка документов

/api/lite/billing/documents

Метод возвращает список документов. Можно использовать для получения списка или одного документа

Параметры

id - поиск по номеру документа

date_from - фильтр по дате документа, от (формат: 2020-02-19T12:35:31)

date_to - фильтр по дате документа, до (формат: 2020-02-19T12:35:31)

filter_types - фильтр по типу документа. можно перечислить через запятую

extended - true/false для отображение доп. данных

page - страница

size - размер страницы

Пример результата запроса

{

 "success": true,

 "recordsTotal": 14,

 "documents": [

 {

 "id": "222",

 "type": "BILL",

 "status": "PAID", // NEW, AWAITING_PAYMENT, PARTIALLY_PAID, EXPIRED

 "title": "Счет на аванс.",

 "date": "2021-06-03 15:17:42",

 "vatSum": 166.67,

 "totalSum": 1000.00,

 "balanceSum": 0.00,

 "items": [

 {

 "num": 1,

 "title": "Сумма аванса 40%",

 "description": null,

 "measure": null,

 "amount": 1.00,

 "price": 0.00,

 "totalSum": 1000.00

 }

 ],

 "relations": []

 },

 {

 "id": "333",

 "type": "BILL",

 "status": "PAID",

 "title": "Счет на доплату.",

 "date": "2021-06-03 15:17:42",

 "vatSum": 12574.33,

 "totalSum": 75446.00,

 "balanceSum": 0.00,

 "items": [

 {

 "num": 1,

 "title": "Крепеж бирки",

 "description": null,

 "measure": "ед. товара",

 "amount": 100.00,

 "price": 12.00,

 "totalSum": 1200.00

 },

 {

 "num": 2,

 "title": "Мелкоячеечное хранение",

 "description": null,

 "measure": "ячейка/сутки",

 "amount": 100.00,

 "price": 13.20,

 "totalSum": 1320.00

 },

 {

 "num": 3,

 "title": "Дополнительные работы по запросу Заказчика",

 "description": null,

 "measure": "час",

 "amount": 555.00,

 "price": 133.20,

 "totalSum": 73926.00

 },

 {

 "num": 4,

 "title": "Сумма переплаты",

 "description": null,

 "measure": null,

 "amount": 1.00,

 "price": 0.00,

 "totalSum": -1000.00

 }

 ],

 "relations": []

 },

 {

 "id": "1025",

 "type": "EXPENSE",

 "subType": "POSTPAID",

 "status": "AWAITING_PAYMENT",

 "title": "Списание",

 "description": "Оплата за услуги за апрель",

 "date": "2021-06-03 15:17:26",

 "deadline": "2021-06-17 01:00:00",

 "vatSum": 12574.33,

 "totalSum": 75446.00,

 "balanceSum": 0.00,

 "items": [

 {

 "num": 1,

 "title": "Крепеж бирки",

 "description": null,

 "measure": "ед. товара",

 "amount": 100.00,

 "price": 12.00,

 "totalSum": 1200.00

 },

 {

 "num": 2,

 "title": "Мелкоячеечное хранение",

 "description": null,

 "measure": "ячейка/сутки",

 "amount": 100.00,

 "price": 13.20,

 "totalSum": 1320.00

 },

 {

 "num": 3,

 "title": "Дополнительные работы по запросу Заказчика",

 "description": null,

 "measure": "час",

 "amount": 555.00,

 "price": 133.20,

 "totalSum": 73926.00

 },

 {

 "num": 4,

 "title": "Сумма переплаты",

 "description": null,

 "measure": null,

 "amount": 1.00,

 "price": 0.00,

 "totalSum": -1000.00

 }

 ],

 "relations": []

 },

 {

 "id": "1024",

 "type": "EXPENSE",

 "subType": "PREPAYMENT",

 "status": "AWAITING_PAYMENT",

 "title": "Списание",

 "description": "Аванс за апрель",

 "date": "2021-06-03 15:17:21",

 "deadline": "2021-06-17 01:00:00",

 "vatSum": 167.00,

 "totalSum": 1000.00,

 "balanceSum": 0.00,

 "items": [

 {

 "num": 1,

 "title": "Сумма аванса 40%",

 "description": null,

 "measure": null,

 "amount": 1.00,

 "price": 0.00,

 "totalSum": 1000.00

 }

 ],

 "relations": []

 },

 {

 "id": "111",

 "type": "REPORT",

 "title": "Акт выполненных работ за апрель 2021",

 "date": "2021-06-03 15:16:19",

 "vatSum": 12741.00,

 "totalSum": 76446.00,

 "balanceSum": 0.00,

 "items": [

 {

 "num": 1,

 "title": "Крепеж бирки",

 "description": null,

 "measure": "ед. товара",

 "amount": 100.00,

 "price": 12.00,

 "totalSum": 1200.00

 },

 {

 "num": 2,

 "title": "Мелкоячеечное хранение",

 "description": null,

 "measure": "ячейка/сутки",

 "amount": 100.00,

 "price": 13.20,

 "totalSum": 1320.00

 },

 {

 "num": 3,

 "title": "Дополнительные работы по запросу Заказчика",

 "description": null,

 "measure": "час",

 "amount": 555.00,

 "price": 133.20,

 "totalSum": 73926.00

 }

 ],

 "relations": []

 },

 {

 "id": "1023",

 "type": "EXPENSE",

 "subType": "POSTPAID",

 "status": "AWAITING_PAYMENT",

 "title": "Списание по акту выполненных работ",

 "date": "2021-06-03 14:54:03",

 "deadline": "2021-06-17 01:00:00",

 "vatSum": 12574.33,

 "totalSum": 75446.00,

 "balanceSum": 0.00,

 "items": [

 {

 "num": 1,

 "title": "Крепеж бирки",

 "description": null,

 "measure": "ед. товара",

 "amount": 100.00,

 "price": 12.00,

 "totalSum": 1200.00

 },

 {

 "num": 2,

 "title": "Мелкоячеечное хранение",

 "description": null,

 "measure": "ячейка/сутки",

 "amount": 100.00,

 "price": 13.20,

 "totalSum": 1320.00

 },

 {

 "num": 3,

 "title": "Дополнительные работы по запросу Заказчика",

 "description": null,

 "measure": "час",

 "amount": 555.00,

 "price": 133.20,

 "totalSum": 73926.00

 },

 {

 "num": 4,

 "title": "Сумма переплаты",

 "description": null,

 "measure": null,

 "amount": 1.00,

 "price": 0.00,

 "totalSum": -1000.00

 }

 ],

 "relations": []

 },

 {

 "id": "1022",

 "type": "EXPENSE",

 "subType": "PREPAYMENT",

 "status": "AWAITING_PAYMENT",

 "title": "Списание аванса.",

 "date": "2021-06-03 14:53:57",

 "deadline": "2021-06-17 01:00:00",

 "vatSum": 167.00,

 "totalSum": 1000.00,

 "balanceSum": 0.00,

 "items": [

 {

 "num": 1,

 "title": "Сумма аванса 40%",

 "description": null,

 "measure": null,

 "amount": 1.00,

 "price": 0.00,

 "totalSum": 1000.00

 }

 ],

 "relations": []

 },

 {

 "id": "22252",

 "type": "PAYMENT",

 "title": "Поступление",

 "date": "2021-06-03 10:20:00",

 "vatSum": 0.00,

 "totalSum": 76446.00,

 "balanceSum": 0.00,

 "relations": [

 {

 "id": "333",

 "type": "BILL",

 "title": "Счет на доплату.",

 "date": "2021-06-03 15:17:42",

 "relationSum": 75446.00

 },

 {

 "id": "222",

 "type": "BILL",

 "title": "Счет на аванс.",

 "date": "2021-06-03 15:17:42",

 "relationSum": 1000.00

 }

 ]

 },

 {

 "id": "1021",

 "type": "EXPENSE",

 "subType": "POSTPAID",

 "status": "AWAITING_PAYMENT",

 "title": "Списание по акту выполненных работ",

 "date": "2021-06-03 10:18:27",

 "deadline": "2021-06-17 01:00:00",

 "vatSum": 12741.00,

 "totalSum": 76446.00,

 "balanceSum": 0.00,

 "items": [

 {

 "num": 1,

 "title": "Крепеж бирки",

 "description": null,

 "measure": "ед. товара",

 "amount": 100.00,

 "price": 12.00,

 "totalSum": 1200.00

 },

 {

 "num": 2,

 "title": "Мелкоячеечное хранение",

 "description": null,

 "measure": "ячейка/сутки",

 "amount": 100.00,

 "price": 13.20,

 "totalSum": 1320.00

 },

 {

 "num": 3,

 "title": "Дополнительные работы по запросу Заказчика",

 "description": null,

 "measure": "час",

 "amount": 555.00,

 "price": 133.20,

 "totalSum": 73926.00

 }

 ],

 "relations": []

 },

 {

 "id": "33333",

 "type": "BILL",

 "status": "PAID",

 "title": "Счет \"Оплата по договору\"",

 "date": "2021-05-28 10:53:00",

 "vatSum": 12741.00,

 "totalSum": 76446.00,

 "balanceSum": 0.00,

 "items": [

 {

 "num": 1,

 "title": "Крепеж бирки",

 "description": null,

 "measure": "ед. товара",

 "amount": 100.00,

 "price": 10.00,

 "totalSum": 1200.00

 },

 {

 "num": 2,

 "title": "Мелкоячеечное хранение",

 "description": null,

 "measure": "ячейка/сутки",

 "amount": 100.00,

 "price": 11.00,

 "totalSum": 1320.00

 },

 {

 "num": 3,

 "title": "Дополнительные работы по запросу Заказчика",

 "description": null,

 "measure": "час",

 "amount": 555.00,

 "price": 111.00,

 "totalSum": 73926.00

 }

 ],

 "relations": []

 }

 ]

}