# fulfillmentOrdersSetFulfillmentDeadline - admin-graphql - MUTATION Version: 2025-01 ## Description Sets the latest date and time by which the fulfillment orders need to be fulfilled. ### Access Scopes `write_merchant_managed_fulfillment_orders` access scope, `write_third_party_fulfillment_orders` access scope or `write_marketplace_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission. ## Arguments * [fulfillmentDeadline](/docs/api/admin-graphql/2025-01/scalars/DateTime): DateTime! - The new fulfillment deadline of the fulfillment orders. * [fulfillmentOrderIds](/docs/api/admin-graphql/2025-01/scalars/ID): ID! - The IDs of the fulfillment orders for which the deadline is being set. ## Returns * [success](/docs/api/admin-graphql/2025-01/scalars/Boolean): Boolean Whether the fulfillment deadline was successfully set. * [userErrors](/docs/api/admin-graphql/2025-01/objects/FulfillmentOrdersSetFulfillmentDeadlineUserError): FulfillmentOrdersSetFulfillmentDeadlineUserError! The list of errors that occurred from executing the mutation. ## Examples ### Sets deadline for fulfillment orders Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation fulfillmentOrdersSetFulfillmentDeadline($fulfillmentDeadline: DateTime!, $fulfillmentOrderIds: [ID!]!) { fulfillmentOrdersSetFulfillmentDeadline(fulfillmentDeadline: $fulfillmentDeadline, fulfillmentOrderIds: $fulfillmentOrderIds) { success userErrors { field message } } }\",\n \"variables\": {\n \"fulfillmentDeadline\": \"2024-11-25T18:44:04Z\",\n \"fulfillmentOrderIds\": [\n \"gid://shopify/FulfillmentOrder/234125762\",\n \"gid://shopify/FulfillmentOrder/564786110\"\n ]\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation fulfillmentOrdersSetFulfillmentDeadline($fulfillmentDeadline: DateTime!, $fulfillmentOrderIds: [ID!]!) {\n fulfillmentOrdersSetFulfillmentDeadline(fulfillmentDeadline: $fulfillmentDeadline, fulfillmentOrderIds: $fulfillmentOrderIds) {\n success\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"fulfillmentDeadline\": \"2024-11-25T18:44:04Z\",\n \"fulfillmentOrderIds\": [\n \"gid://shopify/FulfillmentOrder/234125762\",\n \"gid://shopify/FulfillmentOrder/564786110\"\n ]\n },\n },\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation fulfillmentOrdersSetFulfillmentDeadline($fulfillmentDeadline: DateTime!, $fulfillmentOrderIds: [ID!]!) {\n fulfillmentOrdersSetFulfillmentDeadline(fulfillmentDeadline: $fulfillmentDeadline, fulfillmentOrderIds: $fulfillmentOrderIds) {\n success\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"fulfillmentDeadline\": \"2024-11-25T18:44:04Z\",\n \"fulfillmentOrderIds\": [\"gid://shopify/FulfillmentOrder/234125762\", \"gid://shopify/FulfillmentOrder/564786110\"]\n}\n\nresponse = client.query(query: query, variables: variables)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation fulfillmentOrdersSetFulfillmentDeadline($fulfillmentDeadline: DateTime!, $fulfillmentOrderIds: [ID!]!) {\n fulfillmentOrdersSetFulfillmentDeadline(fulfillmentDeadline: $fulfillmentDeadline, fulfillmentOrderIds: $fulfillmentOrderIds) {\n success\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"fulfillmentDeadline\": \"2024-11-25T18:44:04Z\",\n \"fulfillmentOrderIds\": [\n \"gid://shopify/FulfillmentOrder/234125762\",\n \"gid://shopify/FulfillmentOrder/564786110\"\n ]\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation fulfillmentOrdersSetFulfillmentDeadline($fulfillmentDeadline: DateTime!, $fulfillmentOrderIds: [ID!]!) {\n fulfillmentOrdersSetFulfillmentDeadline(fulfillmentDeadline: $fulfillmentDeadline, fulfillmentOrderIds: $fulfillmentOrderIds) {\n success\n userErrors {\n field\n message\n }\n }\n}" #### Graphql Input { "fulfillmentDeadline": "2024-11-25T18:44:04Z", "fulfillmentOrderIds": [ "gid://shopify/FulfillmentOrder/234125762", "gid://shopify/FulfillmentOrder/564786110" ] } #### Graphql Response { "data": { "fulfillmentOrdersSetFulfillmentDeadline": { "success": true, "userErrors": [] } } }