{"info":{"_postman_id":"e7338f97-0b31-41cd-ab91-292aec2fb091","name":"DSI API Documentation","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"9012901","collectionId":"e7338f97-0b31-41cd-ab91-292aec2fb091","publishedId":"UVe9Spob","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-01-31T18:26:41.000Z"},"item":[{"name":"Search Api","event":[{"listen":"test","script":{"id":"19d43372-1260-41f3-a4d1-04f0bd8bc396","exec":["// Note: get API key from https://federate.doctorevidence.com/api/keys/reset\r","\r","const jsonData = pm.response.json();\r","\r","// checking for successful response is 200, 201, 202\r","pm.test(\"checking for successful response is 200, 201, 202\", function() {\r","    \r","   pm.expect(pm.response.code).to.be.oneOf([200,201,202]);\r","    \r","});\r","\r","// checking that 1. object header fields exist  and that they are the correct value type\r","\r","pm.test(\"check JSON obbject header fields exist and are correct value type\", function() {\r","    pm.expect(jsonData).to.be.an(\"object\");\r","    pm.expect(jsonData.totalResult).to.be.a(\"number\");\r","    pm.expect(jsonData.totolResultInResponse).to.be.a(\"number\");\r","\r","    \r","});\r","\r","\r","// Search URL string never empty\r","pm.test(\"search URL not empty\", function() {\r","    pm.expect(jsonData.generateSearchUrl).to.be.not.oneOf([null,'',0,\"\"]);\r","\r","    \r","});\r","\r","// dsiResult array to have required fields\r","pm.test(\"dsiResult array to have required fields\", function() {\r","    pm.expect(jsonData.dsiResult).to.be.an(\"array\");\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('id');\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('genericName');\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('brandName');\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('dosage');\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('manufacturer');\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('region');\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('lastUpdatedDate');\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('url');\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('version');\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('labelUrl');\r","\r","    \r","});\r","\r","\r","// dsiResult array  to have correct data type\r","pm.test(\"dsiResult array to have correct data type\", function() {\r","    pm.expect(jsonData.dsiResult).to.be.an(\"array\");\r","    pm.expect(jsonData.dsiResult[0].id).to.be.a(\"string\");\r","    pm.expect(jsonData.dsiResult[0].genericName).to.be.a(\"string\");\r","    pm.expect(jsonData.dsiResult[0].brandName).to.be.a(\"string\");\r","    pm.expect(jsonData.dsiResult[0].dosage).to.be.a(\"string\");\r","    pm.expect(jsonData.dsiResult[0].manufacturer).to.be.a(\"string\");\r","    pm.expect(jsonData.dsiResult[0].region).to.be.a(\"string\");\r","    pm.expect(jsonData.dsiResult[0].lastUpdatedDate).to.be.a(\"string\");\r","    pm.expect(jsonData.dsiResult[0].url).to.be.a(\"string\");\r","    pm.expect(jsonData.dsiResult[0].version).to.be.a(\"number\");\r","    pm.expect(jsonData.dsiResult[0].labelUrl).to.be.a(\"string\");\r","\r","    \r","});\r","\r","\r","pm.test(\"dsiResult array to have not empty required fields\", function() {\r","\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('id').and.not.eql(0);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('id').and.not.eql(null);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('id').and.not.eql(undefined);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('genericName').and.not.eql(0);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('genericName').and.not.eql(null);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('genericName').and.not.eql(undefined);\r","\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('manufacturer').and.not.eql(0);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('manufacturer').and.not.eql(null);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('manufacturer').and.not.eql(undefined);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('region').and.not.eql(0);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('region').and.not.eql(null);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('region').and.not.eql(undefined);\r","\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('url').and.not.eql(0);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('url').and.not.eql(null);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('url').and.not.eql(undefined);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('version').and.not.eql(0);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('version').and.not.eql(null);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('version').and.not.eql(undefined);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('labelUrl').and.not.eql(0);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('labelUrl').and.not.eql(null);\r","    pm.expect(jsonData.dsiResult[0]).to.have.property('labelUrl').and.not.eql(undefined);\r","\r","    \r","});\r","\r","\r","\r",""],"type":"text/javascript"}}],"id":"5668680d-bad1-49ac-907b-0d855d128b33","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"searchValue","value":"nausea;headache;vomit","type":"text"},{"key":"country","value":"us","type":"text"},{"key":"pageNumber","value":"1","type":"text"},{"key":"onlyInnovator","value":"true","type":"text"},{"key":"discontinued","value":"false","type":"text"}]},"url":"https://labelapi.doctorevidence.com/services/api/dsi/getLabelInfo","description":"<h2 id=\"search-api\">Search Api</h2>\n<blockquote>\n<p>POST <a href=\"https://labelapidev.doctorevidence.com/services/api/dsi/getLabelInfo\">https://labelapi.doctorevidence.com/services/api/dsi/getLabelInfo</a></p>\n</blockquote>\n<p><em><strong>Authorization:</strong></em></p>\n<p>Federate bearer token for Authorization retrieved from <a href=\"https://federate.doctorevidence.com/api/keys/reset\">https://federate.doctorevidence.com/api/keys/reset</a></p>\n<p>Note :</p>\n<ul>\n<li>For getting the token, first you have to login on DoctorEvidence site. then visit the above URL.</li>\n<li>Everytime you visit the above URL, the token will reset. So old token will no longer work.</li>\n</ul>\n<p><em><strong>Request Data:</strong></em></p>\n<ul>\n<li><p><code>searchValue</code> list of the search terms separated with <code>&amp;</code> and <code>;</code> operators.</p>\n</li>\n<li><p><code>country</code> list of the country's abbreviation. e.g. us,uk,eu,ca,au. comma-separated</p>\n</li>\n<li><p><code>pageNumber</code> is the number field for pagination.</p>\n</li>\n<li><p><code>onlyInnovator</code> is the boolean field. if it has true then include the labels which are innovator</p>\n</li>\n<li><p><code>dicontinued</code> is the boolean field, if it has true value then include discontinued labels otherwise discarded those labels from response.</p>\n</li>\n<li><p>e.g.<br /><strong>1) humira&amp;botox</strong> : it will generate a search query <code>any section contains humira AND botox</code><br /><strong>2) humira;botox :</strong> it will generate a search query <code>any section contains humira OR botox</code></p>\n</li>\n</ul>\n<h5 id=\"response-data\"><em><strong>Response Data:</strong></em></h5>\n<ul>\n<li><code>totalResult</code> is the total number of labels found for the given search terms.</li>\n<li><code>totolResultInResponse</code> is the total number of labels returned in the response.</li>\n<li><code>generateSearchUrl</code> url to perform the same search operation on label site.</li>\n<li><code>id</code> uniquely identifies the label version, it is combination of country and fileid.<br />e.g. UK20564-23 is <code>UK</code> label with fileId <code>20564-23</code>.</li>\n<li><code>genericName</code> is the generic name of the label.</li>\n<li><code>dosage</code> is the dosage of the label.</li>\n<li><code>manufacturer</code> is the manufacturer name of the label</li>\n<li><code>region</code> is the country the label belongs to.</li>\n<li><code>lastUpdatedDate</code> is the last updated date of the label</li>\n<li><code>url</code> is the url of actual label sources. e.g. emc url for UK label</li>\n<li><code>version</code> is the current version of the label</li>\n<li><code>labelUrl</code> is the url to view the label html on label site.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["services","api","dsi","getLabelInfo"],"host":["labelapi","doctorevidence","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"5668680d-bad1-49ac-907b-0d855d128b33"}]}