{"openapi":"3.1.0","info":{"title":"Plandia Logistics API","description":"Parcel logistics reference data for the Polish market: carrier directory, parcel locker lookup, postal code and NIP validation, shipping price calculation and shipment tracking.","contact":{"name":"API Support","email":"support@example.com"},"license":{"name":""},"version":"1.0.0"},"paths":{"/v1/auth/token":{"post":{"tags":["auth"],"operationId":"token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenReq"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResp"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/carriers":{"get":{"tags":["network"],"operationId":"carriers","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Carrier"}}}}}}}},"/v1/fx":{"get":{"tags":["reference"],"operationId":"fx","parameters":[{"name":"base","in":"query","required":false,"schema":{"type":"string"},"example":"PLN"},{"name":"symbols","in":"query","required":false,"schema":{"type":"string"},"example":"EUR,USD,CZK"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FxResp"}}}}}}},"/v1/health":{"get":{"tags":["system"],"operationId":"health","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/v1/holidays":{"get":{"tags":["reference"],"operationId":"holidays","parameters":[{"name":"country","in":"query","required":false,"schema":{"type":"string"},"example":"PL"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Holiday"}}}}}}}},"/v1/lockers":{"get":{"tags":["network"],"operationId":"lockers","parameters":[{"name":"city","in":"query","required":false,"schema":{"type":"string"},"example":"Warszawa"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":0},"example":10}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Locker"}}}}}}}},"/v1/nip/validate":{"get":{"tags":["reference"],"operationId":"nip_validate","parameters":[{"name":"nip","in":"query","required":true,"schema":{"type":"string"},"example":"5260250274"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NipResp"}}}}}}},"/v1/postcode/validate":{"get":{"tags":["reference"],"operationId":"postcode_validate","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string"},"example":"00-950"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostcodeResp"}}}}}}},"/v1/pricing":{"get":{"tags":["shipping"],"operationId":"pricing","parameters":[{"name":"weight_kg","in":"query","required":false,"schema":{"type":"number","format":"double"},"example":2.5},{"name":"service","in":"query","required":false,"schema":{"type":"string"},"example":"locker_standard"},{"name":"cod","in":"query","required":false,"schema":{"type":"boolean"},"example":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingResp"}}}}}}},"/v1/regions":{"get":{"tags":["network"],"operationId":"regions","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Region"}}}}}}}},"/v1/shipments/{id}":{"get":{"tags":["shipping"],"operationId":"shipment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"PLD000123456789"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"bearer_auth":[]}]}},"/v1/shipments/{id}/track":{"get":{"tags":["shipping"],"operationId":"track","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"PLD000123456789"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackResp"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/status":{"get":{"tags":["system"],"operationId":"status","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResp"}}}}}}},"/v1/vat/rates":{"get":{"tags":["reference"],"operationId":"vat_rates","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VatRate"}}}}}}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["type","title","status","detail","request_id"],"properties":{"detail":{"type":"string"},"request_id":{"type":"string"},"status":{"type":"integer","format":"int32","minimum":0},"title":{"type":"string"},"type":{"type":"string"}}},"Carrier":{"type":"object","required":["code","name","country","services","cod_supported","cutoff_local"],"properties":{"cod_supported":{"type":"boolean"},"code":{"type":"string"},"country":{"type":"string"},"cutoff_local":{"type":"string"},"name":{"type":"string"},"services":{"type":"array","items":{"type":"string"}}}},"FxResp":{"type":"object","required":["base","date","rates","source"],"properties":{"base":{"type":"string"},"date":{"type":"string"},"rates":{"type":"object","additionalProperties":{"type":"number","format":"double"},"propertyNames":{"type":"string"}},"source":{"type":"string"}}},"Health":{"type":"object","required":["status","service","version","timestamp"],"properties":{"service":{"type":"string"},"status":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"version":{"type":"string"}}},"Holiday":{"type":"object","required":["date","name","country"],"properties":{"country":{"type":"string"},"date":{"type":"string"},"name":{"type":"string"}}},"Locker":{"type":"object","required":["id","city","street","postcode","lat","lon","size_classes","status"],"properties":{"city":{"type":"string"},"id":{"type":"string"},"lat":{"type":"number","format":"double"},"lon":{"type":"number","format":"double"},"postcode":{"type":"string"},"size_classes":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"street":{"type":"string"}}},"NipResp":{"type":"object","required":["nip","formatted","valid","length_ok","checksum_ok"],"properties":{"checksum_ok":{"type":"boolean"},"formatted":{"type":"string"},"length_ok":{"type":"boolean"},"nip":{"type":"string"},"valid":{"type":"boolean"}}},"PostcodeResp":{"type":"object","required":["code","normalized","valid","voivodeship","hub"],"properties":{"code":{"type":"string"},"hub":{"type":"string"},"normalized":{"type":"string"},"valid":{"type":"boolean"},"voivodeship":{"type":"string"}}},"PricingResp":{"type":"object","required":["service","weight_kg","weight_band","base_net_pln","fuel_surcharge_pln","cod_fee_pln","total_net_pln","vat_pct","total_gross_pln","currency","eta_days"],"properties":{"base_net_pln":{"type":"number","format":"double"},"cod_fee_pln":{"type":"number","format":"double"},"currency":{"type":"string"},"eta_days":{"type":"integer","format":"int32","minimum":0},"fuel_surcharge_pln":{"type":"number","format":"double"},"service":{"type":"string"},"total_gross_pln":{"type":"number","format":"double"},"total_net_pln":{"type":"number","format":"double"},"vat_pct":{"type":"number","format":"double"},"weight_band":{"type":"string"},"weight_kg":{"type":"number","format":"double"}}},"Region":{"type":"object","required":["id","name","country","status"],"properties":{"country":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}}},"Shipment":{"type":"object","required":["id","carrier","service","status","origin_postcode","dest_postcode","weight_kg","declared_value_pln","created_at","eta"],"properties":{"carrier":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"declared_value_pln":{"type":"number","format":"double"},"dest_postcode":{"type":"string"},"eta":{"type":"string","format":"date-time"},"id":{"type":"string"},"origin_postcode":{"type":"string"},"service":{"type":"string"},"status":{"type":"string"},"weight_kg":{"type":"number","format":"double"}}},"StatusResp":{"type":"object","required":["status","service","version","region","uptime_seconds","timestamp"],"properties":{"region":{"type":"string"},"service":{"type":"string"},"status":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"uptime_seconds":{"type":"integer","format":"int64","minimum":0},"version":{"type":"string"}}},"TokenReq":{"type":"object","required":["grant_type","client_id","client_secret"],"properties":{"client_id":{"type":"string"},"client_secret":{"type":"string"},"grant_type":{"type":"string"}}},"TokenResp":{"type":"object","required":["access_token","token_type","expires_in","scope"],"properties":{"access_token":{"type":"string"},"expires_in":{"type":"integer","format":"int64","minimum":0},"scope":{"type":"string"},"token_type":{"type":"string"}}},"TrackEvent":{"type":"object","required":["timestamp","code","description","location"],"properties":{"code":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"TrackResp":{"type":"object","required":["shipment_id","carrier","status","events","eta"],"properties":{"carrier":{"type":"string"},"eta":{"type":"string","format":"date-time"},"events":{"type":"array","items":{"$ref":"#/components/schemas/TrackEvent"}},"shipment_id":{"type":"string"},"status":{"type":"string"}}},"VatRate":{"type":"object","required":["country","standard_pct","reduced_pct","currency","effective_from"],"properties":{"country":{"type":"string"},"currency":{"type":"string"},"effective_from":{"type":"string"},"reduced_pct":{"type":"array","items":{"type":"number","format":"double"}},"standard_pct":{"type":"number","format":"double"}}}}},"tags":[{"name":"system","description":"Health & status"},{"name":"network","description":"Carriers, lockers, regions"},{"name":"reference","description":"Postal codes, NIP, VAT, holidays, FX"},{"name":"shipping","description":"Pricing and tracking"},{"name":"auth","description":"Authentication"}]}