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

Request

Headers

Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjcxLCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzc2MzY1NzM0fQ.z_wsW01oRV_MpvkZ6Dno25RSEJTnb36oHj9MMuREJLw
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/"9ea4445928b142078f3a039b01338623"
cache-control: max-age=0, private, must-revalidate
x-request-id: de6daf13-58bc-475b-b409-60999ac5deae
x-runtime: 0.008808
content-length: 144

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
    }
  }
}