How to assign a PriceList to a Company (B2B) using GraphQL API.

surajit1
Shopify Partner
9 0 2

I have a created 1 company in Shopify B2B through GraphQL API, it is possible to create company with Price List?

I create company in Shopify Admin UI and add price list manually, but I want to add price list using GraphQL API.

I want to add or update price list in a new created company or existing company using API.

Replies 3 (3)

mjatwood
Visitor
3 0 0

I am having the same issue.  I do not see in the documentation where we can add a pricelist to an existing company.

 

This is important functionality as we have hundreds of companies we sell too and have pricing according to contracts we generate with them.  These contracts are created and expire at random times so having a way to automate this would be helpful.

 

Please advise.

mjatwood
Visitor
3 0 0

After some more digging, I was able to find where we can locate the price list on the company graphQL.

 

https://shopify.dev/api/admin-graphql/2022-10/objects/CompanyLocation

 

under CompanyLocation, find the "Market" object.  Within the "Market" object, you will find the price list.

 

Hope this helps!

surajit1
Shopify Partner
9 0 2

Hi,

 

I have tried the method, it is to get the pricelist. Though it is giving me null value even we have assign value in UI. We want to post the pricelist against a company. Kindly advise.

 

surajit1_1-1674022411513.pngsurajit1_2-1674022452523.png