---
# System prepended metadata

title: getdrugnames

---

**MedImpact URL**: https://uatrxsavings-ws.medimpact.com/cashcard-ws-v1_0/soap/cashcard
**Argus URL**: https://argusprod.dstsystems.com/

# getdrugnames
parameter: *string name*
URL: /druglookup/getdrugnames?name=<fragment>&rxbin=&rxpcn

Calls MedImpact using SOAP request over the endpoint `findDrugByNameRequest` and passing hqCode, timestamp and the name as parameter. The value of hqCode is `WAT01`.

Medimpact Request:
```xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:v1="http://rx-savings.medimpact.com/contract/PricingEngine/v1.0">
    <soapenv:Header />
       <soapenv:Body>
            <v1:findDrugByNameRequest>
                 <v1:clientAccountCode>' . 'WAT01' . '</v1:clientAccountCode>
                 <v1:token>UK3AsckpOwoab3LHkBKfK6+ckJs2d/8uS1MpyC1df2H66xhOTvhaAxlcfMWDfayyycdKDTRb9+wv9/pf6so09zJZK7VEVGFSZb57+ZxbLXIU0MsSP1DnPiii1gKBuqK7cxhMKnqep3Bxdzdza9siRjw5etHZD5lz7HehfYp1Kb2UK6bYE1rDWv36w5/kSLkGQzqpbM/G+TOrUNoBRVrbY7iQ0yqNR3hesvV2SgfnDwROehOPODA+1gs4A44AYd0KwjbK8d6Kc6WYzaJYMPLTtgKGyIILfQkh8sZ+s8BTgKw4NEnR/flN5gToNy2RC36M94t11iEnZqUgE1IZDm6NmQ==</v1:token>
                 <v1:timestamp>' . '20200806155501' . '</v1:timestamp>
                 <v1:prefixText>' . 'ZOLO' . '</v1:prefixText>
                 <!--Optional:-->
                 <v1:count>10</v1:count>
            </v1:findDrugByNameRequest>
       </soapenv:Body>
</soapenv:Envelope>
```

Medimpact Response:

```
name: string(296) "ZOLOFT"
```

# getstrengths
parameter: *string name*, *string brd*
URL:  /druglookup/getstrengths?name=<drug-name>

Calls MedImpact using SOAP request over the endpoint `getPharmacyDrugPricingRequest` and passing hqCode, timestamp, name, zipcode, and flag(generic or brand) as parameter
The values of hqCode is `WAT01`

MedImpact Request:
```xml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:v1="http://rx-savings.medimpact.com/contract/PricingEngine/v1.0">
       <soapenv:Header />
       <soapenv:Body>
          <v1:getPharmacyDrugPricingRequest>
             <v1:clientAccountCode>' . WAT01 . '</v1:clientAccountCode>
             <v1:token>UK3AsckpOwoab3LHkBKfK6+ckJs2d/8uS1MpyC1df2H66xhOTvhaAxlcfMWDfayyycdKDTRb9+wv9/pf6so09zJZK7VEVGFSZb57+ZxbLXIU0MsSP1DnPiii1gKBuqK7cxhMKnqep3Bxdzdza9siRjw5etHZD5lz7HehfYp1Kb2UK6bYE1rDWv36w5/kSLkGQzqpbM/G+TOrUNoBRVrbY7iQ0yqNR3hesvV2SgfnDwROehOPODA+1gs4A44AYd0KwjbK8d6Kc6WYzaJYMPLTtgKGyIILfQkh8sZ+s8BTgKw4NEnR/flN5gToNy2RC36M94t11iEnZqUgE1IZDm6NmQ==</v1:token>
             <v1:timestamp>' . 20200806135901 . '</v1:timestamp>
                 <v1:pharmacyCriteria>
                    <v1:addressCriteria>
                        <v1:zipCode>33301</v1:zipCode>
                    </v1:addressCriteria>
                 </v1:pharmacyCriteria>
                 <v1:drugCriteria>
                    <v1:drugName>' . ZOLOFT . '</v1:drugName>
                    <v1:brandGenericFlag>' . G . '</v1:brandGenericFlag>
                 </v1:drugCriteria>
         </v1:getPharmacyDrugPricingRequest>
       </soapenv:Body>
    </soapenv:Envelope>
```

MedImpact Response:

