Discrepancy in the documentation and data which we're getting in actual

When I am hitting the API to get Data of an order. I am getting different key which is not in the documentation.

For reference inside shipping_information object it is included in the documentation

“shipping_information”: {
“company”: “string”,
“country_code”: “string”,
“first_name”: “string”,
“last_name”: “string”,
“line1”: “string”,
“line2”: “string”,
“locality”: “string”,
“middle_name”: “string”,
“phone”: “string”,
“region”: “string”,
“zip_code”: “string”,
“zip_four”: “string”
}

But when I have hit the API instead of line1 and line2 we’re getting street1, street2, zip. And also we’re not getting locality.

“shipping_information”: {
“id”: 16,
“first_name”: “”,
“middle_name”: null,
“last_name”: “”,
“company”: “”,
“phone”: “”,
“street1”: “”,
“street2”: “”,
“city”: “”,
“state”: “”,
“zip”: “”,
“country”: “”
}

Please resolve this issue.

Hi, @Automate_IO,

They’ve been progressively updating and adding to the REST api for some time so I can’t say I’m surprised that there is a difference between the docs and your results but it’s good you point it out.

@bradb, could you pass this on to whomever it would be appropriate for?

I will take a look. This is strange because we generate the docs from the code. Something must getting its wires crossed.

I found the reason. We have two different models labelled as Order. I will write up a ticket. Thanks for reporting @Automate_IO.

1 Like