Create Delivery
This API is used to create delivery for corporate using uniquely assigned APP Key to that particular corporate.
Request headers
Corporate App key
Request Signature, “URL-encoded query string” signed with corporate app secret key with sha256. “query string” should be sort alphbetically before making hash/signature.
Here is the example code in PHP to create signature using coporate app secret.
function CreateSignature($form_data){
$app_secret = USER_APP_SECRET; // replace with your app secret
$data = $form_data;
ksort($data); // sort form data keys alphabatically
$queryString = http_build_query($data); // Generate URL-encoded query string
$signature = hash_hmac("sha256", $queryString, $app_secret); // create hash/signature
return $signature;
}
Request body
First name of customer
Last name of customer
Address of customer
Zip Code / Postal Code of customer
Birthdate of patient, default patient is same as customer
Provider’s id in pharmacy / corporate.
Drug info array, each entity containing “rx”, “fill_date” and “copayment”
drug_info[0][["rx"]=>"123456",["fill_date"]=>"12/23/2010",["copayment"]=>"5"]],
drug_info[1][["rx"]=>"789012",["fill_date"]=>"05/19/1998",["copayment"]=>"5"]]
RX number
Fill date of rx
Copayment amount in dollars
Expected day to deliver your delivery, integer value
Tomorrow
Today
Rush Delivery
Day after tomorrow
Second Day after tomorrow
Third Day after tomorrow
Number of deliveries
Preffered time to deliver the delivery.
any time between 12:00pm and 19:00
“before_time_selector” parameter is required if “before” is selected, before_time_selector value must be in between 13 and 19.
“after_time_selector” parameter is required if “after” is selected, after_time_selector value must be in between 12 and 18.
Required if “delivery_preferred_time” is “before”, value must be in 13 and 19.
Required if selected value for “delivery_preferred_time” is “after”, value must be in 12 and 18.
Type of package from Prescription, Envelope or Small Package, Medium Package, Large Package
Prescription
Envelope or Small Package
Medium Package
Large Package
Provide description of package/delivery
How to deliver the parcel, array index is used to set the value, value of index 2 and 3 can be setable to “true”, index 2 = “Leave with doorman” and index 3 = “Leave near the patient’s door with the Patient’s authorization”
delivery_options_list[2]=true
Delivery Pickup Note
Next delivery in future, if given: must be a future date. Can be null. Default false.
Set to true if item is a controlled substance. Can be null. Default false.
Set to true if you want to collect copayment. Can be null. Default false.
Set to true if item is a fridge medication. Can be null. Default false.
Set to true if you want signature of patient at the time of delivery. Can be null. Default false.
Set to true if document signature required while delivering. Can be null.
Set to true if item is sensitive. Can be null. Default false.
Responses
Delivery Created
Body
Response Code
Response Error code
Response Details
Created delivery Id
Response Message
Success status
Missing Headers
Body
Response Code 1 for success
Response Error code
Response Details
Response Message
Success status
Invalid app key
Body
Response Code 1 for success
Response Error code
Response Details
Response Message
Success status
Invalid Signature
Body
Response Code
Response Error code
Response Details
Response Message
Success status
Missing Provider
Body
Response Code
Response Error code
Response Details
Response Message
Success status
Body
Response Code
Response Error code
Response Details
Field name
Provided Value
Field Id
Response Message
Success status
Body
Response Code
Response Error code
Response Details
Field name
Provided Value
Field Id
Response Message
Success status