Contractors API

update values

PUT /api/rest/admin/contractors/:id

Parameters

Name Description
data[type] Resource type (contractors)
data[id] Contractor ID
data[attributes][name] Name
data[attributes][vendor] Vendor
data[attributes][customer] Customer
data[attributes][enabled] Enabled
data[attributes][description] Description
data[attributes][address] Address
data[attributes][phones] Phones
data[attributes][external-id] External id
data[relationships][smtp-connection] Smtp connection

Request

Headers

Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjY1LCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzY3MzU4NTYyfQ.vpNYdP1z6Naq3wzY-DJpt0-6_35Ga2gHqCNTvFNblqM
Host: example.org
Cookie: 

Route

PUT /api/rest/admin/contractors/32

Body

{"data":{"type":"contractors","id":32,"attributes":{"name":"name","customer":true}}}

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/"5bd6adb4e7731bd1b0f81e2a772cc9ac"
cache-control: max-age=0, private, must-revalidate
x-request-id: 4fea4c28-57b3-4295-9607-0662e2c56f29
x-runtime: 0.013371
content-length: 473

Status

200 OK

Body

{
  "data": {
    "id": "32",
    "type": "contractors",
    "links": {
      "self": "http://example.org/api/rest/admin/contractors/32"
    },
    "attributes": {
      "name": "name",
      "enabled": true,
      "vendor": true,
      "customer": true,
      "description": null,
      "address": null,
      "phones": null,
      "external-id": 31
    },
    "relationships": {
      "smtp-connection": {
        "links": {
          "self": "http://example.org/api/rest/admin/contractors/32/relationships/smtp-connection",
          "related": "http://example.org/api/rest/admin/contractors/32/smtp-connection"
        },
        "data": null
      }
    }
  }
}