I get an "Internal Server Error" when I call create order API with order.customer field

sahragty
Shopify Partner
3 0 0

O.o.jpgO.o (1).jpg

 

{
    "order": {
        "requires_shipping": true,
        "financial_status": "paid",
        "tags": "influencer",
        "line_items": [
            {
                "quantity": 1,
                "variant_id": "41920275316899"
            }
        ],
        "billing_address": {
            "city": "00",
            "country": "00",
            "first_name": "omar",
            "last_name": "elsahragty",
            "zip": "00",
            "province": "00",
            "address1": "00"
        },
        "shipping_address": {
            "city": "00",
            "country": "00",
            "first_name": "omar",
            "last_name": "elsahragty",
            "zip": "00",
            "province": "00",
            "address1": "00"
        },
        "discount_codes": [
            {
                "code": "OMAR_1480",
                "amount": "100.0",
                "type": "percentage"
            }
        ],
        "customer": {
            "first_name": "omar",
            "last_name": "elsahragty"
        },
        "email": "email@pua.edu.eg"
    }
}

This error appeared since yesterday
Replies 4 (4)

sahragty
Shopify Partner
3 0 0
{
    "order": {
        "requires_shipping": true,
        "financial_status": "paid",
        "tags": "affable, influencer",
        "line_items": [
            {
                "quantity": 1,
                "variant_id": "41920275316899"
            }
        ],
        "billing_address": {
            "city": "00",
            "country": "00",
            "first_name": "omar",
            "last_name": "elsahragty",
            "zip": "00",
            "province": "00",
            "address1": "00"
        },
        "shipping_address": {
            "city": "00",
            "country": "00",
            "first_name": "omar",
            "last_name": "elsahragty",
            "zip": "00",
            "province": "00",
            "address1": "00"
        },
        "discount_codes": [
            {
                "code": "OMAR_1480",
                "amount": "100.0",
                "type": "percentage"
            }
        ],
        "customer": {
            "first_name": "omar",
            "last_name": "elsahragty"
        },
        "email": "email@pua.edu.eg"
    }
}

csam
Shopify Staff (Retired)
267 40 51

Hi @sahragty 

 

Would you be able to provide an x-request-id value from the headers in the response? We can have a look through the logs to see if we're able to find additional information. 

 

To learn more visit the Shopify Help Center or the Community Blog.

sahragty
Shopify Partner
3 0 0

X-Request-ID: d1d6b396-8049-4449-83bb-2237bdd4a9f9

csam
Shopify Staff (Retired)
267 40 51

Hi @sahragty 

 

Thanks for that - I was able to check our logs and found that your app does not have the correct permissions. You'll want to enable the write_customers scope in order to include customer information with orders. Hope this helps!

To learn more visit the Shopify Help Center or the Community Blog.