Tier Pricing REST API
Resource URL Summary
Retrieve the details of a specific Tier Pricing
GET /seiapi/v3/trans/TierPricing/${TierID}
Retrieve the details of a specific Tier Pricing for a specific Product
GET /seiapi/v3/trans/TierPricing/${TierID}/Pricing/${ProductNum}
Insert or Update the details for a specific Tier Pricing
PUT /seiapi/v3/trans/TierPricing/${TierID}
Delete a specific Tier Pricing
DELETE /seiapi/v3/trans/TierPricing/${TierID}
API Specific Parameters
Parameter | Description |
---|---|
${ProductNum} | Identifies the product number. |
| Identifies the unique tier pricing object. |
HTTP Headers
This API uses the default ServiceMobility HTTP Headers.
API Specifics
Retrieve the details of a specific Tier Pricing
URL
GET /seiapi/v3/trans/TierPricing/${TierID}
HTTP Request Body
This request does not require a request body.
HTTP Response
On success the HTTP response code will be 200 and the response body will contain a valid Pricing Object.
If the tier does not have any pricing defined an HTTP response code of 404 (not found) will be returned.
Retrieve the details of a specific Tier Pricing for a specific Product
URL
GET /seiapi/v3/trans/TierPricing/${TierID}/Pricing/${ProductNum}
HTTP Request Body
This request does not require a request body.
HTTP Response
On success the HTTP response code will be 200 and the response body will contain a valid object with a price.
If the tier does not have any pricing defined an HTTP response code of 404 (not found) will be returned.
{ "Price" : 0.0 }
Insert or Update the details for a specific Tier Pricing
A PUT request is always an update, not a full replace. During a PUT request, new items will be added to the tier pricing which existing items in the PUT request will be updated with the new price. If a item, in the PUT request, has the Delete property set to true, then that item will be removed from the tier pricing.
URL
PUT /seiapi/v3/trans/TierPricing/${TierID}
HTTP Request
The request body contains a single Pricing Object.
HTTP Response
Response Codes
HTTP Code | Description |
---|---|
200 | Success. |
206 | There was an error with one or more products. Review the response body for a description of the returned error. The most common error reported is an invalid product number. |
404 | Pricing has not been setup for the specified tier |
406 | Review the response body for error specific. Common reasons for this error include:
|
Response Body
{ "success" : 0, "error" : 0, "messages" : [] }
Response Body Field | Description |
---|---|
success | Identifies the number of records that were successfully updated |
error | Identifies the number of records that had errors |
messages | Contains one message per error describing the reason for the error |
Delete a specific Tier Pricing
URL
DELETE /seiapi/v3/trans/TierPricing/${TierID}/Pricing
HTTP Request Body
This request does not require a request body.
HTTP Response
On success the HTTP response code will be 200.
If you try and delete tier pricing when there currently is not any setup then an HTTP response code of 404 (not found) will be returned.
Examples
The following examples assume the specified product numbers are valid and already exist in the main product catalog.
Example 1: Add new Tier Pricing
Initial Tier Pricing Object
{ }
PUT Request
{ "900" : { "Price" : 19.99 }, "901" : { "Price" : 29.99 }, "902" : { "Price" : 39.99 } }
Result
{ "900" : { "Price" : 19.99 }, "901" : { "Price" : 29.99 }, "902" : { "Price" : 39.99 } }
Example 2: Update Existing Tier Pricing
Initial Tier Pricing Object
{ "900" : { "Price" : 19.99 }, "901" : { "Price" : 29.99 }, "902" : { "Price" : 39.99 } }
PUT Request
{ "900" : { "Price" : 9.99 }, "901" : { "Price" : 29.99, "Delete" : true } }
Result
{ "900" : { "Price" : 9.99 }, "902" : { "Price" : 39.99 } }