GraphQL "Company must exist" error when the company does exist.

Srennuse
Visitor
1 0 1

I am trying to place a draft order with a company as the purchasingEntity but I get the userErrors

"Company must exist" and "Contact must exist" when they both definitely do exist

 

If I query the company using the same gid it returns the company info so I'm not sure why this is returning "Company must exist".

 

purchasingEntity entry when trying to create a draft order:

"purchasingEntity": {
"purchasingCompany": {
"companyId": "gid://shopify/Company/123",
"companyLocationId": "gid://shopify/CompanyLocation/456",
"companyContactId": "gid://shopify/CompanyContact/789"
}

Reply 1 (1)
ShopifyDevSup
Shopify Staff
Shopify Staff
1202 190 420

Hey @Srennuse,

 

I tested this on my test store a few times and wasn't able to replicate the same results you are getting. It may be possible that the values you are using are off but I can't be sure without seeing them for myself. 

 

If you are a Shopify Partner, you can contact our Partner Support team by heading to the Support menu of the Partner Dashboard and connect with them directly. They can gather the necessary authenticated information that we require to investigate from there. 

 

Thanks and hope this helps! 

 

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