Manage IP addresses

Retrieve a list of IP addresses that can access the API and add new IP addresses.

List allowed IP addresses

Get/v2/ipaddresses

Request

Use this request to retrieve a list of IP addresses that are allowed to access the API.

Sample requestRequest structure
Copy
Copied
curl -i -X GET \
  'https://api.equalsmoney.com/v2/ipaddresses' \
  -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
Copy
Copied
curl -i -X GET \
  'https://api.equalsmoney.com/v2/ipaddresses' \
  -H 'Authorization: ApiKey YOUR_API_KEY_HERE'

Query parameters

Parameter Description
limit
integer
The maximum number of items to return. For example, limit=25. By default, this is set to 100.

Allowable values:
[ 1 .. 100000 ]
offset
integer
The number of items to skip before returning the results. For example, offset=200. By default, this is set to 0.

Allowable values:
A valid integer

Response

If your request is successful, you'll receive a 200 response containing a list of the IP addresses that can currently access the API, sorted in numerical order by ip.

Sample responseResponse structure
Copy
Copied
{
  "limit": 100,
  "offset": 0,
  "count": 2,
  "rows": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "ip": "192.0.2.1",
      "description": "ACME London HQ",
      "createdAt": "2023-08-24T14:15:22Z",
      "updatedAt": "2023-08-24T14:15:22Z"
    },
    {
      "id": "2327f0d0-2cb5-4f31-8de2-b9d04036fdd9",
      "ip": "8.8.8.8",
      "description": "John Smith Home",
      "createdAt": "2023-11-21T09:15:37Z",
      "updatedAt": "2023-11-21T09:15:37Z"
    }
  ]
}
Copy
Copied
{
  "limit": integer,
  "offset": integer,
  "count": integer,
  "rows": [
    {
      "id": "string",
      "ip": "string",
      "description": "string",
      "createdAt": "string",
      "updatedAt": "string"
    },
    {
      "id": "string",
      "ip": "string",
      "description": "string",
      "createdAt": "string",
      "updatedAt": "string"
    }
  ]
}

For more detailed information about this request and its response, see the API reference.

Add an IP address

Post/v2/ipaddresses

Request

Use this request to allow a new IP address to access the API.

Sample requestRequest structure
Copy
Copied
curl -i -X POST \
  https://api.equalsmoney.com/v2/ipaddresses \
  -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "ip": "8.8.8.8",
    "description": "John Smith Home"
  }'
Copy
Copied
curl -i -X POST \
  https://api.equalsmoney.com/v2/ipaddresses \
  -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "ip": "string",
    "description": "string"
  }'

Request body schema

Parameter Description
ip
string
required
The IP address that you want to add.

Allowable values:
<= 50 characters
description
string
required
A description of the IP address.

Allowable values:
<= 256 characters

Response

If your request is successful, you'll receive a 201 response containing details about the newly-added IP address.

Sample responseResponse structure
Copy
Copied
{
  "id": "2327f0d0-2cb5-4f31-8de2-b9d04036fdd9",
  "ip": "8.8.8.8",
  "description": "John Smith Home",
  "ipaddressableType": "product",
  "ipaddressableId": "d926625b-5e11-4ec1-b4cd-0af2a8021efc",
  "createdAt": "2023-11-21T09:15:37Z",
  "updatedAt": "2023-11-21T09:15:37Z"
}
Copy
Copied
{
  "id": "string",
  "ip": "string",
  "description": "string",
  "ipaddressableType": "string",
  "ipaddressableId": "string",
  "createdAt": "string",
  "updatedAt": "string"
}

For more detailed information about this request and its response, see the API reference.