BestRx APIs
Contact Us
  1. Delivery/Shipping Provider API
  • Introduction - BestRx APIs
  • Patient API
    • Overview
    • Error Codes
    • Add Patient
      POST
    • Update Patient
      POST
    • Get Patient
      POST
    • Submit Charge Account Payment
      POST
  • Drug API
    • Overview
    • Error Codes
    • Get Drug Information
      POST
  • Prescription API
    • Overview
    • Error Codes
    • Submit Rx Transfer Request
      POST
    • Return to Stock
      POST
    • Save Rx Signature
      POST
  • Refill API
    • Overview
    • Error Codes
    • GetPatientProfile
      POST
    • Send Refill Request
      POST
  • BestPOS API
    • Overview
    • Error Codes
    • Create POS Transaction
    • Get POS Transaction Status
    • Get Item Details
  • Delivery/Shipping Provider API
    • Overview
    • Error Codes
    • Address Validation
      POST
    • Create Order
      POST
    • Update Order Status
      POST
    • Cancel Order
      POST
  • Realtime Data Feed Specification
    • Overview
    • Patient Update Callback
    • E-Prescription Notification Callback
    • Prescription Update Callback
  1. Delivery/Shipping Provider API

Cancel Order

POST
/Order/CancelOrder
INFO
This endpoint is used to cancel a shipment order.

Request

Header Params
Content-Type
string 
optional
Example:
application/json
Body Params application/json
bestrx_order_id
integer 
required
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.
Example:
106
provider_order_id
string  | null 
optional
Order ID for this Order that was generated within the Delivery/Shipping Provider's System.
Example:
123456789
tracking_id
string  | null 
optional
Tracking Number generated for this Order within the Delivery/Shipping Provider's System.
Example:
12345
store
object 
optional
Object with Details about the Pharmacy Cancelling the Order
bestrx_pharmacy_id
string 
required
Unique GUID representing the Pharmacy ID of the BestRx Client. This will be sent to the Delivery/Shipping Provider when the Order is Created.
Example:
ef0a4740-0be9-44f7-b89d-9e66eeba0b9a
delivery_provider_acct_no
string 
required
Account Number that the BestRx Client has with the Delivery/Shipping Provider.
Example:
98989898
name
string 
required
Example:
BestRx Pharmacy
address
object 
optional
Object with Address Details
phone
string 
required
Phone Number of the Pharmacy
Example:
6308939210
fax
string 
required
Fax Number of the Pharmacy
Example:
6303393171
email
string 
required
Email Address of the Pharmacy
Example:
pharmacy@bestrx.com
ncpdp
string 
required
NCPDP Number of the Pharmacy
Example:
1234567
npi
string 
required
NPI Number of the Pharmacy
Example:
1234567890
dea
string 
required
DEA Number of the Pharmacy
Example:
BR1234563
notes
string 
optional
Notes to Clarify or Give Context to why the Order was Cancelled
Example:
Shipment Cancelled
bestrx_unique_order_id
integer 
required
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.
Example:
1001
Example
{
    "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"
}

Responses

🟢200OK
application/json
Body
data
object 
optional
bestrx_order_id
integer 
required
Echo the bestrx_order_id that was sent in the request.
Example:
48
provider_order_id
string 
optional
Echo the provider_order_id that was sent in the request.
Example:
132456789
tracking_id
string 
optional
Echo the tracking_id that was sent in the request.
Example:
12345
status
boolean 
optional
Order status
Example:
true
status_reason
string 
optional
status reason
Example:
Success
bestrx_unique_order_id
integer 
required
Echo the bestrx_unique_order_id that was sent in the request.
Example:
1001
request_is_valid
boolean 
optional
Indicates if the request was a good/valid request.
Example:
true
messages
array [object {3}] 
optional
message_code
string 
optional
Message code.
Example:
TP0000
message
string 
optional
The text of the message.
Example:
Error when cancel order.
message_type
enum<integer> 
optional
Specifies the type of message.
Allowed values:
0123-1
Example
{
    "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": []
}
Modified at 2024-06-14 19:17:59
Previous
Update Order Status
Next
Overview