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.eyJzdWIiOjcyLCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzg2MzYwMjg4fQ.F1O5ZMPdDLqJNgQdMY5zkxoRD5qwjzcLfYN36FMdHFM
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/5
vary: Accept
etag: W/"bdc3859662fff3f9927963f378f678d2"
cache-control: max-age=0, private, must-revalidate
x-request-id: d71eb14b-28ca-4004-95cc-8f30bed7254a
x-runtime: 0.010331
content-length: 168

Status

201 Created

Body

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