# Upload invoice for an order **POST /order/invoice/** Processes and uploads invoice data for a specific order using a base64-encoded PDF. ## Servers - production: https://m2e.cloud/api/v1/api (production) - dev: https://sales-channels.m2ecloud.dev/api/v1/api (dev) - local: https://10.0.30.15:56000/api/v1/api (local) ## Authentication methods - Jwt ## Parameters ### Body: application/json (object) - **order_id** (string) Unique identifier of the order within the store system. - **invoice_number** (string) Invoice number. - **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. - **transaction_id** (string | null) Identifier of the payment transaction, if available. - **invoice_data** (string) Base64-encoded string of the PDF invoice file. ## Responses ### 200 Invoice successfully processed #### Headers - **X-RateLimit-Limit** () The number of allowed requests in the current period. - **X-RateLimit-Remaining** () The number of remaining requests in the current period. - **X-RateLimit-Retry-After** () The date of number of remaining requests will reset. ### 400 Bad request #### Headers - **X-RateLimit-Limit** () The number of allowed requests in the current period. - **X-RateLimit-Remaining** () The number of remaining requests in the current period. - **X-RateLimit-Retry-After** () The date of number of remaining requests will reset. #### Body: application/json (array[object]) - **code** (string) An error code that identifies the type of error that occurred. - **message** (string) A message that describes the error condition in a human-readable form. - **data** (object | array) Additional information that can help the caller understand or fix the issue. ### 401 Unauthorized #### Body: application/json (array[object]) - **code** (string) An error code that identifies the type of error that occurred. - **message** (string) A message that describes the error condition in a human-readable form. - **data** (object | array) Additional information that can help the caller understand or fix the issue. ### 404 Not found #### Body: application/json (array[object]) - **code** (string) An error code that identifies the type of error that occurred. - **message** (string) A message that describes the error condition in a human-readable form. - **data** (object | array) Additional information that can help the caller understand or fix the issue. ### 429 Too many requests #### Headers - **X-RateLimit-Limit** () The number of allowed requests in the current period. - **X-RateLimit-Remaining** () The number of remaining requests in the current period. - **X-RateLimit-Retry-After** () The date of number of remaining requests will reset. #### Body: application/json (array[object]) - **code** (string) An error code that identifies the type of error that occurred. - **message** (string) A message that describes the error condition in a human-readable form. - **data** (object | array) Additional information that can help the caller understand or fix the issue. ### 500 Internal server error #### Body: application/json (array[object]) - **code** (string) An error code that identifies the type of error that occurred. - **message** (string) A message that describes the error condition in a human-readable form. - **data** (object | array) Additional information that can help the caller understand or fix the issue. [Powered by Bump.sh](https://bump.sh)