{"info":{"_postman_id":"65e859c3-f694-430c-8529-5fc8d916b060","name":"Field Boundary API","description":"<html><head></head><body><p>The Field Boundary API allows you to access and control data stored in your account with ease.</p>\n<h1 id=\"overview\">Overview</h1>\n<ol>\n<li><p>You need a valid <code>API Token</code> to send requests to the API endpoints. To get a valid API Token, please send a request from here <a href=\"https://www.field-boundary.com/trial-api-key\">https://www.field-boundary.com/trial-api-key</a>. After           receiving the API Token, you will be able to:</p>\n<ul>\n<li>detect a single field boundary.</li>\n<li>detect multiple field boundaries within an area.</li>\n<li>retrieve the timestamp of a field boundary.</li>\n<li>check your account information (e.g. number of requests).</li>\n</ul>\n</li>\n<li><p>Response to every request is sent in [JSON format]. If the API fails to process your request, it will throw an error message within the JSON response.</p>\n</li>\n<li><p>The API calls will respond with appropriate [HTTP status codes] for all requests. When a response is received, a status code will be returned with its description.</p>\n</li>\n</ol>\n<h1 id=\"authentication\">Authentication</h1>\n<p>To use any of the Field Boundary's APIs, you'll need the API access token (see the <a href=\"#overview\">Overview</a> section to read how to request one). Every request must contain a valid token that can be either inserted in token query parameter or provided in the form of an <code>Authorization</code> request header. In your implementation, please follow this documentation of each request header.</p>\n<h2 id=\"api-token-related-error-response\">API Token-related error response</h2>\n<p>If an API Token is missing, misspelt or invalid, you will receive a <code>403 Forbidden</code> or <code>401 Unauthorized</code> response code and the following JSON response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"detail\": \"Authentication credentials were not provided.\"\n}\n</code></pre><h1 id=\"custom-rate-limit\">Custom rate limit</h1>\n<p>The Field Boundary API has a custom rate limit that corresponds to the number of requests your account has available. Each endpoint has its own custom rate limit. Notice that such custom rate limit is not associated to the rate limits of the REST API.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Overview","slug":"overview"},{"content":"Authentication","slug":"authentication"},{"content":"Custom rate limit","slug":"custom-rate-limit"}],"owner":"9886073","collectionId":"65e859c3-f694-430c-8529-5fc8d916b060","publishedId":"SWLYCBa9","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-11-17T09:14:09.000Z"},"item":[{"name":"Account","item":[{"name":"Get Account Information","event":[{"listen":"test","script":{"id":"4f88f59e-88ac-4450-8561-5710677cfa7f","exec":["pm.test(\"successful user get request test with Status: \"+ pm.response.code, function () {\r","     pm.expect(pm.response.code).to.be.oneOf([200,204]); \r","});\r","\r","pm.test(\"Response time is : \"+responseTime +\" ms\", function () {\r","    pm.expect(pm.response.responseTime).to.be.below(2000);\r","});\r","\r","pm.test('Has data', function() {\r","     pm.response.to.be.ok;\r","     const jsonData = pm.response.json();\r","     pm.expect(jsonData).to.have.property('results');\r","});\r","\r","pm.test(\"check if there are any results \",function(){\r","     pm.response.to.be.ok;\r","    pm.expect(pm.response.json().count).to.be.above(0);\r","});\r","/* 500 is given and the exception has appeared in response, If I pass the URL parameter(ID) a value that is not an integer*/"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"8aa730e0-ffe8-41c0-8353-a1206cf18d97","exec":["var ids = pm.environment.get(\"ids\");\r","if(!ids|| (ids && ids.length === 0)){\r"," ids = [15, \"asd123\", 123456,_.random(1, 5000)];\r","}\r","\r","var currentId = ids.shift();\r","pm.environment.set(\"Id\", currentId);\r","pm.environment.set(\"ids\", ids);\r",""],"type":"text/javascript","packages":{}}}],"id":"a934a7be-afa3-42f9-b0ef-f956e1dfa251","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Token {{api token}}","description":"<p>Requires API Token as <em><strong>Authorization</strong></em> request header.\nexample <code>Token</code>  <em><strong>some token</strong></em> .</p>\n","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":"https://api.field-boundary.com/users/me/requests_stats_summary_log/","description":"<p>It returns your current rate limit status for each of the endpoints.</p>\n<blockquote>\n<p>Requires API Token as <code>Authorization</code> request header.</p>\n</blockquote>\n<h3 id=\"expected-status-codes\">Expected status codes</h3>\n<hr />\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>status code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>returning data successfully.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"response\">Response</h3>\n<blockquote>\n<p>  <strong><em>status code 200 OK</em></strong> </p>\n</blockquote>\n<hr />\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">     {\n         \"subscription\": {\n             \"id\": id,\n             \"subscription_type\": {\n                 \"id\": id,\n                 \"subscription\": \"S\",\n                 \"subscription_alt_name\": \"BEGINNER\",\n                 \"max_number_of_requests\": 10000,\n                 \"min_number_of_requests\": 3000,\n                 \"price_per_request\": 3000,\n                 \"created_date\": \"2019-03-21T13:53:04.173808Z\",\n                 \"updated_date\": \"2019-03-21T13:53:04.173821Z\"\n             },\n             \"user_id\": null,\n             \"number_of_requests_made\": 0,\n             \"status\": \"ACTIVE\",\n             \"subscription_from_date\": \"2019-03-27T14:23:08.264029Z\",\n             \"subscription_to_date\": \"2019-04-27T00:23:08.264029Z\"\n         }\n     }\n</code></pre>\n","urlObject":{"protocol":"https","path":["users","me","requests_stats_summary_log",""],"host":["api","field-boundary","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"a934a7be-afa3-42f9-b0ef-f956e1dfa251"}],"id":"e06c402d-71ad-4f09-92ae-b7c8dd9e256d","description":"<p>You can check your current rate limit status at any time using the rate limit API described above.</p>\n","event":[{"listen":"prerequest","script":{"id":"862e986c-05e3-44de-891a-01ef3326035f","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"85140282-a21a-41a2-a09d-6d3e1c6cae51","type":"text/javascript","exec":[""]}}],"_postman_id":"e06c402d-71ad-4f09-92ae-b7c8dd9e256d"},{"name":"Field Boundary","item":[{"name":"Get a single boundary","id":"bb9a4145-81fd-400c-b646-567bb2574d16","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"description":"<p>Requires API Token as <em><strong>Authorization</strong></em> request header.\nexample <code>Token</code>  <em><strong>some token</strong></em> .</p>\n","key":"Authorization","type":"text","value":"Token {{api token}}"}],"url":"https://api.field-boundary.com/field-boundary/?lat=50.09383&lng=9.21508","description":"<p>Providing latitude and longitude as input coordinates of any point within the field, the endpoint will return the corresponding boundary as a GeoJSON.</p>\n<blockquote>\n<p>Requires API Token as <code>Authorization</code> request header.</p>\n</blockquote>\n<h3 id=\"expected-status-codes\">Expected status codes</h3>\n<hr />\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>status code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>returning  data successfully.</td>\n</tr>\n<tr>\n<td>204</td>\n<td>No data to return.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"response\">Response</h3>\n<p>A single field boundary in GeoJSON format given a single geographical point within the field.</p>\n<blockquote>\n<p>  <strong><em>status code 200 OK</em></strong> </p>\n</blockquote>\n<hr />\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">     {\n         \"count\": 1,\n         \"next\": null,\n         \"previous\": null,\n         \"results\": {\n           'GEOJSON'\n         }\n     }\n</code></pre>\n","urlObject":{"protocol":"https","path":["field-boundary",""],"host":["api","field-boundary","com"],"query":[{"key":"lat","value":"50.09383"},{"description":{"content":"<p>Longitude of coordinate where boundary gets detected</p>\n","type":"text/plain"},"key":"lng","value":"9.21508"}],"variable":[]}},"response":[],"_postman_id":"bb9a4145-81fd-400c-b646-567bb2574d16"},{"name":"Get multiple boundaries for an area","id":"fe5824b2-2243-480f-ac88-c6ef2c72a5e1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Token {{api token}}","description":"<p>Requires API Token as <em><strong>Authorization</strong></em> request header.\nexample <code>Token</code>  <em><strong>some token</strong></em> .</p>\n","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"bbox\": {\n        \"type\": \"Polygon\",\n        \"coordinates\": [\n            [\n                [\n                    8.53036880493164,\n                    49.816720843571765\n                ],\n                [\n                    8.468914031982422,\n                    49.79988210788039\n                ],\n                [\n                    8.474235534667969,\n                    49.75975573936961\n                ],\n                [\n                    8.585128784179688,\n                    49.7464468466617\n                ],\n                [\n                    8.595771789550781,\n                    49.79279036138332\n                ],\n                [\n                    8.58856201171875,\n                    49.82137261922289\n                ],\n                [\n                    8.542900085449219,\n                    49.81948981152359\n                ],\n                [\n                    8.53036880493164,\n                    49.816720843571765\n                ]\n            ]\n        ]\n    }\n}"},"url":"https://api.field-boundary.com/field-boundary/","description":"<p>This endpoint allows you to detect all available boundaries within an area. To define the area, a closed polygon must be given as input, where closed means that the last coordinate in the JSON file must coincide with the first one. For example, if the polygon is a square, the JSON file will contain five points with the fifth point having the same coordinates as the first one.</p>\n<blockquote>\n<p>Requires API Token as <code>Authorization</code> request header.</p>\n</blockquote>\n<blockquote>\n<p><strong><em>Note</em></strong>: <strong>Pagination is powered exclusively by the <code>Page</code> parameter. Use the Link header to get the URL for the next or previous page of users.</strong></p>\n</blockquote>\n<h3 id=\"expected-status-codes\">Expected status codes</h3>\n<hr />\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>status code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>returning data successfully.</td>\n</tr>\n<tr>\n<td>204</td>\n<td>No data to return.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"response\">Response</h3>\n<p>Multiple boundaries in GeoJSON format within an area defined as a closed polygon.</p>\n<blockquote>\n<p>  <strong><em>status code 200 OK</em></strong> </p>\n</blockquote>\n<hr />\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">     {\n         \"count\": 1,\n         \"next\": \"http://api.field-boundary.com/field-boundary/?page=2\",\n         \"previous\": null,\n         \"results\": {\n           'GEOJSON'\n         }\n     }\n</code></pre>\n","urlObject":{"protocol":"https","path":["field-boundary",""],"host":["api","field-boundary","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"fe5824b2-2243-480f-ac88-c6ef2c72a5e1"},{"name":"Get last update time","event":[{"listen":"test","script":{"id":"dfc0746f-5119-4c06-9d6a-a9a3b7762e04","exec":["pm.test(\"successful get clients fields asynced test with Status: \"+ pm.response.code, function () {\r","    pm.expect(pm.response.code).to.be.oneOf([200,204]);\r","});\r","\r","pm.test(\"Response time is : \"+responseTime +\" ms\", function () {\r","    pm.expect(pm.response.responseTime).to.be.below(2000);\r","});\r","pm.test('Has data', function() {\r","    pm.response.to.be.ok;\r","    const jsonData = pm.response.json();\r","  pm.expect(jsonData).to.have.property('results');\r","});\r","\r","pm.test(\"check if there are any results \",function(){\r","    pm.response.to.be.ok;\r","    pm.expect(pm.response.json().count).to.be.above(0);\r","});\r","/*500 is given and the exception has appeared in response,and 500 is given and the exception has appeared in response, If I pass the URL parameter a value that is not a valid date*/\r","/*Q:Can we cancel the pagination in this API, and fetch all data in same response?*/"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"241189c2-0529-4bf8-9920-a026845cc47c","exec":["var last_synces = pm.environment.get(\"last_synces\");\r","if(!last_synces|| (last_synces && last_synces.length === 0)){\r"," last_synces = [\"2018-09-07 16:01:34.091687\", \"asd123\",new Date().toISOString(\"yyyy-MM-dd HH:mm:ss.ffffff\"),\"2017-09-07 16:01:34.091687\"];\r","}\r","\r","var last_syncId = last_synces.shift();\r","pm.environment.set(\"last_sync\", last_syncId);\r","pm.environment.set(\"last_synces\", last_synces);\r",""],"type":"text/javascript"}}],"id":"fc5dd4cd-f536-45e3-8eee-ed3717d3f51a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"description":"<p>Requires API Token as <em><strong>Authorization</strong></em> request header.\nexample <code>Token</code>  <em><strong>some token</strong></em> .</p>\n","key":"Authorization","value":"Token {{api token}}"}],"url":"https://api.field-boundary.com/field-boundary/get_last_updated/?lng=50.09383&lat=9.21508","description":"<p>This endpoint returns the timestamp of the last update of a field boundary. This can be used to determine the last change of the geometric information documented in the system.</p>\n<h3 id=\"expected-status-codes\">Expected status codes</h3>\n<hr />\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>status code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>returning data successfully.</td>\n</tr>\n<tr>\n<td>204</td>\n<td>No data to return.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<blockquote>\n<p>Requires API Token as <code>Authorization</code> request header.</p>\n</blockquote>\n<h3 id=\"response\">Response</h3>\n<blockquote>\n<p>  <strong><em>status code 200 OK</em></strong> </p>\n</blockquote>\n<hr />\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">     [\n           'GEOJSON'\n     ]\n</code></pre>\n","urlObject":{"protocol":"https","path":["field-boundary","get_last_updated",""],"host":["api","field-boundary","com"],"query":[{"description":{"content":"<p>Longitude of coordinate where boundary gets detected</p>\n","type":"text/plain"},"key":"lng","value":"50.09383"},{"description":{"content":"<p>Latitude of coordinate where boundary gets detected</p>\n","type":"text/plain"},"key":"lat","value":"9.21508"}],"variable":[]}},"response":[],"_postman_id":"fc5dd4cd-f536-45e3-8eee-ed3717d3f51a"}],"id":"211fb9c3-eeef-47d9-9864-d984ce523d3c","event":[{"listen":"prerequest","script":{"id":"5a5a56f9-4fd1-4c02-b5ee-c0e98bfa343c","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"61ad5472-3e6a-4f4c-abd4-b4b8653ac4ad","type":"text/javascript","exec":[""]}}],"_postman_id":"211fb9c3-eeef-47d9-9864-d984ce523d3c","description":""}],"event":[{"listen":"prerequest","script":{"id":"d686a30d-e9f1-4e77-aced-828a76e242e9","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"e4040d1b-c821-4672-a4ea-567bfb145513","type":"text/javascript","exec":[""]}}],"variable":[{"key":"token","value":"Token 3df40abd039a67fd086e9eb3fc6ae2ea785f7e23"},{"key":"username","value":"fuzumoe@gmail.com"},{"key":"password","value":"adam1987"}]}