We found in some stores that when creating a shopify order, the API will return an empty list or return an order list that has nothing to do with creating an order.
TOOLS: postman
API: /admin/api/2023-04/orders.json
HEADERS X-Request-ID: 458ede07-1e0c-45ff-a8c9-2eb153097395
request body:
{
“order”: {
“transactions”: [
{
“kind”: “sale”,
“status”: “success”,
“amount”: “16.35”
}
],
“tags”: “TikTok Shop”,
“financial_status”: “paid”,
“fulfillment_status”: “fulfilled”,
“note”: “”,
“inventory_behaviour”: “decrement_obeying_policy”,
“line_items”: [
{
“variant_id”: “129309972”,
“quantity”: 1
},
{
“variant_id”: “14006685827125”,
“quantity”: 2
}
],
“customer”: {
“first_name”: “Enrique”,
“last_name”: “Ruiz”,
“email”: “orders@plantgoodseed.com”
},
“shipping_address”: {
“first_name”: “Enrique”,
“last_name”: “Ruiz”,
“address1”: “3511 Slate Dr”,
“address2”: "Casa ",
“phone”: “(+1)7867541492”,
“city”: “Nashville”,
“province”: “Tennessee”,
“country”: “US”,
“zip”: “37216”
},
“gateway”: “Unknown at this time”,
“note_attributes”: [
{
“name”: “TTS order number”,
“value”: “576469535453647645”
},
{
“name”: “shipping option”,
“value”: “Standard Shipping”
},
{
“name”: “TTS Support Package Providers”,
“value”: “USPS,\nUPS,\nFedEx,\nLaserShip,\nOnTrac,\nDHL eCommerce,\nAmazon Logistics”
},
{
“name”: “Channel”,
“value”: “TikTok Shop”
}
],
“source_name”: “TTS”,
“source_identifier”: “576469535453647645”,
“discount_codes”: [
{
“code”: “Platform & Seller”,
“type”: “fixed_amount”,
“amount”: “0”
}
],
“shipping_lines”: [
{
“title”: “Standard Shipping”,
“price”: “0”
}
],
“tax_lines”: [
{
“price”: “1.38”
}
],
“total_tax”: “1.38”
}
}
response http status: 200
response body :
{
“orders”: [
{
“id”: 5340992995580,
}
]
}
or
{
“orders”:
}
In this example, the order with id 5340992995580 is always returned during the request. Please help to find out the reason, thank you.
