Get SMS price list

GET https://sms.8x8.com/api/v1/accounts/:accountId/prices
  • Sending a GET request on this endpoint allows to get prices based on different criteria.

Request

Path Parameters

    accountId stringrequired

    Possible values: >= 32 characters and <= 36 characters, Value must match regular expression ^[0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}$

    You must replace {accountId} with the accountid that you want to use.

Query Parameters

    country string

    Possible values: >= 2 characters and <= 2 characters

    Country code. Should be 2-letter (ISO 3166-1 alpha-2) code.

    mcc integer

    Mobile country code. MCC should always come in pair with MNC parameter.

    mnc integer

    Mobile network code. MNC should always come in pair with MCC parameter.

    direction string

    Possible values: [outbound, inbound]

    Direction: outbound or inbound.

    subAccountId string

    Filter price list by subaccount id.

Price list response

Schema

    subAccounts object[]

  • Array [
  • subAccountIdstring

    Sub account identifier

    outbound object[]

    The list of outbound prices

  • Array [
  • countries object[]

  • Array [
  • alpha2Codestring

    2-letter country code (ISO 3166-1 alpha-2).

    countryNamestring

    Country name

    dialingPrefixstring

    Country dial-in prefix. See list here.

    operators object[]

    List of operators

  • Array [
  • operatorNamestring

    Operator name

    operatorIdinteger

    Unique operator identifier

    hni object[]

    The HNI (Home Network Identity) is a combination of MCC and MNC.

  • Array [
  • mccstring

    Mobile Country Code

    Example: 01
    mncstring

    Mobile Network Code

    Example: 525
  • ]
  • price object

    Price

    amountnumber

    Price amount

    Example: 0.01
    currencystring

    3-letter currency code (ISO 4217)

  • ]
  • ]
  • ]
  • inbound object[]

    The list of inbound prices

  • Array [
  • alpha2Codestring

    2-letter country code (ISO 3166-1 alpha-2).

    countryNamestring

    Country name

    dialingPrefixstring

    Country dial-in prefix. See list here.

    numberTypes object[]

    Virtual number list

  • Array [
  • typestring

    Virtual number type

    Possible values: [longcode, shortCodePremium, shortCodeP2P, shortCodeFTEU, tollfree]

    defaultPrice object

    Price

    amountnumber

    Price amount

    Example: 0.01
    currencystring

    3-letter currency code (ISO 4217)

  • ]
  • ]
  • ]
{
"subAccounts":[
{
"subAccountId":"string",
"outbound":[
{
"countries":[
{
"alpha2Code":"string",
"countryName":"string",
"dialingPrefix":"string",
"operators":[
{
"operatorName":"string",
"operatorId":0,
"hni":[
{
"mcc":"01",
"mnc":"525"
}
],
"price":{
"amount":0.01,
"currency":"string"
}
}
]
}
]
}
],
"inbound":[
{
"alpha2Code":"string",
"countryName":"string",
"dialingPrefix":"string",
"numberTypes":[
{
"type":"longcode",
"defaultPrice":{
"amount":0.01,
"currency":"string"
}
}
]
}
]
}
]
}

Schema