```php
array(2) {
    ["data"] => array(4) {
        ["forms"] => array(2) {
            [46228] => array(4) {
                ["form"] => string(6)
                "TABLET" ["gsn"] => string(5)
                "46228" ["select"] => bool(true)["ranking"] => int(1)
            } [46230] => array(4) {
                ["form"] => string(9)
                "ORAL CONC" ["gsn"] => string(5)
                "46230" ["select"] => bool(false)["ranking"] => int(4)
            }
        } ["quantities_temp"] => array(10) {
            [30] => array(3) {
                ["quantity"] => float(30)["ranking"] => int(1)["select"] => bool(true)
            } [90] => array(3) {
                ["quantity"] => float(90)["ranking"] => int(2)["select"] => bool(false)
            } [100] => array(3) {
                ["quantity"] => float(100)["ranking"] => int(3)["select"] => bool(false)
            } [45] => array(3) {
                ["quantity"] => float(45)["ranking"] => int(4)["select"] => bool(false)
            } [60] => array(3) {
                ["quantity"] => float(60)["ranking"] => int(5)["select"] => bool(false)
            } [200] => array(3) {
                ["quantity"] => float(200)["ranking"] => int(6)["select"] => bool(false)
            } [15] => array(3) {
                ["quantity"] => float(15)["ranking"] => int(7)["select"] => bool(false)
            } [150] => array(3) {
                ["quantity"] => float(150)["ranking"] => int(8)["select"] => bool(false)
            } [135] => array(3) {
                ["quantity"] => float(135)["ranking"] => int(9)["select"] => bool(false)
            } [120] => array(3) {
                ["quantity"] => float(120)["ranking"] => int(10)["select"] => bool(false)
            }
        } ["quantities"] => array(10) {
            [15] => array(3) {
                ["quantity"] => float(15)["ranking"] => int(7)["select"] => bool(false)
            } [30] => array(3) {
                ["quantity"] => float(30)["ranking"] => int(1)["select"] => bool(true)
            } [45] => array(3) {
                ["quantity"] => float(45)["ranking"] => int(4)["select"] => bool(false)
            } [60] => array(3) {
                ["quantity"] => float(60)["ranking"] => int(5)["select"] => bool(false)
            } [90] => array(3) {
                ["quantity"] => float(90)["ranking"] => int(2)["select"] => bool(false)
            } [100] => array(3) {
                ["quantity"] => float(100)["ranking"] => int(3)["select"] => bool(false)
            } [120] => array(3) {
                ["quantity"] => float(120)["ranking"] => int(10)["select"] => bool(false)
            } [135] => array(3) {
                ["quantity"] => float(135)["ranking"] => int(9)["select"] => bool(false)
            } [150] => array(3) {
                ["quantity"] => float(150)["ranking"] => int(8)["select"] => bool(false)
            } [200] => array(3) {
                ["quantity"] => float(200)["ranking"] => int(6)["select"] => bool(false)
            }
        } ["strengths"] => array(3) {
            [46228] => array(3) {
                ["gsn"] => string(5)
                "46228" ["strength"] => string(5)
                "50 MG" ["select"] => bool(true)
            } [46229] => array(3) {
                ["gsn"] => string(5)
                "46229" ["strength"] => string(6)
                "100 MG" ["select"] => bool(false)
            } [46227] => array(3) {
                ["gsn"] => string(5)
                "46227" ["strength"] => string(5)
                "25 MG" ["select"] => bool(false)
            }
        }
    } ["error"] => int(0)
    }
```

# getgsnbasedonform
parameter: *string gsn, string brd*
URL: /druglookup/getstrengths?name=<drug-name>&brb=<generic or brand>

Calls MedImpact using SOAP request over the endpoint `getPharmacyDrugPricingRequest` and passing hqCode, timestamp, gsn, zipcode and brb(generic or brand) as parameter. The value of hqCode is `WAT01`

MedImpact Request:

```xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:v1="http://rx-savings.medimpact.com/contract/PricingEngine/v1.0">
   <soapenv:Header />
   <soapenv:Body>
      <v1:getPharmacyDrugPricingRequest>
         <v1:clientAccountCode>' . WAT01 . '</v1:clientAccountCode>
         <v1:token>UK3AsckpOwoab3LHkBKfK6+ckJs2d/8uS1MpyC1df2H66xhOTvhaAxlcfMWDfayyycdKDTRb9+wv9/pf6so09zJZK7VEVGFSZb57+ZxbLXIU0MsSP1DnPiii1gKBuqK7cxhMKnqep3Bxdzdza9siRjw5etHZD5lz7HehfYp1Kb2UK6bYE1rDWv36w5/kSLkGQzqpbM/G+TOrUNoBRVrbY7iQ0yqNR3hesvV2SgfnDwROehOPODA+1gs4A44AYd0KwjbK8d6Kc6WYzaJYMPLTtgKGyIILfQkh8sZ+s8BTgKw4NEnR/flN5gToNy2RC36M94t11iEnZqUgE1IZDm6NmQ==</v1:token>
         <v1:timestamp>' . 20200806110101 . '</v1:timestamp>
             <v1:pharmacyCriteria>
                <v1:addressCriteria>
                    <v1:zipCode>33301</v1:zipCode>
                </v1:addressCriteria>
             </v1:pharmacyCriteria>
             <v1:drugCriteria>
                <v1:gsn>' . 46227 . '</v1:gsn>
                <v1:brandGenericFlag>'.G.'</v1:brandGenericFlag>
             </v1:drugCriteria>
     </v1:getPharmacyDrugPricingRequest>
   </soapenv:Body>
</soapenv:Envelope>
```

