Product Category
Create Product Category
| Description | Create new Product Category |
| Endpoint | {AnalyticsManagerDataManagerApiAddress}/odata/PostProductCategories |
| Method | POST |
| Request Headers | {AToken} |
| Body - FormData | Key: ProductCategories Value: [ { "Name": "Category A" }, { "Name": "Category B" }, { "Name": "Category C" } ] |
| Response | { "value": [ { "Id": "3bcffb23-632e-ec11-807e-00155ddf9604", "Name": "Category A", "CompanyId": 1, "LastUpdateDateTime": null, "CreatedDateTime": "2021-10-16T09:26:29.0015004Z", "EslactionLogId": null, "Company": null, "Products": [] }, { "Id": "3ccffb23-632e-ec11-807e-00155ddf9604", "Name": "Category B", "CompanyId": 1, "LastUpdateDateTime": null, "CreatedDateTime": "2021-10-16T09:26:29.0016585Z", "EslactionLogId": null, "Company": null, "Products": [] }, { "Id": "3dcffb23-632e-ec11-807e-00155ddf9604", "Name": "Category C", "CompanyId": 1, "LastUpdateDateTime": null, "CreatedDateTime": "2021-10-16T09:26:29.0016593Z", "EslactionLogId": null, "Company": null, "Products": [] } ], "count": 0} |
| Remark | Please record down the "Id" value as you will need to use this as reference key for update / delete / linkage to other entity later |
Read Product Category
| Description | Pull created product category under the company account |
| Endpoint | {AnalyticsManagerDataManagerApiAddress}/odata/GetProductCategories |
| Method | GET |
| Request Headers | {AToken} |
| Response | { "value": [ { "Id": "0c920541-5f2e-ec11-807e-00155ddf9604", "Name": "Category C", "CompanyId": 1, "LastUpdateDateTime": "2021-10-16T11:51:35.403Z", "CreatedDateTime": "2021-10-16T08:58:33.77Z", "EslactionLogId": null, "Company": null, "Products": [] }, { "Id": "0d920541-5f2e-ec11-807e-00155ddf9604", "Name": "Category B", "CompanyId": 1, "LastUpdateDateTime": null, "CreatedDateTime": "2021-10-16T08:58:33.77Z", "EslactionLogId": null, "Company": null, "Products": [] }, { "Id": "0b920541-5f2e-ec11-807e-00155ddf9604", "Name": "Category A", "CompanyId": 1, "LastUpdateDateTime": null, "CreatedDateTime": "2021-10-16T08:58:33.763Z", "EslactionLogId": null, "Company": null, "Products": [] } ], "count": 0 } |
Update Product Category
| Description | Update existing product category |
| Endpoint | {AnalyticsManagerDataManagerApiAddress}/odata/UpdateProductCategories |
| Method | PATCH |
| Request Headers | {AToken} |
| Body - JSON | [ { "Id": "0c920541-5f2e-ec11-807e-00155ddf9604", "Name": "New Category C" }, { "Id": "0d920541-5f2e-ec11-807e-00155ddf9604", "Name": "New Category B" } ] |
| Remark | Mandatory field: - Id |
Delete Product Category
| Description | Delete existing product category |
| Endpoint | {AnalyticsManagerDataManagerApiAddress}/odata/DeleteProductCategories |
| Method | DELETE |
| Request Headers | {AToken} |
| Body - JSON | [ { "Id": "0c920541-5f2e-ec11-807e-00155ddf9604" }, { "Id": "0d920541-5f2e-ec11-807e-00155ddf9604" } ] |
| Remark | Mandatory field: - Id |