"{\n  \"subAccounts\": [\n    {\n      \"subAccountId\": \"example\",\n      \"outbound\": {\n        \"countries\": [\n          {\n            \"alpha2Code\": \"SG\",\n            \"countryName\": \"Singapore\",\n            \"dialingPrefix\": \"+65\",\n            \"operators\": [\n              {\n                \"operatorName\": \"SingTel\",\n                \"operatorId\": 525001,\n                \"hni\": [\n                  {\n                    \"mcc\": \"525\",\n                    \"mnc\": \"01\"\n                  },\n                  {\n                    \"mcc\": \"525\",\n                    \"mnc\": \"02\"\n                  },\n                  {\n                    \"mcc\": \"525\",\n                    \"mnc\": \"07\"\n                  }\n                ],\n                \"price\": {\n                  \"amount\": 0.0099171,\n                  \"currency\": \"SGD\"\n                }\n              },\n              {\n                \"operatorName\": \"MobileOne\",\n                \"operatorId\": 525003,\n                \"hni\": [\n                  {\n                    \"mcc\": \"525\",\n                    \"mnc\": \"03\"\n                  }\n                ],\n                \"price\": {\n                  \"amount\": 0.0099171,\n                  \"currency\": \"SGD\"\n                }\n              },\n              {\n                \"operatorName\": \"Starhub\",\n                \"operatorId\": 525005,\n                \"hni\": [\n                  {\n                    \"mcc\": \"525\",\n                    \"mnc\": \"05\"\n                  },\n                  {\n                    \"mcc\": \"525\",\n                    \"mnc\": \"06\"\n                  }\n                ],\n                \"price\": {\n                  \"amount\": 0.0099171,\n                  \"currency\": \"SGD\"\n                }\n              }\n            ]\n          }\n        ]\n      },\n      \"inbound\": {\n        \"countries\": [\n          {\n            \"alpha2Code\": \"SG\",\n            \"countryName\": \"Singapore\",\n            \"dialingPrefix\": \"+65\",\n            \"numberTypes\": [\n              {\n                \"type\": \"tollFree\",\n                \"defaultPrice\": {\n                  \"amount\": 0.01,\n                  \"currency\": \"SGD\"\n                }\n              },\n              {\n                \"type\": \"shortCodeP2P\",\n                \"defaultPrice\": {\n                  \"amount\": 0.123,\n                  \"currency\": \"SGD\"\n                }\n              }\n            ]\n          }\n        ]\n      }\n    }\n  ]\n}"
{
"subAccounts": [
{
"subAccountId": "example",
"outbound": {
"countries": [
{
"alpha2Code": "SG",
"countryName": "Singapore",
"dialingPrefix": "+65",
"operators": [
{
"operatorName": "SingTel",
"operatorId": 525001,
"hni": [
{
"mcc": "525",
"mnc": "01"
},
{
"mcc": "525",
"mnc": "02"
},
{
"mcc": "525",
"mnc": "07"
}
],
"price": {
"amount": 0.0099171,
"currency": "SGD"
}
},
{
"operatorName": "MobileOne",
"operatorId": 525003,
"hni": [
{
"mcc": "525",
"mnc": "03"
}
],
"price": {
"amount": 0.0099171,
"currency": "SGD"
}
},
{
"operatorName": "Starhub",
"operatorId": 525005,
"hni": [
{
"mcc": "525",
"mnc": "05"
},
{
"mcc": "525",
"mnc": "06"
}
],
"price": {
"amount": 0.0099171,
"currency": "SGD"
}
}
]
}
]
},
"inbound": {
"countries": [
{
"alpha2Code": "SG",
"countryName": "Singapore",
"dialingPrefix": "+65",
"numberTypes": [
{
"type": "tollFree",
"defaultPrice": {
"amount": 0.01,
"currency": "SGD"
}
},
{
"type": "shortCodeP2P",
"defaultPrice": {
"amount": 0.123,
"currency": "SGD"
}
}
]
}
]
}
}
]
}

Schema

