Skip to content

Upload Invoice

POST
/fulfillment/202502/invoice/upload

Upload the invoice document. Note: Applicable only for local sellers in the Brazil market.

shop_cipher
required
string

Identifies the shop. Obtain it from the Get Authorized Shops API.

Media typeapplication/json
object
invoices

The list of invoices to upload. When invoices is provided, include 1 to 500 items.

Array<object>
object
package_id
required

The TikTok Shop package ID, retrieved from Search Package.

string
order_ids
required

The list of TikTok Shop order IDs, retrieved from Get Order List.

Array<string>
file_type
required

The invoice file format. Possible values:

  • XML
string
Allowed values: XML
file
required

Base64 encoding of the invoice file to upload. Max file size: 1MB

string
Example
{
"invoices": [
{
"package_id": "1231231231231",
"order_ids": [
"58747683456"
],
"file_type": "XML",
"file": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGL"
}
]
}

Success

Media typeapplication/json
object
code

Status code; 0 means success.

integer format: int64
message

Success or failure message.

string
request_id

Request log ID.

string
data
object
errors

Invoice-level upload errors. This list may be returned even when the top-level code is 0; each entry identifies the affected package and order IDs.

Array<object>
object
code

The error code.

integer format: int64
message

The error message.

string
detail

The details of the error.

object
package_id

The package ID where the error occurred.

string
order_ids

The order IDs where errors occurred.

Array<string>
Example
{
"code": 0,
"data": {
"errors": [
{
"code": 10007014,
"message": "The invoice already exists in the upload. Please try again later",
"detail": {
"package_id": "1231231231231",
"order_ids": [
"58747683456"
]
}
}
]
},
"message": "Success",
"request_id": "202203070749000101890810281E8C70B7"
}