AR Connect (1.0.0)

Download OpenAPI specification:Download

The AR Connect API.

Authentication

api_key

Value: Bearer {api_key}

Security scheme type: API Key
header parameter name: Authorization

List of networks

Lists all supported networks. If a MSISDN is passed in the query string, it will attempt to determine the network from it. This service is charged for.

Authorizations:
query Parameters
msisdn
string.+

To filter the networks which are possible for a specified MSISDN.

Responses

200

List of networks supported.

403

Cannot afford lookup.

get /v1/networks
https://api.connect.airtimerewards.co.uk/v1/networks

Response samples

application/json
Copy
Expand all Collapse all
{
  • "_embedded":
    {
    }
}

Retrieve a network

Retrieves details about a specific network.

Authorizations:
path Parameters
network
required
string

UUID of the network.

Responses

200

The network.

get /v1/networks/{network}
https://api.connect.airtimerewards.co.uk/v1/networks/{network}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "brand": "string",
  • "id": "string",
  • "subscription_types":
    [
    ],
  • "_links":
    {
    }
}

The credit types available for the network

The credit types that can be credited. Contains minimum amount of credit, maximum amount of credit and increments.

Authorizations:
path Parameters
network
required
string

UUID of the network.

Responses

200

List of credit types.

get /v1/networks/{network}/credit-types
https://api.connect.airtimerewards.co.uk/v1/networks/{network}/credit-types

Response samples

application/json
Copy
Expand all Collapse all
{
  • "_embedded":
    {
    }
}

Retrieve a quote for a credit

Retrieves a price breakdown of how much a credit will cost, along with a flag to indicate if the client can afford it.

Authorizations:
Request Body schema: application/json
client_reference
string
msisdn
string
network
string
send_sms_confirmation
boolean
subscription_type
string
type
string
credit_value
object

Responses

200

The quote.

post /v1/quote
https://api.connect.airtimerewards.co.uk/v1/quote

Request samples

application/json
Copy
Expand all Collapse all
{
  • "client_reference": "string",
  • "msisdn": "string",
  • "network": "string",
  • "send_sms_confirmation": true,
  • "subscription_type": "string",
  • "type": "string",
  • "credit_value":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "pre_tax":
    {
    },
  • "tax":
    {
    },
  • "total":
    {
    },
  • "_links":
    {
    }
}

List credits from Environment

Authorizations:
path Parameters
environment
required
string

UUID of the environment.

query Parameters
limit
string\d+
Default: "50"

Maximum number of results per page.

page
string\d+
Default: "1"

The page of the result set.

sort
string(asc|desc)
Default: "desc"

Sort direction, either 'asc' or 'desc'

Responses

200

List of credits submitted to the environment.

404

The ID doesn't match an environment.

get /v1/environments/{environment}/credits
https://api.connect.airtimerewards.co.uk/v1/environments/{environment}/credits

Response samples

application/json
Copy
Expand all Collapse all
{
  • "_embedded":
    {
    }
}

Credit an Account

Authorizations:
path Parameters
environment
required
string

UUID of the environment.

Request Body schema: application/json
client_reference
string
msisdn
string
network
string
send_sms_confirmation
boolean
subscription_type
string
type
string
credit_value
object

Responses

200

The credit.

400

Bad request.

403

Cannot afford credit.

404

The ID doesn't match an environment.

409

The client reference has already been used.

post /v1/environments/{environment}/credits
https://api.connect.airtimerewards.co.uk/v1/environments/{environment}/credits

Request samples

application/json
Copy
Expand all Collapse all
{
  • "client_reference": "string",
  • "msisdn": "string",
  • "network": "string",
  • "send_sms_confirmation": true,
  • "subscription_type": "string",
  • "type": "string",
  • "credit_value":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "client_reference": "string",
  • "created_at": "2018-09-20T09:36:44Z",
  • "id": "string",
  • "msisdn": "string",
  • "network": "string",
  • "pin_based": true,
  • "pin_code": "string",
  • "pin_ivr": "string",
  • "send_sms_confirmation": true,
  • "sms_confirmation_sent": true,
  • "_links":
    {
    }
}

Get all Credits

Retrieves all credits within the scope of the authenticated user.

Authorizations:
query Parameters
limit
string\d+
Default: "50"

Maximum number of results per page.

page
string\d+
Default: "1"

The page of the result set.

sort
string(asc|desc)
Default: "desc"

Sort direction, either 'asc' or 'desc'

type
string(live|dev)
Default: "live"

Specify whether you want to return credits from either 'live' or 'test' environments.

Responses

200

Retrieves List of credits which have been submitted by the client.

get /v1/credits
https://api.connect.airtimerewards.co.uk/v1/credits

Response samples

application/json
Copy
Expand all Collapse all
{
  • "_embedded":
    {
    }
}

Retrieve a credit

Authorizations:
path Parameters
credit
required
string

Responses

200

The credit.

get /v1/credits/{credit}
https://api.connect.airtimerewards.co.uk/v1/credits/{credit}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "client_reference": "string",
  • "created_at": "2018-09-20T09:36:44Z",
  • "id": "string",
  • "msisdn": "string",
  • "network": "string",
  • "pin_based": true,
  • "pin_code": "string",
  • "pin_ivr": "string",
  • "send_sms_confirmation": true,
  • "sms_confirmation_sent": true,
  • "_links":
    {
    }
}