Product Sale Prices
Retrieve all sale prices for a given product
All existing sale prices for a product can be retrieved using GET /api/Product/{idOrCode}/SalePrice
.
Reference: GET /api/Product/{idOrCode}/SalePrice
Load a single sale price
An individual sale price and be retrieved by its id:
GET /api/Product/PROD_SAL_CODE/SalePrice/26c18ab0-691e-47d3-6773-08dbffbe216b
Reference: GET /api/Product/{productRef}/SalePrice/{priceId}
Creating a new sale price
This is the minimal example to create a cost centre:
POST /api/Product/{idOrCode}/SalePrice/
{
"QuantityFrom": 1,
"UnitPrice": 5.00
}
This creates a new product sale price against the selected sale product.
If not provided as part of the create request the following values will be defaulted:
- currency will default to the value set in the environment defaults.
- unitOfMeasureRef will default to the unit selected on the parent product.
- effectiveDate will default to todays date.
Complete example:
This is a complete example that contains all supported fields.
Note the codes might vary in your environment so be sure to consult the available reference catalogs in Iplicit or via the catalogs endpoints
The unitOfMeasureRef must be a valid reference to a unit of measure as part of the unit group set on the parent product.
POST /api/Product/{idOrCode}/SalePrice/
{
"currency": "GBP",
"unitPrice": 10.00,
"effectiveDate": "2025-01-01",
"quantityFrom": 1,
"quantityTo": 20,
"unitOfMeasureRef": "Units.EA",
"customerRef": "CUST1",
"projectRef": "PROJ1"
}
Reference: POST /api/Product/{idOrCode}/SalePrice/
Updating a sale price
The updating of a sale price is done by patching: only the specified fields will be updated.
Any section included in the patch will be completely replaced.
PATCH /api/Product/{idOrCode}/SalePrice/{id}
{
"effectiveDate": "2025-02-01"
}
Reference: PATCH /api/Product/{idOrCode}/SalePrice/{id}
Locking
Locking (soft deleting) a sale price:
POST /api/Product/{idOrCode}/SalePrice/{id}/lock
Locked sale prices have the isActive
field set to false
.
Reference: POST /api/Product/{idOrCode}/SalePrice/{id}/lock
Unlocking
Unlocking a sale price:
POST /api/Product/{idOrCode}/SalePrice/{id}/unlock
Reference: POST /api/Product/{idOrCode}/SalePrice/{id}/unlock
Deleting
Deleting a sale price completely removes it from the product:
DELETE /api/Product/{idOrCode}/SalePrice/{id}
A sale price does not need to be locked prior to deletion via the API.
Reference: DELETE /api/Product/{productRef}/SalePrice/{priceId}
Updated March 2024