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.eyJzdWIiOjE0MCwiYXVkIjpbImFkbWluIl0sImV4cCI6MTc4NjM2MDI5M30.vW-OrQ-sKZ-Gr12le17cE0-mUku6tVrnsSP-9izpYgA
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: 7432d29b-f800-4ed8-a0e7-7fca7d2aed55
x-runtime: 0.008427
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}}"
    }
  }
}