{"_id":"563a2dbc1846790d00895313","user":"54d4ec36f6c48a0d00f0f040","project":"54d4ecb5f6c48a0d00f0f041","category":{"_id":"563a2dbb1846790d0089530a","__v":3,"pages":["563a2dbc1846790d0089530f","563a2dbc1846790d00895310","563a2dbc1846790d00895311","563a2dbc1846790d00895312","563a2dbc1846790d00895313","563a2dbc1846790d00895314","563a2dbc1846790d00895315","563a2dbc1846790d00895316","563a2dbc1846790d00895317","566232310299ea0d008f2cf2","56623a2d0299ea0d008f2cf6"],"project":"54d4ecb5f6c48a0d00f0f041","version":"563a2dba1846790d00895309","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-02-06T16:32:54.503Z","from_sync":false,"order":2,"slug":"documentation","title":"Documentation"},"version":{"_id":"563a2dba1846790d00895309","__v":3,"project":"54d4ecb5f6c48a0d00f0f041","createdAt":"2015-11-04T16:09:30.844Z","releaseDate":"2015-11-04T16:09:30.844Z","categories":["563a2dbb1846790d0089530a","563a2dbb1846790d0089530b","563a2dbb1846790d0089530c","56620e60f183880d004d3217","5702e5b8f2d6f336005e9025"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"No Mashape","version_clean":"1.1.0","version":"1.1"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-06-26T11:26:11.439Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"Where possible, the Instacount API strives to use HTTP verbs and response codes appropriate for each action.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"HTTP Verbs\"\n}\n[/block]\nThe following **HTTP Verbs** are used by Instacount:\n[block:parameters]\n{\n  \"data\": {\n    \"0-1\": \"Used against any resource to retrieve only the HTTP header info.\",\n    \"0-0\": \"**HEAD**\",\n    \"h-0\": \"HTTP Verb\",\n    \"h-1\": \"Description\",\n    \"1-0\": \"**GET**\",\n    \"1-1\": \"Used for retrieving a resource.\",\n    \"2-0\": \"**POST**\",\n    \"3-0\": \"**PUT**\",\n    \"4-0\": \"**DELETE**\",\n    \"5-0\": \"**PATCH**\",\n    \"5-1\": \"Not currently used.\",\n    \"4-1\": \"Used for deleting a resources.\",\n    \"3-1\": \"Used for updating a resources.\",\n    \"2-1\": \"Used for creating a resources.\"\n  },\n  \"cols\": 2,\n  \"rows\": 6\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"HTTP Response Codes\"\n}\n[/block]\nThe following **HTTP response codes** are used by Instacount:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"**200**\",\n    \"0-1\": \"*HEAD*\",\n    \"0-2\": \"A requested resource exists on the server, but the representation of the resource has been omitted in the response.\",\n    \"h-0\": \"HTTP Response Code\",\n    \"h-1\": \"HTTP Verb\",\n    \"h-2\": \"Response Description\",\n    \"1-1\": \"*GET*\",\n    \"1-2\": \"A requested resource exists on the server and has been successfully retrieved.  Inspect the response body for a JSON payload representing the resource.\",\n    \"2-0\": \"**201**\",\n    \"2-1\": \"*POST*\",\n    \"2-2\": \"A request to create a new resource on the server has succeeded and has been fulfilled.  The newly created resource can be dereferenced by the URI returned in the *Location* header field.\",\n    \"3-0\": \"**202**\",\n    \"3-1\": \"*POST*\",\n    \"3-2\": \"The request has been accepted for processing, but the processing has not been completed. The request may or may not (eventually) be acted upon, as it might be disallowed when processing actually takes place.  If a resource is ultimately created from this request, it can be dereferenced by the URI returned in the *Location* header field.\",\n    \"4-0\": \"**400**\",\n    \"4-1\": \"*POST/PUT*\",\n    \"4-2\": \"The data contained in the request (the JSON payload) was either malformed, or contained invalid data that was required to fulfill the request.  The client SHOULD NOT repeat the request without modifications.\",\n    \"5-0\": \"**404**\",\n    \"7-0\": \"**409**\",\n    \"8-0\": \"\",\n    \"7-1\": \"*POST*\",\n    \"7-2\": \"The request to create a resource could not be fulfilled because the resource already exists.\",\n    \"9-0\": \"**415**\",\n    \"8-1\": \"*PUT*\",\n    \"5-1\": \"*ANY*\",\n    \"5-2\": \"The resource identified by the requested URL does not exist.\",\n    \"8-2\": \"The request to modify a resource could not be fulfilled because the resource is not in a state that would facilitate a proper update.\",\n    \"9-2\": \"The requested URI does not support the supplied media-type.  When requesting a resource, use **application/vnd.instacount.v1+json** as the value of the **Accept** header.  When sending data to Instacount, specify **application/vnd.instacount.v1+json** as the value of the **Content-Type** header.\",\n    \"9-1\": \"*ANY*\",\n    \"10-0\": \"**500**\",\n    \"10-1\": \"*ANY*\",\n    \"10-2\": \"The server encountered an unexpected condition which prevented it from fulfilling the request.\",\n    \"6-0\": \"**405**\",\n    \"6-1\": \"*ANY*\",\n    \"6-2\": \"The requested HTTP method is not supported for the requested resource URL.\"\n  },\n  \"cols\": 3,\n  \"rows\": 11\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Repsonses to Asynchronous Creation Requests\",\n  \"body\": \"After making an asynchronous request to create a resource, you can dereference the URI returned in the ***Location*** response header field.  If dereferencing this URI returns an **HTTP 404** status code, it means that processing has not yet been completed.  \\n\\nOnce an asynchronous request has been acted upon and has succeeded, then dereferencing the URI returned in the initial request's ***Location*** response header should result an **HTTP 200** response with the representation of the newly created or updated resource.\"\n}\n[/block]","excerpt":"","slug":"http-response-codes","type":"basic","title":"Verbs and Response Codes"}

Verbs and Response Codes


Where possible, the Instacount API strives to use HTTP verbs and response codes appropriate for each action. [block:api-header] { "type": "basic", "title": "HTTP Verbs" } [/block] The following **HTTP Verbs** are used by Instacount: [block:parameters] { "data": { "0-1": "Used against any resource to retrieve only the HTTP header info.", "0-0": "**HEAD**", "h-0": "HTTP Verb", "h-1": "Description", "1-0": "**GET**", "1-1": "Used for retrieving a resource.", "2-0": "**POST**", "3-0": "**PUT**", "4-0": "**DELETE**", "5-0": "**PATCH**", "5-1": "Not currently used.", "4-1": "Used for deleting a resources.", "3-1": "Used for updating a resources.", "2-1": "Used for creating a resources." }, "cols": 2, "rows": 6 } [/block] [block:api-header] { "type": "basic", "title": "HTTP Response Codes" } [/block] The following **HTTP response codes** are used by Instacount: [block:parameters] { "data": { "0-0": "**200**", "0-1": "*HEAD*", "0-2": "A requested resource exists on the server, but the representation of the resource has been omitted in the response.", "h-0": "HTTP Response Code", "h-1": "HTTP Verb", "h-2": "Response Description", "1-1": "*GET*", "1-2": "A requested resource exists on the server and has been successfully retrieved. Inspect the response body for a JSON payload representing the resource.", "2-0": "**201**", "2-1": "*POST*", "2-2": "A request to create a new resource on the server has succeeded and has been fulfilled. The newly created resource can be dereferenced by the URI returned in the *Location* header field.", "3-0": "**202**", "3-1": "*POST*", "3-2": "The request has been accepted for processing, but the processing has not been completed. The request may or may not (eventually) be acted upon, as it might be disallowed when processing actually takes place. If a resource is ultimately created from this request, it can be dereferenced by the URI returned in the *Location* header field.", "4-0": "**400**", "4-1": "*POST/PUT*", "4-2": "The data contained in the request (the JSON payload) was either malformed, or contained invalid data that was required to fulfill the request. The client SHOULD NOT repeat the request without modifications.", "5-0": "**404**", "7-0": "**409**", "8-0": "", "7-1": "*POST*", "7-2": "The request to create a resource could not be fulfilled because the resource already exists.", "9-0": "**415**", "8-1": "*PUT*", "5-1": "*ANY*", "5-2": "The resource identified by the requested URL does not exist.", "8-2": "The request to modify a resource could not be fulfilled because the resource is not in a state that would facilitate a proper update.", "9-2": "The requested URI does not support the supplied media-type. When requesting a resource, use **application/vnd.instacount.v1+json** as the value of the **Accept** header. When sending data to Instacount, specify **application/vnd.instacount.v1+json** as the value of the **Content-Type** header.", "9-1": "*ANY*", "10-0": "**500**", "10-1": "*ANY*", "10-2": "The server encountered an unexpected condition which prevented it from fulfilling the request.", "6-0": "**405**", "6-1": "*ANY*", "6-2": "The requested HTTP method is not supported for the requested resource URL." }, "cols": 3, "rows": 11 } [/block] [block:callout] { "type": "warning", "title": "Repsonses to Asynchronous Creation Requests", "body": "After making an asynchronous request to create a resource, you can dereference the URI returned in the ***Location*** response header field. If dereferencing this URI returns an **HTTP 404** status code, it means that processing has not yet been completed. \n\nOnce an asynchronous request has been acted upon and has succeeded, then dereferencing the URI returned in the initial request's ***Location*** response header should result an **HTTP 200** response with the representation of the newly created or updated resource." } [/block]