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

Version: HTTP/1.0
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MzE1Nzg3NTIsInN1YiI6NzN9.LFMCoeXFmKCwrxQHvYBAb2AVPjBPBu-XFJfLC6J6PWg
Host: example.org
Cookie: 

Route

PUT /api/rest/admin/contractors/57

Body

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

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: application/vnd.api+json
Vary: Accept
ETag: W/"787af1e1ff6fc4d5a0f50551b9bf8d92"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: d75607b6-5515-4af6-9f11-53b71c6bbfb2
X-Runtime: 0.013634
Content-Length: 475

Status

200 OK

Body

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