skip to Main Content

New to Shopify API here. I pass JSON data via POST to Shopify API. The order is successfully created, but the billing address (pasted below) is not being populated. When I try other addresses, it succeeds and shows up under “Billing Address” for the order. Is there any logging or API response messaging we can tap into to get some more info when an address isn’t populated?

I have no idea why the address validation is failing.

“billing_address”: {
“address_1”: “815 Stewart Drive”,
“city”: “Sunnyvale”,
“country”: “United States”,
“name”: “Planet Granite”
},

2

Answers


  1. When you POST a request to Shopify, you back a response. If you inspect the response, you will usually, but not always encounter an error message that can help you track down any problems. If you POST an order, and get back an ID, that is a pretty good indication of success. It would be most strange to get an ID, and yet have data you provided not be present. Anyway, check the response from Shopify for messages, that is a good start.

    Login or Signup to reply.
  2. As you mentioned it should be address1 instead of address_1.

    There wasn’t even an indication of such at the address validation
    level

    True that. Shopify doesn’t send any info. If a particular field is not necessary for creating an order, shopify will just ignore it. Not only in orders API but others as well.

    If you still want to check if created order had all details that you passed or not, you can compare the data that you sent with the data you get back from response.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search