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:
- A query can contain multiple objects to update/create prices for different types of users or for different products.
- If a price already exists for a specific user type for the specified product, it will be updated.
- If the specified combination of
user_type_idandgroup_product_iddoes not exist, it will be created. - The
group_product_idfield must be a unique identifier for the product in the group and its format is checked before updating or creating a record. - The
user_type_idfield 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