Customer Portal Rates API
1. Introduction
The HORISEN Customer Portal Rates API endpoints are to be used by SMS Platform Owners's customers to get their price lists. The SMS Platform owner must set up an OAuth2 client type user to give access to the customer. Please contact HORISEN Support for further information.
This API belongs to the Bulk Price List domain. The subject domain of an endpoint URL is:
https://api{separator}{platform_domain}/bulk/pricelists
Note: A domain is presented with placeholders as https://api{separator}{platform_domain}
, where {separator}
can be a dot (.) or a hyphen (-). Please, replace it with your actual platform domain name.
The API uses the HORISEN implementation of the OAuth 2.0 protocol. For more information refer to the OAuth2 Authentication Guidelines page.
2. Methods Overview
Customers Portal endpoints.
3. Methods Details
Customers Portal endpoints.
Method Overview
The method returns a list of Price Lists that belong to the customer. The endpoint is used for API-to-API communication.
Authorization privilege needed for this endpoint: bulk-cust-pricelist-own.view.
URL Parameters
Name | Type | Description |
---|---|---|
page_size | integer (query) | Page size. Default value is 10. |
page_number | integer (query) | Page number. Default value is 1. |
paging | string (query) | Paging options. The format is: &paging=page_num,page_size. E.g. paging=1,10. |
Responses
Code | Description | Links |
---|---|---|
200 | A list of Owner Price Lists. | No links |
default | Unexpected Error. | No links |
Success Response 200: List of Owner Price Lists
{
"data": [
{
"id": 0,
"name": "string",
"currencyId": 0,
"currencyCode": "string"
}
],
"meta": {
"pagination": {
"total": 0,
"count": 0,
"per_page": 0,
"current_page": 0,
"total_pages": 0,
"links": {
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
}
}
Error Response Unexpected Error: Default
{
"code": "string",
"message": "string",
"description": "string",
"items": [
{
"name": "string",
"message": "string",
"description": "string",
"object": {}
}
]
}
Method Overview
The method returns rates for a price list on the specified date. The endpoint is used for API-to-API communication.
Authorization privilege needed for this endpoint: bulk-cust-pricelist-own.view.
If no date is provided, it will be set to the current date, and currently active range will be selected.
The date should be in 2006-01-02T15:04:05Z format.
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | string (path) | Price List ID to get range from. |
date | string (query) | Date to get price for, should be in format 2006-01-02T15:04:05Z. |
diff | string (query) | If diff=true, the difference in prices with the previous date will be added. Default value is false, and no difference in response. |
page_size | integer (query) | Page size. Default value is 10. |
page_number | integer (query) | Page number. Default value is 1. |
paging | string (query) | Paging options. The format is: &paging=page_num,page_size. E.g. paging=1,10. |
Responses
Code | Description | Links |
---|---|---|
200 | A Price List rates data. | No links |
default | Unexpected Error. | No links |
Success Response 200: Price List Rates Data
{
"data": [
{
"countryName": "string",
"operator": "string",
"continent": "string",
"mcc": "string",
"mnc": "string",
"operatorID": "string",
"price": {
"value": 0,
"currency": 0,
"currencyIso": "string"
},
"previousPrice": {
"value": 0,
"currency": 0,
"currencyIso": "string"
},
"difference": "string",
"differencePercentage": "string"
}
],
"meta": {
"pagination": {
"total": 0,
"count": 0,
"per_page": 0,
"current_page": 0,
"total_pages": 0,
"links": {
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
}
}
Error Response Unexpected Error: Default
{
"code": "string",
"message": "string",
"description": "string",
"items": [
{
"name": "string",
"message": "string",
"description": "string",
"object": {}
}
]
}
4. Data Models
Data Models define the structure of a JSON document.
4.1 Data
Data describe the data related to the Customer Portal Rates API.
PublicCustomerPriceListWOCollection object properties:
Name | Type | Description |
---|---|---|
data (required) | array | An array of PublicCustomerPriceListWO objects. |
meta (required) | object | CollectionMeta object. |
PublicCustomerPriceListWO object properties:
Name | Type | Description |
---|---|---|
id | integer | Customer price list ID. |
name | string | Customer price list name. |
currencyId | integer | Currency ID. |
currencyCode | string | Currency code. |
JSON example
{
"data": [
{
"id": 0,
"name": "string",
"currencyId": 0,
"currencyCode": "string"
}
],
"meta": {
"pagination": {
"total": 0,
"count": 0,
"per_page": 0,
"current_page": 0,
"total_pages": 0,
"links": {
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
}
}
CustomerRoutePriceListCollection object properties:
Name | Type | Description |
---|---|---|
data (required) | array | An array of CustomerRoutePriceListWO objects. |
meta (required) | object | CollectionMeta object. |
CustomerRoutePriceListWO object properties:
Name | Type | Description |
---|---|---|
countryName | string | Country name. |
operator | string | Operator name. |
continent | string | Name of a continent. |
mcc | string | Mobile country code. |
mnc | string | Mobile network code. |
operatorID | string | Operator ID. |
price | object | A price. PriceStruct object. |
previousPrice | object | The previous price. PriceStruct object. |
difference | string | Difference in prices. |
differencePercentage | string | Price difference in percentage. |
PriceStruct object properties:
Name | Type | Description |
---|---|---|
value | number($float) | Price value. |
currency | integer | Price currency. |
currencyIso | string | Currency ISO code. |
JSON example
{
"data": [
{
"countryName": "string",
"operator": "string",
"continent": "string",
"mcc": "string",
"mnc": "string",
"operatorID": "string",
"price": {
"value": 0,
"currency": 0,
"currencyIso": "string"
},
"previousPrice": {
"value": 0,
"currency": 0,
"currencyIso": "string"
},
"difference": "string",
"differencePercentage": "string"
}
],
"meta": {
"pagination": {
"total": 0,
"count": 0,
"per_page": 0,
"current_page": 0,
"total_pages": 0,
"links": {
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
}
}
Name | Type | Description |
---|---|---|
code (required) | string | Error code. |
message (required) | string | Error message. |
description | string | Error description. |
items | array | An array of ErrorItem objects. |
Name | Type | Description |
---|---|---|
name (required) | string | Error item name. |
message | string | Error item message. |
description | string | Error item description. |
object | object | Error item object. |
JSON Example
{
"code": "string",
"message": "string",
"description": "string",
"items": [
{
"name": "string",
"message": "string",
"description": "string",
"object": {}
}
]
}
4.2 Meta
Meta contains data for the number of rows and pages that have been received for a given API call.
CollectionMeta object properties:
Name | Type | Description |
---|---|---|
pagination (required) | object | CollectionMetaPagination object. |
CollectionMetaPagination object properties:
Name | Type | Description |
---|---|---|
total (required) | integer | Total number of rows. |
count (required) | integer | A number of rows in the current page. |
per_page (required) | integer | The maximum rows per page. |
current_page (required) | integer | The current page number. |
total_pages (required) | integer | Total number of pages. |
links (required) | object | CollectionMetaPaginationLinks object. |
CollectionMetaPaginationLinks object properties:
Name | Type | Description |
---|---|---|
first | string | Link to the first page. |
last | string | Link to the last page. |
prev | string | Link to the previous page. |
next | string | Link to the next page. |
JSON example
"meta": {
"pagination": {
"total": 0,
"count": 0,
"per_page": 0,
"current_page": 0,
"total_pages": 0,
"links": {
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
}