Problems with Create Sales Order API

Problems with Create Sales Order API

I would do with some help here. 

Trying to use your API to create a Sales Order in Inventory. Below is the CURL post I am making:

    -d organization_id=XXXXX \
    -d authtoken=YYYYYYYYYY  \
    -d JSONString={

  "salesorder_number": "1",

  "date": "2015-05-28",

  "reference_number": "ONline Nos 001",

  "customer_id": "320401000000046596",

  "delivery_method": "FedEx",

  "shipping_charge": 7,

  "notes": "NotesAPI",

  "salesperson_name": "Online",

  "terms": "T&C Online",

  "line_items": [

    {

      "item_id": "320401000000051792",

      "name": "Diffusion Gel Kit",

      "rate": 99.95,

      "quantity": 2,

      "unit": "qty",

      "item_order": 0,

      "description": "test",

      "tax_id": 0,

      "discount": 0

    }

  ]

}


Some facts:

  1. I confirm that I am using the correct organization ID and auth token
  2. I confirm I am using the correct customer ID and item ID

Now, the problems:

  1. How do I get the customer ID from the interface? Only when I export contacts out do I get something called contact_id. Is this the same as customer ID? 
  2. How do I get the Item_id from the interface? Only when I export items do I get the item_ID. 
  3. I tried innumerable combinations, but every time I just get one generic error: 

{"code":4,"message":"Invalid value passed for JSONString"}

Which is not very helpful at all. What is wrong in the above call?