Hello ,
How to insert or Update into child table using rest api
lets say we need to PUT into
http://0.0.0.0:8000/api/resource/Products/PRD0000001
where there child table called Categories_Products
the json when GET is
"data": {
"status": "Disable",
"products_Tags_Type_Tags": [ ],
"barcode": "1256479632145",
"modified_by": "Administrator",
"name": "PRD0000001",
"parent": null,
"title": "حليب المراعي 250 ملم شوكولاته",
"price": 5,
"creation": "2015-02-06 10:07:08.646843",
"modified": "2015-02-08 19:21:34.203954",
"doctype": "Products",
"idx": null,
"parenttype": null,
"catagory": [
{
"modified_by": "Administrator",
"name": "e1e4d5509b15516845f67b3e53932e6b7655204d40c1a63f0b9dbfa6",
"parent": "PRD0000001",
"creation": "2015-02-06 10:07:08.646843",
"modified": "2015-02-08 19:21:34.203954",
"doctype": "Categories_Products",
"idx": 1,
"parenttype": "Products",
"owner": "Administrator",
"docstatus": 0,
"categories": "CAT00001",
"parentfield": "catagory"
}
] ,
"descriptions": "حليب شوكلاته المراعي ",
"owner": "Administrator",
"docstatus": 0,
"image": "http://bo7.net/wp-content/uploads/2014/01/large__0047_UHT250ml-CB1-chocolate.jpg",
"parentfield": null
}
}