alopeyk_create_order
Create a real delivery order to dispatch a courier and charge your account. Confirm addresses, transport type, and price before calling.
Instructions
Create a REAL delivery order — WARNING: this is billable.
Persian purpose: ثبت یک سفارش واقعی. On-Demand, requires an access_token
AND enable_ordering=true (and read_only=false) on the instance;
otherwise it returns {"error": "ordering_disabled", ...} without
contacting the API. Maps to POST /api/v2/orders.
Dispatches a courier and charges the account. Confirm the addresses, transport type, and price (via alopeyk_get_price) before calling.
Args:
transport_type: Vehicle class (motorbike, motor_taxi, cargo,
cargo_s, car).
addresses: Ordered stops, each {type, lat, lng} — one origin and
one or more destinations.
has_return: Whether the courier returns to origin (default false).
cashed: Whether the delivery is cash-on-delivery (default false).
scheduled_at: Optional ISO timestamp to schedule the pickup.
discount_coupon: Optional discount coupon code to apply.
instance: Configured instance to use (default when omitted).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| transport_type | Yes | ||
| addresses | Yes | ||
| has_return | No | ||
| cashed | No | ||
| scheduled_at | No | ||
| discount_coupon | No | ||
| instance | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||