{"openapi":"3.1.0","info":{"title":"LEDMESEE Partner API","version":"2.1.0","description":"API for LEDMESEE Authorized Partners: catalogue with your partner prices, checkout-identical quotes, ordering (transfer, balance, invoice with payment term, card payment link), dropshipping to your customers, webhooks for order status, shipment and tracking, invoices and price list feeds. Docs: https://ledmesee.com/partner-api/"},"servers":[{"url":"https://ledmesee.com/partner-api/v1"}],"security":[{"bearer":[]}],"paths":{"/me":{"get":{"operationId":"me","summary":"Your partner status, level, discount and quarterly turnover","responses":{"200":{"description":"Partner","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing / invalid key"},"403":{"description":"Key without scope"},"429":{"description":"Rate limit"}}}},"/products":{"get":{"operationId":"listProducts","summary":"Catalogue with list and partner prices (scope: catalog)","parameters":[{"name":"lang","in":"query","required":false,"description":"Language of names (pl, en, de, fr …). Default: account language.","schema":{"type":"string"}},{"name":"currency","in":"query","required":false,"description":"One of GET / → currencies (PLN, EUR, USD, GBP, CZK …). Default: currency of the country. Other codes → 400 unsupported_currency.","schema":{"type":"string"}},{"name":"country","in":"query","required":false,"description":"Country for availability and RRP VAT (ISO 2). Default: your country.","schema":{"type":"string"}},{"name":"category","in":"query","required":false,"description":"frames | starter | prints | accessories","schema":{"type":"string"}},{"name":"q","in":"query","required":false,"description":"Search text","schema":{"type":"string"}}],"responses":{"200":{"description":"Products","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing / invalid key"},"403":{"description":"Key without scope"},"429":{"description":"Rate limit"}}}},"/products/{id}":{"get":{"operationId":"getProduct","summary":"One product with description, specs, images (id = product key, SKU or variant_id; scope: catalog)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"description":"Language of names (pl, en, de, fr …). Default: account language.","schema":{"type":"string"}},{"name":"currency","in":"query","required":false,"description":"One of GET / → currencies (PLN, EUR, USD, GBP, CZK …). Default: currency of the country. Other codes → 400 unsupported_currency.","schema":{"type":"string"}},{"name":"country","in":"query","required":false,"description":"Country for availability and RRP VAT (ISO 2). Default: your country.","schema":{"type":"string"}}],"responses":{"200":{"description":"Product","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing / invalid key"},"403":{"description":"Key without scope"},"429":{"description":"Rate limit"}}}},"/quote":{"post":{"operationId":"quote","summary":"Quote exactly like checkout for your account (scope: quote). 2.1: issues[] { code: out_of_stock | unavailable | limit | shipping | blocked | other, sku, message } explain errors[]; message in Polish with lang=pl / Accept-Language: pl, otherwise English","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items","country"],"properties":{"items":{"type":"array","maxItems":50,"items":{"type":"object","required":["quantity"],"properties":{"sku":{"type":"string"},"variant_id":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":10000}}}},"country":{"type":"string","description":"Delivery country ISO 2"},"postal_code":{"type":"string"},"city":{"type":"string"},"region":{"type":"string","maxLength":3,"description":"ISO 3166-2 subdivision code without the country prefix (US: CA, CA: ON, AU: NSW)"},"currency":{"type":"string"},"lang":{"type":"string","description":"pl = Polish messages in issues / error.fields, otherwise English"},"shipping_method":{"type":"string","description":"method from shipping_options"}}}}}},"responses":{"200":{"description":"Quote","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing / invalid key"},"403":{"description":"Key without scope"},"429":{"description":"Rate limit"}}}},"/orders":{"get":{"operationId":"listOrders","summary":"Orders of your company: paid orders and API orders awaiting payment (scope: orders). Response: { count, has_more, next_cursor, order, orders }","parameters":[{"name":"limit","in":"query","required":false,"description":"1–100, default 50","schema":{"type":"string"}},{"name":"order","in":"query","required":false,"description":"id_desc (default, newest first) | updated_asc (oldest change first — use for polling with updated_since)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"next_cursor from the previous page (send the same filters again); a cursor of another order → 400 invalid_cursor","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"ISO date-time, e.g. 2026-11-01T00:00:00Z","schema":{"type":"string"}},{"name":"external_id","in":"query","required":false,"description":"Your order number given at POST /orders","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"pending | paid | processing | shipped | completed | cancelled | refunded | partially_refunded","schema":{"type":"string"}}],"responses":{"200":{"description":"Orders","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing / invalid key"},"403":{"description":"Key without scope"},"429":{"description":"Rate limit"}}},"post":{"operationId":"createOrder","summary":"Place an order at your partner prices (scope: ordering). Idempotent: the same external_id (or Idempotency-Key) always returns the same order.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":64},"description":"Used as external_id when the body has none"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}}},"responses":{"200":{"description":"Duplicate — the order with this external_id already exists (duplicate: true)"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/Order"}}}}}},"400":{"description":"invalid — see error.missing and error.fields / unsupported_currency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"insufficient_balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"contract_required (accept the partner agreement in your account) / term_not_allowed / key without scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"price_changed (expected_total differs) / in_progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"out_of_stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit (counted like quotes)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{number}":{"get":{"operationId":"getOrder","summary":"One order: status, stage, payment, tracking, invoice (scope: orders)","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"string"},"description":"LEDMESEE order number, e.g. LM-26X4QP2A (live: ^LM-[0-9A-Z]{8}$, test: ^LMT-[0-9A-Z]{8}$; treat as text up to 20 characters)"}],"responses":{"200":{"description":"Order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{number}/cancel":{"post":{"operationId":"cancelOrder","summary":"Cancel an unpaid order (status pending) (scope: ordering)","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"string"},"description":"LEDMESEE order number, e.g. LM-26X4QP2A (live: ^LM-[0-9A-Z]{8}$, test: ^LMT-[0-9A-Z]{8}$; treat as text up to 20 characters)"}],"responses":{"200":{"description":"Cancelled (already: true if it was cancelled before)"},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"cannot_cancel — paid or in production","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{number}/invoice.pdf":{"get":{"operationId":"getInvoicePdf","summary":"Invoice PDF (or ?kind=proforma for the pro forma of a transfer order) (scope: orders)","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"string"},"description":"LEDMESEE order number, e.g. LM-26X4QP2A (live: ^LM-[0-9A-Z]{8}$, test: ^LMT-[0-9A-Z]{8}$; treat as text up to 20 characters)"},{"name":"kind","in":"query","required":false,"description":"invoice (default) | proforma","schema":{"type":"string"}}],"responses":{"200":{"description":"PDF","content":{"application/pdf":{}}},"404":{"description":"No invoice yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/balance":{"get":{"operationId":"getBalance","summary":"Your LEDMESEE balance per currency (payment: balance) (scope: ordering)","responses":{"200":{"description":"Balance","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing / invalid key"},"403":{"description":"Key without scope"},"429":{"description":"Rate limit"}}}},"/shipping-methods":{"get":{"operationId":"shippingMethods","summary":"Delivery methods for a country (typical parcel). Exact prices for a cart: POST /quote (scope: quote)","parameters":[{"name":"country","in":"query","required":true,"description":"ISO 2","schema":{"type":"string"}}],"responses":{"200":{"description":"Methods","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing / invalid key"},"403":{"description":"Key without scope"},"429":{"description":"Rate limit"}}}},"/webhooks":{"get":{"operationId":"listWebhooks","summary":"Your webhooks (scope: webhooks)","responses":{"200":{"description":"Webhooks","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing / invalid key"},"403":{"description":"Key without scope"},"429":{"description":"Rate limit"}}},"post":{"operationId":"createWebhook","summary":"Add a webhook (https, public host; max 5). The signing secret is returned only once (scope: webhooks)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["*","order.created","order.paid","order.status_changed","order.shipped","order.delivered","order.cancelled","order.refunded","invoice.issued"]},"description":"Empty or [\"*\"] = all events"},"description":{"type":"string","maxLength":120}}}}}},"responses":{"201":{"description":"Created: { webhook, secret }"},"400":{"description":"invalid / too_many","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"delete":{"operationId":"deleteWebhook","summary":"Delete a webhook (scope: webhooks)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^wh_[0-9a-f]{18}$"}}],"responses":{"200":{"description":"Deleted"},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/test":{"post":{"operationId":"testWebhook","summary":"Send a signed \"ping\" event now and return the result (scope: webhooks)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^wh_[0-9a-f]{18}$"}}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing / invalid key"},"403":{"description":"Key without scope"},"429":{"description":"Rate limit"}}}},"/webhooks/{id}/sample":{"get":{"operationId":"sampleWebhookEvent","summary":"A signed sample event for your own tests (nothing is sent): { type, sent: false, url, example, headers, body, note }. body has \"sample\": true. Use when your shop is not reachable from the internet (staging, localhost) (scope: webhooks)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^wh_[0-9a-f]{18}$"}},{"name":"type","in":"query","required":false,"description":"order.shipped (default) | order.created | order.paid | order.status_changed | order.delivered | order.cancelled | order.refunded | invoice.issued | ping","schema":{"type":"string"}},{"name":"number","in":"query","required":false,"description":"One of your orders — real data instead of an example","schema":{"type":"string"}}],"responses":{"200":{"description":"Sample event","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing / invalid key"},"403":{"description":"Key without scope"},"429":{"description":"Rate limit"}}}},"/plugins":{"get":{"operationId":"listPlugins","summary":"Shop plugins (WooCommerce, PrestaShop): version, requirements, sha256, changelog, download_url (any key except price-list-only)","responses":{"200":{"description":"Plugins","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing / invalid key"},"403":{"description":"Key without scope"},"429":{"description":"Rate limit"}}}},"/plugins/{platform}":{"get":{"operationId":"getPlugin","summary":"Latest version of one plugin — for update checks","parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","enum":["woocommerce","prestashop"]}}],"responses":{"200":{"description":"Plugin","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing / invalid key"},"403":{"description":"Key without scope"},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit"}}}},"/plugins/{platform}/download":{"get":{"operationId":"downloadPlugin","summary":"Plugin ZIP (header X-Content-SHA256)","parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","enum":["woocommerce","prestashop"]}}],"responses":{"200":{"description":"ZIP","content":{"application/zip":{}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/deliveries":{"get":{"operationId":"webhookDeliveries","summary":"Last deliveries with status, attempts and errors (scope: webhooks)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^wh_[0-9a-f]{18}$"}},{"name":"limit","in":"query","required":false,"description":"1–100, default 30","schema":{"type":"string"}}],"responses":{"200":{"description":"Deliveries","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing / invalid key"},"403":{"description":"Key without scope"},"429":{"description":"Rate limit"}}}},"/feed.csv":{"get":{"operationId":"feedCsv","summary":"Price list CSV (scope: feed). Feed readers may pass a price-list-only key as ?token=","parameters":[{"name":"lang","in":"query","required":false,"description":"Language of names (pl, en, de, fr …). Default: account language.","schema":{"type":"string"}},{"name":"currency","in":"query","required":false,"description":"One of GET / → currencies (PLN, EUR, USD, GBP, CZK …). Default: currency of the country. Other codes → 400 unsupported_currency.","schema":{"type":"string"}},{"name":"country","in":"query","required":false,"description":"Country for availability and RRP VAT (ISO 2). Default: your country.","schema":{"type":"string"}},{"name":"token","in":"query","required":false,"description":"Price-list-only key (scope feed only)","schema":{"type":"string"}}],"responses":{"200":{"description":"CSV","content":{"text/csv":{}}}}}},"/feed.xml":{"get":{"operationId":"feedXml","summary":"Price list XML (scope: feed)","parameters":[{"name":"lang","in":"query","required":false,"description":"Language of names (pl, en, de, fr …). Default: account language.","schema":{"type":"string"}},{"name":"currency","in":"query","required":false,"description":"One of GET / → currencies (PLN, EUR, USD, GBP, CZK …). Default: currency of the country. Other codes → 400 unsupported_currency.","schema":{"type":"string"}},{"name":"country","in":"query","required":false,"description":"Country for availability and RRP VAT (ISO 2). Default: your country.","schema":{"type":"string"}},{"name":"token","in":"query","required":false,"description":"Price-list-only key (scope feed only)","schema":{"type":"string"}}],"responses":{"200":{"description":"XML","content":{"application/xml":{}}}}}}},"webhooks":{"orderEvent":{"post":{"summary":"Event sent to your webhook URL","description":"Headers: X-LEDMESEE-Event, X-LEDMESEE-Delivery, X-LEDMESEE-Signature: t=<unix seconds>,v1=<hex>. v1 = HMAC-SHA256(secret, t + \".\" + raw body). Reject if the signature differs or t is older than 5 minutes. Answer 2xx within 10 s; otherwise we retry after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h. Events may arrive more than once and out of order — use id and data.order.updated.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"evt_…"},"type":{"type":"string","enum":["order.created","order.paid","order.status_changed","order.shipped","order.delivered","order.cancelled","order.refunded","invoice.issued","ping"]},"created":{"type":"string","format":"date-time"},"environment":{"type":"string","enum":["live","test"]},"partner":{"type":"string"},"data":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/Order"},"previous":{"type":["object","null"]}}}}}}}},"responses":{"200":{"description":"Any 2xx = delivered"}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Partner API key from your LEDMESEE account: lmp_live_… (test.ledmesee.com: lmp_test_…)"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string","description":"English"},"missing":{"type":"array","items":{"type":"string"}},"fields":{"type":"array","description":"2.1: one entry per field; message in Polish with lang=pl / Accept-Language: pl","items":{"type":"object","properties":{"field":{"type":"string"},"code":{"type":"string","enum":["required","invalid","unknown"]},"message":{"type":"string"}}}},"issues":{"type":"array","description":"2.1 (out_of_stock): { code, sku, message }","items":{"type":"object"}},"currencies":{"type":"array","items":{"type":"string"},"description":"unsupported_currency: supported codes"},"quote":{"type":"object"}}}}},"OrderRequest":{"type":"object","required":["items","payment"],"properties":{"external_id":{"type":"string","maxLength":64,"description":"Your order number (idempotency). Required unless Idempotency-Key header is sent."},"items":{"type":"array","maxItems":50,"items":{"type":"object","required":["quantity"],"properties":{"sku":{"type":"string"},"variant_id":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":10000}}}},"payment":{"type":"string","enum":["transfer","balance","term","card_link"],"description":"transfer = pro forma + bank transfer (production starts after payment); balance = paid at once from your LEDMESEE balance; term = VAT invoice with payment term (only if enabled in your agreement); card_link = payment link (card / BLIK / Przelewy24) in payment.payment_url"},"currency":{"type":"string","description":"Default: currency of the delivery country. Balance: PLN or EUR. Unsupported code → 400 unsupported_currency."},"lang":{"type":"string","description":"pl = Polish messages in error.fields / issues"},"ship_to":{"type":"object","description":"Omit to ship to your company address. With ship_to the parcel goes to your customer.","required":["name","street","postal_code","city","country","phone"],"properties":{"name":{"type":"string"},"company":{"type":"string"},"street":{"type":"string"},"postal_code":{"type":"string"},"city":{"type":"string"},"region":{"type":"string","maxLength":3,"description":"ISO 3166-2 code without the country prefix (US: CA, CA: ON, AU: NSW); required only where the carrier needs it (then 400 with field ship_to.region), usually not needed in the EU"},"country":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"customs_id":{"type":"string","description":"Outside the EU: recipient tax / customs ID if required"}}},"dropship":{"type":"boolean","description":"With ship_to: neutral parcel (no prices or LEDMESEE invoice inside, your company as sender on the documents we can control). Default true."},"shipping_method":{"type":"string","description":"method from POST /quote shipping_options; default: the cheapest"},"pickup_point":{"type":"string","description":"Parcel locker code when the method is a locker"},"print_files_url":{"type":"string","description":"https link to print files (frames with print)"},"notes":{"type":"string","maxLength":500},"expected_total":{"type":"number","description":"Total from your quote; if the current total differs we answer 409 price_changed and create nothing"}}},"Order":{"type":"object","properties":{"number":{"type":"string"},"external_id":{"type":["string","null"]},"source":{"type":"string","enum":["api","web","app","manual"]},"created":{"type":"string"},"updated":{"type":"string"},"paid_at":{"type":["string","null"]},"status":{"type":"string"},"stage":{"type":["string","null"]},"ship_by":{"type":["string","null"]},"payment":{"type":"object","properties":{"method":{"type":"string"},"status":{"type":"string","enum":["awaiting_payment","paid","term_open","term_paid","cancelled"]},"due":{"type":["string","null"]},"bank":{"type":["object","null"],"properties":{"account":{"type":"string"},"bic":{"type":["string","null"]},"title":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"}}},"payment_url":{"type":["string","null"]},"proforma_number":{"type":["string","null"]}}},"items":{"type":"array","items":{"type":"object"}},"currency":{"type":"string"},"net":{"type":["number","null"]},"vat":{"type":["number","null"]},"total":{"type":"number"},"refunded":{"type":"number"},"invoice":{"type":"boolean"},"invoice_number":{"type":["string","null"]},"shipping":{"type":"object","properties":{"method":{"type":["string","null"]},"carrier":{"type":["string","null"]},"tracking_number":{"type":["string","null"]},"tracking_url":{"type":["string","null"]},"carrier_status":{"type":["string","null"]},"neutral":{"type":"boolean"},"pickup_point":{"type":["string","null"]}}},"recipient":{"type":"object"},"print_file":{"type":"object"},"order_url":{"type":"string"}}}}}}