MedImpact Response:

```php
array(2) {
    ["data"] => array(4) {
        ["forms"] => array(2) {
            [46228] => array(4) {
                ["form"] => string(6)
                "TABLET" ["gsn"] => string(5)
                "46228" ["select"] => bool(true)["ranking"] => int(1)
            } [46230] => array(4) {
                ["form"] => string(9)
                "ORAL CONC" ["gsn"] => string(5)
                "46230" ["select"] => bool(false)["ranking"] => int(4)
            }
        } ["quantities_temp"] => array(10) {
            [30] => array(3) {
                ["quantity"] => float(30)["ranking"] => int(1)["select"] => bool(true)
            } [60] => array(3) {
                ["quantity"] => float(60)["ranking"] => int(2)["select"] => bool(false)
            } [45] => array(3) {
                ["quantity"] => float(45)["ranking"] => int(3)["select"] => bool(false)
            } [90] => array(3) {
                ["quantity"] => float(90)["ranking"] => int(4)["select"] => bool(false)
            } [100] => array(3) {
                ["quantity"] => float(100)["ranking"] => int(5)["select"] => bool(false)
            } [180] => array(3) {
                ["quantity"] => float(180)["ranking"] => int(6)["select"] => bool(false)
            } [200] => array(3) {
                ["quantity"] => float(200)["ranking"] => int(7)["select"] => bool(false)
            } [135] => array(3) {
                ["quantity"] => float(135)["ranking"] => int(8)["select"] => bool(false)
            } [150] => array(3) {
                ["quantity"] => float(150)["ranking"] => int(9)["select"] => bool(false)
            } [15] => array(3) {
                ["quantity"] => float(15)["ranking"] => int(10)["select"] => bool(false)
            }
        } ["quantities"] => array(10) {
            [15] => array(3) {
                ["quantity"] => float(15)["ranking"] => int(10)["select"] => bool(false)
            } [30] => array(3) {
                ["quantity"] => float(30)["ranking"] => int(1)["select"] => bool(true)
            } [45] => array(3) {
                ["quantity"] => float(45)["ranking"] => int(3)["select"] => bool(false)
            } [60] => array(3) {
                ["quantity"] => float(60)["ranking"] => int(2)["select"] => bool(false)
            } [90] => array(3) {
                ["quantity"] => float(90)["ranking"] => int(4)["select"] => bool(false)
            } [100] => array(3) {
                ["quantity"] => float(100)["ranking"] => int(5)["select"] => bool(false)
            } [135] => array(3) {
                ["quantity"] => float(135)["ranking"] => int(8)["select"] => bool(false)
            } [150] => array(3) {
                ["quantity"] => float(150)["ranking"] => int(9)["select"] => bool(false)
            } [180] => array(3) {
                ["quantity"] => float(180)["ranking"] => int(6)["select"] => bool(false)
            } [200] => array(3) {
                ["quantity"] => float(200)["ranking"] => int(7)["select"] => bool(false)
            }
        } ["strengths"] => array(3) {
            [46228] => array(3) {
                ["gsn"] => string(5)
                "46228" ["strength"] => string(5)
                "50 MG" ["select"] => bool(false)
            } [46229] => array(3) {
                ["gsn"] => string(5)
                "46229" ["strength"] => string(6)
                "100 MG" ["select"] => bool(true)
            } [46227] => array(3) {
                ["gsn"] => string(5)
                "46227" ["strength"] => string(5)
                "25 MG" ["select"] => bool(false)
            }
        }
    } ["error"] => int(0)
}
```

# getdrugprice
parameter: *string gsn, string brd, string zip, string qty*
URL: /druglookup/getdrugprice?brb=G&zip=33071&gsn=46229&brd=G&qty=30

This endpoint calls MedImpact and Argus to get the right price.

## MedImpact
Call MedImpact through the endpoints getPharmacyDrugPricingRequest to get drug information such as NDC passing the parameters: hqCode, timestamp, zip, gsn, brb and quantity.

