Start using the Web-Browser REST API
Before integrating our web-browser REST API, the Pricing API, read through the following information to help you get started:
The Pricing API does not require authentication.
The most relevant REST request header values for our Pricing API are the following:
||Format of the function call response that is desired.||
||Setting a value is required.|
||Contact's language preferences, in order of priority.||
In this example, the requested resource is a
json object and the preferred languages are Swiss French, French, English and German, respectively:
curl --request GET \ --url 'https://pricingapi.cleverbridge.com/prices?client_id=864&product_id=97772&internalproduct_id=¤cy=USD&country=US&coupon=BD3-1KK-UN3&price_rule=' \ --header 'accept: application/json' \ --header 'accept-language: fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5'
The following describes the status codes that result from successful and unsuccessful calls to our REST APIs.
All cleverbridge REST-based APIs use conventional HTTP response codes to indicate success or failure of an API call. In general:
- Codes in the 2xx range indicate that the function call was successful.
- Codes in the 4xx range indicate an error that resulted from an incorrectly specified request (for example, a required parameter was missing or the data type passed in a parameter was incorrect).
- Codes in the 5xx range indicate an error on the cleverbridge side.
|200||Successful completion of the call.|
|400||Bad Request (incomplete message, required fields missing, incorrectly formatted XML/JSON).|
|401||Unauthorized Request. Authentication with cleverbridge failed (ID/password problem). Not applicable to Pricing API.|
|402||Request failed: Invalid parameters.|
|404||Not Found: The other unique identifier (for example, the subscription ID) set and passed in the call is invalid or does not exist.|
|500||Request failed due to server error.|
Upon calling an API endpoint, check the HTTP header status code.
- If the status code is 200, then the call was successful (and the
ResultMessagefield in the response is blank).
- In case of a non-200 status code, the
ResultMessagecontains more information to assist in diagnosis and error handling. For example:
- With a 404 status code, the
ResultMessagecould contain “Item not found.”
- With a 400 status code, the
ResultMessagecould contain “Missing required field.”
In the following guide, you can find additional information about the Pricing API, including descriptions of how to implement particular use cases:
In the following reference documentation, you can find request and response examples, an API explorer, and parameter definitions for each of the backend REST APIs: