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
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.
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â } } }