Questions and discussions about using the Shopify CLI and Shopify-built libraries.
I am trying to create a draft order through the api. I have created an app in App Development in Shopify admin, and got the admin API token.
I am now trying to send a http request with Filemaker's function Insert from URL, with following json to "https://[mystore].myshopify.com/admin/api/2024-04/draft_orders.json":
{
"line_items" :
[
{
"price" : "100.00",
"quantity" : 1,
"title" : "Custom Service"
}
]
}
The cURL is:
"-H " & Quote ( "Content-Type: application/json" ) & " " &
"-H " & Quote ( "X-Shopify-Access-Token: " & $apiToken ) & " " &
"-X POST " & Quote ( $apiEndpoint ) & " " &
"-d " & Quote ( $jsonData )
But I keep ketting "Bad request" as result. I would appreciate any ideas!
With kind regards,
- Johan.
Solved! Go to the solution
This is an accepted solution.
I figured this out - the curl was invalid.
This is an accepted solution.
I figured this out - the curl was invalid.