Create invoice asynchronously
POST/v2/ob/invoices
Create invoice asynchronously and return tracking identifier to fetch processing status and result. Submitted request will be validated, added to queue and processed enventually.
Request
- application/json
Body
Array [
]
invoice_data
object
required
consumer
object
Customer information
Possible values: <= 255 characters
Customer code
Possible values: <= 255 characters
Customer name
Possible values: <= 14 characters
Customer tax code
Possible values: <= 255 characters
Customer address
Possible values: <= 12 characters
Customer citizen identification card
Possible values: <= 20 characters
Customer phone number
Possible values: <= 255 characters
Buyer's name
Possible values: <= 255 characters
Buyer's bank account information
Possible values: Value must match regular expression [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Invoice template Id
invoice_lines
object[]
required
Detail product information
Possible values: <= 255 characters
Product code
Possible values: <= 500 characters
Product name
Possible values: <= 255 characters
Unit of Product
Product price
Number of products purchased
Total tax payable
Possible values: [UNDECLARED
, NONE
, ZERO
, FIVE
, EIGHT
, TEN
]
Tax type: NONE | UNDECLARED | ZERO | FIVE | EIGHT | TEN
Amount = (price * quantity) - discount_amount
Discount money
Is promotional item
Default value: true
Is an invoice with a tax authority code
Possible values: [CASH
, BANK_TRANSFER
, UNKNOWN
]
The method used to pay the invoice: UNKNOWN | BANK_TRANSFER | CASH
submit_to_tax_request
object
Email of invoice recipients
Default value: true
Need to send mail for buyer
Default value: true
Automation submit to tax after create invoice
Responses
- 200
- 401
- 403
OK
- application/json
- Schema
- Example (from schema)
Schema
Possible values: Value must match regular expression [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Unique identifier of submitted request, is used for tracking processing status and fetch result of asynchronous processing
Possible values: [FAILED
, SUCCESS
, NEW
]
Submitted request processing status
{
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "FAILED"
}
Not Authorized
Not Allowed