{"openapi":"3.1.0","info":{"title":"LeMax Open API","description":"\nLeMax Open API lets your shop, ERP or WMS create **DHL Germany shipping labels** on LeMax Logistics' DHL contract,\ncancel them, download labels again, get prices and check your balance — without access to our DHL accounts.\n（中文：你的系统按这份文档调用，就能用 LeMax 的 DHL 合同直接出面单、取消、重新下载面单、试算运费、查余额。）\n\n## Quick start · 快速开始\n\n1. **Get a test key** (`lmx_test_…`) in the LeMax customer portal → *API*, or from your LeMax contact.\n   测试密钥在客户门户「API」页自己生成（完整密钥只显示一次，请马上保存）。\n2. Send every request with `Authorization: Bearer <your key>`. Try it right here: **Authorize** (top right) → paste your test key.\n3. Test keys create labels in the **DHL sandbox**: specimen labels, nothing is shipped, nothing is charged or frozen.\n   测试密钥连 DHL 沙箱：面单是样张，不发货、不扣钱、不冻结。\n4. When your integration passes our checklist (create, validate, cancel, retry with the same Idempotency-Key, insufficient balance,\n   error handling), create a **live key** (`lmx_live_…`). 验收通过后再生成正式密钥。\n\nBase URL: `https://api.lemaxlogistics.com/v1` for both environments — **the key decides**: `lmx_test_` → DHL sandbox, `lmx_live_` → DHL production.\n\n## Money and balance · 额度和扣款\n\n* Live shipments are priced with **your LeMax price list**. When a label is created we **freeze** the estimate plus a small safety buffer\n  from your available balance (balance + credit − frozen). If the available balance does not cover the whole request we return\n  `402 INSUFFICIENT_BALANCE` and **no label is created**. 额度不够时整次请求返回 402，DHL 不会出面单。\n* The final charge follows the DHL invoice (actual weight, surcharges); the freeze is then released. Cancelling a label before it is\n  handed over to DHL releases the freeze immediately. 最终按 DHL 账单扣款；交给 DHL 之前取消，冻结马上释放。\n* Live keys are available for prepaid accounts. `GET /account/balance` shows balance, frozen and available amounts.\n\n## Idempotency · 防止重复出单\n\n`POST /shipments` requires an `Idempotency-Key` header — any unique string up to 100 characters (e.g. your order number).\nIf the network fails, **send the same request again with the same key**: within 24 hours you get the original response\n(header `Idempotent-Replayed: true`) and never a second label. Reusing a key for a different request returns `422 IDEMPOTENCY_KEY_REUSED`.\n网络出错时用同一个 Idempotency-Key 重发，24 小时内只会出一次单。\n\n## Batches · 一次多票\n\nUp to 30 shipments per request. Each shipment succeeds or fails on its own:\n`201` all created · `207` some created, some failed · `422` none created. Every item has `status` (`created` / `failed`) and,\nif failed, an `error` with DHL's validation messages.\n\n## Errors · 错误\n\nErrors use [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) `application/problem+json`:\n`{\"type\", \"title\", \"status\", \"code\", \"detail\", \"request_id\"}`. Please log `request_id` and send it to us when asking for help.\n\n| HTTP | code | meaning |\n|---|---|---|\n| 400 | `IDEMPOTENCY_KEY_REQUIRED` | `POST /shipments` without `Idempotency-Key` |\n| 401 | `UNAUTHORIZED` | missing, wrong or revoked key |\n| 402 | `INSUFFICIENT_BALANCE` | available balance too low — top up first; includes `available_cents` and `required_cents` |\n| 403 | `INSUFFICIENT_SCOPE`, `LIVE_NOT_ALLOWED`, `IP_NOT_ALLOWED`, `API_ACCESS_DISABLED` | key not allowed to do this |\n| 404 | `NOT_FOUND` | no such shipment for this account and environment |\n| 409 | `CANNOT_CANCEL`, `REQUEST_IN_PROGRESS` | label already handed over / same Idempotency-Key still running |\n| 410 | `LABEL_EXPIRED` | labels are kept for 30 days |\n| 422 | `VALIDATION_ERROR`, `IDEMPOTENCY_KEY_REUSED`, per item: `DHL_VALIDATION`, `PRODUCT_NOT_AVAILABLE`, `PRICING_UNAVAILABLE`, `WEIGHT_LIMIT`, `PRODUCT_DESTINATION`, `INVALID_COUNTRY`, `SERVICE_NOT_AVAILABLE` | request or shipment data not accepted |\n| 429 | `RATE_LIMITED` | more than 10 requests/second or 600/minute per key — wait `Retry-After` seconds |\n| 502–504 | `DHL_UNAVAILABLE`, `DHL_TIMEOUT`, `DHL_AUTH` | DHL did not answer; nothing was created — retry with the same Idempotency-Key |\n| 503 | `LIVE_SHIPPING_PAUSED`, `DHL_NOT_CONFIGURED` | temporarily unavailable — contact LeMax |\n\n## Units and formats · 单位\n\nMoney: euro **cents** (integers). Weight: **grams**. Dimensions: **millimetres**. Countries: ISO 3166-1 **alpha-2** (`DE`, `FR`, `CH`).\nDates `YYYY-MM-DD`; timestamps ISO 8601 in UTC. `reference` is printed on the label (8–35 characters, DHL rule).\n\n## Products · 产品\n\n`paket` (domestic, up to 31.5 kg) · `paket_fba` (domestic to Amazon FBA warehouses) · `kleinpaket` (domestic, up to 1 kg) ·\n`paket_international` (Premium by default) · `warenpost_international` (up to 1 kg). `GET /products` shows which ones your account can use live.\nDestinations outside the EU need the DHL `customs` object (same structure as DHL Parcel DE Shipping v2).\n\n## Labels · 面单\n\nPDF (default) or `ZPL2`; sizes `103x150` (default, thermal 10×15), `103x199`, `105x208`, `105x148`, `A4`. The label comes back as base64\nin the create response and can be downloaded again for **30 days** at `GET /shipments/{shipment_no}/label`.\n\n## Privacy · 隐私\n\nRecipient names and addresses are only forwarded to DHL. We store shipment number, product, destination country, weight and your\nreference — not names or addresses. Labels are stored encrypted for 30 days. 收件人姓名和地址只转给 DHL，我们不保存。\n","contact":{"name":"LeMax Logistics","email":"service@lemaxlogistics.com"},"version":"1.0.0"},"servers":[{"url":"/v1","description":"LeMax Open API v1 (key decides: test → DHL sandbox, live → DHL)"}],"paths":{"/shipments":{"post":{"tags":["Shipments"],"summary":"Create shipments (labels)","description":"Creates 1–30 shipments at DHL and returns shipment numbers and labels.\nLive keys: the estimated price (plus buffer) is frozen from your available balance first; if it is not enough the whole request\nis rejected with 402 and nothing is created. 正式密钥先冻结预估金额，额度不够整次拒绝。","operationId":"create_shipments_shipments_post","security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Unique per order, e.g. your order number. Reuse it when retrying.","title":"Idempotency-Key"},"description":"Unique per order, e.g. your order number. Reuse it when retrying."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShipments"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResult"}}}},"207":{"description":"Some shipments created, some failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResult"}}}},"422":{"description":"No shipment created (see each item’s error)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResult"}}}},"402":{"description":"Insufficient balance – nothing created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Idempotency-Key missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"}}},"get":{"tags":["Shipments"],"summary":"List shipments","description":"Shipments created with keys of the same environment (test or live), newest first.","operationId":"list_shipments_shipments_get","security":[{"ApiKey":[]}],"parameters":[{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"YYYY-MM-DD (UTC)","title":"Created From"},"description":"YYYY-MM-DD (UTC)"},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Created To"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["created","failed","cancelled"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"reference","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":35},{"type":"null"}],"title":"Reference"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"next_cursor from the previous page","title":"Cursor"},"description":"next_cursor from the previous page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shipments/validate":{"post":{"tags":["Shipments"],"summary":"Validate shipments without creating labels","description":"Checks addresses, product and services with DHL (`validate=true`) and returns the price estimate.\nNothing is created or frozen. 只校验：不出面单、不冻结。","operationId":"validate_shipments_shipments_validate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateShipments"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/shipments/{shipment_no}":{"get":{"tags":["Shipments"],"summary":"Get one shipment","description":"Status, price and (live) the latest DHL tracking status. 最新物流状态来自 DHL 事件报表，大约每小时更新。","operationId":"get_shipment_shipments__shipment_no__get","security":[{"ApiKey":[]}],"parameters":[{"name":"shipment_no","in":"path","required":true,"schema":{"type":"string","maxLength":40,"title":"Shipment No"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentOut"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Shipments"],"summary":"Cancel a label","description":"Cancels the label at DHL (only before it is handed over / before DHL's daily closing) and releases the freeze.\n交给 DHL 之前可以取消，冻结马上释放。","operationId":"cancel_shipment_shipments__shipment_no__delete","security":[{"ApiKey":[]}],"parameters":[{"name":"shipment_no","in":"path","required":true,"schema":{"type":"string","maxLength":40,"title":"Shipment No"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentOut"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"description":"Already handed over or closed at DHL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shipments/{shipment_no}/label":{"get":{"tags":["Shipments"],"summary":"Download the label again (30 days)","operationId":"get_label_shipments__shipment_no__label_get","security":[{"ApiKey":[]}],"parameters":[{"name":"shipment_no","in":"path","required":true,"schema":{"type":"string","maxLength":40,"title":"Shipment No"}}],"responses":{"200":{"description":"Label file","content":{"application/json":{"schema":{}},"application/pdf":{},"text/plain":{}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Gone"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account/balance":{"get":{"tags":["Account"],"summary":"Balance and available amount","description":"Prepaid accounts: balance, credit, frozen and available amount (available = balance + credit − frozen);\nnew shipments are rejected when the available amount would fall below `stop_below_cents`.","operationId":"get_balance_account_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"ApiKey":[]}]}},"/products":{"get":{"tags":["Account"],"summary":"Products and services","description":"`live: true` = your account has a DHL billing number for it; every product works with test keys.","operationId":"get_products_products_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"ApiKey":[]}]}},"/rates/quote":{"post":{"tags":["Account"],"summary":"Price estimate","description":"Price with your LeMax price list (freight + automatic surcharges such as toll, energy and peak season) and the amount that would be\nfrozen. The final charge follows the DHL invoice.","operationId":"post_quote_rates_quote_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"ApiKey":[]}]}}},"components":{"schemas":{"Address":{"properties":{"name1":{"type":"string","maxLength":50,"minLength":1,"title":"Name1","description":"Name or company"},"name2":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Name2"},"name3":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Name3"},"street":{"type":"string","maxLength":50,"minLength":1,"title":"Street","description":"Street; the house number can be included here or given in house_number"},"house_number":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"House Number"},"address_addition":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Address Addition","description":"Additional address information"},"postal_code":{"type":"string","maxLength":10,"minLength":3,"title":"Postal Code"},"city":{"type":"string","maxLength":40,"minLength":1,"title":"City"},"country":{"type":"string","maxLength":3,"minLength":2,"title":"Country","description":"ISO 3166-1 alpha-2, e.g. DE"},"state":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"State"},"email":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Phone"},"contact_name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Contact Name"}},"additionalProperties":false,"type":"object","required":["name1","street","postal_code","city","country"],"title":"Address"},"CreateResult":{"properties":{"mode":{"type":"string","title":"Mode"},"request_id":{"type":"string","title":"Request Id"},"shipments":{"items":{"$ref":"#/components/schemas/ShipmentOut"},"type":"array","title":"Shipments"},"summary":{"additionalProperties":true,"type":"object","title":"Summary"},"balance":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Balance"}},"type":"object","required":["mode","request_id","shipments","summary"],"title":"CreateResult"},"CreateShipments":{"properties":{"shipments":{"items":{"$ref":"#/components/schemas/ShipmentIn"},"type":"array","maxItems":30,"minItems":1,"title":"Shipments"},"options":{"$ref":"#/components/schemas/Options","default":{"label_format":"PDF","label_size":"103x150","include_label":true,"must_encode":false}}},"additionalProperties":false,"type":"object","required":["shipments"],"title":"CreateShipments"},"Dimensions":{"properties":{"length":{"type":"integer","maximum":3000.0,"minimum":1.0,"title":"Length"},"width":{"type":"integer","maximum":3000.0,"minimum":1.0,"title":"Width"},"height":{"type":"integer","maximum":3000.0,"minimum":1.0,"title":"Height"}},"additionalProperties":false,"type":"object","required":["length","width","height"],"title":"Dimensions"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ItemError":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"details":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Details","default":[]}},"type":"object","required":["code","message"],"title":"ItemError"},"Label":{"properties":{"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Size"},"url":{"type":"string","title":"Url"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base64"}},"type":"object","required":["url"],"title":"Label"},"Options":{"properties":{"label_format":{"type":"string","enum":["PDF","ZPL2"],"title":"Label Format","default":"PDF"},"label_size":{"type":"string","enum":["103x150","103x199","105x208","105x148","A4"],"title":"Label Size","default":"103x150"},"include_label":{"type":"boolean","title":"Include Label","description":"Return the label as base64 in the response (otherwise download it via the label URL)","default":true},"must_encode":{"type":"boolean","title":"Must Encode","description":"Reject addresses DHL cannot route (avoids the DHL coding fee for unreadable addresses)","default":false}},"additionalProperties":false,"type":"object","title":"Options"},"Price":{"properties":{"currency":{"type":"string","title":"Currency","default":"EUR"},"estimated_cents":{"type":"integer","title":"Estimated Cents"},"frozen_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frozen Cents"}},"type":"object","required":["estimated_cents"],"title":"Price"},"Problem":{"properties":{"type":{"type":"string","title":"Type"},"title":{"type":"string","title":"Title"},"status":{"type":"integer","title":"Status"},"code":{"type":"string","title":"Code"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"}},"type":"object","required":["type","title","status","code"],"title":"Problem"},"QuoteIn":{"properties":{"product":{"type":"string","enum":["paket","paket_fba","kleinpaket","paket_international","warenpost_international"],"title":"Product"},"country":{"type":"string","maxLength":3,"minLength":2,"title":"Country","description":"Destination, ISO 3166-1 alpha-2"},"weight_g":{"type":"integer","maximum":31500.0,"minimum":1.0,"title":"Weight G"},"services":{"anyOf":[{"$ref":"#/components/schemas/Services"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["product","country","weight_g"],"title":"QuoteIn","example":{"country":"DE","product":"paket","weight_g":2500}},"Services":{"properties":{"premium":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Premium","description":"International only. paket_international is Premium unless you send false"},"bulky_goods":{"type":"boolean","title":"Bulky Goods","default":false},"no_neighbour_delivery":{"type":"boolean","title":"No Neighbour Delivery","default":false},"named_person_only":{"type":"boolean","title":"Named Person Only","default":false},"visual_check_of_age":{"anyOf":[{"type":"string","enum":["A16","A18"]},{"type":"null"}],"title":"Visual Check Of Age"},"additional_insurance_cents":{"anyOf":[{"type":"integer","maximum":2500000.0,"minimum":1.0},{"type":"null"}],"title":"Additional Insurance Cents","description":"Insured value in euro cents (max EUR 25,000)"},"preferred_neighbour":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Preferred Neighbour"},"preferred_location":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Preferred Location"},"parcel_outlet_routing":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Parcel Outlet Routing","description":"E-mail for the notice when the parcel goes to a retail outlet"}},"additionalProperties":false,"type":"object","title":"Services"},"ShipmentIn":{"properties":{"product":{"type":"string","enum":["paket","paket_fba","kleinpaket","paket_international","warenpost_international"],"title":"Product"},"reference":{"anyOf":[{"type":"string","maxLength":35,"minLength":8},{"type":"null"}],"title":"Reference","description":"Printed on the label (DHL: 8–35 characters)"},"ship_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Ship Date","description":"Defaults to today"},"shipper":{"$ref":"#/components/schemas/Address"},"consignee":{"$ref":"#/components/schemas/Address"},"weight_g":{"type":"integer","maximum":31500.0,"minimum":1.0,"title":"Weight G"},"dimensions_mm":{"anyOf":[{"$ref":"#/components/schemas/Dimensions"},{"type":"null"}]},"services":{"anyOf":[{"$ref":"#/components/schemas/Services"},{"type":"null"}]},"customs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Customs","description":"DHL Parcel DE Shipping v2 `customs` object, passed through unchanged (required outside the EU)"}},"additionalProperties":false,"type":"object","required":["product","shipper","consignee","weight_g"],"title":"ShipmentIn","example":{"consignee":{"city":"Bonn","country":"DE","email":"maria@example.com","house_number":"20","name1":"Maria Musterfrau","postal_code":"53113","street":"Kurt-Schumacher-Str."},"product":"paket","reference":"ORDER-100045","shipper":{"city":"Bonn","country":"DE","email":"shipping@myshop.example","house_number":"10","name1":"My Shop GmbH","postal_code":"53113","street":"Sträßchensweg"},"weight_g":1200}},"ShipmentOut":{"properties":{"index":{"type":"integer","title":"Index"},"status":{"type":"string","enum":["created","failed","cancelled","pending"],"title":"Status"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"},"shipment_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipment No"},"product":{"type":"string","title":"Product"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"consignee_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consignee Country"},"weight_g":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Weight G"},"price":{"anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}]},"label":{"anyOf":[{"$ref":"#/components/schemas/Label"},{"type":"null"}]},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","default":[]},"error":{"anyOf":[{"$ref":"#/components/schemas/ItemError"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"cancelled_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancelled At"},"tracking":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tracking"}},"type":"object","required":["index","status","product"],"title":"ShipmentOut"},"ValidateShipments":{"properties":{"shipments":{"items":{"$ref":"#/components/schemas/ShipmentIn"},"type":"array","maxItems":30,"minItems":1,"title":"Shipments"}},"additionalProperties":false,"type":"object","required":["shipments"],"title":"ValidateShipments"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"ApiKey":{"type":"http","description":"Your LeMax API key. Test keys (lmx_test_) use the DHL sandbox; live keys (lmx_live_) create real labels.","scheme":"bearer","bearerFormat":"lmx_test_… / lmx_live_…"}}},"tags":[{"name":"Shipments","description":"Create, validate, list and cancel DHL shipments; download labels. 出单、校验、查询、取消、面单。"},{"name":"Account","description":"Balance, products and prices of your account. 余额、能用的产品、运费试算。"}]}