"{\n    \"subAccounts\": [\n        {\n            \"subAccountId\": \"example\",\n            \"outbound\": {\n                \"countries\": [\n                    {\n                        \"alpha2Code\": \"SG\",\n                        \"countryName\": \"Singapore\",\n                        \"dialingPrefix\": \"+65\",\n                        \"operators\": [\n                            {\n                                \"operatorName\": \"SingTel\",\n                                \"operatorId\": 525001,\n                                \"hni\": [\n                                    {\n                                        \"mcc\": \"525\",\n                                        \"mnc\": \"01\"\n                                    },\n                                    {\n                                        \"mcc\": \"525\",\n                                        \"mnc\": \"02\"\n                                    },\n                                    {\n                                        \"mcc\": \"525\",\n                                        \"mnc\": \"07\"\n                                    }\n                                ],\n                                \"price\": {\n                                    \"amount\": 0.0520648,\n                                    \"currency\": \"SGD\"\n                                }\n                            },\n                            {\n                                \"operatorName\": \"MobileOne\",\n                                \"operatorId\": 525003,\n                                \"hni\": [\n                                    {\n                                        \"mcc\": \"525\",\n                                        \"mnc\": \"03\"\n                                    }\n                                ],\n                                \"price\": {\n                                    \"amount\": 0.0421477,\n                                    \"currency\": \"SGD\"\n                                }\n                            },\n                            {\n                                \"operatorName\": \"Starhub\",\n                                \"operatorId\": 525005,\n                                \"hni\": [\n                                    {\n                                        \"mcc\": \"525\",\n                                        \"mnc\": \"05\"\n                                    },\n                                    {\n                                        \"mcc\": \"525\",\n                                        \"mnc\": \"06\"\n                                    }\n                                ],\n                                \"price\": {\n                                    \"amount\": 0.0495856,\n                                    \"currency\": \"SGD\"\n                                }\n                            }\n                        ]\n                    },\n                    {\n                        \"alpha2Code\": \"US\",\n                        \"countryName\": \"United States\",\n                        \"dialingPrefix\": \"+1\",\n                        \"operators\": [\n                            {\n                                \"operatorName\": \"Western Wireless\",\n                                \"operatorId\": 310012,\n                                \"hni\": [\n                                    {\n                                        \"mcc\": \"310\",\n                                        \"mnc\": \"03\"\n                                    },\n                                    {\n                                        \"mcc\": \"310\",\n                                        \"mnc\": \"12\"\n                                    }\n                                ],\n                                \"price\": {\n                                    \"amount\": 0.0161153,\n                                    \"currency\": \"SGD\"\n                                }\n                            }\n                        ]\n                    }\n                ]\n            }\n        },\n        {\n            \"subAccountId\": \"example2\",\n            \"outbound\": {\n                \"countries\": [\n                    {\n                        \"alpha2Code\": \"SG\",\n                        \"countryName\": \"Singapore\",\n                        \"dialingPrefix\": \"+65\",\n                        \"operators\": [\n                            {\n                                \"operatorName\": \"SingTel\",\n                                \"operatorId\": 525001,\n                                \"hni\": [\n                                    {\n                                        \"mcc\": \"525\",\n                                        \"mnc\": \"01\"\n                                    },\n                                    {\n                                        \"mcc\": \"525\",\n                                        \"mnc\": \"02\"\n                                    },\n                                    {\n                                        \"mcc\": \"525\",\n                                        \"mnc\": \"07\"\n                                    }\n                                ],\n                                \"price\": {\n                                    \"amount\": 0.0099171,\n                                    \"currency\": \"SGD\"\n                                }\n                            },\n                            {\n                                \"operatorName\": \"MobileOne\",\n                                \"operatorId\": 525003,\n                                \"hni\": [\n                                    {\n                                        \"mcc\": \"525\",\n                                        \"mnc\": \"03\"\n                                    }\n                                ],\n                                \"price\": {\n                                    \"amount\": 0.0099171,\n                                    \"currency\": \"SGD\"\n                                }\n                            },\n                            {\n                                \"operatorName\": \"Starhub\",\n                                \"operatorId\": 525005,\n                                \"hni\": [\n                                    {\n                                        \"mcc\": \"525\",\n                                        \"mnc\": \"05\"\n                                    },\n                                    {\n                                        \"mcc\": \"525\",\n                                        \"mnc\": \"06\"\n                                    }\n                                ],\n                                \"price\": {\n                                    \"amount\": 0.0099171,\n                                    \"currency\": \"SGD\"\n                                }\n                            }\n                        ]\n                    },\n                    {\n                        \"alpha2Code\": \"US\",\n                        \"countryName\": \"United States\",\n                        \"dialingPrefix\": \"+1\",\n                        \"operators\": [\n                            {\n                                \"operatorName\": \"Western Wireless\",\n                                \"operatorId\": 310012,\n                                \"hni\": [\n                                    {\n                                        \"mcc\": \"310\",\n                                        \"mnc\": \"03\"\n                                    },\n                                    {\n                                        \"mcc\": \"310\",\n                                        \"mnc\": \"12\"\n                                    }\n                                ],\n                                \"price\": {\n                                    \"amount\": 0.0136360,\n                                    \"currency\": \"SGD\"\n                                }\n                            },\n                            {\n                                \"operatorName\": \"T-Mobile (Cingular)\",\n                                \"operatorId\": 310490,\n                                \"hni\": [\n                                    {\n                                        \"mcc\": \"310\",\n                                        \"mnc\": \"490\"\n                                    }\n                                ],\n                                \"price\": {\n                                    \"amount\": 0.0136360,\n                                    \"currency\": \"SGD\"\n                                }\n                            }\n                        ]\n                    }\n                ]\n            },\n            \"inbound\": {\n                \"countries\": [\n                    {\n                        \"alpha2Code\": \"SG\",\n                        \"countryName\": \"Singapore\",\n                        \"dialingPrefix\": \"+65\",\n                        \"numberTypes\": [\n                            {\n                                \"type\": \"tollFree\",\n                                \"defaultPrice\": {\n                                    \"amount\": 0.0100000,\n                                    \"currency\": \"SGD\"\n                                }\n                            },\n                            {\n                                \"type\": \"shortCodeP2P\",\n                                \"defaultPrice\": {\n                                    \"amount\": 0.1230000,\n                                    \"currency\": \"SGD\"\n                                }\n                            }\n                        ]\n                    }\n                ]\n            }\n        }\n    ]\n}"
{
"subAccounts": [
{
"subAccountId": "example",
"outbound": {
"countries": [
{
"alpha2Code": "SG",
"countryName": "Singapore",
"dialingPrefix": "+65",
"operators": [
{
"operatorName": "SingTel",
"operatorId": 525001,
"hni": [
{
"mcc": "525",
"mnc": "01"
},
{
"mcc": "525",
"mnc": "02"
},
{
"mcc": "525",
"mnc": "07"
}
],
"price": {
"amount": 0.0520648,
"currency": "SGD"
}
},
{
"operatorName": "MobileOne",
"operatorId": 525003,
"hni": [
{
"mcc": "525",
"mnc": "03"
}
],
"price": {
"amount": 0.0421477,
"currency": "SGD"
}
},
{
"operatorName": "Starhub",
"operatorId": 525005,
"hni": [
{
"mcc": "525",
"mnc": "05"
},
{
"mcc": "525",
"mnc": "06"
}
],
"price": {
"amount": 0.0495856,
"currency": "SGD"
}
}
]
},
{
"alpha2Code": "US",
"countryName": "United States",
"dialingPrefix": "+1",
"operators": [
{
"operatorName": "Western Wireless",
"operatorId": 310012,
"hni": [
{
"mcc": "310",
"mnc": "03"
},
{
"mcc": "310",
"mnc": "12"
}
],
"price": {
"amount": 0.0161153,
"currency": "SGD"
}
}
]
}
]
}
},
{
"subAccountId": "example2",
"outbound": {
"countries": [
{
"alpha2Code": "SG",
"countryName": "Singapore",
"dialingPrefix": "+65",
"operators": [
{
"operatorName": "SingTel",
"operatorId": 525001,
"hni": [
{
"mcc": "525",
"mnc": "01"
},
{
"mcc": "525",
"mnc": "02"
},
{
"mcc": "525",
"mnc": "07"
}
],
"price": {
"amount": 0.0099171,
"currency": "SGD"
}
},
{
"operatorName": "MobileOne",
"operatorId": 525003,
"hni": [
{
"mcc": "525",
"mnc": "03"
}
],
"price": {
"amount": 0.0099171,
"currency": "SGD"
}
},
{
"operatorName": "Starhub",
"operatorId": 525005,
"hni": [
{
"mcc": "525",
"mnc": "05"
},
{
"mcc": "525",
"mnc": "06"
}
],
"price": {
"amount": 0.0099171,
"currency": "SGD"
}
}
]
},
{
"alpha2Code": "US",
"countryName": "United States",
"dialingPrefix": "+1",
"operators": [
{
"operatorName": "Western Wireless",
"operatorId": 310012,
"hni": [
{
"mcc": "310",
"mnc": "03"
},
{
"mcc": "310",
"mnc": "12"
}
],
"price": {
"amount": 0.0136360,
"currency": "SGD"
}
},
{
"operatorName": "T-Mobile (Cingular)",
"operatorId": 310490,
"hni": [
{
"mcc": "310",
"mnc": "490"
}
],
"price": {
"amount": 0.0136360,
"currency": "SGD"
}
}
]
}
]
},
"inbound": {
"countries": [
{
"alpha2Code": "SG",
"countryName": "Singapore",
"dialingPrefix": "+65",
"numberTypes": [
{
"type": "tollFree",
"defaultPrice": {
"amount": 0.0100000,
"currency": "SGD"
}
},
{
"type": "shortCodeP2P",
"defaultPrice": {
"amount": 0.1230000,
"currency": "SGD"
}
}
]
}
]
}
}
]
}

