{"id":262,"date":"2025-07-11T22:24:28","date_gmt":"2025-07-11T22:24:28","guid":{"rendered":"https:\/\/www.audio2note.org\/?page_id=262"},"modified":"2025-11-14T14:47:34","modified_gmt":"2025-11-14T14:47:34","slug":"swagger-rest-api","status":"publish","type":"page","link":"https:\/\/www.notin.ai\/?page_id=262","title":{"rendered":"Swagger Rest API"},"content":{"rendered":"<p><!DOCTYPE html><br \/>\n<html lang=\"en\"><br \/>\n<head><br \/>\n  <meta charset=\"UTF-8\"><br \/>\n  <title>Notin API Documentation<\/title>\n  <link rel=\"stylesheet\" type=\"text\/css\" href=\"https:\/\/unpkg.com\/swagger-ui-dist@5\/swagger-ui.css\">\n<style>\n    html {\n      box-sizing: border-box;\n      overflow: -moz-scrollbars-vertical;\n      overflow-y: scroll;\n    }\n    *,\n    *:before,\n    *:after {\n      box-sizing: inherit;\n    }\n    body {\n      margin: 0;\n      background: #fafafa;\n    }\n    .swagger-ui .topbar, .swagger-ui .info .scheme-container {\n      display: none;\n    }\n  <\/style>\n<p><\/head><br \/>\n<body><\/p>\n<div id=\"swagger-ui\"><\/div>\n<p>  <script src=\"https:\/\/unpkg.com\/swagger-ui-dist@5\/swagger-ui-bundle.js\"><\/script><br \/>\n  <script src=\"https:\/\/unpkg.com\/swagger-ui-dist@5\/swagger-ui-standalone-preset.js\"><\/script><br \/>\n  <script>\n    window.onload = function() {\n      const ui = SwaggerUIBundle({\n        spec: {\n          \"openapi\": \"3.0.3\",\n          \"info\": {\n            \"title\": \"Notin Transcription API\",\n            \"description\": \"A RESTful API for submitting audio files for transcription and processing into clinical notes.\\nAuthentication is handled by providing a valid license key in the `x-license-key` header.\",\n            \"version\": \"1.0.0\"\n          },\n          \"servers\": [\n            {\n              \"url\": \"https:\/\/backend.notin.ai\/webhook\/\",\n              \"description\": \"Production Server\"\n            }\n          ],\n          \"components\": {\n            \"securitySchemes\": {\n              \"LicenseKeyAuth\": {\n                \"type\": \"apiKey\",\n                \"in\": \"header\",\n                \"name\": \"x-license-key\"\n              }\n            },\n            \"schemas\": {\n              \"TranscriptionRequest\": {\n                \"type\": \"object\",\n                \"required\": [\n                  \"audio\",\n                  \"note_type\"\n                ],\n                \"properties\": {\n                  \"audio\": {\n                    \"type\": \"string\",\n                    \"format\": \"binary\",\n                    \"description\": \"The audio file to be transcribed.\"\n                  },\n                  \"note_type\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"SOAP\", \"History and Physical\", \"Summary\"],\n                    \"description\": \"The type of clinical note to generate.\"\n                  },\n                  \"historical_notes_text\": {\n                    \"type\": \"string\",\n                    \"description\": \"The concatenated text of historical notes. Required only when note_type is 'Summary'.\"\n                  },\n                  \"min_speakers\": {\n                    \"type\": \"integer\",\n                    \"enum\": [1, 2, 3, 4],\n                    \"default\": 1\n                  },\n                  \"max_speakers\": {\n                    \"type\": \"integer\",\n                    \"enum\": [2, 3, 4, 5, 6],\n                    \"default\": 2\n                  },\n                  \"visit_category\": {\n                    \"type\": \"string\",\n                    \"description\": \"The category of the visit. Required if note_type is not 'Summary'.\",\n                    \"enum\": [\n                      \"Office or Other Outpatient Services - New Patient\",\n                      \"Office or Other Outpatient Services - Established Patient\",\n                      \"Hospital Inpatient and Observation Care Services\",\n                      \"Consultations\",\n                      \"Emergency Department Services\",\n                      \"Nursing Facility Services\",\n                      \"Home or Residence Services\",\n                      \"Prolonged Services\"\n                    ]\n                  },\n                  \"visit_class\": {\n                    \"type\": \"string\",\n                    \"description\": \"The class of the visit. The valid options depend on the 'visit_category'.\\n- For 'Office' or 'Outpatient' categories, use 'Outpatient'.\\n- For 'Hospital', 'Inpatient', or 'Observation' categories, use 'Inpatient'.\\n- etc.\",\n                    \"enum\": [\n                      \"Outpatient\",\n                      \"Inpatient\",\n                      \"Consultation\",\n                      \"Emergency\",\n                      \"Nursing Facility\",\n                      \"Home or Residence\",\n                      \"Prolonged Services\"\n                    ]\n                  },\n                  \"visit_type\": {\n                    \"type\": \"string\",\n                    \"description\": \"The type of the visit. The valid options depend on the 'visit_category'.\",\n                    \"enum\": [\n                        \"Office o\/p new sf 15 min\",\n                        \"Office o\/p new low 30 min\",\n                        \"Office o\/p new mod 45 min\",\n                        \"Office o\/p new hi 60 min\",\n                        \"Off\/op est may x req phy\/qhp\",\n                        \"Office o\/p est sf 10 min\",\n                        \"Office o\/p est low 20 min\",\n                        \"Office o\/p est mod 30 min\",\n                        \"Office o\/p est hi 40 min\",\n                        \"1st hosp ip\/obs sf\/low 40\",\n                        \"1st hosp ip\/obs moderate 55\",\n                        \"1st hosp ip\/obs high 75\",\n                        \"Sbsq hosp ip\/obs sf\/low 25\",\n                        \"Sbsq hosp ip\/obs moderate 35\",\n                        \"Sbsq hosp ip\/obs high 50\",\n                        \"Hosp ip\/obs sm dt sf\/low 45\",\n                        \"Hosp ip\/obs same date mod 70\",\n                        \"Hosp ip\/obs same date hi 85\",\n                        \"Hosp ip\/obs dschrg mgmt 30\/<\",\n                        \"Hosp ip\/obs dschrg mgmt >30\",\n                        \"Off\/op consltj new\/est sf 20\",\n                        \"Off\/op cnsltj new\/est low 30\",\n                        \"Off\/op cnsltj new\/est mod 40\",\n                        \"Off\/op consltj new\/est hi 55\",\n                        \"Ip\/obs consltj new\/est sf 35\",\n                        \"Ip\/obs cnsltj new\/est low 45\",\n                        \"Ip\/obs cnsltj new\/est mod 60\",\n                        \"Ip\/obs consltj new\/est hi 80\",\n                        \"Emr dpt vst mayx req phy\/qhp\",\n                        \"Emergency dept visit sf mdm\",\n                        \"Emergency dept visit low mdm\",\n                        \"Emergency dept visit mod mdm\",\n                        \"Emergency dept visit hi mdm\",\n                        \"Direct advanced life support\",\n                        \"1st nf care sf\/low mdm 25\",\n                        \"1st nf care moderate mdm 35\",\n                        \"1st nf care high mdm 50\",\n                        \"Sbsq nf care sf mdm 10\",\n                        \"Sbsq nf care low mdm 20\",\n                        \"Sbsq nf care moderate mdm 30\",\n                        \"Sbsq nf care high mdm 45\",\n                        \"Nf dschrg mgmt 30 min\/less\",\n                        \"Nf dschrg mgmt 30 min+\",\n                        \"Home\/res vst new sf mdm 15\",\n                        \"Home\/res vst new low mdm 30\",\n                        \"Home\/res vst new mod mdm 60\",\n                        \"Home\/res vst new high mdm 75\",\n                        \"Home\/res vst est sf mdm 20\",\n                        \"Home\/res vst est low mdm 30\",\n                        \"Home\/res vst est mod mdm 40\",\n                        \"Home\/res vst est high mdm 60\",\n                        \"Prolong service w\/o contact\",\n                        \"Prolong serv w\/o contact add\"\n                    ]\n                  }\n                }\n              },\n              \"JobAcceptedResponse\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"job_id\": {\n                    \"type\": \"string\",\n                    \"format\": \"uuid\",\n                    \"description\": \"A unique identifier for the transcription job.\"\n                  },\n                  \"status\": {\n                    \"type\": \"string\",\n                    \"example\": \"queued\"\n                  }\n                }\n              },\n              \"JobStatusResponse\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"job_id\": {\n                    \"type\": \"string\",\n                    \"format\": \"uuid\"\n                  },\n                  \"status\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"queued\", \"processing\", \"completed\", \"failed\"]\n                  },\n                  \"results\": {\n                    \"type\": \"object\",\n                    \"description\": \"Included when the job status is 'completed'.\",\n                    \"properties\": {\n                      \"subjective\": { \"type\": \"string\" },\n                      \"objective\": { \"type\": \"string\" },\n                      \"assessment\": { \"type\": \"string\" },\n                      \"plan\": { \"type\": \"string\" },\n                      \"billing_content\": { \"type\": \"string\" }\n                    }\n                  }\n                }\n              },\n              \"ErrorResponse\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"error\": {\n                    \"type\": \"string\",\n                    \"description\": \"A message describing the error.\"\n                  }\n                }\n              }\n            }\n          },\n          \"security\": [\n            {\n              \"LicenseKeyAuth\": []\n            }\n          ],\n          \"paths\": {\n            \"\/api_initiate_transcription\": {\n              \"post\": {\n                \"summary\": \"Initiate a Transcription Job\",\n                \"description\": \"Uploads an audio file to start the transcription and note generation process. The `visit_category`, `visit_class`, and `visit_type` parameters are conditionally related. The selection of a `visit_category` determines the possible values for `visit_class` and `visit_type`. Here is a complete list of the valid combinations:\\n\\n**Visit Details**\\n\\n*   **Office or Other Outpatient Services - New Patient**\\n    *   `visit_class`: \\\"Outpatient\\\"\\n    *   `visit_type`:\\n        *   \\\"Office o\/p new sf 15 min\\\"\\n        *   \\\"Office o\/p new low 30 min\\\"\\n        *   \\\"Office o\/p new mod 45 min\\\"\\n        *   \\\"Office o\/p new hi 60 min\\\"\\n*   **Office or Other Outpatient Services - Established Patient**\\n    *   `visit_class`: \\\"Outpatient\\\"\\n    *   `visit_type`:\\n        *   \\\"Off\/op est may x req phy\/qhp\\\"\\n        *   \\\"Office o\/p est sf 10 min\\\"\\n        *   \\\"Office o\/p est low 20 min\\\"\\n        *   \\\"Office o\/p est mod 30 min\\\"\\n        *   \\\"Office o\/p est hi 40 min\\\"\\n*   **Hospital Inpatient and Observation Care Services**\\n    *   `visit_class`: \\\"Inpatient\\\"\\n    *   `visit_type`:\\n        *   \\\"1st hosp ip\/obs sf\/low 40\\\"\\n        *   \\\"1st hosp ip\/obs moderate 55\\\"\\n        *   \\\"1st hosp ip\/obs high 75\\\"\\n        *   \\\"Sbsq hosp ip\/obs sf\/low 25\\\"\\n        *   \\\"Sbsq hosp ip\/obs moderate 35\\\"\\n        *   \\\"Sbsq hosp ip\/obs high 50\\\"\\n        *   \\\"Hosp ip\/obs sm dt sf\/low 45\\\"\\n        *   \\\"Hosp ip\/obs same date mod 70\\\"\\n        *   \\\"Hosp ip\/obs same date hi 85\\\"\\n        *   \\\"Hosp ip\/obs dschrg mgmt 30\/<\\\"\\n        *   \\\"Hosp ip\/obs dschrg mgmt >30\\\"\\n*   **Consultations**\\n    *   `visit_class`: \\\"Consultation\\\"\\n    *   `visit_type`:\\n        *   \\\"Off\/op consltj new\/est sf 20\\\"\\n        *   \\\"Off\/op cnsltj new\/est low 30\\\"\\n        *   \\\"Off\/op cnsltj new\/est mod 40\\\"\\n        *   \\\"Off\/op consltj new\/est hi 55\\\"\\n        *   \\\"Ip\/obs consltj new\/est sf 35\\\"\\n        *   \\\"Ip\/obs cnsltj new\/est low 45\\\"\\n        *   \\\"Ip\/obs cnsltj new\/est mod 60\\\"\\n        *   \\\"Ip\/obs consltj new\/est hi 80\\\"\\n*   **Emergency Department Services**\\n    *   `visit_class`: \\\"Emergency\\\"\\n    *   `visit_type`:\\n        *   \\\"Emr dpt vst mayx req phy\/qhp\\\"\\n        *   \\\"Emergency dept visit sf mdm\\\"\\n        *   \\\"Emergency dept visit low mdm\\\"\\n        *   \\\"Emergency dept visit mod mdm\\\"\\n        *   \\\"Emergency dept visit hi mdm\\\"\\n        *   \\\"Direct advanced life support\\\"\\n*   **Nursing Facility Services**\\n    *   `visit_class`: \\\"Nursing Facility\\\"\\n    *   `visit_type`:\\n        *   \\\"1st nf care sf\/low mdm 25\\\"\\n        *   \\\"1st nf care moderate mdm 35\\\"\\n        *   \\\"1st nf care high mdm 50\\\"\\n        *   \\\"Sbsq nf care sf mdm 10\\\"\\n        *   \\\"Sbsq nf care low mdm 20\\\"\\n        *   \\\"Sbsq nf care moderate mdm 30\\\"\\n        *   \\\"Sbsq nf care high mdm 45\\\"\\n        *   \\\"Nf dschrg mgmt 30 min\/less\\\"\\n        *   \\\"Nf dschrg mgmt 30 min+\\\"\\n*   **Home or Residence Services**\\n    *   `visit_class`: \\\"Home or Residence\\\"\\n    *   `visit_type`:\\n        *   \\\"Home\/res vst new sf mdm 15\\\"\\n        *   \\\"Home\/res vst new low mdm 30\\\"\\n        *   \\\"Home\/res vst new mod mdm 60\\\"\\n        *   \\\"Home\/res vst new high mdm 75\\\"\\n        *   \\\"Home\/res vst est sf mdm 20\\\"\\n        *   \\\"Home\/res vst est low mdm 30\\\"\\n        *   \\\"Home\/res vst est mod mdm 40\\\"\\n        *   \\\"Home\/res vst est high mdm 60\\\"\\n*   **Prolonged Services**\\n    *   `visit_class`: \\\"Prolonged Services\\\"\\n    *   `visit_type`:\\n        *   \\\"Prolong service w\/o contact\\\"\\n        *   \\\"Prolong serv w\/o contact add\\\"\",\n                \"requestBody\": {\n                  \"required\": true,\n                  \"content\": {\n                    \"multipart\/form-data\": {\n                      \"schema\": {\n                        \"$ref\": \"#\/components\/schemas\/TranscriptionRequest\"\n                      },\n                      \"examples\": {\n                        \"soap_note_example\": {\n                          \"summary\": \"Example for a SOAP note\",\n                          \"value\": {\n                            \"note_type\": \"SOAP\",\n                            \"min_speakers\": 1,\n                            \"max_speakers\": 2,\n                            \"visit_category\": \"Office or Other Outpatient Services - New Patient\",\n                            \"visit_class\": \"Outpatient\",\n                            \"visit_type\": \"Office o\/p new sf 15 min\",\n                            \"audio\": \"(binary file data)\"\n                          }\n                        },\n                        \"history_and_physical_example\": {\n                          \"summary\": \"Example for a History and Physical note\",\n                          \"value\": {\n                            \"note_type\": \"History and Physical\",\n                            \"min_speakers\": 1,\n                            \"max_speakers\": 2,\n                            \"visit_category\": \"Hospital Inpatient and Observation Care Services\",\n                            \"visit_class\": \"Inpatient\",\n                            \"visit_type\": \"1st hosp ip\/obs moderate 55\",\n                            \"audio\": \"(binary file data)\"\n                          }\n                        },\n                        \"summary_note_example\": {\n                          \"summary\": \"Example for a Summary note\",\n                          \"value\": {\n                            \"note_type\": \"Summary\",\n                            \"historical_notes_text\": \"Patient seen on 2023-01-15 for cough, improving with medication. Follow-up on 2023-02-03 showed resolution of symptoms.\",\n                            \"audio\": \"(dummy binary file data)\"\n                          }\n                        }\n                      }\n                    }\n                  }\n                },\n                \"responses\": {\n                  \"202\": {\n                    \"description\": \"The job has been successfully accepted for processing.\",\n                    \"content\": {\n                      \"application\/json\": {\n                        \"schema\": {\n                          \"$ref\": \"#\/components\/schemas\/JobAcceptedResponse\"\n                        }\n                      }\n                    }\n                  },\n                  \"400\": {\n                    \"description\": \"Bad Request - The request body is invalid or missing required fields.\",\n                    \"content\": {\n                      \"application\/json\": {\n                        \"schema\": {\n                          \"$ref\": \"#\/components\/schemas\/ErrorResponse\"\n                        }\n                      }\n                    }\n                  },\n                  \"403\": {\n                    \"description\": \"Forbidden - The license key is invalid or expired.\",\n                    \"content\": {\n                      \"application\/json\": {\n                        \"schema\": {\n                          \"$ref\": \"#\/components\/schemas\/ErrorResponse\"\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            },\n            \"\/api_status\": {\n              \"get\": {\n                \"summary\": \"Check Job Status\",\n                \"description\": \"Retrieves the current status and results of a transcription job using the job_id.\",\n                \"security\": [\n                  {\n                    \"LicenseKeyAuth\": []\n                  }\n                ],\n                \"parameters\": [\n                  {\n                    \"name\": \"job_id\",\n                    \"in\": \"query\",\n                    \"required\": true,\n                    \"schema\": {\n                      \"type\": \"string\",\n                      \"format\": \"uuid\"\n                    }\n                  }\n                ],\n                \"responses\": {\n                  \"200\": {\n                    \"description\": \"The job status and results.\",\n                    \"content\": {\n                      \"application\/json\": {\n                        \"schema\": {\n                          \"$ref\": \"#\/components\/schemas\/JobStatusResponse\"\n                        }\n                      }\n                    }\n                  },\n                  \"404\": {\n                    \"description\": \"Not Found - The specified job_id does not exist.\",\n                    \"content\": {\n                      \"application\/json\": {\n                        \"schema\": {\n                          \"$ref\": \"#\/components\/schemas\/ErrorResponse\"\n                        }\n                      }\n                    }\n                  },\n                  \"429\": {\n                    \"description\": \"Too Many Requests - The user has exceeded the rate limit.\",\n                    \"content\": {\n                      \"application\/json\": {\n                        \"schema\": {\n                          \"$ref\": \"#\/components\/schemas\/ErrorResponse\"\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        },\n        dom_id: '#swagger-ui',\n        deepLinking: true,\n        presets: [\n          SwaggerUIBundle.presets.apis,\n          SwaggerUIStandalonePreset\n        ],\n        plugins: [\n          SwaggerUIBundle.plugins.DownloadUrl\n        ],\n        layout: \"StandaloneLayout\",\n        requestInterceptor: (req) => {\n          if (req.body instanceof FormData) {\n            req.body.append('source', 'api');\n            req.body.append('output_format', 'json');\n          }\n          return req;\n        }\n      })\n      window.ui = ui\n    }\n  <\/script><br \/>\n<\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Notin API Documentation<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-262","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.notin.ai\/index.php?rest_route=\/wp\/v2\/pages\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.notin.ai\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.notin.ai\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.notin.ai\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.notin.ai\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=262"}],"version-history":[{"count":21,"href":"https:\/\/www.notin.ai\/index.php?rest_route=\/wp\/v2\/pages\/262\/revisions"}],"predecessor-version":[{"id":426,"href":"https:\/\/www.notin.ai\/index.php?rest_route=\/wp\/v2\/pages\/262\/revisions\/426"}],"wp:attachment":[{"href":"https:\/\/www.notin.ai\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}