Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Shopify Plus, using Rest API 04-2023 (we have also looked in unstable).
The "order" object returns a value for company.id. This is the Shopify ID for the company. We should be able to use that to obtain the company object from the API
We have entered all of our Companies to have the External ID, so we can pull this information into our ERP for B2B orders. Using Maxtrixify to test, we can export the External ID with their App, so we know it exists.
Where is the reference for the "company" object for Rest API? It shows here that it exists for GraphQL
https://shopify.dev/docs/api/admin-graphql/2023-04/objects/Company
I do not believe there is a rest endpoint for company (yet). You will probably have to do everything via graphql. At least thats what I did.
Cheers,
Gary
I have found a solution using REST API.
It is now possible to use the Shopify Flow app to write the External ID to Customer Notes. Then using Rest API, you can get the External ID from the "note" field in the API.
Any additional information on this solution - what were your steps to success?
Would it be possible to write the External ID to a metafield that would be accessible in the Order call?
Hi @stoneiam. Not all objects in GraphQL are available in the REST API. We would recommend using GraphQL if possible, but you might find some similar fields for Company in the Shop object in REST . https://shopify.dev/docs/api/admin-rest/2023-04/resources/shop
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog