Skip to main content

Orders

Reading a lot of order history?

For backfills, exports and reporting, the BigQuery SDK (JavaScript) reads orders from your UltraCart data warehouse in one query and returns the same Order objects as this API, fully expanded, without REST rate limits. Its change log also keeps every version of each order, including deletes, so you can sync only what changed: the REST API returns only the current version. See Extracting Order History.

Add items and release a held order
PUT/order/orders/{order_id}/hold/add_items_and_release
This method adds items to an order in the hold stage and releases it
Adjusts an order total
POST/order/orders/{order_id}/adjust_order_total/{desired_total}
Adjusts an order total.
Assigns an order to an affiliate
POST/order/orders/{order_id}/assignToAffiliate
Assigns an order to an affiliate.
Associates an RMA with an order
POST/order/orders/{order_id}/rma
Associates an RMA number with an order.
Cancel an order
POST/order/orders/{order_id}/cancel
Cancel an order on the UltraCart account.
Delete an order
DELETE/order/orders/{order_id}
Delete an order on the UltraCart account.
Determine if an order can be refunded
GET/order/orders/{order_id}/refundable
Determine if an order can be refunded based upon payment method and age
Duplicate an order
POST/order/orders/{order_id}/duplicate
Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
Format order
POST/order/orders/{order_id}/format
Format the order for display at text or html
Generate a packing slip for this order across all distribution centers.
GET/order/orders/{order_id}/packing_slip
The packing slip PDF that is returned is base 64 encoded
Generate a packing slip for this order for the given distribution center.
GET/order/orders/{order_id}/packing_slip/{distribution_center_code}
The packing slip PDF that is returned is base 64 encoded
Generate an auto order update billing url
GET/order/orders/{order_id}/auto_order_update_billing_url
Generates the url a customer can use to update the billing information on the auto order associated with this order.
Generate an invoice for this order.
GET/order/orders/{order_id}/invoice
The invoice PDF that is returned is base 64 encoded
Generate an order token for a given order id
GET/order/orders/token/{order_id}
Retrieves a single order token for a given order id.
Get Order Upsell Cart
PUT/order/orders/{order_id}/upsell_with_cart
Creates a new cart using cloned information from the order, but with a specific set of items, coupons and optionally a checkout URL to return the customer to
Insert an order
POST/order/orders
Inserts a new order on the UltraCart account.
Process payment
POST/order/orders/{order_id}/process_payment
Process payment on order
Refund an order
PUT/order/orders/{order_id}/refund
Perform a refund operation on an order and then update the order if successful.
Release a held order
PUT/order/orders/{order_id}/hold/release
This method releases an order from the hold stage
Remove a refund block on an order
GET/order/orders/{order_id}/refund_unblock
Removes a refund block on an order to prevent a user from performing a refund.
Replacement order
POST/order/orders/{order_id}/replacement
Create a replacement order based upon a previous order
Replaces an order item id
PUT/order/orders/{order_id}/replace_item_id
Replaces a single order item id with another merchant_item_id, leaving all other attributes and properties unchanged.
Resend receipt
POST/order/orders/{order_id}/resend_receipt
Resend the receipt for an order on the UltraCart account.
Resend shipment confirmation
POST/order/orders/{order_id}/resend_shipment_confirmation
Resend shipment confirmation for an order on the UltraCart account.
Retrieve a value histogram for a given AR transaction-detail name
GET/order/accounts_receivable/detail_value_histogram
For the calling merchant's Accounts Receivable orders, returns a value -> document-count histogram for the named transaction detail, optionally scoped to transactions on the named gateway.
Retrieve A/R Retry Configuration
GET/order/accountsReceivableRetryConfig
Retrieve A/R Retry Configuration.
Retrieve A/R Retry Statistics
GET/order/accountsReceivableRetryConfig/stats
Retrieve A/R Retry Statistics.
Retrieve an order
GET/order/orders/{order_id}
Retrieves a single order using the specified order id.
Retrieve an order using a token
POST/order/orders/token
Retrieves a single order using the specified order token.
Retrieve customer activity for this order.
GET/order/orders/{order_id}/customer_activity
Retrieves the customer activity associated with the email address on this order.
Retrieve EDI documents associated with this order.
GET/order/orders/{order_id}/edi
Retrieve EDI documents associated with this order.
Retrieve email delivery information for this order.
GET/order/orders/{order_id}/emails
Retrieves email delivery records associated with the specified order id.
Retrieve gateway / detail-name picker data for the AR filter modal
GET/order/accounts_receivable/gateway_detail_names
For the calling merchant's Accounts Receivable orders, returns the distinct payment gateway names paired with the set of transaction-detail names observed on those gateways.
Retrieve order batch
POST/order/orders/batch
Retrieves a group of orders from the account based on an array of order ids.
Retrieve orders
GET/order/orders
Retrieves a group of orders from the account.
Retrieve orders by query
POST/order/orders/query
Retrieves a group of orders from the account based on a query object.
Retrieve orders by RMA
GET/order/orders/rma/{rma}
Retrieves the orders associated with the specified RMA number.
Retrieve page view history for this order.
GET/order/orders/{order_id}/page_view_history
Retrieves the page views captured during the session that placed this order.
Set a refund block on an order
GET/order/orders/{order_id}/refund_block
Sets a refund block on an order to prevent a user from performing a refund.
Update A/R Retry Configuration
POST/order/accountsReceivableRetryConfig
Update A/R Retry Configuration.
Update an order
PUT/order/orders/{order_id}
Update a new order on the UltraCart account.
Validate
POST/order/validate
Validate the order for errors.

Webhooks​

The following webhook events are available for this resource. See Webhooks for how delivery, retries, and versioning work.

EventDescriptionReflowExpandable
order_abandon_recoveryFired when a previously abandoned cart turns into an order—Yes
order_createFired when an order is placed—Yes
order_deleteFired when an order is deleted—Yes
order_payment_failedFired when a payment fails—Yes
order_payment_processFired when a payment is processed—Yes
order_refundFired when an order is refunded—Yes
order_rejectFired when an order is rejected—Yes
order_s3_invoiceFired when an invoice PDF is stored in S3 bucket—Yes
order_s3_packing_slipFired when a packing slip PDF is stored in an S3 bucket—Yes
order_shipFired when an order is shipped—Yes
order_ship_deliveredFired when an order has a shipment delivered—Yes
order_ship_expectedFired when an order has an expected delivery date—Yes
order_ship_out_for_deliveryFired when an order has a shipment out for delivery—Yes
order_stage_changeFired when an order stage changes—Yes
order_updateFired when an order is editedYesYes

Receiving these events​

  • Payload: each delivery is a POST whose JSON body is an array of events, even when it carries one. Each element has a single key, the event name, whose value is the object, for example [{"order_create": {...}}].
  • Contents: the object includes only the parts in the webhook's expansion. Expansions appear when you edit the webhook after creating it.
  • Respond within 30 seconds. Store or queue the payload and do the work in a background job.
  • Batching: one delivery can bundle several events. The webhook sets how many (10 or more) and the maximum payload size (up to 900K).
  • HTTPS: use it. It is required whenever the payload includes customer information.
  • Testing: the webhook's test button sends a delivery, and its log shows each one. To resend existing records, for example to backfill a new receiver, request a reflow.

More: Webhooks, Creating a simple webhook (with a sample payload), receiver samples in PHP and Python

Was this page helpful?