## API URL
URL used to send HTTP requests:
```url
https://portal.bulkgate.com/api/1.0/price-list/get
```

> [!NOTE]
> If the request does not reach its destination, repeat it on the [backup server](https://www.bulkgate.com/en/docs/api-administration-tokens/api-backup-server/) `backup1.bulkgate.com`.


```http
POST /api/1.0/price-list/get HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json
```

> [!NOTE]
> Api is limited by minute quota **20** requests.

### Parameters table

| PARAMETER NAME    | VALUE                                         | MANDATORY | DEFAULT VALUE |
|:------------------|:----------------------------------------------|:----------|:--------------|
| application_id    | [Application ID](https://www.bulkgate.com/en/docs/api-administration-tokens/api-administration/) | **Yes**   | -             | 
| application_token | [Application token](https://www.bulkgate.com/en/docs/api-administration-tokens/api-tokens/)	     | **Yes**   | -             |
| country           | Array of country codes of desired price list  | **Yes**   | -             |
| wallet            | Wallet name of your preferred wallet.         | No        | Main wallet   |


> Unlike the other endpoints, `price-list/get` rejects any parameter that is not in the table above with `invalid_input_parameters`. `country` must always be an array, even for a single country.

### Example of full request

```http-json
POST /api/1.0/price-list/get HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json

{
	"application_id": 451,
	"application_token": "NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj",
	"country": ["sk", "cz"],
	"wallet": "bg1905014138000023"
}
```

## Response to this command may be:

**In case of success:**
```json
{
  "data": {
    "price_list": {
      "sk": [
        {
          "operator": "4ka",
          "operator_code": "23103",
          "type": "gSystem",
          "price": 0.03,
          "currency": "EUR",
          "gate": 0,
          "economy": false,
          "unicode": true,
          "two_way": true,
          "registration": false,
          "registration_fee": 0,
          "registration_delay": 0,
          "monthly_fee": 0,
          "route_quality": "HQ",
          "route_note": null,
          "sender_note": null,
          "default_senders": [
            "+##############"
          ]
        },
        {
          "operator": "O2",
          "operator_code": "23106",
          "type": "gSystem",
          "price": 0.03,
          "currency": "EUR",
          "gate": 0,
          "economy": false,
          "unicode": true,
          "two_way": true,
          "registration": false,
          "registration_fee": 0,
          "registration_delay": 0,
          "monthly_fee": 0,
          "route_quality": "HQ",
          "route_note": null,
          "sender_note": null,
          "default_senders": [
            "+###############"
          ]
        }
      ]
    }
  }
}
```



### Price list item

`data.price_list` is an object keyed by the country code; under each key is an array of routes. A country that has no price list is **not** present in the response at all.

| FIELD              | VALUE                                                                                                                                                         |
|:-------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| operator           | Operator name                                                                                                                                                 |
| operator_code      | Operator code                                                                                                                                                 |
| type               | Sender ID type of the route: `gTextOwn`, `gSystem`, `gShort`, `gText`, `gOwn`, `gMobile`, `gPush`, or `gNone` when the route has none                          |
| price              | Price of one message part, rounded to 4 decimal places and converted to the currency of the wallet                                                             |
| currency           | Currency of the wallet the price list belongs to                                                                                                              |
| gate               | Gateway number `0`–`6`, `985` for [Mobile Connect](https://www.bulkgate.com/en/helpdesk/mobile-connect/mobile-connect-install/)                                                                       |
| economy            | Economy route                                                                                                                                                 |
| unicode            | The route supports Unicode                                                                                                                                    |
| two_way            | The route supports [two-way communication](https://www.bulkgate.com/en/products/two-way-sms/). Always `true` for `gOwn`                                                                 |
| registration       | The sender ID has to be registered before sending, see [Text sender ID registration](https://www.bulkgate.com/en/helpdesk/sms/registering-text-sender-id/)                                  |
| registration_fee   | One-off fee for registering the sender ID. Meaningful only together with `registration`                                                                        |
| registration_delay | How long the registration takes. Meaningful only together with `registration`                                                                                  |
| monthly_fee        | Recurring monthly fee for the registered sender ID. Meaningful only together with `registration`                                                               |
| route_quality      | One of `HQ`, `PARTNER DIRECT`, `DIRECT`, `SIM`, `WH`, `SS7`, `PARTNER SS7`, `OFFNET DIRECT - NATIONAL`, `OFFNET DIRECT - GROUP`, `OFFNET DIRECT - INTERNATIONAL` and their `PARTNER` variants. An **empty string** when the quality is not known |
| route_note         | Note about the route, `null` when there is none                                                                                                               |
| sender_note        | Note about the sender ID, `null` when there is none                                                                                                           |
| default_senders    | Array of the default sender IDs of the route                                                                                                                  |


**In case of error:**

```json
{
    "type": "invalid_wallet",
    "code": 400,
    "error": "Invalid wallet",
    "detail": null
}
```

```json
{
    "type": "the_quota_of_send_per_minute_has_been_exceeded",
    "code": 400,
    "error": "The quota of send per minute has been exceeded",
    "detail": null
}
```

```json
{
    "type": "invalid_input_parameters",
    "code": 400,
    "error": "Invalid input parameters",
    "detail": null
}
```

```json
{
    "type": "unknown_identity",
    "code": 401,
    "error": "Unknown identity / unauthorized / empty application_id",
    "detail": null
}
```

Where:
 - **type** and **error** (description of the error) can be found in the [error types table](https://www.bulkgate.com/en/docs/api-administration-tokens/api-error-types/)
 - **code** represents http error
 - **detail** is an additional info about the error
