Skip to content

Address’s company line not showing in Orders API

I am using the REST API to sync orders down from Magento into our ERP. When retrieving an order’s details, I need the billing address’s Company value in order to make sure that the synced order is associated with the right account. Presently, despite having a company attached to the billing address, the API does not return billingAddress[company]. Even if I specifically request that using the fields parameter, nothing is returned. The Swagger UI page shows that it should be returned by the API, but alas it is not. What am I missing?

Here you can see that there is a value for the user’s Company field in the billing address. This value is also shown when editing the address from the admin panel.

A picture from the user's view showing the company field is filled in

But then when an order is retrieved from the API, there’s no Company field.

The response from the API where the Company value is not included

What am I missing?

Update:

Adding that when I use the REST API to get just that address, it does indeed show the company line there. It’s just missing from the Orders’ response.

The response from the server when getting the address by ID