Get a Currency
GEThttps://useast.api.elasticpath.com/v2/currencies/:currencyID
Fetch a currency by its ID.
Request
Path Parameters
currencyID stringrequired
The ID for the requested currency.
Responses
- 200
- 401
OK
- application/json
- Schema
- Example (auto)
Schema
data object[]
{
"data": [
{
"id": "0c45e4ec-26e0-4043-86e4-c15b9cf985a0",
"type": "currency",
"code": "GBP",
"exchange_rate": 1,
"format": "£{price}",
"decimal_point": ".",
"thousand_separator": ",",
"decimal_places": 2,
"default": true,
"enabled": true,
"links": {
"self": "string"
},
"meta": {
"timestamps": {
"created_at": "2023-11-07T23:04:18.845Z",
"updated_at": "2023-11-07T23:04:18.845Z"
},
"owner": "store"
}
}
]
}
Unauthorized
- application/json
- Schema
- Example (auto)
- Example
Schema
errors object[]
{
"errors": [
{
"detail": "string",
"status": 400,
"title": "string"
}
]
}
{
"errors": [
{
"status": 401,
"title": "Unauthorized"
}
]
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://useast.api.elasticpath.com/v2/currencies/:currencyID");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear