Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space MOBUD and version 3

Status
colourGreen
title3.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.

Include Page
_Pricing Logic
_Pricing Logic

Panel
borderColorgrey
bgColorwhitesmoke

On this page:

Table of Contents
maxLevel2

Related pages:

Resource URL Summary

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

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.

Include Page
_Default HTTP Headers
_Default HTTP Headers

 


API Specifics

Panel

Retrieve the details of a specific Tier Pricing

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

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.

Panel

Retrieve the details of a specific Tier Pricing for a specific Product

URL

Panel

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.

Include Page
Price Formats
Price Formats

Panel

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

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

PUT /seiapi/v3/trans/TierPricing/${TierID}

HTTP Request

The request body contains a single Pricing Object

Include Page
_Pricing Formats
_Pricing Formats

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

Code Block
languagejs
{
	"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
Panel

Delete a specific Tier Pricing

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid
titleURLborderStylesolid

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

Code Block
languagejs
{
} 

PUT Request

Code Block
languagejs
{
   "900" : {
		"Price" : 19.99
   },
   "901" : {
		"Price" : 29.99

   },
   "902" : {
		"Price" : 39.99

   }
} 

Result

Code Block
languagejs
{
   "900" : {
		"Price" : 19.99

   },
   "901" : {
		"Price" : 29.99

   },
   "902" : {
		"Price" : 39.99

   }
} 

Example 2: Update Existing Tier Pricing

Initial Tier Pricing Object

Code Block
languagejs
{
   "900" : {
		"Price" : 19.99

   },
   "901" : {
		"Price" : 29.99

   },
   "902" : {
		"Price" : 39.99

   }
} 

PUT Request

Code Block
languagejs
{
   "900" : {
		"Price" : 9.99

   },
   "901" : {
		"Price" : 29.99,
		"Delete" : true
   }
} 

Result

Code Block
languagejs
{
   "900" : {
		"Price" : 9.99

   },
   "902" : {
		"Price" : 39.99

   }
}