Skip to main content

Auto Orders

Reading a lot of auto order history?

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

Attempt a failed rebill on an auto order
POST/auto_order/auto_orders/{auto_order_oid}/rebill
Attempts to rebill an auto order using the payment information already on the original order.
Cancel a single item on an auto order
POST/auto_order/auto_orders/reference_order_id/{reference_order_id}/items/original/{original_item_id}/cancel
Cancels a single item on an auto order identified by the original order id and the item's original_item_id.
Consolidates multiple auto orders
PUT/auto_order/auto_orders/{auto_order_oid}/consolidate
Consolidates mutliple auto orders on the UltraCart account.
Establish an auto order by referencing a regular order id
POST/auto_order/auto_orders/reference_order_id/{reference_order_id}
Establish an auto order by referencing a regular order id.
Generate an auto order update billing url
GET/auto_order/auto_orders/{auto_order_oid}/update_billing_url
Generates the url a customer can use to update the billing information on this auto order.
Pause auto order
PUT/auto_order/auto_orders/{auto_order_oid}/pause
Completely pause an auto order
Retrieve an auto order by code
GET/auto_order/auto_orders/code/{auto_order_code}
Retrieves a single auto order using the specified reference (original) order id.
Retrieve an auto order by oid
GET/auto_order/auto_orders/{auto_order_oid}
Retrieves a single auto order using the specified auto order oid.
Retrieve an auto order by order id
GET/auto_order/auto_orders/reference_order_id/{reference_order_id}
Retrieves a single auto order using the specified reference (original) order id.
Retrieve auto order batch
POST/auto_order/auto_orders/batch
Retrieves a group of auto orders from the account based on an array of auto order oids.
Retrieve auto order cancel reasons.
GET/auto_order/auto_orders/cancel_reasons
Retrieves auto order cancel reasons.
Retrieve auto orders
GET/auto_order/auto_orders
Retrieves auto orders from the account.
Retrieve auto orders by query
POST/auto_order/auto_orders/query
Retrieves a group of auto orders from the account based on a query object.
Retrieve email delivery information for this auto order.
GET/auto_order/auto_orders/{auto_order_oid}/emails
Retrieves email delivery records associated with the specified auto order.
Update an auto order
PUT/auto_order/auto_orders/{auto_order_oid}
Update an auto order on the UltraCart account.
Update an auto order item add ons
PUT/auto_order/auto_orders/{auto_order_oid}/items/{auto_order_item_oid}/add_ons
Update an auto order item add ons.
Update an auto order item properties
PUT/auto_order/auto_orders/{auto_order_oid}/items/{auto_order_item_oid}/properties
Update an auto order item properties.
Update an auto order properties
PUT/auto_order/auto_orders/{auto_order_oid}/properties
Update an auto order properties.
Update multiple auto orders
PUT/auto_order/auto_orders/batch
Update multiple auto orders on the UltraCart account.
Update the payment information on an auto order
PUT/auto_order/auto_orders/{auto_order_oid}/payment
Updates the credit card on the original order behind an auto order, along with any rebills sitting in accounts receivable, and reactivates the auto order.

Webhooks​

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

EventDescriptionReflowExpandable
auto_order_cancelFired when an auto order is canceled—Yes
auto_order_createFired when an auto order is created—Yes
auto_order_declineFired when an auto order is declined—Yes
auto_order_disableFired when an auto order is disabled—Yes
auto_order_item_cancelFired when an item on an auto order has reached its no_order_after date and effectively cancels—Yes
auto_order_item_cancel_scheduledFired when an item on an auto order is scheduled for cancellation (no_order_after set so the item has no future shipments)—Yes
auto_order_item_pauseFired when an item on an auto order is paused—Yes
auto_order_item_reactivateFired when an item on an auto order is reactivated (no_order_after cleared)—Yes
auto_order_item_unpauseFired when an item on an auto order is unpaused—Yes
auto_order_preshipmentFired when an auto order generates a new pre-shipment notice—Yes
auto_order_rebillFired when an auto order is rebilled—Yes
auto_order_updateFired when an auto order is updated—Yes

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 [{"auto_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?