{"info":{"_postman_id":"465602be-c392-8da0-0433-1da70dfadefb","name":"airscout-external-partners-hierarchy-api","description":"<html><head></head><body><h1 id=\"api-description\">API Description:</h1>\n<p>This API is provided to allow Airscout partners to create and manage Airscout hierarchy element trees which is Airscout’s concept for managing and group fields within a sensible hierarchy.</p>\n<h1 id=\"how-to-use\">How to Use:</h1>\n<p>In order to use this API a consuming partner needs to request an “App User Key” which is unique to the consumer of the information and can be throttled or revoked if abuse is detected. Please see the documentation for the standard Airscout External Partner Imagery API for more details on how to use an Airscout External Partner API such as this one as this document assumes you understand the concepts covered in that document.</p>\n<h1 id=\"some-more-general-concepts\">Some More General Concepts:</h1>\n<p><em>Airscout Hierarchy</em>&nbsp;– The Airscout hierarchy supports more than just client (sometimes grower) – farm – field levels, we also support Company – Division – Agronomist above Client. We provide methods to be able to traverse the Airscout Hierarchy to make sure fields are created at the correct location in the Airscout Hierarchy but currently we only support external partner ID mapping at the Field level but you can actually add elements to the Airscout Hierarchy.</p>\n<p>Here are the “Hierarchy Category IDs” to use when querying for details on different hierarchy elements and their children:</p>\n<p>0 – COMPANY\n1 – DIVISION\n2 – AGRONOMIST\n3 – CLIENT\n4 – FARM\n5 – FIELD</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"API Description:","slug":"api-description"},{"content":"How to Use:","slug":"how-to-use"},{"content":"Some More General Concepts:","slug":"some-more-general-concepts"}],"owner":"1765269","collectionId":"465602be-c392-8da0-0433-1da70dfadefb","publishedId":"7LhjkWg","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2017-12-15T19:31:04.000Z"},"item":[{"name":"Get Hierarchy Element","id":"ac0b3ae2-9e2d-b018-b7bd-581c3a867e76","request":{"method":"GET","header":[{"key":"appUserKey","value":"{{appUserKey}}"}],"body":{"mode":"raw","raw":""},"url":"{{airscoutcloud_base_url}}/external-partners-api/orders/{{externalPartnerId}}/element?hierarchyCategoryId=0&elementId=7","description":"<p>Use this resource to get details about a given hierarchy element</p>\n","urlObject":{"path":["external-partners-api","orders","{{externalPartnerId}}","element"],"host":["{{airscoutcloud_base_url}}"],"query":[{"description":{"content":"<p>The ID of the hierarchy category of the element you wish to query for.</p>\n","type":"text/plain"},"key":"hierarchyCategoryId","value":"0"},{"description":{"content":"<p>The ID of the hierarchy element you wish to query for.</p>\n","type":"text/plain"},"key":"elementId","value":"7"}],"variable":[]}},"response":[],"_postman_id":"ac0b3ae2-9e2d-b018-b7bd-581c3a867e76"},{"name":"Create Hierarchy Element","id":"a784a9fc-12e0-0dde-9b11-7e15dd23cc75","request":{"method":"POST","header":[{"key":"appUserKey","value":"{{appUserKey}}"}],"body":{"mode":"raw","raw":"POLYGON((-87.475781 41.326442, -87.475753 41.326436, -87.475670 41.326385, -87.475678 41.326318, -87.475694 41.326234, -87.475714 41.326076, -87.475721 41.326001, -87.475737 41.325881, -87.475745 41.325810, -87.475753 41.325764, -87.475768 41.325625, -87.475777 41.325584, -87.475788 41.325470, -87.475817 41.325252, -87.475833 41.325110, -87.475868 41.324880, -87.475882 41.324803, -87.475922 41.324568, -87.475943 41.324409, -87.475958 41.324330, -87.475998 41.324093, -87.476013 41.324016, -87.476050 41.323780, -87.476064 41.323705, -87.476102 41.323471, -87.476132 41.323321, -87.476155 41.323168, -87.476206 41.322869, -87.476229 41.322715, -87.476238 41.322638, -87.476269 41.322607, -87.476283 41.322476, -87.476319 41.322413, -87.476348 41.322416, -87.476439 41.322421, -87.476628 41.322423, -87.477130 41.322419, -87.477633 41.322423, -87.478182 41.322430, -87.478333 41.322430, -87.478419 41.322432, -87.478609 41.322432, -87.478806 41.322434, -87.479088 41.322431, -87.479288 41.322432, -87.479344 41.322430, -87.479431 41.322431, -87.479654 41.322430, -87.479759 41.322428, -87.479789 41.322429, -87.479939 41.322426, -87.480030 41.322427, -87.480115 41.322424, -87.480128 41.322425, -87.480280 41.322423, -87.480491 41.322424, -87.480606 41.322420, -87.480606 41.322486, -87.480629 41.322620, -87.480638 41.322641, -87.480647 41.322696, -87.480658 41.322730, -87.480685 41.322780, -87.480775 41.322821, -87.480871 41.322831, -87.480874 41.322889, -87.480876 41.323066, -87.480872 41.323203, -87.480875 41.323315, -87.480870 41.323360, -87.480862 41.323398, -87.480860 41.323434, -87.480862 41.323469, -87.480874 41.323521, -87.480879 41.323554, -87.480882 41.323589, -87.480987 41.323690, -87.481104 41.323691, -87.481151 41.323694, -87.481199 41.323699, -87.481240 41.323710, -87.481295 41.323714, -87.481302 41.323734, -87.481314 41.323752, -87.481319 41.323772, -87.481320 41.323790, -87.481322 41.323874, -87.481321 41.324117, -87.481329 41.324268, -87.481327 41.324324, -87.481327 41.324478, -87.481328 41.324780, -87.481342 41.324954, -87.481350 41.325032, -87.481359 41.325248, -87.481347 41.325327, -87.481211 41.325418, -87.481042 41.325392, -87.480949 41.325391, -87.480887 41.325388, -87.480754 41.325385, -87.480656 41.325385, -87.480555 41.325388, -87.480451 41.325388, -87.480353 41.325386, -87.480239 41.325387, -87.480134 41.325390, -87.480091 41.325394, -87.480070 41.325398, -87.480027 41.325414, -87.480008 41.325425, -87.479922 41.325491, -87.479849 41.325552, -87.479828 41.325572, -87.479781 41.325608, -87.479755 41.325627, -87.479704 41.325659, -87.479549 41.325774, -87.479521 41.325797, -87.479500 41.325826, -87.479488 41.325859, -87.479486 41.325876, -87.479484 41.325939, -87.479485 41.326009, -87.479493 41.326085, -87.479496 41.326156, -87.479495 41.326228, -87.479490 41.326256, -87.479465 41.326299, -87.479448 41.326317, -87.479427 41.326335, -87.479377 41.326368, -87.479310 41.326398, -87.479249 41.326424, -87.479202 41.326434, -87.479136 41.326443, -87.479033 41.326444, -87.478823 41.326441, -87.478714 41.326444, -87.478608 41.326444, -87.478504 41.326446, -87.478401 41.326453, -87.478298 41.326455, -87.478193 41.326456, -87.478089 41.326454, -87.477866 41.326457, -87.477758 41.326456, -87.477718 41.326457, -87.477535 41.326454, -87.477424 41.326455, -87.477352 41.326454, -87.477029 41.326457, -87.476816 41.326453, -87.476707 41.326453, -87.476285 41.326444, -87.476094 41.326448, -87.476031 41.326447, -87.475997 41.326449, -87.475894 41.326450, -87.475781 41.326442))"},"url":"{{airscoutcloud_base_url}}/external-partners-api/orders/{{externalPartnerId}}/element?hierarchyCategoryId=5&parentId=184&name=North2","description":"<p>Use this resource to create a hierarchy element. The object details will be included in the body of the post. There are really two different types of hierarchy elements: Fields and everything else. Fields are special because they are the only object in the hierarchy tree that actually represents a physical space. As such you’ll see two different example request bodies below. It is also very import to include the “hierarchyCategory” in the object for you which post. This is the field that is used to actually determine what type of object to deserialize. It is also important to include the header “Content-Type” in the put request and set the value to “application/json”. The “externalPartnerFieldId” is an optional json object field value for fields only that allows you create the external partner field mappings at the time of field creation.</p>\n","urlObject":{"path":["external-partners-api","orders","{{externalPartnerId}}","element"],"host":["{{airscoutcloud_base_url}}"],"query":[{"description":{"content":"<p>The ID of the hierarchy category of the element you wish to create. Remember to still include the hierarchyCategory parameter as an attribute in the JSON of the body of the request you putting.</p>\n","type":"text/plain"},"key":"hierarchyCategoryId","value":"5"},{"description":{"content":"<p>ID of the parent you want this element to reside under</p>\n","type":"text/plain"},"key":"parentId","value":"184"},{"description":{"content":"<p>Name to give element</p>\n","type":"text/plain"},"key":"name","value":"North2"}],"variable":[]}},"response":[],"_postman_id":"a784a9fc-12e0-0dde-9b11-7e15dd23cc75"},{"name":"Update Hierarchy Element","id":"64c0304e-2c4d-0f08-0ebc-10b93d9e70f5","request":{"method":"PUT","header":[{"key":"appUserKey","value":"{{appUserKey}}"}],"body":{"mode":"raw","raw":"POLYGON((-87.475781 41.326442, -87.475753 41.326436, -87.475670 41.326385, -87.475678 41.326318, -87.475694 41.326234, -87.475714 41.326076, -87.475721 41.326001, -87.475737 41.325881, -87.475745 41.325810, -87.475753 41.325764, -87.475768 41.325625, -87.475777 41.325584, -87.475788 41.325470, -87.475817 41.325252, -87.475833 41.325110, -87.475868 41.324880, -87.475882 41.324803, -87.475922 41.324568, -87.475943 41.324409, -87.475958 41.324330, -87.475998 41.324093, -87.476013 41.324016, -87.476050 41.323780, -87.476064 41.323705, -87.476102 41.323471, -87.476132 41.323321, -87.476155 41.323168, -87.476206 41.322869, -87.476229 41.322715, -87.476238 41.322638, -87.476269 41.322607, -87.476283 41.322476, -87.476319 41.322413, -87.476348 41.322416, -87.476439 41.322421, -87.476628 41.322423, -87.477130 41.322419, -87.477633 41.322423, -87.478182 41.322430, -87.478333 41.322430, -87.478419 41.322432, -87.478609 41.322432, -87.478806 41.322434, -87.479088 41.322431, -87.479288 41.322432, -87.479344 41.322430, -87.479431 41.322431, -87.479654 41.322430, -87.479759 41.322428, -87.479789 41.322429, -87.479939 41.322426, -87.480030 41.322427, -87.480115 41.322424, -87.480128 41.322425, -87.480280 41.322423, -87.480491 41.322424, -87.480606 41.322420, -87.480606 41.322486, -87.480629 41.322620, -87.480638 41.322641, -87.480647 41.322696, -87.480658 41.322730, -87.480685 41.322780, -87.480775 41.322821, -87.480871 41.322831, -87.480874 41.322889, -87.480876 41.323066, -87.480872 41.323203, -87.480875 41.323315, -87.480870 41.323360, -87.480862 41.323398, -87.480860 41.323434, -87.480862 41.323469, -87.480874 41.323521, -87.480879 41.323554, -87.480882 41.323589, -87.480987 41.323690, -87.481104 41.323691, -87.481151 41.323694, -87.481199 41.323699, -87.481240 41.323710, -87.481295 41.323714, -87.481302 41.323734, -87.481314 41.323752, -87.481319 41.323772, -87.481320 41.323790, -87.481322 41.323874, -87.481321 41.324117, -87.481329 41.324268, -87.481327 41.324324, -87.481327 41.324478, -87.481328 41.324780, -87.481342 41.324954, -87.481350 41.325032, -87.481359 41.325248, -87.481347 41.325327, -87.481211 41.325418, -87.481042 41.325392, -87.480949 41.325391, -87.480887 41.325388, -87.480754 41.325385, -87.480656 41.325385, -87.480555 41.325388, -87.480451 41.325388, -87.480353 41.325386, -87.480239 41.325387, -87.480134 41.325390, -87.480091 41.325394, -87.480070 41.325398, -87.480027 41.325414, -87.480008 41.325425, -87.479922 41.325491, -87.479849 41.325552, -87.479828 41.325572, -87.479781 41.325608, -87.479755 41.325627, -87.479704 41.325659, -87.479549 41.325774, -87.479521 41.325797, -87.479500 41.325826, -87.479488 41.325859, -87.479486 41.325876, -87.479484 41.325939, -87.479485 41.326009, -87.479493 41.326085, -87.479496 41.326156, -87.479495 41.326228, -87.479490 41.326256, -87.479465 41.326299, -87.479448 41.326317, -87.479427 41.326335, -87.479377 41.326368, -87.479310 41.326398, -87.479249 41.326424, -87.479202 41.326434, -87.479136 41.326443, -87.479033 41.326444, -87.478823 41.326441, -87.478714 41.326444, -87.478608 41.326444, -87.478504 41.326446, -87.478401 41.326453, -87.478298 41.326455, -87.478193 41.326456, -87.478089 41.326454, -87.477866 41.326457, -87.477758 41.326456, -87.477718 41.326457, -87.477535 41.326454, -87.477424 41.326455, -87.477352 41.326454, -87.477029 41.326457, -87.476816 41.326453, -87.476707 41.326453, -87.476285 41.326444, -87.476094 41.326448, -87.476031 41.326447, -87.475997 41.326449, -87.475894 41.326450, -87.475781 41.326442))"},"url":"{{airscoutcloud_base_url}}/external-partners-api/orders/{{externalPartnerId}}/element?hierarchyCategoryId=5&parentId=184&name=North2","description":"<p>Use this resource to update an existing hierarchy element. The object details will be included in the body of the put. There are really two different types of hierarchy elements: Fields and everything else. Fields are special because they are the only object in the hierarchy tree that actually represents a physical space. As such you’ll see two different example request bodies below. It is also very import to include the “hierarchyCategory” in the object for you which post. This is the field that is used to actually determine what type of object to deserialize. It is also important to include the header “Content-Type” in the put request and set the value to “application/json”. The “externalPartnerFieldId” is an optional json object field value for fields only that allows you create the external partner field mappings at the time of field updating.</p>\n","urlObject":{"path":["external-partners-api","orders","{{externalPartnerId}}","element"],"host":["{{airscoutcloud_base_url}}"],"query":[{"description":{"content":"<p>The ID of the hierarchy category of the element you wish to create. Remember to still include the hierarchyCategory parameter as an attribute in the JSON of the body of the request you putting.</p>\n","type":"text/plain"},"key":"hierarchyCategoryId","value":"5"},{"description":{"content":"<p>ID of the parent you want this element to reside under</p>\n","type":"text/plain"},"key":"parentId","value":"184"},{"description":{"content":"<p>Name to give element</p>\n","type":"text/plain"},"key":"name","value":"North2"}],"variable":[]}},"response":[],"_postman_id":"64c0304e-2c4d-0f08-0ebc-10b93d9e70f5"},{"name":"DELETE Hierarchy Element","id":"0a857870-966b-e19e-fe94-4d61700c9d2a","request":{"method":"DELETE","header":[{"key":"appUserKey","value":"{{appUserKey}}"}],"body":{"mode":"raw","raw":"POLYGON((-87.475781 41.326442, -87.475753 41.326436, -87.475670 41.326385, -87.475678 41.326318, -87.475694 41.326234, -87.475714 41.326076, -87.475721 41.326001, -87.475737 41.325881, -87.475745 41.325810, -87.475753 41.325764, -87.475768 41.325625, -87.475777 41.325584, -87.475788 41.325470, -87.475817 41.325252, -87.475833 41.325110, -87.475868 41.324880, -87.475882 41.324803, -87.475922 41.324568, -87.475943 41.324409, -87.475958 41.324330, -87.475998 41.324093, -87.476013 41.324016, -87.476050 41.323780, -87.476064 41.323705, -87.476102 41.323471, -87.476132 41.323321, -87.476155 41.323168, -87.476206 41.322869, -87.476229 41.322715, -87.476238 41.322638, -87.476269 41.322607, -87.476283 41.322476, -87.476319 41.322413, -87.476348 41.322416, -87.476439 41.322421, -87.476628 41.322423, -87.477130 41.322419, -87.477633 41.322423, -87.478182 41.322430, -87.478333 41.322430, -87.478419 41.322432, -87.478609 41.322432, -87.478806 41.322434, -87.479088 41.322431, -87.479288 41.322432, -87.479344 41.322430, -87.479431 41.322431, -87.479654 41.322430, -87.479759 41.322428, -87.479789 41.322429, -87.479939 41.322426, -87.480030 41.322427, -87.480115 41.322424, -87.480128 41.322425, -87.480280 41.322423, -87.480491 41.322424, -87.480606 41.322420, -87.480606 41.322486, -87.480629 41.322620, -87.480638 41.322641, -87.480647 41.322696, -87.480658 41.322730, -87.480685 41.322780, -87.480775 41.322821, -87.480871 41.322831, -87.480874 41.322889, -87.480876 41.323066, -87.480872 41.323203, -87.480875 41.323315, -87.480870 41.323360, -87.480862 41.323398, -87.480860 41.323434, -87.480862 41.323469, -87.480874 41.323521, -87.480879 41.323554, -87.480882 41.323589, -87.480987 41.323690, -87.481104 41.323691, -87.481151 41.323694, -87.481199 41.323699, -87.481240 41.323710, -87.481295 41.323714, -87.481302 41.323734, -87.481314 41.323752, -87.481319 41.323772, -87.481320 41.323790, -87.481322 41.323874, -87.481321 41.324117, -87.481329 41.324268, -87.481327 41.324324, -87.481327 41.324478, -87.481328 41.324780, -87.481342 41.324954, -87.481350 41.325032, -87.481359 41.325248, -87.481347 41.325327, -87.481211 41.325418, -87.481042 41.325392, -87.480949 41.325391, -87.480887 41.325388, -87.480754 41.325385, -87.480656 41.325385, -87.480555 41.325388, -87.480451 41.325388, -87.480353 41.325386, -87.480239 41.325387, -87.480134 41.325390, -87.480091 41.325394, -87.480070 41.325398, -87.480027 41.325414, -87.480008 41.325425, -87.479922 41.325491, -87.479849 41.325552, -87.479828 41.325572, -87.479781 41.325608, -87.479755 41.325627, -87.479704 41.325659, -87.479549 41.325774, -87.479521 41.325797, -87.479500 41.325826, -87.479488 41.325859, -87.479486 41.325876, -87.479484 41.325939, -87.479485 41.326009, -87.479493 41.326085, -87.479496 41.326156, -87.479495 41.326228, -87.479490 41.326256, -87.479465 41.326299, -87.479448 41.326317, -87.479427 41.326335, -87.479377 41.326368, -87.479310 41.326398, -87.479249 41.326424, -87.479202 41.326434, -87.479136 41.326443, -87.479033 41.326444, -87.478823 41.326441, -87.478714 41.326444, -87.478608 41.326444, -87.478504 41.326446, -87.478401 41.326453, -87.478298 41.326455, -87.478193 41.326456, -87.478089 41.326454, -87.477866 41.326457, -87.477758 41.326456, -87.477718 41.326457, -87.477535 41.326454, -87.477424 41.326455, -87.477352 41.326454, -87.477029 41.326457, -87.476816 41.326453, -87.476707 41.326453, -87.476285 41.326444, -87.476094 41.326448, -87.476031 41.326447, -87.475997 41.326449, -87.475894 41.326450, -87.475781 41.326442))"},"url":"{{airscoutcloud_base_url}}/external-partners-api/orders/{{externalPartnerId}}/element?hierarchyCategoryId=5&elementId=184","description":"<p>Use this resource to remove a hierarchy element. In order to successfully remove a hierarchy element you must removed all children of the hierarchy element. For the case of a Field you must cancel all orders first.</p>\n","urlObject":{"path":["external-partners-api","orders","{{externalPartnerId}}","element"],"host":["{{airscoutcloud_base_url}}"],"query":[{"description":{"content":"<p>The ID of the hierarchy category of the element you wish to create. Remember to still include the hierarchyCategory parameter as an attribute in the JSON of the body of the request you putting.</p>\n","type":"text/plain"},"key":"hierarchyCategoryId","value":"5"},{"description":{"content":"<p>The ID of the hierarchy element you wish to delete.</p>\n","type":"text/plain"},"key":"elementId","value":"184"}],"variable":[]}},"response":[],"_postman_id":"0a857870-966b-e19e-fe94-4d61700c9d2a"},{"name":"Get Children of Hierarchy Element","id":"444987f0-0e7a-bde3-b99a-44b469d1aab2","request":{"method":"GET","header":[{"key":"appUserKey","value":"{{appUserKey}}"}],"body":{"mode":"raw","raw":""},"url":"{{airscoutcloud_base_url}}/external-partners-api/orders/{{externalPartnerId}}/element/children?hierarchyCategoryId=0&elementId=7","description":"<p>Use this resource to retrieve the childern of a given hierarchy element. This will be how you’ll traverse the Airscout Hiearchy. Notice there is a legacy property called “childrenIds”, this will not be populated and is left over from a legacy implementation and still currently in the model for backwards compatability reasons.</p>\n","urlObject":{"path":["external-partners-api","orders","{{externalPartnerId}}","element","children"],"host":["{{airscoutcloud_base_url}}"],"query":[{"description":{"content":"<p>The ID of the hierarchy category of the element you wish to query for.</p>\n","type":"text/plain"},"key":"hierarchyCategoryId","value":"0"},{"description":{"content":"<p>The ID of the hierarchy element you wish to query for.</p>\n","type":"text/plain"},"key":"elementId","value":"7"}],"variable":[]}},"response":[],"_postman_id":"444987f0-0e7a-bde3-b99a-44b469d1aab2"}],"event":[{"listen":"prerequest","script":{"id":"2068c107-c2a6-4e46-b589-3e00e6d1d901","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"171570b0-d1f6-4985-8fe3-4c0af8957495","type":"text/javascript","exec":[""]}}]}