{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"Accounts","type":"basic","slug":"accounts","excerpt":"","body":"An Account allows a user to manage Products from LRS. \n\nSome facts about accounts in LRS Connect are:\n \n  * Accounts owned by an Administrative user. \n  * Other types of users are Managers and Reporting users. \n  * A user may be an Administrator, Manager or Reporting user on one more more accounts. \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Account Attributes\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Details\",\n    \"0-0\": \"accountGuid\",\n    \"0-1\": \"Unique identifier for an account.\",\n    \"1-0\": \"companyName\",\n    \"1-1\": \"The company name for the account.\",\n    \"2-0\": \"countryCode\",\n    \"2-1\": \"The country associated with the account.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"/rest/v3/accounts\"\n}\n[/block]\nRetrieves a list of accounts that are authorized for the user.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Report Controller accounts (GET https://connect.lrsus.com/rest/v3/accounts)\\n\\n$.ajax({\\n    url: \\\"https://connect.lrsus.com/rest/v3/accounts\\\",\\n    type: \\\"GET\\\",\\n    headers: {\\n        \\\"Authorization\\\": \\\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\\\",\\n    },\\n})\\n.done(function(data, textStatus, jqXHR) {\\n    console.log(\\\"HTTP Request Succeeded: \\\" + jqXHR.status);\\n    console.log(data);\\n})\\n.fail(function(jqXHR, textStatus, errorThrown) {\\n    console.log(\\\"HTTP Request Failed\\\");\\n})\\n.always(function() {\\n    /* ... */\\n});\\n\",\n      \"language\": \"javascript\"\n    },\n    {\n      \"code\": \"import java.io.IOException;\\nimport org.apache.http.client.fluent.*;\\n\\npublic class SendRequest\\n{\\n  public static void main(String[] args) {\\n    sendRequest();\\n  }\\n  \\n  private static void sendRequest() {\\n    \\n    // Report Controller accounts (GET )\\n    \\n    try {\\n      \\n      // Create request\\n      Content content = Request.Get(\\\"https://connect.lrsus.com/rest/v3/accounts\\\")\\n      \\n      // Add headers\\n      .addHeader(\\\"Authorization\\\", \\\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\\\")\\n      \\n      // Fetch request and return content\\n      .execute().returnContent();\\n      \\n      // Print content\\n      System.out.println(content);\\n    }\\n    catch (IOException e) { System.out.println(e); }\\n  }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Report Controller accounts (GET https://connect.lrsus.com/rest/v3/accounts)\\n\\nNSURL* URL = [NSURL URLWithString::::at:::\\\"https://connect.lrsus.com/rest/v3/accounts\\\"];\\nNSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:URL];\\nrequest.HTTPMethod = @\\\"GET\\\";\\n\\n// Headers\\n\\n[request addValue:@\\\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\\\" forHTTPHeaderField:@\\\"Authorization\\\"];\\n\\n// Connection\\n\\nNSURLConnection* connection = [NSURLConnection connectionWithRequest:request delegate:nil];\\n[connection start];\\n\\n\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"curl -X \\\"GET\\\" \\\"https://connect.lrsus.com/rest/v3/accounts\\\" \\\\\\n\\t-H \\\"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\\\"\\n\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"# Install the Python Requests library:\\n# `pip install requests`\\n\\nimport requests\\n\\ndef send_request():\\n    # Report Controller accounts (GET https://connect.lrsus.com/rest/v3/accounts)\\n\\n    try:\\n        r = requests.get(\\n            url=\\\"https://connect.lrsus.com/rest/v3/accounts\\\",\\n            headers = {\\n                \\\"Authorization\\\":\\\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\\\",\\n            },\\n        )\\n        print('Response HTTP Status Code   : {status_code}'.format(status_code=r.status_code))\\n        print('Response HTTP Response Body : {content}'.format(content=r.content))\\n    except requests.exceptions.RequestException as e:\\n        print('HTTP Request failed')\\n\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Response 200 (application/json)\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n          \\\"status\\\": 200,\\n          \\\"count\\\": \\\"25\\\",\\n          \\\"offset\\\" : 50,\\n          \\\"limit\\\" : 25,\\n          \\\"first\\\" : \\\"https://connect.lrsus.com/rest/v3/accounts?offset=0&limit=25\\\",\\n          \\\"previous\\\" : \\\"https://connect.lrsus.com/rest/v3/accounts?offset=25&limit=25\\\",\\n          \\\"next\\\" : \\\"https://connect.lrsus.com/rest/v3/accounts?offset=75&limit=25\\\",\\n          \\\"last\\\" : \\\"https://connect.lrsus.com/rest/v3/accounts?offset=8745&limit=25\\\",\\n          \\\"items\\\": [\\n            {\\n              \\\"accountGuid\\\": \\\"777a5eb-59ea-4003-9c1c-77760879c88d\\\",\\n              \\\"companyName\\\": \\\"Bob's Deli\\\",\\n              \\\"countryCode\\\": \\\"US\\\"\\n            },\\n            ...\\n            {\\n              \\\"accountGuid\\\": \\\"888a5eb-59ea-4003-9c1c-77760879c88d\\\",\\n              \\\"companyName\\\": \\\"Chimera Bread\\\",\\n              \\\"countryCode\\\": \\\"US\\\"\\n            }\\n          ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"/rest/v3/accounts/{accountGuid}\"\n}\n[/block]\nRetrieves details for a particular account identified by its guid.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Details\",\n    \"0-0\": \"accountGuid\",\n    \"0-1\": \"Unique identifier for an account\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Report Controller accounts (GET https://connect.lrsus.com/rest/v3/accounts/7c088e00-edeb-43b6-9303-872e0385d598)\\n\\n$.ajax({\\n    url: \\\"https://connect.lrsus.com/rest/v3/accounts/7c088e00-edeb-43b6-9303-872e0385d598\\\",\\n    type: \\\"GET\\\",\\n    headers: {\\n        \\\"Authorization\\\": \\\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\\\",\\n    },\\n})\\n.done(function(data, textStatus, jqXHR) {\\n    console.log(\\\"HTTP Request Succeeded: \\\" + jqXHR.status);\\n    console.log(data);\\n})\\n.fail(function(jqXHR, textStatus, errorThrown) {\\n    console.log(\\\"HTTP Request Failed\\\");\\n})\\n.always(function() {\\n    /* ... */\\n});\\n\",\n      \"language\": \"javascript\"\n    },\n    {\n      \"code\": \"import java.io.IOException;\\nimport org.apache.http.client.fluent.*;\\n\\npublic class SendRequest\\n{\\n  public static void main(String[] args) {\\n    sendRequest();\\n  }\\n  \\n  private static void sendRequest() {\\n    \\n    // Report Controller accounts (GET )\\n    \\n    try {\\n      \\n      // Create request\\n      Content content = Request.Get(\\\"https://connect.lrsus.com/rest/v3/accounts/7c088e00-edeb-43b6-9303-872e0385d598\\\")\\n      \\n      // Add headers\\n      .addHeader(\\\"Authorization\\\", \\\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\\\")\\n      \\n      // Fetch request and return content\\n      .execute().returnContent();\\n      \\n      // Print content\\n      System.out.println(content);\\n    }\\n    catch (IOException e) { System.out.println(e); }\\n  }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Report Controller accounts (GET https://connect.lrsus.com/rest/v3/accounts/7c088e00-edeb-43b6-9303-872e0385d598)\\n\\nNSURL* URL = [NSURL URLWithString:@\\\"https://connect.lrsus.com/rest/v3/accounts/7c088e00-edeb-43b6-9303-872e0385d598\\\"];\\nNSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:URL];\\nrequest.HTTPMethod = @\\\"GET\\\";\\n\\n// Headers\\n\\n[request addValue:@\\\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\\\" forHTTPHeaderField:@\\\"Authorization\\\"];\\n\\n// Connection\\n\\nNSURLConnection* connection = [NSURLConnection connectionWithRequest:request delegate:nil];\\n[connection start];\\n\\n\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"curl -X \\\"GET\\\" \\\"https://connect.lrsus.com/rest/v3/accounts/7c088e00-edeb-43b6-9303-872e0385d598\\\" \\\\\\n\\t-H \\\"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\\\"\\n\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"# Install the Python Requests library:\\n# `pip install requests`\\n\\nimport requests\\n\\ndef send_request():\\n    # Report Controller accounts (GET https://connect.lrsus.com/rest/v3/accounts/7c088e00-edeb-43b6-9303-872e0385d598)\\n\\n    try:\\n        r = requests.get(\\n            url=\\\"https://connect.lrsus.com/rest/v3/accounts/7c088e00-edeb-43b6-9303-872e0385d598\\\",\\n            headers = {\\n                \\\"Authorization\\\":\\\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\\\",\\n            },\\n        )\\n        print('Response HTTP Status Code   : {status_code}'.format(status_code=r.status_code))\\n        print('Response HTTP Response Body : {content}'.format(content=r.content))\\n    except requests.exceptions.RequestException as e:\\n        print('HTTP Request failed')\\n\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Response 200 (application/json)\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n          \\\"status\\\": 200,\\n          \\\"account\\\":\\n            {\\n              \\\"accountGuid\\\": \\\"777a5eb-59ea-4003-9c1c-77760879c88d\\\",\\n              \\\"companyName\\\": \\\"Jason's Deli\\\",\\n              \\\"countryCode\\\": \\\"US\\\"\\n            }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","updates":[],"order":4,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"58766da64a24f82f00bbf289","createdAt":"2015-08-05T14:57:54.007Z","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Documentation","slug":"documentation","order":0,"from_sync":false,"reference":false,"_id":"58766da64a24f82f00bbf286","version":"58766da54a24f82f00bbf285","project":"552819c1555b9e0d00564f74","createdAt":"2015-04-10T18:43:14.538Z","__v":0},"project":"552819c1555b9e0d00564f74","githubsync":"","__v":0,"user":"55157a70c859ac2f0001b535","version":{"version":"3.0","version_clean":"3.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["58766da64a24f82f00bbf286","5e97f10ca9631a0231d9c19a"],"_id":"58766da54a24f82f00bbf285","releaseDate":"2017-01-11T17:38:45.993Z","project":"552819c1555b9e0d00564f74","__v":2,"createdAt":"2017-01-11T17:38:45.993Z"},"parentDoc":null}
An Account allows a user to manage Products from LRS. Some facts about accounts in LRS Connect are: * Accounts owned by an Administrative user. * Other types of users are Managers and Reporting users. * A user may be an Administrator, Manager or Reporting user on one more more accounts. [block:api-header] { "type": "basic", "title": "Account Attributes" } [/block] [block:parameters] { "data": { "h-0": "Name", "h-1": "Description", "h-2": "Details", "0-0": "accountGuid", "0-1": "Unique identifier for an account.", "1-0": "companyName", "1-1": "The company name for the account.", "2-0": "countryCode", "2-1": "The country associated with the account." }, "cols": 3, "rows": 3 } [/block] [block:api-header] { "type": "get", "title": "/rest/v3/accounts" } [/block] Retrieves a list of accounts that are authorized for the user. [block:api-header] { "type": "basic", "title": "Request" } [/block] [block:code] { "codes": [ { "code": "// Report Controller accounts (GET https://connect.lrsus.com/rest/v3/accounts)\n\n$.ajax({\n url: \"https://connect.lrsus.com/rest/v3/accounts\",\n type: \"GET\",\n headers: {\n \"Authorization\": \"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\",\n },\n})\n.done(function(data, textStatus, jqXHR) {\n console.log(\"HTTP Request Succeeded: \" + jqXHR.status);\n console.log(data);\n})\n.fail(function(jqXHR, textStatus, errorThrown) {\n console.log(\"HTTP Request Failed\");\n})\n.always(function() {\n /* ... */\n});\n", "language": "javascript" }, { "code": "import java.io.IOException;\nimport org.apache.http.client.fluent.*;\n\npublic class SendRequest\n{\n public static void main(String[] args) {\n sendRequest();\n }\n \n private static void sendRequest() {\n \n // Report Controller accounts (GET )\n \n try {\n \n // Create request\n Content content = Request.Get(\"https://connect.lrsus.com/rest/v3/accounts\")\n \n // Add headers\n .addHeader(\"Authorization\", \"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\")\n \n // Fetch request and return content\n .execute().returnContent();\n \n // Print content\n System.out.println(content);\n }\n catch (IOException e) { System.out.println(e); }\n }\n}", "language": "java" }, { "code": "// Report Controller accounts (GET https://connect.lrsus.com/rest/v3/accounts)\n\nNSURL* URL = [NSURL URLWithString:@\"https://connect.lrsus.com/rest/v3/accounts\"];\nNSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:URL];\nrequest.HTTPMethod = @\"GET\";\n\n// Headers\n\n[request addValue:@\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\" forHTTPHeaderField:@\"Authorization\"];\n\n// Connection\n\nNSURLConnection* connection = [NSURLConnection connectionWithRequest:request delegate:nil];\n[connection start];\n\n", "language": "objectivec" }, { "code": "curl -X \"GET\" \"https://connect.lrsus.com/rest/v3/accounts\" \\\n\t-H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\"\n", "language": "curl" }, { "code": "# Install the Python Requests library:\n# `pip install requests`\n\nimport requests\n\ndef send_request():\n # Report Controller accounts (GET https://connect.lrsus.com/rest/v3/accounts)\n\n try:\n r = requests.get(\n url=\"https://connect.lrsus.com/rest/v3/accounts\",\n headers = {\n \"Authorization\":\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\",\n },\n )\n print('Response HTTP Status Code : {status_code}'.format(status_code=r.status_code))\n print('Response HTTP Response Body : {content}'.format(content=r.content))\n except requests.exceptions.RequestException as e:\n print('HTTP Request failed')\n", "language": "python" } ] } [/block] [block:api-header] { "type": "basic", "title": "Response 200 (application/json)" } [/block] [block:code] { "codes": [ { "code": "{\n \"status\": 200,\n \"count\": \"25\",\n \"offset\" : 50,\n \"limit\" : 25,\n \"first\" : \"https://connect.lrsus.com/rest/v3/accounts?offset=0&limit=25\",\n \"previous\" : \"https://connect.lrsus.com/rest/v3/accounts?offset=25&limit=25\",\n \"next\" : \"https://connect.lrsus.com/rest/v3/accounts?offset=75&limit=25\",\n \"last\" : \"https://connect.lrsus.com/rest/v3/accounts?offset=8745&limit=25\",\n \"items\": [\n {\n \"accountGuid\": \"777a5eb-59ea-4003-9c1c-77760879c88d\",\n \"companyName\": \"Bob's Deli\",\n \"countryCode\": \"US\"\n },\n ...\n {\n \"accountGuid\": \"888a5eb-59ea-4003-9c1c-77760879c88d\",\n \"companyName\": \"Chimera Bread\",\n \"countryCode\": \"US\"\n }\n ]\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "get", "title": "/rest/v3/accounts/{accountGuid}" } [/block] Retrieves details for a particular account identified by its guid. [block:parameters] { "data": { "h-0": "Name", "h-1": "Description", "h-2": "Details", "0-0": "accountGuid", "0-1": "Unique identifier for an account" }, "cols": 3, "rows": 1 } [/block] [block:api-header] { "type": "basic", "title": "Request" } [/block] [block:code] { "codes": [ { "code": "// Report Controller accounts (GET https://connect.lrsus.com/rest/v3/accounts/7c088e00-edeb-43b6-9303-872e0385d598)\n\n$.ajax({\n url: \"https://connect.lrsus.com/rest/v3/accounts/7c088e00-edeb-43b6-9303-872e0385d598\",\n type: \"GET\",\n headers: {\n \"Authorization\": \"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\",\n },\n})\n.done(function(data, textStatus, jqXHR) {\n console.log(\"HTTP Request Succeeded: \" + jqXHR.status);\n console.log(data);\n})\n.fail(function(jqXHR, textStatus, errorThrown) {\n console.log(\"HTTP Request Failed\");\n})\n.always(function() {\n /* ... */\n});\n", "language": "javascript" }, { "code": "import java.io.IOException;\nimport org.apache.http.client.fluent.*;\n\npublic class SendRequest\n{\n public static void main(String[] args) {\n sendRequest();\n }\n \n private static void sendRequest() {\n \n // Report Controller accounts (GET )\n \n try {\n \n // Create request\n Content content = Request.Get(\"https://connect.lrsus.com/rest/v3/accounts/7c088e00-edeb-43b6-9303-872e0385d598\")\n \n // Add headers\n .addHeader(\"Authorization\", \"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\")\n \n // Fetch request and return content\n .execute().returnContent();\n \n // Print content\n System.out.println(content);\n }\n catch (IOException e) { System.out.println(e); }\n }\n}", "language": "java" }, { "code": "// Report Controller accounts (GET https://connect.lrsus.com/rest/v3/accounts/7c088e00-edeb-43b6-9303-872e0385d598)\n\nNSURL* URL = [NSURL URLWithString:@\"https://connect.lrsus.com/rest/v3/accounts/7c088e00-edeb-43b6-9303-872e0385d598\"];\nNSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:URL];\nrequest.HTTPMethod = @\"GET\";\n\n// Headers\n\n[request addValue:@\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\" forHTTPHeaderField:@\"Authorization\"];\n\n// Connection\n\nNSURLConnection* connection = [NSURLConnection connectionWithRequest:request delegate:nil];\n[connection start];\n\n", "language": "objectivec" }, { "code": "curl -X \"GET\" \"https://connect.lrsus.com/rest/v3/accounts/7c088e00-edeb-43b6-9303-872e0385d598\" \\\n\t-H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\"\n", "language": "curl" }, { "code": "# Install the Python Requests library:\n# `pip install requests`\n\nimport requests\n\ndef send_request():\n # Report Controller accounts (GET https://connect.lrsus.com/rest/v3/accounts/7c088e00-edeb-43b6-9303-872e0385d598)\n\n try:\n r = requests.get(\n url=\"https://connect.lrsus.com/rest/v3/accounts/7c088e00-edeb-43b6-9303-872e0385d598\",\n headers = {\n \"Authorization\":\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzU3ODAwMjksInN1YiI6IlY5MjhaNENSV1hUM1oxWlFJNzRUSk5UUFgiLCJpc3MiOiJodHRwczovL2FwaS5zdG9ybXBhdGguY29tL3YxL2FwcGxpY2F0aW9ucy81c3VtdGdod3A2Vkw2cUdTbUN3VDJjIiwiaWF0IjoxNDM1Nzc4ODI5fQ.HImt7h2ML-gNsphXIxRIlIv9IV8uLuOuSx8QKyezeA0\",\n },\n )\n print('Response HTTP Status Code : {status_code}'.format(status_code=r.status_code))\n print('Response HTTP Response Body : {content}'.format(content=r.content))\n except requests.exceptions.RequestException as e:\n print('HTTP Request failed')\n", "language": "python" } ] } [/block] [block:api-header] { "type": "basic", "title": "Response 200 (application/json)" } [/block] [block:code] { "codes": [ { "code": "{\n \"status\": 200,\n \"account\":\n {\n \"accountGuid\": \"777a5eb-59ea-4003-9c1c-77760879c88d\",\n \"companyName\": \"Jason's Deli\",\n \"countryCode\": \"US\"\n }\n}", "language": "json" } ] } [/block]