server internal error

New Member
6 0 0

Hi

I have developed an API  in PHP to upload our orders from a system outside of Shopify to eventually fully migrate and start using Shopify 100% in the future. The API was creating orders successfully and when an error showed up, it was very specific. Example:

{errors:{billing_address:"Zip code is invalid"}} However, now every time I am trying to send a JSON API call, the server returns {errors:{"Server Internal Error"}}, does anyone know how to troubleshot it or what can cause this error?

 

Thanks

0 Likes
Shopify Staff
Shopify Staff
591 0 45

What kind of information are you sending to the server? Also I'm going to assume you're using cURL to make your request. If you could include a request ID that would be fabulous.

The header that we return is X-Request-Id and you can see how to inspect those headers from this post on stack overflow.

0 Likes
New Member
6 0 0

Hello

 

I was unable to retrieve the Header X-Request-id

 

this is an example of a .json  I sent via cURL using Shopify's API

 

{
    "order": {
        "line_items": [
            {
                "product_id": 335696821,
                "quantity": 3,
                "variant_id": 815690685,
                "title": "Patchnride Tool KIT",
                "sku": "1000",
                "price": "25.00"
            },
            {
                "quantity": 2,
                "variant_id": 815723441,
                "title": "Road Patch Pod",
                "sku": "1100",
                "price": "0"
            },
            {
                "quantity": 2,
                "variant_id": 891458493,
                "title": "Mountain",
                "sku": "1200",
                "price": "0"
            },
            {
                "quantity": 2,
                "variant_id": 891458997,
                "title": "Mountain Tubeless",
                "sku": "1300",
                "price": "0"
            },
            {
                "product_id": 348477713,
                "quantity": 6,
                "variant_id": 859892105,
                "title": "Leak Detector",
                "sku": "1500",
                "price": "0"
            }
        ],
        "billing_address": {
            "address1": "123 Some Street",
            "address2": "",
            "city": "Some City",
            "first_name": "John",
            "last_name": "Doe",
            "name": "John Doe",
            "phone": "0000000000",
            "province": "FL",
            "zip": "33009",
            "country": "United States",
            "country_code": "US"
        },
        "shipping_address": {
            "address1": "123 Some Street",
            "address2": "",
            "city": "Hollywood",
            "first_name": John",
            "last_name": "Doe",
            "name": "John Doe",
            "phone": "3052007290",
            "province": "FL",
            "zip": "33141",
            "country": "United States",
            "country_code": "US"
        },
        "buyer_accepts_marketing": true,
        "browser_ip": null,
        "customer": {
            "accepts_marketing": true,
            "created_at": "2014-08-10T21:00:36-04:00",
            "email": "email@domain.com",
            "first_name": "John",
            "id": 299033933,
            "last_name": "Doe",
            "last_order_id": 330269441,
            "multipass_identifier": null,
            "note": null,
            "orders_count": 1,
            "state": "disabled",
            "total_spent": "80.00",
            "updated_at": "2014-09-02T23:06:07-04:00",
            "verified_email": true,
            "tags": "",
            "last_order_name": "#0000",
            "default_address": {
                "address1": "Some Address",
                "address2": null,
                "city": "Hollywood",
                "company": null,
                "country": "United States",
                "first_name": "John",
                "id": 366134365,
                "last_name": "Doe",
                "phone": null,
                "province": "Florida",
                "zip": "99999",
                "name": "John Doe",
                "province_code": "FL",
                "country_code": "US",
                "country_name": "United States",
                "default": true
            }
        },
        "send_receipt": false,
        "email": "email@domain.com",
        "financial_status": "paid",
        "currency": "USD",
        "client_details": null,
        "processing_method": "manual",
        "shipping_lines": [
            {
                "code": "US Shipping",
                "price": "5.00",
                "source": null,
                "title": "US Shipping",
                "tax_lines": []
            }
        ],
        "transactions": {
            "amount": "80.00",
            "gateway": "bogus",
            "kind": "sale",
            "status": "success",
            "message": "Authorized",
            "created_at": "2014-09-21 17:57:38"
        },
        "note": "This is a test",
        "total_price": "80.00"
    }
}

I have errased some "Private Info" but I believe the "Internal Server Error" comes from the line_items section. 

 

Thanks

0 Likes
Highlighted
Shopify Staff
Shopify Staff
591 0 45

Including -v in your argument will include the full server response including the Request ID.

0 Likes
New Member
6 0 0

done, same result, it might be too much to ask, but can you please take a look at the syntax of my call? I think the reason of the error is due to the fact that I am trying to add different variands of the same product in the same order

{
                "quantity": 2,
                "variant_id": 815723441,
                "title": "Road Patch Pod",
                "sku": "1100",
                "price": "0"
            },
            {
                "quantity": 2,
                "variant_id": 891458493,
                "title": "Mountain",
                "sku": "1200",
                "price": "0"
            },
            {
                "quantity": 2,
                "variant_id": 891458997,
                "title": "Mountain Tubeless",
                "sku": "1300",
                "price": "0"
            },
            {

 

is this possible or I am doing something wrong?

Thanks

0 Likes
New Member
6 0 0

any news?

0 Likes
New Member
6 0 0

updates? anyone.. I really need help with this.

0 Likes
New Member
6 0 0

where is shopify support?

0 Likes