GraphQL API - mutation - productCreate

Solved
bhavin_iflair
Shopify Partner
3 1 0

Hello,

When i try to create product using GraphQL product API then in the ProductVariantInput's one of the input field with name * fulfillmentServiceId * we need to pass for fulfillment service of the variant, So any one can please suggest what we need to pass in this input field.

https://shopify.dev/api/admin/graphql/reference/products-and-collections/productvariantinput

Thank you in advance for your help.

0 Likes
iozyigit
Excursionist
17 1 2

This is an accepted solution.

this might be helpful.

https://shopify.dev/api/admin/rest/reference/shipping-and-fulfillment/fulfillmentservice

I think you should have "read_fulfillments" permission to get services 

this is rest endpoint: "yourstore.myshopify.com//admin/api/2021-04/fulfillment_services.json to get list. Later you can get desired ID and put in ProductVariantInput.

 

 

0 Likes
bhavin_iflair
Shopify Partner
3 1 0

This is an accepted solution.

Hello @iozyigit 

Yes, You are right we need to pass as per below.

fulfillmentServiceId: "gid://shopify/FulfillmentService/53834285194?id=true"

Here 53834285194 is my fulfillment Service Id which i have get using yourstore.myshopify.com//admin/api/2021-04/fulfillment_services.json REST endpoint.

Thanks again for your help.

 

0 Likes