Product API

Product

Create Product

Description Create new Product
Endpoint {AnalyticsManagerDataManagerApiAddress}/odata/PostProducts
Method POST
Request Headers {AToken}
Body - FormData Key: Products
Value: [
    {
        "ProductSerial": "ProductA1234",
        "Name": "Product A",
        "Price": "13.00",
        "ProductBrandId": 101,
        "ProductCategoryId": "0B920541-5F2E-EC11-807E-00155DDF9604",
        "Description": "Description content for product A",
        "ProductBarcode": "1111100010101",
        "Unit": "gram", // indicate unit of measurement
        "DiscountedPrice": 10.99,
        "ProductPromotionHeader": "Good promotion",
        "UnitNumber": 10, // Number of physical units assigned to the price of the product. (eg. $10 per 100 g, Unit=100)
        "QRCodeLink": "https://product.qr.code.link.com"
    },
    {
        "ProductSerial": "ProductB1234",
        "Name": "Product B",
        "Price": "23.00",
        "ProductBrandId": 102,
        "ProductCategoryId": "7B84077E-0ABC-EA11-833B-D05099D42A29",
        "Description": "Description content for product B",
        "ProductBarcode": "2222200010101",
        "Unit": "pair", // indicate unit of measurement
        "DiscountedPrice": 19.99,
        "ProductPromotionHeader": "Good promotion",
        "UnitNumber": 1, // Number of physical units assigned to the price of the product. (eg. $10 per 100 g, Unit=100)
        "QRCodeLink": "https://product.qr.code.link.com"
    },
    {
        "ProductSerial": "ProductA1234",
        "Name": "Product C",
        "Price": "33.00",
        "ProductBrandId": 96,
        "ProductCategoryId": "0D920541-5F2E-EC11-807E-00155DDF9604",
        "Description": "Description content for product C",
        "ProductBarcode": "3333300010101",
        "Unit": "kg", // indicate unit of measurement
        "DiscountedPrice": 29.99,
        "ProductPromotionHeader": "Good promotion",
        "UnitNumber": 2, // Number of physical units assigned to the price of the product. (eg. $10 per 100 g, Unit=100)
        "QRCodeLink": "https://product.qr.code.link.com"
    }
]
Response {
    "value": [
        {
            "Id": "76ae9bf3-9a2e-ec11-807e-00155ddf9604",
            "ProductSerial": "ProductA1234",
            "Name": "Product A",
            "Price": 13.0,
            "CompanyId": 1,
            "ProductCategoryId": "0b920541-5f2e-ec11-807e-00155ddf9604",
            "Description": "Description content for product A",
            "ProductBrandId": 101,
            "ProductBarcode": "1111100010101",
            "Unit": "gram",
            "DiscountedPrice": 10.99,
            "ProductPromotionHeader": "Good promotion",
            "UnitNumber": 10.0,
            "QrcodeLink": "https://product.qr.code.link.com",
            "LastUpdateDateTime": null,
            "CreatedDateTime": "2021-10-16T16:05:50.6651175Z",
            "EslmiscJson": null,
            "EslactionLogId": null,
            "Company": null,
            "ProductBrand": null,
            "ProductCategory": null,
            "EslTags": [],
            "ProductCurrencyPrices": [],
            "ProductCustomPrices": [],
            "ProductDailySales": []
        },
        {
            "Id": "77ae9bf3-9a2e-ec11-807e-00155ddf9604",
            "ProductSerial": "ProductB1234",
            "Name": "Product B",
            "Price": 23.0,
            "CompanyId": 1,
            "ProductCategoryId": "7b84077e-0abc-ea11-833b-d05099d42a29",
            "Description": "Description content for product B",
            "ProductBrandId": 102,
            "ProductBarcode": "2222200010101",
            "Unit": "pair",
            "DiscountedPrice": 19.99,
            "ProductPromotionHeader": "Good promotion",
            "UnitNumber": 1.0,
            "QrcodeLink": "https://product.qr.code.link.com",
            "LastUpdateDateTime": null,
            "CreatedDateTime": "2021-10-16T16:05:50.6652001Z",
            "EslmiscJson": null,
            "EslactionLogId": null,
            "Company": null,
            "ProductBrand": null,
            "ProductCategory": null,
            "EslTags": [],
            "ProductCurrencyPrices": [],
            "ProductCustomPrices": [],
            "ProductDailySales": []
        },
        {
            "Id": "78ae9bf3-9a2e-ec11-807e-00155ddf9604",
            "ProductSerial": "ProductA1234",
            "Name": "Product C",
            "Price": 33.0,
            "CompanyId": 1,
            "ProductCategoryId": "0d920541-5f2e-ec11-807e-00155ddf9604",
            "Description": "Description content for product C",
            "ProductBrandId": 96,
            "ProductBarcode": "3333300010101",
            "Unit": "kg",
            "DiscountedPrice": 29.99,
            "ProductPromotionHeader": "Good promotion",
            "UnitNumber": 2.0,
            "QrcodeLink": "https://product.qr.code.link.com",
            "LastUpdateDateTime": null,
            "CreatedDateTime": "2021-10-16T16:05:50.6652005Z",
            "EslmiscJson": null,
            "EslactionLogId": null,
            "Company": null,
            "ProductBrand": null,
            "ProductCategory": null,
            "EslTags": [],
            "ProductCurrencyPrices": [],
            "ProductCustomPrices": [],
            "ProductDailySales": []
        }
    ],
    "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
- ProductBrandId is the Id you got when created Product Brand
- ProductCategoryId is the Id you got when you created Product Category

Read Product

Description Pull created product under the company account
Endpoint {AnalyticsManagerDataManagerApiAddress}/odata/GetProducts
Method GET
Request Headers {AToken}
Response {
    "value": [
        {
            "Id": "76ae9bf3-9a2e-ec11-807e-00155ddf9604",
            "ProductSerial": "ProductA1234",
            "Name": "Product A new name",
            "Price": 113.0,
            "CompanyId": 1,
            "ProductCategoryId": "0b920541-5f2e-ec11-807e-00155ddf9604",
            "Description": "Description content for product A",
            "ProductBrandId": 101,
            "ProductBarcode": "1111100010101",
            "Unit": "gram",
            "DiscountedPrice": 10.99,
            "ProductPromotionHeader": "Good promotion",
            "UnitNumber": 10.0,
            "QrcodeLink": "https://product.qr.code.link.com",
            "LastUpdateDateTime": "2021-10-16T16:12:44.187Z",
            "CreatedDateTime": "2021-10-16T16:05:50.667Z",
            "EslmiscJson": null,
            "EslactionLogId": null,
            "Company": null,
            "ProductBrand": null,
            "ProductCategory": null,
            "EslTags": [],
            "ProductCurrencyPrices": [],
            "ProductCustomPrices": [],
            "ProductDailySales": []
        },
        {
            "Id": "77ae9bf3-9a2e-ec11-807e-00155ddf9604",
            "ProductSerial": "ProductB1234",
            "Name": "Product B new name",
            "Price": 123.0,
            "CompanyId": 1,
            "ProductCategoryId": "7b84077e-0abc-ea11-833b-d05099d42a29",
            "Description": "Description content for product B",
            "ProductBrandId": 102,
            "ProductBarcode": "2222200010101",
            "Unit": "pair",
            "DiscountedPrice": 19.99,
            "ProductPromotionHeader": "Good promotion",
            "UnitNumber": 1.0,
            "QrcodeLink": "https://product.qr.code.link.com",
            "LastUpdateDateTime": "2021-10-16T16:12:44.213Z",
            "CreatedDateTime": "2021-10-16T16:05:50.667Z",
            "EslmiscJson": null,
            "EslactionLogId": null,
            "Company": null,
            "ProductBrand": null,
            "ProductCategory": null,
            "EslTags": [],
            "ProductCurrencyPrices": [],
            "ProductCustomPrices": [],
            "ProductDailySales": []
        }
    ],
    "count": 0
}

Update Product

Description Update existing product
Endpoint {AnalyticsManagerDataManagerApiAddress}/odata/UpdateProducts
Method PATCH
Request Headers {AToken}
Body - JSON [
    {
        "Id": "76ae9bf3-9a2e-ec11-807e-00155ddf9604",
        "ProductSerial": "ProductA1234",
        "Name": "Product A new name",
        "Price": 113.0
    },
    {
        "Id": "77ae9bf3-9a2e-ec11-807e-00155ddf9604",
        "ProductSerial": "ProductB1234",
        "Name": "Product B new name",
        "Price": 123.0
    },
    {
        "Id": "78ae9bf3-9a2e-ec11-807e-00155ddf9604",
        "ProductSerial": "ProductA1234",
        "Name": "Product C new name",
        "Price": 133.0,
        "Unit": "kg"
    }
]
Remark Mandatory field:
- Id

Delete Product

Description Delete existing product
Endpoint {AnalyticsManagerDataManagerApiAddress}/odata/DeleteProducts
Method DELETE
Request Headers {AToken}
Body - JSON [
    {
        "Id": "76ae9bf3-9a2e-ec11-807e-00155ddf9604"
    },
    {
        "Id": "77ae9bf3-9a2e-ec11-807e-00155ddf9604"
    },
    {
        "Id": "78ae9bf3-9a2e-ec11-807e-00155ddf9604"
    }
]
Remark Mandatory field:
- Id
Pages: 1 2 3 4
Updated on October 28, 2024