Currency aliases
Use these methods to manage currency aliases.
GET[host]/api/v2/currencies/{currencyId}/aliases |
|
GET[host]/api/v2/currencies/{currencyId}/aliases/{aliasId} |
|
POST[host]/api/v2/currencies/{currencyId}/aliases |
|
PUT[host]/api/v2/currencies/{currencyId}/aliases/{aliasId} PATCH[host]/api/v2/currencies/{currencyId}/aliases/{aliasId} |
|
DELETE[host]/api/v2/currencies/{currencyId}/aliases/{aliasId} |
Get a list of currency aliases
Use this method to obtain a list of the available currency aliases.
To obtain detailed information about a specific currency alias, use a separate method to get currency alias details.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- currencyId required
The numeric code that is used as a unique currency identifier.
GET[host]/api/v2/currencies/{currencyId}/aliases
curl --location --request GET 'https://host.name/api/v2/currencies/8980/aliases?limit=10&offset=0' \
--header 'Authorization: Bearer <token>'
Response
A response includes an array of Currency Alias objects providing information about the aliases matching the request parameters.
Get currency alias details
Use this method to obtain detailed information about a specified currency alias.
To obtain a list of the available currency aliases, use a separate method to get a list of currency aliases.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- currencyId required
The numeric code that is used as a unique currency identifier.
- aliasId required
The identifier of a currency alias.
GET[host]/api/v2/currencies/{currencyId}/aliases/{aliasId}
curl --location --request GET 'https://host.name/api/v2/currencies/8980/aliases/14' \
--header 'Authorization: Bearer <token>'
Response
A response includes a Currency Alias object providing information about the specified currency alias.
Add a currency alias
Use this method to add a currency alias.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- currencyId required
The numeric code that is used as a unique currency identifier.
Body:
Specify the following parameters for a currency alias:
- alphabeticCode string required
The alphabetic code of a currency alias.
- numericCode integer required
The numeric code of a currency for which an alias is set up.
- name string required
The name of a currency alias.
POST[host]/api/v2/currencies/{currencyId}/aliases
curl --location --request POST 'https://host.name/api/v2/currencies/8980/aliases' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"alphabeticCode": "USXF",
"numericCode": 8980,
"name": "X Dollar"
}'
Response
A response includes a Currency Alias object providing information about the added currency alias.
Update a currency alias
Use this method to update the data related to a specified currency alias.
Note
Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- currencyId required
The numeric code that is used as a unique currency identifier.
- aliasId required
The identifier of a currency alias.
Body:
The following field values can be updated for a currency alias:
- alphabeticCode string
The alphabetic code of a currency alias.
- numericCode integer
The numeric code of a currency for which an alias is set up.
- name string
The name of a currency alias.
PUT[host]/api/v2/currencies/{currencyId}/aliases/{aliasId}
curl --location --request PUT 'https://host.name/api/v2/currencies/8980/aliases/14' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"alphabeticCode": "USXF",
"numericCode": 8980,
"name": "X Dollar"
}'
Response
A response includes a Currency Alias object providing information about the currency alias that was updated.
Delete a currency alias
Use this method to delete a specified currency alias.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- currencyId required
The numeric code that is used as a unique currency identifier.
- aliasId required
The identifier of a currency alias.
DELETE[host]/api/v2/currencies/{currencyId}/aliases/{aliasId}
curl --location --request DELETE 'https://host.name/api/v2/currencies/8980/aliases/14' \
--header 'Authorization: Bearer <token>'
Response
In case of success, no response body is returned.