MedImpact Request:
```xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:v1="http://rx-savings.medimpact.com/contract/PricingEngine/v1.0">
   <soapenv:Header />
   <soapenv:Body>
      <v1:getPharmacyDrugPricingRequest>
         <v1:clientAccountCode>' . WT01 . '</v1:clientAccountCode>
         <v1:token>UK3AsckpOwoab3LHkBKfK6+ckJs2d/8uS1MpyC1df2H66xhOTvhaAxlcfMWDfayyycdKDTRb9+wv9/pf6so09zJZK7VEVGFSZb57+ZxbLXIU0MsSP1DnPiii1gKBuqK7cxhMKnqep3Bxdzdza9siRjw5etHZD5lz7HehfYp1Kb2UK6bYE1rDWv36w5/kSLkGQzqpbM/G+TOrUNoBRVrbY7iQ0yqNR3hesvV2SgfnDwROehOPODA+1gs4A44AYd0KwjbK8d6Kc6WYzaJYMPLTtgKGyIILfQkh8sZ+s8BTgKw4NEnR/flN5gToNy2RC36M94t11iEnZqUgE1IZDm6NmQ==</v1:token>
         <v1:timestamp>' . 20200806151501 . '</v1:timestamp>
             <v1:pharmacyCriteria>
                <v1:addressCriteria>
                   <v1:zipCode>' . 33071 . '</v1:zipCode>
                </v1:addressCriteria>
             </v1:pharmacyCriteria>
             <v1:drugCriteria>
                <v1:gsn>' . 46228 . '</v1:gsn>
                <v1:brandGenericFlag>' . G . '</v1:brandGenericFlag>
             </v1:drugCriteria>';
             <v1:pricingControl>
                <v1:quantity>' . 30 . '</v1:quantity>
             </v1:pricingControl>
    </v1:getPharmacyDrugPricingRequest>
   </soapenv:Body>
</soapenv:Envelope>
```

MedImpact Response:
```php
array(4) {
    ["error"] => int(0)["data"] => array(20) {
        [0] => array(38) {
            ["BrandGeneric"] => string(1)
            "G" ["BrandGeneric_formatted"] => string(7)
            "Generic" ["Qty"] => float(30)["LN"] => string(10)
            "SERTRALINE" ["DrugRanking"] => int(2)["GSN"] => int(46229)["GroupName"] => string(0)
            "" ["GroupNum"] => string(0)
            "" ["NCPDP"] => string(0)
            "" ["HoursOfOperation"] => int(0)["ChainCode"] => string(11)
            "68645052354" ["QuantityRanking"] => int(1)["PriceBasis"] => string(2)
            "UC" ["network"] => string(0)
            "" ["MACPrice"] => string(3)
            "N/A" ["AWPPrice"] => string(6)
            "$78.18" ["NDC"] => string(11)
            "68645052354" ["usualAndCustomaryPrice"] => float(9)["UCPrice"] => float(9)["Address"] => string(24)
            "10635 WEST ATLANTIC BLVD" ["City"] => string(13)
            "CORAL SPRINGS" ["Distance"] => float(0.47)["PharmacyName"] => string(24)
            "WALMART PHARMACY 10-4380" ["Phone"] => string(13)
            "(954)345-9250" ["State"] => string(2)
            "FL" ["Zip"] => string(10)
            "33071-0000" ["Zip_formatted"] => string(5)
            "33071" ["Latitude"] => float(26.2421495)["Longitude"] => float(-80.2673853)["City_State_Zip"] => string(23)
            "CORAL SPRINGS, FL 33071" ["Address_Full"] => string(48)
            "10635 WEST ATLANTIC BLVD CORAL SPRINGS, FL 33071" ["Map_URL"] => string(85)
            "https://www.google.com/maps/search/10635+WEST+ATLANTIC+BLVD+CORAL+SPRINGS%2C+FL+33071" ["network_price"] => float(9)["network_price_formatted"] => string(5)
            "$9.00" ["discount"] => float(0)["discount_formatted"] => string(3)
            "N/A" ["discount_percentage_formatted"] => string(3)
            "N/A" ["UCPrice_formatted"] => string(5)
            "$9.00"
        }
    }
}
```

## Argus
Calls Argus using REST request over the endpoint `PharmacyPricing` as GET method and passing quantity, NDC, clientId (Acquire(2) or Watertree(1)), ZipCode, radius as parameter.

Argus Request:
```php
curl_setopt_array($curl, array(
    CURLOPT_URL => "https://argusprod.dstsystems.com/pharmacy-drug-pricing/1.0/service/PharmacyPricing?quantity=30&ndc=69097083512&clientId=1&zipCode=33071&radius=20",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Postman-Token: 151217c0-ff79-4612-9538-5e41bfbb8f18",
        "cache-control: no-cache"
    ),
));
```

Argus Response:
```json
"DrugPricing": [
    {
        "npi": "1437253390",
        "name": "CVS PHARMACY 04808",
        "pharmacy": "CVS PHARMACY",
        "phoneNumber": "9543417636",
        "street1": "11375 W ATLANTIC BLVD",
        "street2": "",
        "city": "CORAL SPRINGS",
        "state": "FL",
        "zipCode": "33071",
        "ndc": "69097083512",
        "price": "23.28",
        "labelName": "SERTRALINE HCL 100 MG TABLET"
    },
]
```