Different prices for different types of users


API documentation for updating/creating prices for different types of users

Table with field descriptions:

Field Type Required? Description
usertypeid int Yes Unique identifier of the user type for which the product price is set.

price| decimal| Yes| Product price for the specified user type.

https://admin.ecom.md/ru/admin/users/usertype/
groupproductid| string| Yes| A unique identifier of the product in the group for which prices are set.

1. Update/Create Prices

Method: POST
URL: {domain}/external/product/user-price-update/

Description:
Allows you to set or update prices for different types of users for certain products.

Query example:

POST {domain}/external/product/user-price-update/
Content-Type: application/json

Request body:

[
    {
        "user_type_id": 10,
        "price": 8888,
        "group_product_id": "349254"
    },
    {
        "user_type_id": 11,
        "price": 9999,
        "group_product_id": "349255"
    }
]

Notes:

  1. A query can contain multiple objects to update/create prices for different types of users or for different products.
  2. If a price already exists for a specific user type for the specified product, it will be updated.
  3. If the specified combination of user_type_id and group_product_id does not exist, it will be created.
  4. The group_product_id field must be a unique identifier for the product in the group and its format is checked before updating or creating a record.
  5. The user_type_id field must match an existing user type, and it is also validated during the request processing stage.

Was the article helpful?

Yes, thank you! Unfortunately no

article.helpfulQuestion