Get all Currencies
Get all Currencies
GET
https://api.moltin.com/v2/currencies
Headers
Name | Type | Description |
---|---|---|
Authorization | string | The Bearer token to grant access to the API |
{
"data": [
{
"id": "451b94f8-0536-4580-91e1-68bad2f05925",
"type": "currency",
"code": "GBP",
"exchange_rate": 1,
"format": "£{price}",
"decimal_point": ".",
"thousand_separator": ",",
"decimal_places": 0,
"default": false,
"enabled": true,
"links": {
"self":
"https://api.moltin.com/currencies/451b94f8-0536-4580-91e1-68bad2f05925"
},
"meta": {
"timestamps": {
"created_at": "2017-09-27T08:48:01.821Z",
"updated_at": "2018-04-24T19:19:40.941Z"
}
}
},
{
"id": "cd9f04a9-2338-469b-a1f2-096ac5973a90",
"type": "currency",
"code": "USD",
"exchange_rate": 1,
"format": "${price}",
"decimal_point": ".",
"thousand_separator": ",",
"decimal_places": 2,
"default": true,
"enabled": true,
"links": {
"self":
"https://api.moltin.com/currencies/cd9f04a9-2338-469b-a1f2-096ac5973a90"
},
"meta": {
"timestamps": {
"created_at": "2017-06-12T13:36:23.541Z",
"updated_at": "2018-05-01T14:32:53.956Z"
}
}
}
]
}
curl -X GET https://api.moltin.com/v2/currencies \
-H "Authorization: Bearer XXXX"
const MoltinGateway = require('@moltin/sdk').gateway
const Moltin = MoltinGateway({
client_id: 'X'
})
Moltin.Currencies.All().then(currencies => {
// Do something
})
let moltin = Moltin(withClientID: "<your client ID>")
moltin.currency.all { result in
switch result {
case .success(let response):
print(response)
case .failure(let error):
print(error)
}
}
Last updated