External Order Submission

Lastest update 2023/01/25

Our external order submission APIs allow practitioners to transfer orders directly to our fulfillment system from their eStore. We provide product information and order status endpoints, including shipment tracking.

Product List

Description

Get a list of available products for purchase.

Authorization

Basic authorization header, username and password provided by XYMOGEN

Request Values

search Pass a string to filter products returned by name, description, brand, or SKU (optional)
instockonly Pass "true" or "false"; If true, products with 0 or less quantity will not be returned (optional, defaults to false)

Request URL

Copy to clipboard
GET https://testservices.wholescripts.com/api/Orders/ProductList

Response Values

ProductName Product name
Sku Product sku
MedPaxSku Associated MedPax product sku
MedPaxDetails Details about the associated MedPax product (null if no related MedPax product):
  • Quantity – available inventory
  • WholesalePrice
  • RetailPrice
  • Name
  • GenericName – name to be used for Private Label MedPax boxes
Categories Comma delimited string of product categories
Quantity Current available quantity
ReleaseDate The last date and time (UTC) that the product was updated
WholesalePrice Wholesale price (decimal)
RetailPrice Retail price (decimal)
UPC Product's UPC code
Count Product count per unit
Flavor Product flavor (if available)
DescriptionShort Short product description
DescriptionFull Full product description, including HTML markup
Brand Product brand
Weight Product weight
ProductImage URL to product image
SupplementFactsHTML HTML for product supplement facts
DefaultDosing Array of objects that represent the recommended daily dosing for the product (Time and Qty)
DRS URL to product DRS document
CountUnit Unit of measure for the Count value
WeightUnit Unit of measure for the Weight value
Warnings Array of string warnings for the product:
  • Prop65Excluded – cannot be sold in CA
  • Prop65BirthDefect – birth defect warning for CA
  • Prop65Cancer – cancer warning for CA
  • Prop65BirthDefectCancer – birth defect and cancer warning for CA

Response Example