Schema

"{\n    \"subAccounts\": [\n        {\n            \"subAccountId\": \"example\",\n            \"inbound\": {\n                \"countries\": [\n                    {\n                        \"alpha2Code\": \"SG\",\n                        \"countryName\": \"Singapore\",\n                        \"dialingPrefix\": \"+65\",\n                        \"numberTypes\": [\n                            {\n                                \"type\": \"tollFree\",\n                                \"defaultPrice\": {\n                                    \"amount\": 0.0100000,\n                                    \"currency\": \"SGD\"\n                                }\n                            },\n                            {\n                                \"type\": \"shortCodeP2P\",\n                                \"defaultPrice\": {\n                                    \"amount\": 0.1230000,\n                                    \"currency\": \"SGD\"\n                                }\n                            }\n                        ]\n                    }\n                ]\n            }\n        }\n    ]\n}"
{
"subAccounts": [
{
"subAccountId": "example",
"inbound": {
"countries": [
{
"alpha2Code": "SG",
"countryName": "Singapore",
"dialingPrefix": "+65",
"numberTypes": [
{
"type": "tollFree",
"defaultPrice": {
"amount": 0.0100000,
"currency": "SGD"
}
},
{
"type": "shortCodeP2P",
"defaultPrice": {
"amount": 0.1230000,
"currency": "SGD"
}
}
]
}
]
}
}
]
}

