Статті витрат: методи API Bimp
Методи API Bimp для ресурсу «Статті витрат» (/org2/expenseItems/…): 2 методи. Базова адреса: https://app.bimpsoft.com. Усі запити, крім входу, передають токен компанії в заголовку access-token — див. Початок роботи з API.
| Метод | Що робить |
|---|---|
POST /org2/expenseItems/api-readList | A request to view a list of expense items |
POST /org2/expenseItems/api-create | A request to create an expense item |
api-readList
POST /org2/expenseItems/api-readList
A request to view a list of expense items
Відповідь: поле data
| Поле | Тип | Опис |
|---|---|---|
[].uuid | string (uuid) | |
[].name | string | |
[].expensesGroup | string | |
[].expensesGroupUuid | string (uuid) | Expense group uuid, used as expensesGroup in expenseItems/api-create |
[].activityType | string (uuid) | Activity type uuid, used as activityType in expenseItems/api-create |
curl -X POST 'https://app.bimpsoft.com/org2/expenseItems/api-readList' \
-H 'access-token: <токен компанії>'
api-create
POST /org2/expenseItems/api-create
A request to create an expense item
Тіло запиту (JSON)
| Поле | Тип | Обов’язкове | Опис |
|---|---|---|---|
name | string | так | Expense item name |
expensesGroup | string (uuid) | так | Expense group: the expensesGroupUuid value of the /expenseItems/api-readList request |
activityType | string (uuid) | Activity type: the activityType value of the /expenseItems/api-readList request. If omitted, the operating activity is set | |
parent | string (uuid) | Parent expense item (“Батьківська стаття витрат” in the form): the uuid of an expense item of the same expense group from the /expenseItems/api-readList request. If omitted, the item is a top-level one in its group | |
cashFlowItem | string | Cash flow statement item (shown as “Стаття РГК” in the form). If omitted, the expense item name is used | |
comment | string | An optional text field for any additional notes or comments related to the document |
Відповідь: поле data
| Поле | Тип | Опис |
|---|---|---|
uuid | string (uuid) | A unique uuid key of the created expense item |
curl -X POST 'https://app.bimpsoft.com/org2/expenseItems/api-create' \
-H 'access-token: <токен компанії>' \
-H 'Content-Type: application/json' \
-d '{"name":"string","expensesGroup":"00000000-0000-0000-0000-000000000000"}'
Інтерактивна документація з можливістю надіслати тестовий запит: https://app.bimpsoft.com/docs. Специфікація OpenAPI оновлюється разом із Bimp; ця сторінка згенерована з неї автоматично.