Creating the order using Shopify Order API for pick up at store option

Hi I am trying to create an order using shopiy order API and I want that order to be specific for pick up at store option and want the order to have these options

This is the order for pick up at store from shopify online store

But i am getting the order like this

I want your help with what changes we have to do in order to get the order look line the first picture

2 Likes

Hi Raviteja,

The important part to ensure that you’re getting the required order details when creating orders via the API is around constructing the correct request payload. The payload should include the necessary attributes like line items, customer details, and other relevant fields.

In the case you’ve described, for the order payload, set the fulfillment_status to ‘null’ or ‘unfulfilled’ to indicate that the order is for local pickup. Additionally, you can add a note to the order specifying the desired pickup time using the note_attributes field.

You’ll also want to add the product variant to the line items of the order. Each line item should have the variant_id and quantity properties. Then you can use the Shopify API to send a POST request to the /admin/api/2023-01/orders.json endpoint, providing the payload you constructed and you should see the order appearing with the additional info you’ve requested.

Hope this helps,

Hi @Liam ,

Thanks for the reply Liam. We have build a payload by referring your above response. However we can see the order is not created with pickup stuff.
Could you please share the sample payload , that will be great for us to move forward with this issue.
You can check the below payload that we are using to create an order on Shopify.
Payload:
{
“order”: {
“email”: “abc@gmail.com”,
“line_items”: [{
“variant_id”: 43965815586982,
“quantity”: 1
}],
“fulfillment_status”: “unfulfilled”,
“fulfillments”: [{
“location_id”: 65555005606
}],
“note_attributes”: [],
“customer”: {
“first_name”: “John”,
“last_name”: “Smith”,
“email”: “abc@gmail.com”,
“phone”: “9999999999”
},
“billing_address”: {
“first_name”: “John”,
“last_name”: “Smith”,
“address1”: “356 OLD STEESE HWY,FAIRBANKS”,
“phone”: “9999999999”,
“city”: “FAIRBANKS”,
“zip”: “99701”,
“province”: “AK”,
“country”: “FAIRBANKS NORTH STAR”
}
}
}

2 Likes

I’m also looking into this. @VaibhavWagh145 did you ever figure it out?

We are experiencing exactly the same issue, trying to do it through the GraphQL API

https://shopify.dev/docs/api/admin-graphql/2024-10/mutations/orderCreate

But getting different results than from the Checkout process, exactly as shown in @Raviteja Screenshots

What we try to achieve through Admin API

What we get - (BTW says it’d default to UNFULFILLED, does not seem that to me)