{"id":19946,"date":"2017-07-14T13:44:54","date_gmt":"2017-07-14T18:44:54","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=19946"},"modified":"2022-02-03T13:15:53","modified_gmt":"2022-02-03T19:15:53","slug":"account-api-format","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/devicehq\/account-api\/account-api-format\/","title":{"rendered":"Account API &#8211; Format"},"content":{"rendered":"<p>The [json-api](http:\/\/jsonapi.org\/format\/) specification will be used for all communication to and from the account API, with the exception of uploading and downloading files, which use typical Send-File http messages.<\/p>\n<p>DeviceHQ supports a slightly relaxed standard of json-api for client requests, with the following deviations from strict json-api:<\/p>\n<ul>\n<li>It is not be necessary for requests targeting the API to have the header Content-Type fields set to &#8220;application\/vnd.api+json&#8221;. Clients may use this heade, or set their Content-Type to &#8220;application\/json&#8221;.<\/li>\n<li>Clients may use *either* PUT or PATCH requests for updating resources. Json-api requires the use of PATCH only for updates, but since this may not be possible for all clients, either PUT or PATCH will be accepted.<\/li>\n<\/ul>\n<p>All responses\u00a0<em>from<\/em>\u00a0the server will be json-api 1.0 compliant.<\/p>\n<h4>Example:<\/h4>\n<p>PUT \/api\/v2\/devices\/12345678 HTTP\/1.1<\/p>\n<p>Content-Type: application\/vnd.api+json<\/p>\n<p>Accept: application\/vnd.api+json<\/p>\n<pre class=\"brush:xml\">{\r\n  \"data\": {\r\n    \"type\": \"devices\",\r\n    \"id\": \"12345678\",\r\n    \"attributes\": {\r\n      \"description\": \"Test device\"\r\n    }\r\n  }\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The [json-api](http:\/\/jsonapi.org\/format\/) specification will be used for all communication to and from the account API, with the exception of uploading and downloading files, which use typical Send-File http messages. DeviceHQ supports a slightly relaxed standard of json-api for client requests, with the following deviations from strict json-api: It is not be necessary for requests targeting [&hellip;]<\/p>\n","protected":false},"author":2082,"featured_media":0,"parent":19942,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-19946","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/19946","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/users\/2082"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=19946"}],"version-history":[{"count":18,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/19946\/revisions"}],"predecessor-version":[{"id":32350,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/19946\/revisions\/32350"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/19942"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=19946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}