Invoice template API

update values

PUT /api/rest/admin/invoice-template/:id

Parameters

Name Description
data[type] Resource type (invoice-templates)
data[id] Invoice template ID
data[attributes][name] Name

Request

Headers

Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjE0MCwiYXVkIjpbImFkbWluIl0sImV4cCI6MTc4ODYwNjUxNH0.1Qsooci3fE7fHSEgMk0n3U4NZVCL43RxdkYuGDLs5DI
Host: example.org
Cookie: 

Route

PUT /api/rest/admin/invoice-template/7

Body

{"data":{"type":"invoice-templates","id":7,"attributes":{"name":"name"}}}

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
vary: Accept
etag: W/"51b3af5a08ca92b78bd94d150d9f112d"
cache-control: max-age=0, private, must-revalidate
x-request-id: 77609a7a-95bf-4967-88b5-ee32c325f28a
x-runtime: 0.012447
content-length: 268

Status

200 OK

Body

{
  "data": {
    "id": "7",
    "type": "invoice-templates",
    "links": {
      "self": "http://example.org/api/rest/admin/invoice-templates/7"
    },
    "attributes": {
      "name": "name",
      "html-template": "<html><body>{{ invoice.reference }}</body></html>",
      "filename-template": "invoice-{{invoice.reference}}"
    }
  }
}