A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hello,
I am facing some issue with Shopify's API and their Admin interface for Pickup orders.
When I try to fulfill a "Pickup" order via API, it breaks Shopify's admin order interface.
In the Shopify admin interface, I go to the orders list page and then I tried to open one of the orders for pickup, it results in following error:
There’s a problem loading this page
There’s a technical problem with Shopify that has prevented this page from loading. Try reloading this page or going to another page in Shopify. If that doesn’t work, visit our status page for updates and try again later.
A bit more history about this problem:
I placed an order for "Pickup" on the frontend store and tried to fulfill it via API. I wish to mark the order as "ready for pickup" and then mark is as "picked up"
I am trying to use Admin REST APIs to do so. In order to mark the order as "Ready for Pickup", I created a new Fulfillment and corresponding FulfillmentEvent. Sample code used is shared below for reference. It is in C# using the ShopifySharp package. However, you will be able to understand the Admin API params being passed.
var fulfillmentService = new FulfillmentService("https://MYDOMAIN.myshopify.com/", Constants.APIKey); Fulfillment fulfillment = new Fulfillment(); fulfillment.Status = "open"; fulfillment.LocationId = Constants.LocationID; fulfillment.TrackingCompany = "Warehouse Pickup"; fulfillment.NotifyCustomer = true; var createdFulfillment = await fulfillmentService.CreateAsync(ShopifyOrderID, fulfillment); var fulfillmentEventService = new FulfillmentEventService("https://MYDOMAIN.myshopify.com/", Constants.APIKey); FulfillmentEvent fulfillmentEvent = new FulfillmentEvent() { Address1 = "Warehouse", City = "CITY", Country = "COUNTRY", CreatedAt = DateTime.Now, Message = "Order is ready for pickup", Province = "STATE", Zip = "POSTCODE", UpdatedAt = DateTime.Now, Status = "ready_for_pickup" }; var createdEvent = await fulfillmentEventService.CreateAsync(ShopifyOrderID, createdFulfillment.Id.Value, fulfillmentEvent);
In my opinion, the moment a fulfillment is created for a Pickup order, admin interface breaks. Regardless of the FulfillmentEvent.
It may be that I am calling the APIs with wrong parameters or calling the wrong APIs itself. In that case, can someone help me with the right set of API to use to mark order as "Ready for Pickup" and also for marking the order as "Picked Up". See snapshot below for understanding the two actions that I am looking for, but via Admin REST API.
This issue is specific to "Pickup" orders only (not for shipping orders).
I referred following two links but it also seems to be a dead-end.
https://community.shopify.com/c/Technical-Q-A/Set-quot-Ready-for-Pickup-quot-via-API/td-p/729831
https://community.shopify.com/c/Technical-Q-A/API-Endpoint-for-Setting-Order-to-ready-for-pickup/td-...
It has been more than 3 weeks since I lodged support ticket (18105494) with Shopify to help us on this. Performing weekly follow up with them. From retail support to technical support to escalation team to developers. The ticket has been moving around and around.
Today when I contacted support, they said they do not have dedicated team to help with API and that I should drop a topic here.
So can anybody with experience help me here.
I have a test shop, but it didn't have local pickup configured as an option. So didn't get a chance to dig into that. But I did try to issue a POST request to create a new fulfillment. I explicitly set the shipment_status to be ready_for_pickup, yet this isn't reflected in the order when I query it. The API response didn't indicate this either. The shipment_status just shows null. Below are the specifics.
POST https://{my_shop}.myshopify.com/admin/api/2020-04/orders/1896621375540/fulfillments.json HTTP/1.1 Content-Type: application/json Authorization: Basic {my_auth} User-Agent: PostmanRuntime/7.26.1 Accept: */* Host: {my_shop}.myshopify.com Accept-Encoding: gzip, deflate, br Connection: keep-alive Content-Length: 548 { "fulfillment": { "location_id": 203128, "tracking_number": "123456789", "tracking_numbers": ["123456789"], "service": "manual", "tracking_url": "https://shipping.xyz/track.php?num=123456789", "tracking_urls": ["https://shipping.xyz/track.php?num=123456789"], "tracking_company": "Jack Black's Pack, Stack and Track", "receipt": {}, "line_items": [{"id": 4202603839540, "quantity": 1, "variant_id": null, "fulfillment_service":"manual" }], "notify_customer": false, "shipment_status": "ready_for_pickup" } } HTTP/1.1 201 Created Date: Wed, 08 Jul 2020 17:13:17 GMT Content-Type: application/json; charset=utf-8 Connection: keep-alive Set-Cookie: __cfduid=d82518925e3dbf527b10e54d039743fe91594228396; expires=Fri, 07-Aug-20 17:13:16 GMT; path=/; domain=.myshopify.com; HttpOnly; SameSite=Lax X-Sorting-Hat-PodId: 161 X-Sorting-Hat-ShopId: 3036253 Referrer-Policy: origin-when-cross-origin X-Frame-Options: DENY X-ShopId: 3036253 X-ShardId: 161 X-Stats-UserId: X-Stats-ApiClientId: 309925 X-Stats-ApiPermissionId: 8304915 X-Shopify-API-Terms: By accessing or using the Shopify API you agree to the Shopify API License and Terms of Use at https://www.shopify.com/legal/api-terms HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT: 1/40 X-Shopify-Shop-Api-Call-Limit: 1/40 X-Shopify-API-Version: 2020-04 Location: /admin/orders/1896621375540/fulfillments/2433788608674 Strict-Transport-Security: max-age=7889238 X-Request-Id: c44ee24d-7558-41f3-9996-f40798f9325c X-Shopify-Stage: production Content-Security-Policy: default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src 'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn.net https://checkout.shopifycs.com https://js-agent.newrelic.com https://bam.nr-data.net https://api.stripe.com https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com https://widget.intercom.io https://js.intercomcdn.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri /csp-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Forders%2Ffulfillments&source%5Bsection%5D=admin_api&source%5Buuid%5D=c44ee24d-7558-41f3-9996-f40798f9325c X-Content-Type-Options: nosniff X-Download-Options: noopen X-Permitted-Cross-Domain-Policies: none X-XSS-Protection: 1; mode=block; report=/xss-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Forders%2Ffulfillments&source%5Bsection%5D=admin_api&source%5Buuid%5D=c44ee24d-7558-41f3-9996-f40798f9325c X-Dc: gcp-us-central1,gcp-us-central1 NEL: {"report_to":"network-errors","max_age":2592000,"failure_fraction":0.01,"success_fraction":0.0001} Report-To: {"group":"network-errors","max_age":2592000,"endpoints":[{"url":"https://monorail-edge.shopifycloud.com/v1/reports/nel/20190325/shopify"}]} CF-Cache-Status: DYNAMIC cf-request-id: 03d103e9fc000004002da1c200000001 Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" Server: cloudflare CF-RAY: 5afb6f566dfc0400-ORD alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400 Content-Length: 1975 { "fulfillment":{ "id":2433788608674, "order_id":1896621375540, "status":"success", "created_at":"2020-07-08T17:13:16Z", "service":"manual", "updated_at":"2020-07-08T17:13:16Z", "tracking_company":"Jack Black's Pack, Stack and Track", "shipment_status":null, "location_id":203128, "line_items":[ { "id":4202603839540, "variant_id":null, "title":"Shbcahkdbccbkajdbvjkdaspeicla", "quantity":1, "sku":null, "variant_title":"", "vendor":null, "fulfillment_service":"manual", "product_id":null, "requires_shipping":true, "taxable":true, "gift_card":false, "name":"Shbcahkdbccbkajdbvjkdaspeicla", "variant_inventory_management":null, "properties":[ ], "product_exists":false, "fulfillable_quantity":0, "grams":0, "price":"450.00", "total_discount":"0.00", "fulfillment_status":"fulfilled", "price_set":{ "shop_money":{ "amount":"450.00", "currency_code":"USD" }, "presentment_money":{ "amount":"450.00", "currency_code":"USD" } }, "total_discount_set":{ "shop_money":{ "amount":"0.00", "currency_code":"USD" }, "presentment_money":{ "amount":"0.00", "currency_code":"USD" } }, "discount_allocations":[ ], "duties":[ ], "admin_graphql_api_id":"gid:\/\/shopify\/LineItem\/4202603839540", "tax_lines":[ { "title":"OH State Tax", "price":"25.88", "rate":0.0575, "price_set":{ "shop_money":{ "amount":"25.88", "currency_code":"USD" }, "presentment_money":{ "amount":"25.88", "currency_code":"USD" } } }, { "title":"Franklin County Tax", "price":"7.88", "rate":0.0175, "price_set":{ "shop_money":{ "amount":"7.88", "currency_code":"USD" }, "presentment_money":{ "amount":"7.88", "currency_code":"USD" } } } ], "origin_location":{ "id":927969050686, "country_code":"US", "province_code":"OH", "name":"Sawmill", "address1":"6280 Sawmill Road", "address2":"", "city":"Dublin", "zip":"43017" } } ], "tracking_number":"123456789", "tracking_numbers":[ "123456789" ], "tracking_url":"https:\/\/shipping.xyz\/track.php?num=123456789", "tracking_urls":[ "https:\/\/shipping.xyz\/track.php?num=123456789" ], "receipt":{ }, "name":"#1304.1", "admin_graphql_api_id":"gid:\/\/shopify\/Fulfillment\/2433788608674" } }
Like I said, I don't have things configured in my test company, but I would think that the shipment_status would reflect what I specified in my POST request. Although perhaps this can't be programmatically changed via the API, in favor of just the admin UI perhaps?
Hello Greg,
Thank you for your response providing a test fulfillment example. I created two more pickup orders from frontend. I then tried to fulfill them via API calls from postman with different parameters and here are the results.
Test Call 1:
{ "fulfillment": { "location_id": 43505746053, "service": "manual", "tracking_company": "Warehouse Pickup", "receipt": {}, "notify_customer": true, "shipment_status": "ready_for_pickup" } }
When passed above parameters, in response the order status is "success" and shipment_status is null. The admin interface treats the order as "fulfilled" and shows status as "picked up" (which is not what I intend to do). I get email that your order is on the way (as if we were shipping it). This is totally wrong and confusing. However, at least Shopify's admin interface is working and not broken so far.
Test Call 2:
{ "fulfillment": { "location_id": 43505746053, "service": "manual", "tracking_company": "Warehouse Pickup", "notify_customer": true, "shipment_status": "ready_for_pickup", "status": "open" } }
When passed the above parameters, in response the order status is "open" and shipment_status is null. BUT, the admin interface breaks as mentioned in my original post.
So, we could conclude that if "status": "open" is passed when calling the fulfillment API on a "Pickup" order, it breaks their frontend admin interface too.
I feel like I am debugging the issue for Shopify developers. If there were some bugs bounty I might earn some bucks and help Shopify. But all this is not helping me.
Seems some serious trouble between Shopify's Pickup feature and API support.
Drives me crazy, such huge platform with so many customers and their support is such bad.
Greg, thanks for taking time to write though. I feel now I agree with your statement:
"Although perhaps this can't be programmatically changed via the API, in favor of just the admin UI perhaps? "
I will be redirecting this to Shopify support to see if then can confirm this. In which case, this might result in end of our relations with Shopify.
Good luck with getting to the bottom of this. When you do hopefully hear back from Shopify support, I would hope they would update their API documentation to steer the API consumer toward what is and what isn't allowed. Either an API request should be rejected due to being "invalid" or else it should be accepted and appear as expected in the admin UI. Having an apparently bad API request block the record from being pulled up in the admin UI is just wrong...lol.
We're also having issues implementing this. No hints on the docs and all things I've tried via API have the same results documented in the original post and subsequent answers.
Any news Shopify?
After 1.5 months waiting for a solution and weekly followup with their support team, I got the following reply:
"I am still collaborating with our developers on this one and we are investigating where the error had stemmed from. Just want to confirm again, are you still seeing this error?"
It sounds as if support wanted to check with us whether the issue was fixed automatically or not. I feel like their support is simply consuming time so the customer gets frustrated and either drops the ball or finds a workaround. As if they want us to live with whatever their platform has to offer, instead of fixing anything. God, what kind of support takes 1.5 months to investigate an issue. I guess their support is just name sake.
Took support 1.5 month to reply that feature is beta.
I was able to speak to a dev on the Local Pickup team today and they've noted that the error is being caused due to the fact that our pickup in store is a beta feature and the API is not yet public, any public docs with local pickup GraphQL are also not available publicly yet. This forum post may help a bit, but it is otherwise currently unsupported:https://community.shopify.com/c/Technical-Q-A/Set-quot-Ready-for-Pickup-quot-via-API/td-p/729831.
Here's further update from Shopify support:
I did confirm with our developers that this is not something that we could provide a permanent workaround or resolution for at this time, until the API has been made public.
When asked if there is a timeline or ETA for public release of API:
At this time we do not have a roadmap or an ETA of when this will be released to the public, however, when we do, we will very likely release this information in an email to our partners.
To summarize it is a DEAD-END with no resolution and no ETA for resolution.
Any updates from support about this?
We are facing the same issue.
Hello FederikC,
Like I mentioned it is a dead-end. There is no plan for them to release a REST API for this feature.
We ended up implementing workarounds to notify client to manually go to each order and mark them as ready for pickup / picked up.
Our store is also having this issue. We tried to implement this last year and got the same responses from Shopify as you. I cannot believe is has been a year and they have still not released this as public. Why release a feature like this but we have to do unnecessary manual work?
Have you had any updates since February or any solutions for this? We're tired of waiting on Shopify.
It was a dead-end from their support. They mentioned pickup as a beta feature. There is no plan for them to release a REST API for this feature.
So, we ended up implementing workarounds. Basically client now manually goes to each order and mark them as ready for pickup / picked up from admin UI.
You can put the order "ready for pickup" using:
$data = [
'message' => "La orden ingreso a nuestro sistema",
'shipment_status' => 'ready_for_pickup',
'status' => 'success',
'notify_customer' => true
];
try {
$shopify = \Intrasistema\V1\Shopify\Connect::connectByStoreId($orderData['shopify_store_id']);
return $shopify->Order($orderData['shopify_order_id'])->Fulfillment('yourid')->put($data);
} catch (\Exception $e) {
print_r($e);
return $e;
}
So have you tried to put an order to status "ready_for_pickup" in a real store or even at a dev store?
This just doesn't work. Shopify performs this action by using the graphql api and these requests are not publicly available yet.
Feel free to share the requests and the final result on shopify as these calls get a successful response by the api but nothing really changes in Shopify.
I have doing several test.
Finnaly, the conclusion: you can put 'fullfilled', and in some rare cases 'ready for pickup', but only on the creation of the fulfillment id (POST).
We have opted to do the nexts steps on our backend.
There's a solution now, and I already tried it and it works fine.
Kindly check this link https://community.shopify.com/c/shopify-apis-and-sdks/mark-order-as-quot-ready-for-pickup-quot-using...