Currencies API

create new entry

POST /api/rest/admin/currencies

Parameters

Name Description
data[type] Resource type (currencies)
data[attributes][name] Name
data[attributes][rate] Rate
data[attributes][rate-provider-id] Rate provider id

Request

Headers

Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjc1LCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzkyNjE5ODAzfQ.ysRpNlck2NmA_rmQfi_RotQMCVHUlznGZNjEm4rHH-k
Host: example.org
Cookie: 

Route

POST /api/rest/admin/currencies

Body

{"data":{"type":"currencies","attributes":{"name":"EUR","rate":1.2}}}

Response

Headers

x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/vnd.api+json
location: http://example.org/api/rest/admin/currencies/8
vary: Accept
etag: W/"5e606c39fbe860e59ef232defc83ed19"
cache-control: max-age=0, private, must-revalidate
x-request-id: 413ea9ea-4074-46ef-a026-0afb113a4e0b
x-runtime: 0.015634
content-length: 168

Status

201 Created

Body

{
  "data": {
    "id": "8",
    "type": "currencies",
    "links": {
      "self": "http://example.org/api/rest/admin/currencies/8"
    },
    "attributes": {
      "name": "EUR",
      "rate": 1.2,
      "rate-provider-id": null
    }
  }
}