{"openapi":"3.1.0","info":{"title":"LuggAgent Partner API","description":"Book door-to-door luggage delivery for your travellers: check coverage, get a quote, create an order and track it.\n\nAuthenticate with `Authorization: Bearer <key>`. Keys starting with `lgpk_test_` hit the sandbox (no payment is taken, no emails are sent); `lgpk_live_` keys create real orders.\n\nEvery error uses the same shape: `{\"error\": {\"code\", \"message\", \"retryable\", \"request_id\"}}`. Developer guide: https://luggagent.com/developers","version":"1.0.0"},"servers":[{"url":"https://partner-api.luggagent.com","description":"Production (test and live keys)"}],"paths":{"/v1/ping":{"get":{"tags":["partner-api-v1"],"summary":"Ping","operationId":"ping_v1_ping_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"INVALID_API_KEY: missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"403":{"description":"INSUFFICIENT_SCOPE: the key lacks the scope this endpoint needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"422":{"description":"VALIDATION_ERROR (or another 422 code listed in the developer guide).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"429":{"description":"RATE_LIMITED (see Retry-After) or DAILY_QUOTA_EXCEEDED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"500":{"description":"INTERNAL_ERROR (retryable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}}}}},"/v1/coverage":{"get":{"tags":["partner-api-v1"],"summary":"Countries, cities, airports and transport points we serve","operationId":"coverage_v1_coverage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageOut"}}}},"401":{"description":"INVALID_API_KEY: missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"403":{"description":"INSUFFICIENT_SCOPE: the key lacks the scope this endpoint needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"422":{"description":"VALIDATION_ERROR (or another 422 code listed in the developer guide).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"429":{"description":"RATE_LIMITED (see Retry-After) or DAILY_QUOTA_EXCEEDED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"500":{"description":"INTERNAL_ERROR (retryable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}}},"parameters":[{"in":"query","required":false,"name":"country","description":"Only this country (ISO 3166-1 alpha-2, case-insensitive), e.g. JP. Omit for every country.","schema":{"type":"string","pattern":"^[A-Za-z]{2}$","examples":["JP"]}}]}},"/v1/quotes":{"post":{"tags":["partner-api-v1"],"summary":"Quote a delivery (valid 15 minutes)","operationId":"create_quote_v1_quotes_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"pickup":{"properties":{"type":{"type":"string","enum":["airport","harbor","train_station","hotel","residence"],"title":"Type"},"lat":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Lat"},"lng":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Lng"},"address":{"type":"string","maxLength":300,"minLength":1,"title":"Address"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"airport_code":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Airport Code"},"terminal":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Terminal"},"flight_number":{"anyOf":[{"type":"string","maxLength":12},{"type":"null"}],"title":"Flight Number"}},"additionalProperties":false,"type":"object","required":["type","lat","lng","address"],"title":"Endpoint"},"dropoff":{"properties":{"type":{"type":"string","enum":["airport","harbor","train_station","hotel","residence"],"title":"Type"},"lat":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Lat"},"lng":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Lng"},"address":{"type":"string","maxLength":300,"minLength":1,"title":"Address"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"airport_code":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Airport Code"},"terminal":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Terminal"},"flight_number":{"anyOf":[{"type":"string","maxLength":12},{"type":"null"}],"title":"Flight Number"}},"additionalProperties":false,"type":"object","required":["type","lat","lng","address"],"title":"Endpoint"},"pickup_date":{"type":"string","format":"date","title":"Pickup Date"},"pickup_time":{"type":"string","title":"Pickup Time"},"dropoff_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Dropoff Date"},"dropoff_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dropoff Time"},"bags":{"properties":{"standard":{"type":"integer","minimum":0.0,"title":"Standard","default":0},"oversized":{"type":"integer","minimum":0.0,"title":"Oversized","default":0}},"additionalProperties":false,"type":"object","title":"Bags"},"insurance_plan":{"type":"string","enum":["included","1000","1500","2000","2500","3000"],"title":"Insurance Plan","default":"included"}},"additionalProperties":false,"type":"object","required":["pickup","dropoff","pickup_date","pickup_time","bags"],"title":"QuoteIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteOut"}}}},"422":{"description":"VALIDATION_ERROR, OUT_OF_COVERAGE or PAST_CUTOFF.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"401":{"description":"INVALID_API_KEY: missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"403":{"description":"INSUFFICIENT_SCOPE: the key lacks the scope this endpoint needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"429":{"description":"RATE_LIMITED (see Retry-After) or DAILY_QUOTA_EXCEEDED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"500":{"description":"INTERNAL_ERROR (retryable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}}}}},"/v1/orders":{"post":{"tags":["partner-api-v1"],"summary":"Create an order from a quote (requires Idempotency-Key)","operationId":"create_order_v1_orders_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderOut"}}}},"409":{"description":"IDEMPOTENCY_KEY_REUSED or CAPACITY_FULL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"410":{"description":"QUOTE_EXPIRED: the quote expired or the price changed; quote again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"422":{"description":"VALIDATION_ERROR, OUT_OF_COVERAGE, PAST_CUTOFF or IDEMPOTENCY_KEY_REQUIRED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"401":{"description":"INVALID_API_KEY: missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"403":{"description":"INSUFFICIENT_SCOPE: the key lacks the scope this endpoint needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"429":{"description":"RATE_LIMITED (see Retry-After) or DAILY_QUOTA_EXCEEDED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"500":{"description":"INTERNAL_ERROR (retryable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"quote_id":{"maxLength":4000,"minLength":10,"title":"Quote Id","type":"string"},"traveller":{"additionalProperties":false,"properties":{"name":{"maxLength":100,"minLength":1,"title":"Name","type":"string"},"email":{"maxLength":254,"minLength":3,"title":"Email","type":"string"},"phone":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"title":"Phone"},"locale":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":"en","title":"Locale"}},"required":["name","email"],"title":"Traveller","type":"object"},"partner_reference":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"title":"Partner Reference"}},"required":["quote_id","traveller"],"title":"OrderIn","type":"object"}}}}},"get":{"tags":["partner-api-v1"],"summary":"List orders, newest first (cursor pagination, limit 1-100)","operationId":"list_orders_v1_orders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderList"}}}},"401":{"description":"INVALID_API_KEY: missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"403":{"description":"INSUFFICIENT_SCOPE: the key lacks the scope this endpoint needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"422":{"description":"VALIDATION_ERROR (or another 422 code listed in the developer guide).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"429":{"description":"RATE_LIMITED (see Retry-After) or DAILY_QUOTA_EXCEEDED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"500":{"description":"INTERNAL_ERROR (retryable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}}},"parameters":[{"in":"query","required":false,"name":"cursor","description":"next_cursor from the previous page. Omit for the first page.","schema":{"type":"string"}},{"in":"query","required":false,"name":"limit","description":"Page size, 1-100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}]}},"/v1/orders/{order_code}":{"get":{"tags":["partner-api-v1"],"summary":"Get one order","operationId":"get_order_v1_orders__order_code__get","parameters":[{"name":"order_code","in":"path","required":true,"schema":{"type":"string","title":"Order Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderOut"}}}},"404":{"description":"NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"422":{"description":"VALIDATION_ERROR (or another 422 code listed in the developer guide).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"401":{"description":"INVALID_API_KEY: missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"403":{"description":"INSUFFICIENT_SCOPE: the key lacks the scope this endpoint needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"429":{"description":"RATE_LIMITED (see Retry-After) or DAILY_QUOTA_EXCEEDED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"500":{"description":"INTERNAL_ERROR (retryable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}}}}},"/v1/orders/{order_code}/cancellation-quote":{"get":{"tags":["partner-api-v1"],"summary":"Can this order be cancelled via the API, and what is refunded","operationId":"cancellation_quote_v1_orders__order_code__cancellation_quote_get","parameters":[{"name":"order_code","in":"path","required":true,"schema":{"type":"string","title":"Order Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancellationQuoteOut"}}}},"404":{"description":"NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"422":{"description":"VALIDATION_ERROR (or another 422 code listed in the developer guide).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"401":{"description":"INVALID_API_KEY: missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"403":{"description":"INSUFFICIENT_SCOPE: the key lacks the scope this endpoint needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"429":{"description":"RATE_LIMITED (see Retry-After) or DAILY_QUOTA_EXCEEDED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"500":{"description":"INTERNAL_ERROR (retryable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}}}}},"/v1/orders/{order_code}/cancel":{"post":{"tags":["partner-api-v1"],"summary":"Cancel an unpaid order (requires Idempotency-Key)","operationId":"cancel_order_v1_orders__order_code__cancel_post","parameters":[{"name":"order_code","in":"path","required":true,"schema":{"type":"string","title":"Order Code"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderOut"}}}},"404":{"description":"NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"409":{"description":"NOT_CANCELLABLE.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"422":{"description":"VALIDATION_ERROR (or another 422 code listed in the developer guide).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"401":{"description":"INVALID_API_KEY: missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"403":{"description":"INSUFFICIENT_SCOPE: the key lacks the scope this endpoint needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"429":{"description":"RATE_LIMITED (see Retry-After) or DAILY_QUOTA_EXCEEDED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}},"500":{"description":"INTERNAL_ERROR (retryable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerError"}}}}}}}},"components":{"schemas":{"BagsOut":{"properties":{"standard":{"type":"integer","title":"Standard"},"oversized":{"type":"integer","title":"Oversized"}},"type":"object","required":["standard","oversized"],"title":"BagsOut"},"CancellationPolicy":{"properties":{"summary":{"type":"string","title":"Summary"}},"type":"object","required":["summary"],"title":"CancellationPolicy"},"CancellationQuoteOut":{"properties":{"order_code":{"type":"string","title":"Order Code"},"cancellable":{"type":"boolean","title":"Cancellable"},"reason_code":{"type":"string","title":"Reason Code"},"refund_amount":{"type":"number","title":"Refund Amount"},"fee":{"type":"number","title":"Fee"},"currency":{"type":"string","title":"Currency"},"deadline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deadline"}},"type":"object","required":["order_code","cancellable","reason_code","refund_amount","fee","currency"],"title":"CancellationQuoteOut"},"CityOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"transport_points":{"items":{"$ref":"#/components/schemas/TransportPointOut"},"type":"array","title":"Transport Points"}},"type":"object","required":["id","transport_points"],"title":"CityOut"},"CountryOut":{"properties":{"country_code":{"type":"string","title":"Country Code"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"cities":{"items":{"$ref":"#/components/schemas/CityOut"},"type":"array","title":"Cities"}},"type":"object","required":["country_code","cities"],"title":"CountryOut"},"CoverageOut":{"properties":{"countries":{"items":{"$ref":"#/components/schemas/CountryOut"},"type":"array","title":"Countries"}},"type":"object","required":["countries"],"title":"CoverageOut"},"LineItem":{"properties":{"code":{"type":"string","title":"Code"},"label":{"type":"string","title":"Label"},"amount":{"type":"number","title":"Amount"}},"type":"object","required":["code","label","amount"],"title":"LineItem"},"OrderEndpointOut":{"properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"airport_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airport Code"},"terminal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terminal"},"flight_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flight Number"}},"type":"object","title":"OrderEndpointOut"},"OrderList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrderOut"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"OrderList"},"OrderOut":{"properties":{"order_code":{"type":"string","title":"Order Code"},"status":{"type":"string","enum":["awaiting_payment","order_placed","driver_arrived_pickup","client_dropped_off","luggage_collected","driver_arrived_delivery","luggage_delivered","cancelled"],"title":"Status"},"mode":{"type":"string","enum":["test","live"],"title":"Mode"},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"pickup_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pickup Date"},"pickup_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pickup Time"},"dropoff_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dropoff Date"},"dropoff_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dropoff Time"},"pickup":{"$ref":"#/components/schemas/OrderEndpointOut"},"dropoff":{"$ref":"#/components/schemas/OrderEndpointOut"},"bags":{"$ref":"#/components/schemas/BagsOut"},"traveller_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Traveller Name"},"partner_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Reference"},"payment_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Url"},"payment_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Expires At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["order_code","status","mode","pickup","dropoff","bags"],"title":"OrderOut"},"QuoteOut":{"properties":{"quote_id":{"type":"string","title":"Quote Id"},"currency":{"type":"string","title":"Currency"},"total":{"type":"number","title":"Total"},"line_items":{"items":{"$ref":"#/components/schemas/LineItem"},"type":"array","title":"Line Items"},"expires_at":{"type":"string","title":"Expires At"},"pickup_date":{"type":"string","format":"date","title":"Pickup Date"},"pickup_time":{"type":"string","title":"Pickup Time"},"dropoff_date":{"type":"string","format":"date","title":"Dropoff Date"},"cancellation_policy":{"$ref":"#/components/schemas/CancellationPolicy"}},"type":"object","required":["quote_id","currency","total","line_items","expires_at","pickup_date","pickup_time","dropoff_date","cancellation_policy"],"title":"QuoteOut"},"TransportPointOut":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"airport_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airport Code"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"}},"type":"object","required":["id","kind"],"title":"TransportPointOut"},"PartnerError":{"type":"object","title":"PartnerError","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string","description":"Machine-readable error code, e.g. QUOTE_EXPIRED."},"message":{"type":"string","description":"Human-readable explanation (English)."},"retryable":{"type":"boolean","description":"true when the same request may succeed later."},"request_id":{"type":"string","description":"Also returned in the X-Request-Id header.","examples":["req_3f9c2a1b7d4e5f60a1b2c3d4"]}}}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"lgpk_test_… / lgpk_live_…","description":"API key from LuggAgent. Test keys use the sandbox."}}},"security":[{"bearerAuth":[]}],"tags":[{"name":"partner-api-v1","description":"LuggAgent Partner API v1"}],"externalDocs":{"description":"Developer guide","url":"https://luggagent.com/developers"}}