Set "Ready for Pickup" via API

Highlighted
Shopify Partner
4 0 5

I would like to mark my order as "Ready for Pickup in Store".

 

Tried a Fulfillment Request like this:

POST admin/api/2020-07/orders/######/fulfillments.json
application/json={"fulfillment":{"status":"pending","location_id":######,"shipment_status":"ready_for_pickup","notify_customer":true}}

 

But it marked the whole order as "Picked Up".

 

What am I doing wrong?

 

 

5 Likes
Highlighted
New Member
2 0 1

I'm also wondering how this is done. Would love a response on this!

It looks like the FulfillmentEvent would be it but making a POST to the following:

POST /admin/api/2020-04/orders/#{order_id}/fulfillments/#{fulfillment_id}/events.json
{
  "event": {
    "status": "ready_for_pickup"
  }
}

Just throws a 404 error

1 Like
Highlighted
Tourist
4 0 2

Any luck fixing this? I'm running into the same issue.

0 Likes
Highlighted
New Member
2 0 0

I looked at what the GUI does, and it looks like this GraphQL Mutation operation is it: 

 

{"operationName":"PreparePickupSubmit","variables":{"input":[{"fulfillmentOrderId":"gid://shopify/FulfillmentOrder/2232798347416","lineItems":[{"lineItemId":"gid://shopify/LineItem/5530864287896","quantity":3}]}]},"query":"mutation PreparePickupSubmit($input: [PreparedPackageInput!]!) {\n  preparedPackageCreate(input: $input) {\n    preparedPackages {\n      id\n      __typename\n    }\n    userErrors {\n      message\n      __typename\n    }\n    __typename\n  }\n}\n"}

Doesn't look like this is in the API documentation though. Is this a new thing? 

0 Likes
Highlighted
Tourist
4 0 2

@mralbertchen 

I did the same thing but I'm not familiar with GraphQL. If it's possible with GraphQL I'd love the opportunity to learn and make it work. Have you made it work by mimicking the GQL mutation you saw?

I opened a ticket with Shopify support to get some answers. 

As far as I know, the local pickup features are new. 

0 Likes
Highlighted
Shopify Partner
4 0 5

Unfortunately, "fulfillmentOrderId":"gid://shopify/FulfillmentOrder/2232798347416" can not be obtained by using APIs.

The "/admin/api/2020-04/orders/{order_id}/fulfillment_orders.json" API comes back empty Before and After the order is marked as "Ready for Pickup".

 

0 Likes
Highlighted
Shopify Partner
4 0 5

Now that I have posted the URL, I discovered my app actually using "/admin/orders/{order_id}/fulfillment_orders.json" and apparently it was bound to an old API release that did not support Fulfillment Orders.

Anyway, starting form 2020-01 this should work and return something like this:

 

image.png

Still, there is not much can be done with this ID:

image.png

 

 

 

 

 

In regards to GraphQL the only documented mutations are these ones:

fulfillmentOrderAcceptCancellationRequest
fulfillmentOrderAcceptFulfillmentRequest
fulfillmentOrderCancel
fulfillmentOrderClose
fulfillmentOrderMove
fulfillmentOrderRejectCancellationRequest
fulfillmentOrderRejectFulfillmentRequest
fulfillmentOrderSubmitCancellationRequest
fulfillmentOrderSubmitFulfillmentRequest

None resemble the request from the Admin Screen.

0 Likes
Highlighted
Shopify Partner
4 0 5

To be more specific.

The following "application/graphql" request:
mutation ReadyToPick {
preparedPackageCreate (fulfillmentOrderId: "gid://shopify/FulfillmentOrder/1232813326380")
}

Comes back with the following "application/json" reply:
{
"errors": [
{
"message": "Field 'preparedPackageCreate' doesn't exist on type 'Mutation'",
"locations": [
{
"line": 5,
"column": 3
}
],
"path": [
"mutation ReadyToPick",
"preparedPackageCreate"
],
"extensions": {
"code": "undefinedField",
"typeName": "Mutation",
"fieldName": "preparedPackageCreate"
}
}
]
}

This is understandable because Admin Console uses "/admin/internal/web/graphql/core" instead of documented "/admin/api/2020-07/graphql.json" entry point.

0 Likes
Highlighted
New Member
2 0 0

Does anyone have any luck with this?

0 Likes