Development discussions around Shopify APIs
To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more
I'm trying to programmatically create orders for this dummy item here. Here's the curl I used:
curl -X POST 'https://key:secret@exe-test-store.myshopify.com/admin/api/2019-07/products.json' \ -H 'Content-Type: application/json' \ -d '{ "order": { "line_items": [ { "product_id": 1884330262574, "variant_id": 16960861732910, "quantity": 1 } ], "financial_status": "pending" } } '
Axios is having the same issues... It seems from the documentation you can just use a variant ID and not even a product ID but I'm still seeing the following error:
{"errors":{"product":"Required parameter missing or invalid"}}
I feel like I'm this close to cracking the case. In fact, I managed to programmatically add the order ONCE but not since then (I'm not sure if lack of customer prevented it from being created as a duplicate or what but I lost the working code.)
It feels like I'm not getting the IDs right - please refer to the item xml link.
Thank you much in advance 🙏
Solved! Go to the solution
This is an accepted solution.
One quick thing, I've noticed.
You want to create an order https://help.shopify.com/en/api/reference/orders/order#create-2019-07, but in your code it says you are using the products.json, but instead it should be the orders.json.
This is an accepted solution.
One quick thing, I've noticed.
You want to create an order https://help.shopify.com/en/api/reference/orders/order#create-2019-07, but in your code it says you are using the products.json, but instead it should be the orders.json.
User | RANK |
---|---|
5 | |
5 | |
4 | |
4 | |
4 |
Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022Shipping can be one of the most vital parts to set up and manage your business. Understand...
By Ollie Dec 16, 2022