Hi Nguyen,
Your body is malformed.
I tried to create a Purchase order (in our demo env) using the Postman tool like this,
http://i.imgur.com/tv0fsgT.png
with the data being
{"supplier": "Asiatic Solutions", "po_details": [{ "doctype": "Purchase Order Item", "name": "New Purchase Order Item 1", "stock_uom": "Nos", "item_code": "Base Bearing Plate", "item_group": "Raw Material", "description": "1/4 in. x 6 in. x 6 in. Mild Steel Plate", "stock_qty": 1, "base_price_list_rate": 15, "brand": null, "barcode": null, "base_amount": 15, "expense_account": null, "projected_qty": null, "item_tax_rate": "{}", "rate": 15, "cost_center": "Main - WP", "qty": 1, "price_list_rate": 15, "pricing_rule": null, "discount_percentage": 0, "item_name": "Base Bearing Plate", "income_account": "Sales - WP", "min_order_qty": "", "amount": 15, "conversion_factor": 1, "batch_no": null, "warehouse": "Stores - WP", "supplier_part_no": null, "base_rate": 15, "uom": "Nos", "received_qty": 0, "billed_amt": 0, "schedule_date": "2014-08-23" }] }
Pretty printed:
{
"supplier": "Asiatic Solutions",
"po_details": [
{
"doctype": "Purchase Order Item",
"name": "New Purchase Order Item 1",
"stock_uom": "Nos",
"item_code": "Base Bearing Plate",
"item_group": "Raw Material",
"description": "1/4 in. x 6 in. x 6 in. Mild Steel Plate",
"stock_qty": 1,
"base_price_list_rate": 15,
"brand": null,
"barcode": null,
"base_amount": 15,
"expense_account": null,
"projected_qty": null,
"item_tax_rate": "{}",
"rate": 15,
"cost_center": "Main - WP",
"qty": 1,
"price_list_rate": 15,
"pricing_rule": null,
"discount_percentage": 0,
"item_name": "Base Bearing Plate",
"income_account": "Sales - WP",
"min_order_qty": "",
"amount": 15,
"conversion_factor": 1,
"batch_no": null,
"warehouse": "Stores - WP",
"supplier_part_no": null,
"base_rate": 15,
"uom": "Nos",
"received_qty": 0,
"billed_amt": 0,
"schedule_date": "2014-08-23"
}
]
}
It did work.
Will strengthen the API to give meaningful Validation errors