POST api/Setting/AddMaterial
Request Information
URI Parameters
None.
Body Parameters
Material| Name | Description | Type | Additional information |
|---|---|---|---|
| material_id | globally unique identifier |
None. |
|
| name | string |
None. |
|
| description | string |
None. |
|
| image_id | globally unique identifier |
None. |
|
| image | string |
None. |
|
| referenceType | integer |
None. |
|
| createBy | globally unique identifier |
None. |
|
| createDate | date |
None. |
|
| isActive | boolean |
None. |
|
| updateBy | globally unique identifier |
None. |
|
| updateDate | date |
None. |
|
| business_id | globally unique identifier |
None. |
|
| inventory | Collection of Inventory |
None. |
|
| compositions | Collection of MaterialComposition |
None. |
Request Formats
application/json, text/json
Sample:
{
"material_id": "78662b92-2531-4fd5-b21e-df953b2504b4",
"name": "sample string 2",
"description": "sample string 3",
"image_id": "13ff9fff-bd04-483d-8e6d-a77b6f935cdc",
"image": "sample string 5",
"referenceType": 6,
"createBy": "51e5a980-e74c-472e-a2a4-bd7930c1d276",
"createDate": "1788980266000",
"isActive": true,
"updateBy": "969fb2ab-30b3-4e7f-9835-7c867cfe1096",
"updateDate": "1788980266000",
"business_id": "0458ea42-7ebf-4921-b5d7-1d4e1d1c4155",
"inventory": [
{
"inventory_id": "efaf4583-c342-4380-b363-95199f10c5c0",
"reference_id": "e541749f-a906-46dd-a331-3fa58b7e698d",
"referenceType": 3,
"name": "sample string 4",
"qty": 5.1,
"unit_id": 6,
"unit": "sample string 7",
"in_out": 8,
"description": "sample string 9",
"createBy": "057877be-f54b-49b8-811d-a68df95eb123",
"createDate": "1788980266000",
"isActive": true,
"updateBy": "4b781d32-69cc-4cc6-8655-768f7cae8adf",
"updateDate": "1788980266000",
"business_id": "11dd21b5-a2ee-40fd-91d0-e6f2fd91d0a3",
"datetime": "1788980266000"
},
{
"inventory_id": "efaf4583-c342-4380-b363-95199f10c5c0",
"reference_id": "e541749f-a906-46dd-a331-3fa58b7e698d",
"referenceType": 3,
"name": "sample string 4",
"qty": 5.1,
"unit_id": 6,
"unit": "sample string 7",
"in_out": 8,
"description": "sample string 9",
"createBy": "057877be-f54b-49b8-811d-a68df95eb123",
"createDate": "1788980266000",
"isActive": true,
"updateBy": "4b781d32-69cc-4cc6-8655-768f7cae8adf",
"updateDate": "1788980266000",
"business_id": "11dd21b5-a2ee-40fd-91d0-e6f2fd91d0a3",
"datetime": "1788980266000"
}
],
"compositions": [
{
"id": "f9b189c8-c8b0-4876-804b-5f1703ab2f75",
"material_id": "c8636fca-9ccb-45e5-b117-55d683144269",
"composition_id": 3,
"efficiency": 4.1
},
{
"id": "f9b189c8-c8b0-4876-804b-5f1703ab2f75",
"material_id": "c8636fca-9ccb-45e5-b117-55d683144269",
"composition_id": 3,
"efficiency": 4.1
}
]
}
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Response| Name | Description | Type | Additional information |
|---|---|---|---|
| status | boolean |
None. |
|
| error | string |
None. |
|
| data | Object |
None. |
Response Formats
application/json, text/json
Sample:
Sample not available.