Solved

GraphQL API - mutation - productCreate

bhavin_iflair
Shopify Partner
7 1 2

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.

Accepted Solutions (2)

iozyigit
Shopify Partner
28 2 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.

 

 

https://www.linkedin.com/in/ismailozyigit/

View solution in original post

bhavin_iflair
Shopify Partner
7 1 2

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.

 

View solution in original post

Replies 2 (2)

iozyigit
Shopify Partner
28 2 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.

 

 

https://www.linkedin.com/in/ismailozyigit/
bhavin_iflair
Shopify Partner
7 1 2

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.