Packetek By AGAPE
Sign in to your Packetek Pharmacy Account here https://sandbox.packetek.nyc.
enter these credentials
username: pharmacy@bestrx.com
password: bestrx12345
click menu on top right menu, click corporate Information
Generate Keys if not created already
Copy the App key
To use the API key in a request header, specify the key in the X-API-KEY
parameter in the request header.
Request headers
Responses
Body
Http Status Code
Http Status Code description
Indicates the response Payload
This can be used in createOrder API to Identify the default pickup address for Pharmacy
Name of Pharmacy
Name of contact person in the Pharmacy
Complete Address of Pharmacy Pickup Location
Street Address Line 2 of the pharmacy.
City of the pharmacy.
State of the pharmacy.
Zipcode of the pharmacy.
Map coordinates of the pharmacy.
Map coordinates of the pharmacy.
Confirmation bit for default address
Customized description
Indicates request validity
Request headers
Request body
The Order ID generated within the BestRx system for the delivery order.
The date that the courier/carrier should pick up the order from the pharmacy.
The date that the order should be delivered, if a specific delivery date was requested.
The service level that describes the order. Suppored values are …
The sum of the cost of all prescription items in the order.
The sum of the cost of all OTC or non-prescription items in the order.
The total tax amount for the order.
The total dollar amount for this order. This should be equal to (prescription_amount + otc_amount + tax_amount).
The amount to collect from the patient at time of delivery. This does not necessarily have to be equal to the total_amount field. The patient could have already prepaid for all or part of the order, or the pharmacy could have an arrangement with the recipient to collect payment at a later time.
The dollar amount that is being declared for insurance purposes.
The height of the package.
The width of the package.
The length of the package.
The weight of the package.
Indicates if this order contains items that need to be refrigerated.
Indicates if the recipient’s signature is required at the time of delivery.
Indicates if the recipient’s Photo ID needs to be checked at the time of delivery.
Enter any delivery notes here that would help the courier or delivery person properly delivery the order. This will be also used for verification of DOB at the time of delivery. formate supported
Object with details about the pharmacy creating the order.
Unique GUID representing the Pharmacy ID of the BestRx client.
Account number that the BestRx client has with the delivery/shipping provider. this can be same as X-APP-KEY
The name of the pharmacy.
Object with address details.
Street Address Line 1 of the pharmacy.
Street Address Line 2 of the pharmacy.
City of the pharmacy.
State of the pharmacy.
Zip Code of the pharmacy.
Phone number of the pharmacy.
Fax number of the pharmacy.
Email address of the pharmacy.
NCPDP number of the pharmacy.
NPI number of the pharmacy.
DEA number of the pharmacy.
Object with details about the recipient of the order.
Entity name of the recipient if it’s a business, facility, school, or other type of organization.
Last name of the recipient.
First name of the recipient.
Middle name of the recipient.
Object with address details.
Street Address Line 1 of the reipient.
Street Address Line 2 of the reipient.
City of the reipient.
State of the reipient.
Zip Code of the reipient.
Home phone number of the reipient.
Work phone number of the reipient.
Mobile/cell phone number of the reipient.
Fax number of the reipient.
Email address of the reipient.
An array of objects containing info about the customers in the order. An order may contain items for multiple individuals. For example if delivering items for multiple members of the same family or delivering items to an orgranization such as an LTC facility.
Unique ID of the customer from the BestRx system.
Last name of the customer.
First name of the customer.
Middle name of the customer.
Object with address details.
Street Address Line 1 of the customer.
Street Address Line 2 of the customer.
City of the customer.
State of the customer.
Zip Code of the customer.
An array of objects containing information about the prescriptions that are in the order.
The unique BestRx Customer ID of the customer that this prescription is intended for.
Prescription Number
Fill Date / Date of Service of the prescription
The due amount that the patient is responsible for for this prescription.
Partial fill sequence number (if this is a partial fill)
An array of objects containing info about the OTC (non-prescription) items in the order.
The unique BestRx Customer ID that this item is intended for.
The UPC/SKU of the item.
The description or name of the item.
The number of units of this item in the order for this customer.
The total due amount of this item for the customer.
An array of objects containing information about the Consents that need to displayed at the time of delivery.
The header or title of the consent.
The detailed description to present to the recipient so that they can decide whether or not they would like to accept or decline this specific consent.
An array containing the various options that should be displayed for this consent.
A code indicating the Consent Type.
Custom Consents
Auto Refill
The BestRx Unique Order ID generated within the BestRx system for the delivery/shipping order.
Examples
Responses
If the order is created successfully, please return a HTTP response of 200
Body
Echo the bestrx_order_id that was sent in the request.
The Order ID for this order that was generated within the delivery/shipping provider’s system.
The tracking number generated for this order within the delivery/shipping provider’s system.
Echo the bestrx_pharmacy_id that was sent in the request.
An object containing details about the status of the order.
The date/time that the status of this order was last updated.
The current status code of this order.
Order Created
Order Acknowledged
Delivery/Shipment Cancelled
Picked Up by Courier/Carrier
Delivery/Shipment In Transit
Out For Delivery
Delivery/Shipment Delivered
Delivery Attempted
Unable To Deliver
Returned To Pharmacy/Store
The current status description of this order. This should match up with the description of the status code. This field is for informational purposes to help make troubleshooting easier when there are problems.
Any notes that would help clarify the current status of the order.
Url to download label
Label File Types
PNG
JPEG
GIF
Base64 encoded string
Url to download manifesto
Manifesto File Types
PNG
JPEG
GIF
Base64 encoded string
Echo the bestrx_unique_order_id that was sent in the request.
Tracking URL to track order
Indicates if the request was a good/valid request.
Any additional notes needed to clarify the current status of the order.
Message code.
The text of the message.
Specifies the type of message.
Information
Warning
[Error]
Success
Unknown
POST .../Order/CreateOrder HTTP/1.1
Content-Type: application/json
{
"bestrx_order_id": 123456789,
"bestrx_unique_order_id":1001,
"pickup_date": "2020-05-31",
"requested_delivery_date": "2020-06-02",
"service_level": "normal",
"prescription_amount": 32.15,
"otc_amount": 65.24,
"tax_amount": 54.23,
"total_amount": 97.83,
"amount_to_collect": 97.83,
"declared_amount": 50,
"height": "2 in",
"width": "2 in",
"length": "3 in",
"weight": "8 oz",
"refrigeration_needed": "false",
"signature_required": "true",
"photo_id_required": "false",
"delivery_notes": "Please leave on back porch if no one is home.",
"store": {
"bestrx_pharmacy_id": "ef0a4740-0be9-44f7-b89d-9e66eeba0b9a",
"delivery_provider_acct_no": "98989898",
"name": "BestRx Pharmacy",
"address": {
"address_line_1": "2625 Butterfield Rd",
"address_line_2": "Suite 200S",
"city": "Oak Brook",
"state": "IL",
"zip_code": "60523"
},
"phone": "6308939210",
"fax": "6303393171",
"email": "pharmacy@bestrx.com",
"ncpdp": 1234567,
"npi": "1234567890",
"dea": "BR1234563"
},
"recipient": {
"entity_name": "Doe Industries",
"last_name": "Doe",
"first_name": "Jane",
"middle_name": "Joplin",
"address": {
"address_line_1": "500 Second Ave",
"address_line_2": "Suite 100",
"city": "Bloomingdale",
"state": "IL",
"zip_code": "60108"
},
"home_phone": "6305551111",
"work_phone": "6305551111",
"mobile_phone": "45678946785",
"fax": "6305552222",
"email": "jane.doe@doeind.com"
},
"customers": [
{
"customer_unique_id": 111111,
"last_name": "Doe",
"first_name": "Jane",
"middle_name": "Joplin",
"address": {
"address_line_1": "123 Main St",
"address_line_2": "Suite 10",
"city": "Lombard",
"state": "IL",
"zip_code": "60523"
}
}
],
"prescriptions": [
{
"customer_unique_id": 111111,
"rx_number": 610011,
"fill_date": "2022-05-31",
"amount_due": 10,
"partial_fill_seqno": 1
}
],
"otc_items": [
{
"customer_unique_id": 111111,
"upc": "616784366630",
"item_description": "BANDAGE ELASTIC 6IN N LTX 3666",
"quantity": 1,
"amount_due": 25.26
}
],
"consents": [
{
"consent_header": "Enroll in Auto-Refills?",
"consent_text": "The prescriptions in your order are eligible for our auto-refill program. Would you like to enroll in that program so that your prescriptions can be automatically refilled without you having to contact the pharmacy?",
"consent_inputs": [
"no"
],
"consent_type": "0"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"bestrx_order_id": 123456789,
"bestrx_unique_order_id":1001,
"provider_order_id": "123456",
"tracking_id": "789456123",
"tracking_url": "https://developer.bestrxconnect.com/ordes/789456123",
"bestrx_pharmacy_id": "ef0a4740-0be9-44f7-b89d-9e66eeba0b9a",
"label_url": "https://developer.bestrxconnect.com/TestDispensingConsumerapi/images/BestRxDispenseLable.PNG",
"label_image": "",
"label_file_type": 1,
"manifesto_url": "https://developer.bestrxconnect.com/TestDispensingConsumerapi/images/BestRxDispenseLable.PNG",
"manifesto_image": "",
"manifesto_file_type": 1,
"order_status": {
"date": "2022-09-10T09:47:27.5232761Z",
"status_code": "10",
"status_code_description": "Order Created",
"status_notes": "An example would be if there was a delivery exception, the reason for that exception could be displayed here (\"recipient not home\")."
}
},
"request_is_valid": "true",
"messages": []
}
This endpoint is used to validate a address and return a list of suggested address
Request headers
Request body
Unique GUID representing the Pharmacy ID of the BestRx client.
Account number that the BestRx client has with the delivery/shipping provider.
The name of the pharmacy.
Object with address details.
Street Address Line 1 of the pharmacy.
Street Address Line 2 of the pharmacy.
Phone number of the pharmacy.
Fax number of the pharmacy.
Email address of the pharmacy.
NCPDP number of the pharmacy.
NPI number of the pharmacy.
DEA number of the pharmacy.
Object to validate address details.
Street Address Line 1.
Street Address Line 2.
City
State
Zip Code
Responses
Body
List object with suggested address
Information
Warning
[Error]
Success
Unknown
POST .../Address/ValidateAddress HTTP/1.1
Content-Type: application/json
{
"store": {
"bestrx_pharmacy_id": "ef0a4740-0be9-44f7-b89d-9e66eeba0b9a",
"delivery_provider_acct_no": "98989898",
"name": "BestRx Pharmacy",
"address": {
"address_line_1": "2625 Butterfield Rd",
"address_line_2": "Suite 200S",
"city": "Oak Brook",
"state": "IL",
"zip_code": "60523"
},
"phone": "6308939210",
"fax": "6303393171",
"email": "pharmacy@bestrx.com",
"ncpdp": "1234567",
"npi": "1234567890",
"dea": "BR1234563"
},
"address_to_validate": {
"address_line_1": "908 ATLANTIC AVE APT A APT A",
"address_line_2": "",
"city": "HOFFMAN ESTATES",
"state": "IL",
"zip_code": "60169"
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"suggested_address": [
{
"address_line_1": "908 ATLANTIC AVE APT A APT A",
"address_line_2": "",
"city": "HOFFMAN ESTATES",
"state": "IL",
"zip_code": "60169"
}
]
},
"messages": [],
"request_is_valid": "true"
}
This endpoint is used to cancel a shipment order.
Request headers
Request body
The Order ID generated within the BestRx system for the delivery/shipping order. This will be sent to the delivery/shipping provider when the order is created.
The Order ID for this order that was generated within the delivery/shipping provider’s system.
The tracking number generated for this order within the delivery/shipping provider’s system.
Object with details about the pharmacy cancelling the order.
Unique GUID representing the Pharmacy ID of the BestRx client. This will be sent to the delivery/shipping provider when the order is created.
Account number that the BestRx client has with the delivery/shipping provider.
Object with address details.
Street Address Line 1 of the pharmacy.
Street Address Line 2 of the pharmacy.
City of the pharmacy.
State of the pharmacy.
Zip Code of the pharmacy.
Phone number of the pharmacy.
Fax number of the pharmacy.
Email address of the pharmacy.
NCPDP number of the pharmacy.
NPI number of the pharmacy.
DEA number of the pharmacy.
Notes to clarify or give context to why the order was cancelled.
The Unique Order ID generated within the BestRx system for the delivery/shipping order. This will be sent to the delivery/shipping provider when the order is created.
Responses
Body
Echo the bestrx_order_id that was sent in the request.
Echo the provider_order_id that was sent in the request.
Echo the tracking_id that was sent in the request.
Order status
status reason
Echo the bestrx_unique_order_id that was sent in the request.
Indicates if the request was a good/valid request.
Message code.
The text of the message.
Specifies the type of message.
Information
Warning
[Error]
Success
Unknown
POST .../Order/CancelOrder HTTP/1.1
Content-Type: application/json
{
"bestrx_order_id": 106,
"bestrx_unique_order_id":1001,
"provider_order_id": "123456789",
"tracking_id": "12345",
"store": {
"bestrx_pharmacy_id": "ef0a4740-0be9-44f7-b89d-9e66eeba0b9a",
"delivery_provider_acct_no": "98989898",
"name": "BestRx Pharmacy",
"address": {
"address_line_1": "2625 Butterfield Rd",
"address_line_2": "Suite 200S",
"city": "Oak Brook",
"state": "IL",
"zip_code": "60523"
},
"phone": "6308939210",
"fax": "6303393171",
"email": "pharmacy@bestrx.com",
"ncpdp": "1234567",
"npi": "1234567890",
"dea": "BR1234563"
},
"notes": "Shipment Cancelled"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"bestrx_order_id": 48,
"bestrx_unique_order_id":1001,
"provider_order_id": "132456789",
"tracking_id": "12345",
"status": true,
"status_reason": "Success"
},
"request_is_valid": true,
"messages": []
}
Authentication key for integration provider issued by Packetek
Authentication Appkey generated from Pharmacy Login