Connect Uber Direct
- Sign up at direct.uber.com. New accounts start in test mode with sandbox credentials. Uber requires billing details and approval before it issues production credentials.
- In the Uber Direct dashboard, open Developer and copy the client ID, client secret, and customer ID.
- To use triggers, open Developer > Webhooks, create a webhook with the URL
https://automate.ax/api/v1/events/uber/followed by your customer ID, and select the delivery status, courier update, and refund events your automations use. Copy the signing key for that webhook. - Connect Uber in Automate.ax with Uber Direct. Enter the client ID, client secret, customer ID, and, for triggers, the webhook signing key.
direct.organizations scope. Automate.ax requests it when you connect and grants those actions only if Uber allows it for your account.
Send a courier
automations/send-a-courier.automation.ts
roboCourier: { mode: "auto" } with test credentials to have Uber’s simulated courier move the delivery through every status in about three minutes and send real webhooks.
Delivery lifecycle
Uber reports a delivery aspending, then pickup while a courier heads to the store, pickup_complete, dropoff while the courier heads to the customer, and finally delivered, canceled, or returned. courierImminent becomes true when the courier is about one minute away from the current stop.
Each status triggers any delivery event plus one milestone trigger:
Courier Pick & Pack deliveries can also report
shopping_completed, which starts only any delivery event.
When Uber cannot complete a delivery whose undeliverableAction is return, the original delivery becomes returned and Uber creates a separate return delivery whose ID starts with ret_. relatedDeliveries links the two.
Monetary amounts such as fee, tip, and manifestTotalValue are integers in the currency’s smallest unit, so $10.99 is 1099.
Exports
ubercontains the packaged Uber Direct actions and triggers.uberAccount("name")selects a named Uber Direct connection.getUberApicreates the authenticated REST helper for a custom account-backed action.
idempotencyKey.
Triggers
- Any delivery event
- Delivery pending
- Courier en route to pickup
- Courier arriving at pickup
- Delivery picked up
- Courier en route to dropoff
- Courier arriving at dropoff
- Delivery delivered
- Delivery canceled
- Delivery returned
- Courier location updated
- Refund requested
Actions
- Create delivery quote
- Create delivery
- Get delivery
- List deliveries
- Update delivery
- Cancel delivery
- Get proof of delivery
- Find stores
- Get organization
- Create organization
- Invite organization member
- List business locations
- Get business location
- Update business location