Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all articles
Browse latest Browse all 25503

Aleksandar Jakovljevic commented on Create Order with the API

$
0
0

Hi there,

I created private app and I am trying to create simple order via the shopify API following the instructions found here:

http://docs.shopify.com/api/order#create

I am using the last example, and sending POST request to admin/orders.json with this in the body of the request:


{
  "order": {
    "line_items": [
      {
        "quantity": 1,
        "variant_id": 500775053
      }
    ]
  }
}

500775053 is a valid variant id.

The response I'm getting is:

{
    "errors": {
        "line_items": [
            "must have at least one line item"
        ]
    }
}

I don't understand what am I doing wrong? Is there some special parameter that I should pass along the request? Some special header?

Thank you for your help!

Regards,

Aleksandar


 


Viewing all articles
Browse latest Browse all 25503

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>