Bad request error response

Schema

    codeintegerrequired

    Error code

    messagestring

    Error description

    errorIdstring<uuid>required

    Unique id of error. You can use it as reference when sending enquiries to 8x8 support

    timestampstring<date-time>required

    Data and time of the error occurence

{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
{
"code":1002,
"message":"Invalid MSISDN format (not E.164 international number)",
"errorId":"b4478860-b76c-e811-814e-022a35cc1c71",
"timestamp":"2018-08-04T09:25:40.9235752+00:00"
}

Request was not authenticated response

Schema

    codeintegerrequired

    Error code

    messagestring

    Error description

    errorIdstring<uuid>required

    Unique id of error. You can use it as reference when sending enquiries to 8x8 support

    timestampstring<date-time>required

    Data and time of the error occurence

{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
{
"code":1200,
"message":"Request was not authenticated properly",
"errorId":"db9dced4-3534-4d86-9d18-6b448af0d621",
"timestamp":"2018-08-02T09:42:38.8988997+00:00"
}

Upgrade Required — client is using an unsupported TLS version

Response Headers

    Upgrade
    Example: TLS/1.3

Schema

    codeintegerrequired

    Error code

    messagestring

    Error description

    errorIdstring<uuid>required

    Unique id of error. You can use it as reference when sending enquiries to 8x8 support

    timestampstring<date-time>required

    Data and time of the error occurence

{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
{
"code":1014,
"message":"TLS 1.3+ is required for Singapore-bound messages. Detected: TLSv1.2",
"errorId":"b4478860-b76c-e811-814e-022a35cc1c71",
"timestamp":"2018-08-04T09:25:40.9235752+00:00"
}

Rate limiting quota exceeded error

Schema

    codeintegerrequired

    Error code

    messagestring

    Error description

    errorIdstring<uuid>required

    Unique id of error. You can use it as reference when sending enquiries to 8x8 support

    timestampstring<date-time>required

    Data and time of the error occurence

{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
{
"code":429,
"message":"Quota exceeded. Please try again in 1 second(s).",
"errorId":"c8a41b47-57bf-ea11-8273-00155d466a31",
"timestamp":"2020-07-06T07:07:00.30Z"
}

Internal server error

Schema

    codeintegerrequired

    Error code

    messagestring

    Error description

    errorIdstring<uuid>required

    Unique id of error. You can use it as reference when sending enquiries to 8x8 support

    timestampstring<date-time>required

    Data and time of the error occurence

{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
{
"code":2000,
"message":"Internal server error",
"errorId":"db9dced4-3534-4d86-9d18-6b448af0d621",
"timestamp":"2018-07-02T09:42:38.8988997+00:00"
}

Source: https://developer.8x8.com/connect/reference/get-price-list · 8x8 CPaaS Developer Docs. Synced for support deflection.

Was this article helpful?
or
0 out of 0 found this helpful

0 Comments

Please sign in to leave a comment.

Didn't find what you were looking for?

Submit a request