Skip to main content

POST /v1/orders/{id}/status

After LMN’s responsibility ends at vessel departure (Bill of Lading issued), only the partner can confirm what happens next. This endpoint accepts the two partner-owned status transitions: in_transit → customs and customs → delivered. Sandbox follows the same permission model. Use POST /v1/orders/{id}/sandbox-status when you need to simulate LMN-owned lifecycle states for testing.
curl -X POST \
  -H "x-api-key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "delivered",
    "occurred_at": "2026-06-15T12:00:00+01:00",
    "notes": "Delivered to dealer at Ikeja, Lagos"
  }' \
  https://api.lmnauto.com/v1/orders/01HXYZ.../status
FieldTypeRequiredDescription
statusenumyescustoms or delivered. No other values are partner-writable through this endpoint.
occurred_atISO 8601 with offsetyesWhen the event happened, in the event’s local offset (e.g., +01:00 for Lagos events — never bare Z).
notesstring | nullnoFree-text context for ops.
The legacy fulfillment_detail field has been removed. Send status instead.

Allowed partner-driven transitions

Current statusRequestResult
in_transitstatus: customsTransitions to customs.
customsstatus: deliveredTransitions to delivered. Mandatory — partner MUST push this to close the lifecycle.
LMN-owned statuses (inspection_in_progress, inspection_ready, acquiring, secured, export_processing, in_transit) cannot be set by the partner; attempting them returns 403 invalid_status_transition with details.reason: "partner_not_authorized". Out-of-sequence partner-owned transitions (e.g., delivered from placed) return 409 invalid_status_transition with details.reason: "out_of_sequence".

POST /v1/orders/{id}/sandbox-status

Use this sandbox-only endpoint when you need to simulate LMN-driven lifecycle changes and test webhook delivery. It is available only on sandbox hosts with sandbox API keys. Unlike POST /v1/orders/{id}/status, this endpoint enqueues webhook events:
ChangeWebhook event
status changedorder.status_changed

Sandbox lifecycle statuses

placed ─┬─→ acquiring → secured → export_processing → in_transit → customs → delivered
        │      └─→ failed                                (acquiring only)
        ├─→ inspection_in_progress → inspection_ready ─┬─→ acquiring
        │                                              └─→ cancelled (inspection_failed)
        └─→ cancelled                                  (placed only)
Inspection is optional: placed → acquiring directly is valid (skip inspection); placed → inspection_in_progress → inspection_ready → acquiring is the inspected path. Inspection failure resolves to cancelled (inspection_failed), never failed.
StatusTerminalTypical meaning
placednoOrder created and waiting for LMN bidding.
inspection_in_progressnoOptional pre-acquisition inspection underway. On complete → inspection_ready.
inspection_readynoInspection completed; LMN can move to acquiring, or cancel with inspection_failed.
acquiringnoLMN is bidding or acquiring the vehicle.
securednoLMN won or purchased the vehicle.
export_processingnoKorean export workflow in progress.
in_transitnoBill of Lading issued; vessel has departed Korea.
customsnoVessel arrived at destination port; in customs-bonded area.
deliveredyesPartner confirmed final delivery.
failedyesLMN could not acquire the vehicle.
cancelledyesPartner cancelled before LMN started acquisition, or LMN auto-cancelled for upstream reasons.
curl -X POST \
  -H "x-api-key: $SANDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "secured",
    "purchase_price_usd": 20100,
    "auction_fee_usd": 440,
    "occurred_at": "2026-05-20T10:00:00+09:00"
  }' \
  https://sandbox-api.lmnauto.com/v1/orders/01HXYZ.../sandbox-status
FieldTypeRequiredDescription
statusenumyesOne of placed, inspection_in_progress, inspection_ready, acquiring, secured, export_processing, in_transit, customs, delivered, failed, cancelled.
purchase_price_usdintegernoUseful when simulating secured.
auction_fee_usdinteger | nullnoUseful when simulating secured.
failure_reasonenum | nullnoOnly valid with status: failed.
cancellation_reasonstring | nullnoOnly valid with status: cancelled.
occurred_atISO 8601noEvent timestamp. Defaults to server time.

QA cases

CaseRequestExpected
Simulate acquisitionPOST /sandbox-status with status: secured200, order.status = secured, webhook_enqueued = true
Simulate Korean exportPOST /sandbox-status with status: export_processing200, order.status = export_processing, webhook_enqueued = true
Simulate vessel departurePOST /sandbox-status with status: in_transit200, order.status = in_transit, webhook_enqueued = true
Wrong endpoint guardrailPOST /status with status: in_transit403 invalid_status_transition (details.reason: "partner_not_authorized")
Partner-owned destination pushPOST /status with status: customs on an in_transit order200, status = customs
Final deliveryPOST /status with status: delivered on a customs order200, status = delivered
Out-of-sequencePOST /status with status: delivered on a placed order409 invalid_status_transition (details.reason: "out_of_sequence")

Response

{
  "order": {
    "id": "01HXYZ...",
    "status": "secured",
    "amounts": {
      "purchase_price_usd": 20100,
      "auction_fee_usd": 440
    }
  },
  "webhook_enqueued": true,
  "allowed_statuses": ["placed", "inspection_in_progress", "inspection_ready", "acquiring", "secured", "export_processing", "in_transit", "customs", "delivered", "failed", "cancelled"]
}
Use GET /v1/orders/{id}/events after simulation to inspect delivery status, attempts, response codes, and payloads.

Errors

CodeHTTPCondition
validation_error400Bad enum, occurred_at missing offset, or legacy fulfillment_detail field present.
invalid_status_transition403Partner attempted an LMN-owned status (inspection_in_progress, inspection_ready, acquiring, secured, export_processing, in_transit). details.reason: "partner_not_authorized".
invalid_status_transition409Wrong sequence (e.g., delivered from non-customs). details.reason: "out_of_sequence", details.current_status shows actual state.
order_not_found404Unknown order or wrong key.

SLA expectation

If a customs order doesn’t receive a delivered push within 90 days, LMN’s ops sends a daily digest reminder + email to the partner contact. Document your handoff process to make sure the push happens.