{"openapi":"3.0.3","info":{"title":"MapEx Cargo Customer API","version":"1.0.0"},"servers":[{"url":"https://api.mapcargo.com.tr"}],"components":{"securitySchemes":{"MapexClientId":{"type":"apiKey","in":"header","name":"X-Mapex-Client-Id"},"MapexApiKey":{"type":"apiKey","in":"header","name":"X-Mapex-Api-Key"}}},"security":[{"MapexClientId":[],"MapexApiKey":[]}],"paths":{"/v1/ping":{"get":{"security":[],"responses":{"200":{"description":"OK"}}}},"/v1/shipments":{"get":{"summary":"List shipments","responses":{"200":{"description":"Shipment list"}}},"post":{"summary":"Create shipment","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"example":{"external_reference":"ORDER-10001","origin_country":"TR","destination_country":"AE","shipment_type":"SALE","valuation_currency":"USD","service":{"dispatch_mode":"manual","carrier_code":"mapex-naqel"},"sender":{"entity_type":"COMPANY","company_name":"Sender Company","contact_name":"Sender Name","phone_country_code":"+90","phone":"5551112233","address_line1":"Istanbul warehouse","country_code":"TR","city":"Istanbul","postal_code":"34000"},"recipient":{"entity_type":"PERSON","full_name":"Receiver Name","phone_country_code":"+971","phone":"501112233","email":"receiver@example.com","address_line1":"Business Bay","country_code":"AE","city":"Dubai","postal_code":"00000"},"packages":[{"quantity":1,"length_cm":30,"width_cm":20,"height_cm":10,"weight_kg":2.5}],"products":[{"product_name_en":"Cotton T-Shirt","product_name_tr":"Pamuk Tişört","hs_code":"610910","origin_country":"TR","quantity":2,"unit_price":12.5,"currency":"USD"}],"note":"Test gönderisi"}}}},"responses":{"201":{"description":"Shipment created"},"422":{"description":"Validation failed"}}}},"/v1/shipments/{shipment_no}":{"get":{"summary":"Get shipment detail","parameters":[{"name":"shipment_no","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Shipment detail"}}},"delete":{"summary":"Cancel created shipment","parameters":[{"name":"shipment_no","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Shipment cancelled"},"409":{"description":"Not cancelable"}}}},"/v1/shipments/{shipment_no}/tracking":{"get":{"summary":"Get tracking events and package image metadata","parameters":[{"name":"shipment_no","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tracking events and package images"}}}},"/v1/shipments/{shipment_no}/images/{image_id}":{"get":{"summary":"Get package image","parameters":[{"name":"shipment_no","in":"path","required":true,"schema":{"type":"string"}},{"name":"image_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"size","in":"query","required":false,"schema":{"type":"string","enum":["thumb"]}}],"responses":{"200":{"description":"Package image","content":{"image/jpeg":[],"image/png":[],"image/webp":[]}},"404":{"description":"Package image not found"}}}},"/v1/shipments/{shipment_no}/label":{"get":{"summary":"Get PDF label","parameters":[{"name":"shipment_no","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"PDF label","content":{"application/pdf":[]}}}}}}}