Guides

How to implement the "Prices" API

Prices

This API is intended to search for additional prices (such as wholesale) configured for a product.

This API can be used with two methods:

1β€’ Using the GET method to get the details of a specific product

curl --location 'https://catalog-api.omni.chat/v1/prices/{variantID}?integrationId={integrationID}' \
--header 'x-api-key: example' \
--header 'x-api-secret: r:example'

2β€’ Using the POST method to get batch details from a catalog

curl --location 'https://catalog-api.omni.chat/v1/prices' \
--header 'x-api-key: example' \
--header 'x-api-secret: r:example' \
--header 'Content-Type: application/json' \
--data '{
    "integrationId": "{integrationID}",
    "variantIds": ["1", "2", "3"]
}'

This will be the answer that must be obtained

[
    {
        "variantId": "1",
        "price": 175,
        "salePrice": null,
        "otherPrices": [
            {
                "minQuantity": 10,
                "price": 170,
                "type": "WHOLESALE"
            }
        ]
    },
    {
        "variantId": "2",
        "price": 149.7,
        "salePrice": null,
        "otherPrices": [
            {
                "minQuantity": 50,
                "price": 139.99,
                "type": "WHOLESALE"
            }
        ]
    },
    {
        "variantId": "3",
        "price": 149.7,
        "salePrice": null,
        "otherPrices": [
            {
                "minQuantity": 50,
                "price": 119.99,
                "type": "WHOLESALE"
            }
        ]
    }
]