Step 5: add an address

This last step is optional, but can be useful if you're using our cards feature.

We're going to save an address to your account so that when you convert a virtual card into a physical one, you can supply a reusable address ID rather than having to specify a new recipient address for each request.

info

The type can be anything that you want, other than registered. You'll be able to filter addresses by type when you look up addresses, so we recommend using at least office and personal or similar.

SandboxProduction
Copy
Copied
curl -i -X POST \
  'https://api-sandbox.equalsmoney.com/v2/addresses?accountId=F12345' \
  -H 'Authorization: ApiKey {apiKey}' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "office",
    "addressLine1": "8 St Marks Close,",
    "addressLine2": "Scarborough",
    "addressContact": "John Smith",
    "city": "London",
    "postcode": "YO126SQ",
    "country": "England"
  }'
Copy
Copied
curl -i -X POST \
  'https://api.equalsmoney.com/v2/addresses?accountId=F12345' \
  -H 'Authorization: ApiKey {apiKey}' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "office",
    "addressLine1": "8 St Marks Close,",
    "addressLine2": "Scarborough",
    "addressContact": "John Smith",
    "city": "London",
    "postcode": "YO126SQ",
    "country": "England"
  }

If your request is successful, you'll receive a 200 response containing an id. You can now supply this ID when you convert a card.

Copy
Copied
{
  "id": "94a5eb77-0d1c-42c4-895d-ccbd6db8980c",
  "type": "office",
  "nickName": null,
  "addressLine1": "8 St Marks Close,",
  "addressLine2": "Scarborough",
  "addressLine3": null,
  "addressContact": "John Smith",
  "city": "London",
  "postcode": "YO126SQ",
  "country": "England"
}
info

For more information about the parameters available, see the API reference.

Next