FROM CACHE - zh-cn_header
此社区已转向点对点支持。Shopify 支持团队将不再为此社区提供服务。我们建议您与其他商家和合作伙伴建立联系以获取帮助,并分享您的经验! 如发现有任何违反我们行为准则的行为或您希望删除的内容,欢迎继续举报。
Shopify 社区停机时间:Shopify 社区将于 12 月 5 日下午 3 点至下午 4 点(美国东部时间)停机 15 分钟。感谢您的理解。

When We Create order returns an empty list or an order not related to the created order?????????????

When We Create order returns an empty list or an order not related to the created order?????????????

ifan1
Shopify Partner
5 0 1

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.2.gif

 

 

 

 

 

 

 

 

 

 

 

1 条回复1

EDO3
访客
2 0 0

Hi Bro, Have you resolved the issue?