Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Current »

3.16.0

The Tier Pricing REST API is used to manage tier specific pricing. Tier pricing is used to override the default catalog pricing. Tier pricing is then associated with multiple like accounts. In order to calculate the base price of a product, the pricing engine first looks for an account specific price then a tier specific price and finally default catalog pricing. 

  • In order to conserve space, and reduce network bandwidth time/cost only those products who's price needs to be changed from the default catalog price should be added to the tier pricing.

Pricing Logic

When calculating the pricing:

  • If an account-specific price is found, that price will be used as the base price.
  • If no account-specific pricing exists, the API will then check for tier-specific pricing (if the account is associated with a pricing tier); if a tier-specific price is found, that price will be used as the base price.
  • If no tier-specific pricing exists, the API will then check for price list pricing (if the supplied service area has a price list).
  • If no price-list exists, the retail price will be used as the base price.

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

ParameterDescription
${ProductNum}Identifies the product number.

${TierID}

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.

JSON Format
{
	"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

JSON Format
{
    "{$ProdNum}" : {
        "Price" : 0.0,
		"Delete" : false
    }
}

HTTP Response 

Response Codes

HTTP CodeDescription
200Success.
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.

404Pricing has not been setup for the specified tier
406

Review the response body for error specific.

Common reasons for this error include:

  • Invalid Content-Type was specified
  • The provided body was not valid for the Content-Type specified

Response Body

{
	"success" : 0,
	"error" : 0,
	"messages" : []
}
Response Body FieldDescription
successIdentifies the number of records that were successfully updated
errorIdentifies the number of records that had errors
messagesContains one message per error describing the reason for the error

Delete a specific Tier Pricing

URL

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

   }
} 
  • No labels