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
Buyer's Name | Purchasing Unit. Required if it is a warehouse release note
Possible values: <= 255 characters
Customer name
Possible values: <= 14 characters
Customer tax code. Required if it is a warehouse release note
Possible values: <= 255 characters
Customer address. Required if it is a warehouse release note
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
Customer email
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
]
Default value: UNKNOWN
The method used to pay the invoice
Possible values: [VND
, USD
]
Default value: VND
Payment currency
Exchange rate
Possible values: <= 255 characters
Economic Contract Number: Only applicable for warehouse release note sent to agents and is required
Possible values: <= 100 characters
Transporter's Full Name:Only applicable for warehouse release note. Required for warehouse release note sent to agents.
Possible values: <= 50 characters
Contract Number: Only applicable for warehouse release note
Possible values: <= 100 characters
Issuer's Full Name: Only applicable for warehouse release note
Possible values: <= 50 characters
Transportation Vehicle: Only applicable for warehouse release note. Required for internal warehouse release note
Possible values: <= 255 characters
Internal Transfer Order: Only applicable for internal warehouse release note
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