fulfillmentEventCreate Invalid ID

fulfillmentEventCreate Invalid ID

B-Bubbles
Tourist
8 0 1

Hey everyone,

I'm having some problems trying to create fulfillment events with the purpose of creating a delivery status for the order. 

I'm currently using GraphQL 2023-10 to create a fulfillment event but am experiencing the invalid id error. Here's what i've got:

 

mutation fulfillmentEvent{
  fulfillmentEventCreate(fulfillmentEvent: {fulfillmentId: "gid://shopify/fulfillmentOrderId/XXXXXXXX",status:ATTEMPTED_DELIVERY}){
    userErrors {
      field
      message
    }
}
}

Where the fulfillmentOrderId is cross referenced with the admin URL when fulfilling an order (In XXXXs):

https://admin.shopify.com/store/______/orders/_______/fulfillment_orders/XXXXXXX/fulfill?locationId=...

What can i do to provide the correct ID?

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 511

Hi @B-Bubbles,

The fulfillmentEventCreate mutation takes a fulfillmentId value in the inputs, which should use the global ID format gid://shopify/Fulfillment/XXXXXXXX

A fulfillmentOrder can have multiple fulfillments, and each fulfillment can have multiple events. 

 

Hope that 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