Upload invoice for an order
Processes and uploads invoice data for a specific order using a base64-encoded PDF.
Body
Required
-
order_id
string Required Unique identifier of the order within the store system.
Maximum length is
300
. -
invoice_number
string Required Invoice number.
Maximum length is
100
. -
total_amount
number | null Total order amount including VAT, in the store's currency.
-
total_vat_amount
number | null VAT portion of the total amount.
-
shipping_id
string | null Identifier of the related shipping record, if available.
Maximum length is
100
. -
transaction_id
string | null Identifier of the payment transaction, if available.
Maximum length is
100
. -
invoice_data
string Required Base64-encoded string of the PDF invoice file.
POST
/order/invoice/
curl \
--request POST 'https://m2e.cloud/api/v1/api/order/invoice/' \
--header "access-token: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"order_id":"0002002","invoice_number":"113-00010001-0002002","total_amount":59.99,"total_vat_amount":9.99,"shipping_id":"113-00010001-0002002","transaction_id":"113-00010001-0002002","invoice_data":"string"}'
Request examples
{
"order_id": "0002002",
"invoice_number": "113-00010001-0002002",
"total_amount": 59.99,
"total_vat_amount": 9.99,
"shipping_id": "113-00010001-0002002",
"transaction_id": "113-00010001-0002002",
"invoice_data": "string"
}
Response examples (400)
[
{
"code": null,
"message": "All array items must match schema"
},
{
"code": null,
"message": "The required properties (currency) are missing"
}
]
Response examples (401)
[
{
"code": 401,
"message": "Unauthorized"
}
]
Response examples (404)
[
{
"code": 404,
"message": "Entity is not found."
}
]
Response examples (429)
[
{
"code": 429,
"message": "Too many requests."
}
]
Response examples (500)
[
{
"code": 500,
"message": "Internal server error."
}
]