Skip to main content

POST /v1/orders — Place order

This is a bid commitment, not a payment. No deposit. By POSTing, the partner takes commercial responsibility to pay LMN if (and only if) the order reaches secured. Money flow is described in Conventions.
curl -X POST \
  -H "x-api-key: $KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"vehicle_id": "01HXYZ...", "max_bid_amount_usd": 15500}' \
  https://api.lmnauto.com/v1/orders
HeaderRequiredDescription
Idempotency-KeyYesUUID v4. Permanent uniqueness per (api_key, key). Replays return the original response. Reusing with a different vehicle_id returns 422 idempotency_key_reused.
Body fieldTypeRequiredDescription
vehicle_idstringYesFrom GET /v1/vehicles.
max_bid_amount_usdinteger | nullConditionalBid ceiling in whole USD. Required for auction vehicles (auction_result: "upcoming"). Must be > 0 and ≥ pricing.listing_usd. Null/omitted for buy-now (auction_result: "no_bid").

Response — 201 Created (or 200 OK on idempotent replay)

{
  "id": "01HXYZ...",
  "vehicle_id": "01HXYZ...",
  "status": "proceed",
  "max_bid_amount_usd": 15500,
  "is_highest_bid": true,
  "current_max_bid_usd": 15500,
  "amounts": { "purchase_price_usd": null, "auction_fee_usd": null },
  "auction_date": "2026-04-20T13:00:00+09:00",
  "order_cutoff_at": "2026-04-19T00:00:00+09:00",
  "created_at": "2026-04-11T10:00:00+09:00",
  "updated_at": "2026-04-11T10:00:00+09:00"
}

Competitive bidding

Multiple partners may all order the same auction vehicle. All POSTs return 201. The response carries:
  • is_highest_bid (boolean) — whether your bid is currently the highest among all active orders.
  • current_max_bid_usd (integer) — the highest active bid across all partners.
At auction time, LMN bids with the highest active max_bid_amount_usd. Winner gets secured; losers get failed (failure_reason: "outbid_internally").

Errors

CodeHTTPCondition
missing_idempotency_key400Header absent.
missing_max_bid400Auction vehicle, but max_bid_amount_usd null/omitted/below listing.
vehicle_not_found404Unknown vehicle_id.
past_order_cutoff409Past auction_date - 1 day, midnight KST.
duplicate_order409Active order already exists for (your key, this vehicle). details.existing_order_id referenced.
idempotency_key_reused422Same key, different vehicle_id.
vehicle_unavailable410Listing disappeared before processing.

GET /v1/orders — List

Paginated, filterable list of your orders. AND semantics across filters.
ParamDescription
idsCSV of order IDs (max 100). Foreign IDs silently dropped. Empty result → 200 with data: [] (not 404).
statusSingle status filter.
from, toISO 8601 with offset. Half-open [from, to) on created_at. Both required if either present.
sortcreated_desc (default), created_asc, auction_date_asc, updated_desc.
cursor, limitComposite cursor (sort-specific); default 50, max 200.

Sort use cases

ValueWhen
created_desc (default)“Show what I just placed”
created_ascBackfill / oldest-first reconciliation
auction_date_asc”Which of my orders resolves next?” Dealer-source orders (null auction_date) appear at the END (NULL LAST).
updated_desc”What changed recently?” — useful when a webhook was missed

Errors

CodeHTTPCondition
validation_error400Bad enum, ids > 100, from without to, limit > 200.
invalid_cursor400Cursor obtained with a different sort. Restart pagination.

GET /v1/orders/ — Detail

Returns the full Order resource — current state, amounts, cutoffs, fulfillment_detail, shipment.
curl -H "x-api-key: $KEY" https://api.lmnauto.com/v1/orders/01HXYZ...
ErrorWhen
404 order_not_foundUnknown ID, or order belongs to a different API key.
For auction vehicles, response includes recomputed is_highest_bid and current_max_bid_usd reflecting the latest competitive state. Full Order schema in Schemas.

DELETE /v1/orders/ — Cancel

Allowed only when the order is in proceed status. Once LMN starts bidding (acquiring+), cancellation moves offline.
curl -X DELETE \
  -H "x-api-key: $KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  https://api.lmnauto.com/v1/orders/01HXYZ...
Response: 200 OK with the updated Order (status: cancelled, cancellation_reason: dealer_cancelled). No money flow has occurred pre-secured, so cancellation has no settlement implication. Partner-to-dealer arrangements are outside this API.
Race condition: If you DELETE while LMN concurrently transitions the order (e.g., proceed → acquiring), you may receive 409 invalid_status_transition. Re-fetch GET /v1/orders/{id} to see current state.
ErrorWhen
missing_idempotency_key400
order_not_found404
invalid_status_transition409 — order not in proceed, or already cancelled. details.current_status shows actual state.