Skip to main content

Validate Order

The order is validated to ensure that the order details are correct and the order can be processed further. The subtotal, insurance, shipping, warranty and total amounts are calculated based on the buy requests and shipping rate selected by the buyer. An order must be validated before it can be created. An orderMetaId is returned for a validated order, which can then be used to create the order.

Note: The orderMetaId is valid for 15 minutes. If the order is not created within 15 minutes, the order must be validated again.

Validate Order Payload

Core Parameters


buyRequestIds
An array of ids of the buy requests that are being purchased.


buyerAddress
The id of the shipping address of the buyer.


shippingOption
The shipping rate object selected by the buyer from an array of shipping rates. The shipping rates must be generated using the buyerAddress and buyRequestIds that are to be provided while verifying this order.



POST   /v1/orders/validate
curl -X POST "https://api.ezewholesale.com/api/v1/orders/validate" \
-H "x-api-key:your-api-key" \
-H 'Content-Type: application/json' \
-d '{"buyRequestIds":["0af41604-aa9f-4bf7-8120-aec212a1e71c"],"buyerAddress":"6b80ac21-baca-4fb3-98a5-6e5bb8d4f457","shippingOption":{"id":"rate_eecd0c0320f04c359d59dc5155d81602","object":"Rate","mode":"test","carrier":"UPS","service":"NextDayAir","rate":118,"currency":"USD","delivery_days":1,"delivery_date":null,"est_delivery_days":1,"delivery_date_guaranteed":true,"shipment_id":"shp_19f70989494640a2892d91668c98008f","carrier_account_id":"ca_a9b77758fa814c208946190fde5b7001"}}'


RESPONSE
{
  "orderMetaId": "B2XHYGUT9I",
  "subtotal": "1474.00",
  "shippingFee": "118.00",
  "insurance": "7.37",
  "warranty": "0.00",
  "total": "1599.37",
  "wirePaymentDetails": {
    "international": {
      "payeeName": "Eze Technologies Inc",
      "routingNo": "322271724",
      "accNo": "208235531 (Citi Bank)",
      "accType": "Business Checking",
      "bankAddress": "100 Citibank Drive, San Antonio, TX 78245",
      "specialInstruction": "",
      "address": "4943 McConnell Ave, Suite W, Los Angeles, CA 90066",
      "swiftCode": "CITIUS33"
    },
    "local": {
      "payeeName": "Eze Technologies",
      "routingNo": "121145349",
      "accNo": "795578334462860 (Column NA - Brex)",
      "accType": "Business Checking",
      "bankAddress": "1110 Gorgas Ave Suite A4-700, San Francisco, CA 94129",
      "specialInstruction": "",
      "address": "8 10th Street 1701, San Francisco, CA 94103"
    }
  }
}