Add customer to company via API

ftballguy45
Shopify Partner
32 0 11

I cant find any way to add customers to existing companies via the GraphQL or REST APIs. Is this just missing functionality? We are migrating a client from another platform so we need to add all the companies and customers/accounts.

Replies 3 (3)

ShopifyDevSup
Shopify Staff
1432 234 488

Hey @ftballguy45,

We have a suite of objects, queries and mutations aimed at developers building B2B apps, that are available for Shopify Plus merchants - more info on B2B APIs here. This API is centred around the company, companyLocation, and companyContact objects. There is an excellent getting started guide in addition to documentation covering workflows for leveraging draft orders, managing catalogs, and more. 

Hope that helps point you in the right direction - Cheers! 

@awwdam | Shopify Developer Support

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

ftballguy45
Shopify Partner
32 0 11
Thank you. I've looked through the documentation hence my post here. I
don't see anything for adding a customer to a company
ShopifyDevSup
Shopify Staff
1432 234 488

Hey @ftballguy45,

Thanks for getting back. I had a quick look, the companyAssignCustomerContact mutation and companyContactCreate mutation are likely what you are looking for, the former specifically associates a customer and companyContact

Cheers! 
@awwdam | Shopify Developer Support

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