Copy to clipboard
[
    {
        "productName": "NeurophX DPN® 60 Capsules",
        "sku": "000000000300001012",
        "medPaxSku": "000000000200000200",
        "medPaxDetails": {
            "quantity": 8394,
            "wholesalePrice": 0.8000,
            "retailPrice": 1.3400,
            "name": "NeurophX DPN® Capsules",
            "genericName": "B FOLATE WITH ALA"
        },
        "categories": "All",
        "quantity": 1064,
        "releaseDate": "2021-04-01T06:08:00.32",
        "wholesalePrice": 45.0300,
        "retailPrice": 75.2000,
        "upc": "871149004941",
        "count": "60",
        "flavor": "",
        "descriptionShort": "",
        "descriptionFull": "

NeurophX DPN® is an orally administered medical food* for use only under the supervision of a physician for patients with metabolic nutritional impairments associated with peripheral neuropathy and microvascular complications.

", "brand": "XYMOGEN®", "weight": 2.4000, "productImage": "https://www.wholescripts.com/images/thumbs/0006863_neurophx-dpn-60-capsules.png", "supplementFactsHTML": "", "defaultDosing": [ { "time": "AM", "qty": 1 }, { "time": "PM", "qty": 1 } ], "drs": "https://www.wholescripts.com/ProductAttachments/DownloadFile/CB53FA66-6A65-4162-A7CC-46556A2C593E", "countUnit": "Capsules", "weightUnit": "OZ", "warnings": [ "Prop65BirthDefectCancer" ] } ]

Submit

Description

Submit an order for fulfillment.

If submitting a MedPax box, be sure to add at least three distinct pills and not more than four distinct dosing times. AM, PM, Bedtime, and Daily dosing time variants must also be unique for each MedPax box (ex. You may not have a box with both AM and AM with food).

Authorization

Basic authorization header, username and password provided by XYMOGEN

Request Values

ShippingAddress Shipping address for the order:
  • FName – First Name
  • LName – Last Name
  • Address1 – Address line 1
  • Address1 – Address line 2
  • City
  • State – Two letter state abbreviation
  • Zip – Postal code
  • Email – additional email address to receive shipping notifications (optional)
Items Array of items for the order:
  • Sku – Product sku, or MedPax box sku if the item is a MedPax box
  • Quantity – Product quantity
  • Notes – Product specific notes
  • MedPaxName – If sending a MedPax box, this represents the MedPax box's name that will print on each packet
  • MedPaxPills – Array of products to include in the MedPax box
    • Sku – Pill's sku
    • Quantity – Pill quantity
    • ItemTime – Divided into distinct groups
      • AM, AM with food, AM without food
      • PM, PM with food, PM without food
      • Daily, Daily with food, Daily without food
      • Bedtime, Bedtime with food, Bedtime without food
ShippingMethod Shipping method for the order, from the following options:
  • UPS1DAASR - UPS Next Day Air Early A.M.
  • UPS1DAIR - UPS Next Day Air
  • UPS1DASV - UPS Next Day Air Saver
  • UPS2D - UPS 2nd Day Air
  • UPS3D - UPS 3 Day Select
  • UPSGROUND - UPS Ground
  • UPSITLEXP - UPS Worldwide Expedited
  • USPS1STCLS - USPS First-Class Package Service - Retail™
  • USPSPRI - USPS Priority Mail
  • USPSXPRSS - USPS Priority Mail Express
  • STANDARD (XYMOGEN will determine the best method; unavailable for P.O. Box addresses)

NOTE: if we are unable to get a quote for the method passed, we will attempt to use the STANDARD option to get the best method; if changed, a message will be displayed in the result "msg" value.

Request URL

Copy to clipboard
POST https://testservices.wholescripts.com/api/Orders/Submit

Request Example

Copy to clipboard
{
    "ShippingAddress": {
        "FName": "Test",
        "LName": "Test",
        "Address1": "123 Main St",
        "Address2": "",
        "City": "Orlando",
        "State": "FL",
        "Zip": "32819",
        "Email": "test@test.test"
    },
    "Notes": "test notes",
    "Items": [
        {
            "Sku": "000000000300000096",
            "Quantity": 1
        },
        {
            "Sku": "000000000300001001",
            "Quantity": 1
        },
        {
            "Sku": "000000000200000633",
            "Quantity": 1,
            "MedPaxName": "Test",
            "MedPaxPills": [
                {
                    "Sku": "000000000200000225",
                    "Quantity": 1,
                    "ItemTime": "AM"
                },
                {
                    "Sku": "000000000100000893",
                    "Quantity": 1,
                    "ItemTime": "AM"
                },
                {
                    "Sku": "000000000200000217",
                    "Quantity": 1,
                    "ItemTime": "AM"
                },
                {
                    "Sku": "000000000200000203",
                    "Quantity": 1,
                    "ItemTime": "AM"
                },
                {
                    "Sku": "000000000200000138",
                    "Quantity": 4,
                    "ItemTime": "AM"
                },
                {
                    "Sku": "000000000200000193",
                    "Quantity": 2,
                    "ItemTime": "AM"
                },
                {
                    "Sku": "000000000100000893",
                    "Quantity": 1,
                    "ItemTime": "PM"
                }
            ]
        }
    ],
    "ShippingMethod": "USPS PRIORITY"
}

Response Values

OrderNumber Order number for reference
Success True for a successful submission, false if there was a problem
Msg A message that will show errors or changes to the order

Response Example

Copy to clipboard
{
    "orderNumber": "XAPI00000001",
    "success": true,
    "msg": "Shipping method changed to UPSGROUND"
}

Status

Description

Get the status of all orders sent to the Submit API.

Authorization

Basic authorization header, username and password provided by XYMOGEN

Request Values

ordernum Pass an order number to limit the results to just that order (optional)

Request URL

Copy to clipboard
GET https://testservices.wholescripts.com/api/Orders/Status?ordernum={ordernumber}

Response Values

OrderNumber Order number from the Submit service
OrderDate When the order was submitted (datetime)
SalesOrder Sales order number, generated once the order has reached our fulfillment process and will display on the shipped documentation
Status A status to determine where the order is in the process:
  • Pending – the order has been received but not yet forwarded to our fulfillment area
  • Processing – the order has reached the fulfillment process
  • Complete – the order has been successfully shipped and billed
  • Cancelled / Partially Cancelled – the order has been either partially or fully cancelled
  • Error – there was a problem receiving the order; see the Message value for more details
Tracking An array of tracking numbers, if available
Message If a problem was encountered at any point, this value will contain more details
SubTotal Order subtotal (decimal)
ShipMethod Shipping method
ShipCharge Shipping total (decimal)
Discount Discount applied to the order (decimal)
Tax Tax applied to the order (decimal)
OrderTotal Order total (decimal)

Response Example

Copy to clipboard
[
    {
        "orderNumber": "XAPI00000001",
        "orderDate": "2020-09-10T08:51:16.507",
        "salesOrder": "0005241942",
        "status": "Processing",
        "tracking": [],
        "message": "",
        "subTotal": 75.00,
        "shipMethod": "USPS1STCLS",
        "shipCharge": 9.95,
        "discount": 0.00,
        "tax": 0.00,
        "orderTotal": 92.04
    }
]

Cancel

Description

Cancel an order that has not yet been sent to fulfillment.

Authorization

Basic authorization header, username and password provided by XYMOGEN

Request Values

OrderNumber Order number from the Submit service.

Request URL

Copy to clipboard
POST https://testservices.wholescripts.com/api/Orders/Cancel

Request Example

Copy to clipboard
{
    "OrderNumber": "XAPI00000001"
}

Response Values

Success True if the order was cancelled successfully (bool)
Msg String describing the result

Response Example

Success:

Copy to clipboard
{
    "success": true,
    "msg": "Order cancelled"
}

Fail:

Copy to clipboard
{
    "success": false,
    "msg": "Unable to cancel order"
}