This document is generated by Apidog. Apidog: All-in-one workspace for API design, document, debug, test, mock
This document is generated by Apidog. Apidog: All-in-one workspace for API design, document, debug, test, mock
Field | Type | Description |
---|---|---|
client_id | integer | ID of the client for this invoice |
store_id | integer | ID of the store for this invoice |
InvoiceItem | array | At least one invoice item is required |
Field | Type | Description |
---|---|---|
product_id | integer | ID of the product |
quantity | number | Quantity of the product |
unit_price | number | Price per unit |
Field | Type | Description | Default |
---|---|---|---|
currency_code | string | 3-digit currency code | Account default |
date | string | Invoice date (YYYY-MM-DD) | Current date |
draft | integer | Whether this is a draft (0/1) | 0 |
discount | number | Percentage discount | 0 |
discount_amount | number | Fixed amount discount | 0 |
notes | string | Invoice notes | null |
po_number | string | Purchase order number | null |
is_offline | boolean | Whether client is offline (0/1) | 0 |
Field | Type | Description | Default |
---|---|---|---|
discount | number | Item discount amount | 0 |
discount_type | integer | Discount type (1=Percentage, 2=Absolute) | 1 |
tax1 | integer | First tax ID | null |
tax2 | integer | Second tax ID | null |
col_3 | string | Custom column 3 content | null |
col_4 | string | Custom column 4 content | null |
col_5 | string | Custom column 5 content | null |
{
"Invoice": {
"client_id": 15,
"store_id": 1,
"currency_code": "USD",
"date": "2023-03-23",
"draft": 0,
"notes": "Invoice for March services",
"InvoiceItem": [
{
"product_id": 1,
"quantity": 2,
"unit_price": 100
},
{
"product_id": 3,
"quantity": 1,
"unit_price": 50,
"discount": 10,
"discount_type": 1
}
]
}
}
{
"code": 202,
"result": "successful",
"id": 124
}
curl --location -g --request POST '{{subdomain}}/api2/api2/invoices.json' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: text/plain' \
--data-raw '{
"Invoice": {
"client_id": 15,
"store_id": 1,
"currency_code": "USD",
"date": "2023-03-23",
"draft": 0,
"notes": "Invoice for March services",
"InvoiceItem": [
{
"product_id": 1,
"quantity": 2,
"unit_price": 100
},
{
"product_id": 3,
"quantity": 1,
"unit_price": 50,
"discount": 10,
"discount_type": 1
}
]
}
}'
{}