Product API

Product Category

Create Product Category

DescriptionCreate new Product Category
Endpoint{AnalyticsManagerDataManagerApiAddress}/odata/PostProductCategories
MethodPOST
Request Headers{AToken}
Body - FormDataKey: 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}
RemarkPlease 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

DescriptionPull created product category under the company account
Endpoint{AnalyticsManagerDataManagerApiAddress}/odata/GetProductCategories
MethodGET
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

DescriptionUpdate existing product category
Endpoint{AnalyticsManagerDataManagerApiAddress}/odata/UpdateProductCategories
MethodPATCH
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"
    }
]
RemarkMandatory field:
- Id

Delete Product Category

DescriptionDelete existing product category
Endpoint{AnalyticsManagerDataManagerApiAddress}/odata/DeleteProductCategories
MethodDELETE
Request Headers{AToken}
Body - JSON[
    {
        "Id": "0c920541-5f2e-ec11-807e-00155ddf9604"
    },
    {
        "Id": "0d920541-5f2e-ec11-807e-00155ddf9604"
    }
]
RemarkMandatory field:
- Id
Pages: 1 2 3 4
Updated on March 4, 2022