{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"8bbd5cc4-5892-49ef-a8f0-ea1420c8f8ef","name":"Akute Health Customer API Documentation","description":"### Base URLs:\n\n- [https://api.staging.akutehealth.com/v1](https://)\n    \n- [https://api.akutehealth.com/v1](https://)\n    \n\n# Authentication\n\n- API Key (APIKeyHeader)\n    \n    - Parameter Name: **X-API-Key**, in: header.\n        \n- Webhook Signature (SignatureHeader)\n    \n    - Parameter Name: **x-akute-signature**, in: header. Akute generates signatures using a hash-based message authentication code (HMAC) with SHA-256.\n        \n\n## Webhook Signatures\n\n### Step 1: Extract the timestamp and signatures from the header\n\nSplit the header, using the , character as the separator, to get a list of elements. Then split each element, using the = character as the separator, to get a prefix and value pair.\n\nThe value for the prefix 't' corresponds to the timestamp, and the prefix 'v1' corresponds to the signature. The below code block is an example signature header you could receive.\n\nBefore you can verify signatures, you need to retrieve your endpoint’s secret from your [Settings-&gt;Developer](https://) page, and clicking on a webhook's secret reveal.\n\n``` javascript\nx-akute-signature:\nt=1492774577,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd\n\n ```\n\n### Step 2: Prepare the signed_payload string\n\nThe signed_payload string will be used in the `update` function in step 4 and is created by concatenating:\n\n- The timestamp (as a string)\n    \n- The character `.`\n    \n- The actual JSON payload (i.e., the request body)\n    \n\n``` javascript\n${timestamp}.${JSON.stringify(request.body)}\n\n ```\n\n### Step 3: Determine the expected signature\n\nCompute an HMAC with the SHA256 hash function. Use the Akute webhook secret as the key, and use the payload string as the message.\n\n``` javascript\nfunction parseHeader(header) {\n  if (typeof header !== \"string\") {\n    return null;\n  }\n  return header.split(\",\").reduce(\n    (accum, item) => {\n      const kv = item.split(\"=\");\n      if (kv[0] === \"t\") {\n        accum.timestamp = kv[1];\n      }\n      if (kv[0] === \"v1\") {\n        accum.signature = kv[1];\n      }\n      return accum;\n    },\n    {\n      timestamp: -1,\n      signature: \"\"\n    }\n  );\n}\nconst headerDetails = parseHeader(request.headers[\"x-akute-signature\"]);\n\n ```\n\n### Step 4: Compare the signatures\n\nCompare the signature (or signatures) in the header to the expected signature.\n\nFor an equality match, compute the difference between the current timestamp and the received timestamp, then decide if the difference is within your tolerance.\n\nTo protect against timing attacks, use constant-time string comparison to compare the expected signature to each of the received signatures.\n\n``` javascript\nconst unfoldedSignature = crypto\n    .createHmac('sha256', secret)\n    .update(`${headerDetails.timestamp}.${JSON.stringify(request.body)}`, 'utf8')\n    .digest('hex');\nconst isValid = crypto.timingSafeEqual(unfoldedSignature, headerDetails.signature);\n\n ```\n\n# Supported Webhooks\n\n[See full webhook documentation here](https://help.akutehealth.com/article/212-supported-webhooks).\n\n- Medications\n    \n- Medication Prior Auths\n    \n- Tasks\n    \n- Diagnostic Reports\n    \n- Order Requests\n    \n- Orders\n    \n- Faxes\n    \n- Patients\n    \n- Notes","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"4139535","team":1979514,"collectionId":"8bbd5cc4-5892-49ef-a8f0-ea1420c8f8ef","publishedId":"2s93XzyP7n","public":true,"publicUrl":"https://developer.akutehealth.com","privateUrl":"https://go.postman.co/documentation/4139535-8bbd5cc4-5892-49ef-a8f0-ea1420c8f8ef","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"61b47b"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"API documentation users of Akute Health can use to enhance the dataset in Akute with their own data or build their own patient-facing or internal applications using Akute's APIs."},{"name":"title","value":"Akute Health API Documentation"}],"appearance":{"default":"light","themes":[{"name":"dark","logo":"https://content.pstmn.io/fe8aa780-74fc-41f7-b8a4-036e2c5e7e8c/QWt1dGVIZWFsdGhfRmluYWxBcnR3b3JrXzUxMiAoMSkucG5n","colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"61b47b"}},{"name":"light","logo":"https://content.pstmn.io/fe8aa780-74fc-41f7-b8a4-036e2c5e7e8c/QWt1dGVIZWFsdGhfRmluYWxBcnR3b3JrXzUxMiAoMSkucG5n","colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"61b47b"}}]}},"version":"8.10.1","publishDate":"2023-08-31T00:25:08.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"Akute Health API Documentation","description":"API documentation users of Akute Health can use to enhance the dataset in Akute with their own data or build their own patient-facing or internal applications using Akute's APIs."},"logos":{"logoLight":"https://content.pstmn.io/fe8aa780-74fc-41f7-b8a4-036e2c5e7e8c/QWt1dGVIZWFsdGhfRmluYWxBcnR3b3JrXzUxMiAoMSkucG5n","logoDark":"https://content.pstmn.io/fe8aa780-74fc-41f7-b8a4-036e2c5e7e8c/QWt1dGVIZWFsdGhfRmluYWxBcnR3b3JrXzUxMiAoMSkucG5n"}},"statusCode":200},"environments":[{"name":"Akute EHR - Staging (Public)","id":"2fcfb5dd-34bd-4446-a4ac-7ace858f92c2","owner":"4139535","values":[{"key":"serverBaseUrl","value":"api.staging.akutehealth.com","enabled":true},{"key":"labcorp_performer_organization_id","value":"f-e20f61500ba128d340068ff6","enabled":true,"type":"default"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/90a5a6f8e0c9ccaf0efb71b22044c90fd570024413e4dba2b31317a7c311f89b","favicon":"https://res.cloudinary.com/postman/image/upload/v1693441176/team/j5xadgpb3qyewdivxedf.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Akute EHR - Staging (Public)","value":"4139535-2fcfb5dd-34bd-4446-a4ac-7ace858f92c2"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2s93XzyP7n"}