{"openapi":"3.1.0","info":{"title":"OpenAPI definition","contact":{"name":"Dealer CustomerService","url":"https://promo.mobile.de/b2b/","email":"service@team.mobile.de"},"version":"2025-11-19"},"servers":[{"url":"https://services.sandbox.mobile.de","description":"Sandbox"}],"security":[{"basicAuth":[]}],"paths":{"/lead-api/sellers/{mobileSellerId}/sandbox/resubmission":{"post":{"tags":["sandbox"],"description":"Generate a resubmission for a given seller","operationId":"generateResubmission","parameters":[{"name":"mobileSellerId","in":"path","required":true,"schema":{"type":"string"},"example":12345},{"name":"leadId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxResponse"}}}}}}},"/lead-api/sellers/{mobileSellerId}/sandbox/initial-submission":{"post":{"tags":["sandbox"],"description":"Generate a sample lead for a given seller","operationId":"generateInitialSubmission","parameters":[{"name":"mobileSellerId","in":"path","required":true,"schema":{"type":"string"},"example":12345}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxResponse"}}}}}}},"/lead-api/sellers/{mobileSellerId}/sandbox/buyer-search-behaviour":{"post":{"tags":["sandbox"],"description":"Generate buyer search behaviour for a given seller","operationId":"generateBuyerSearchBehaviour","parameters":[{"name":"mobileSellerId","in":"path","required":true,"schema":{"type":"string"},"example":12345},{"name":"leadId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxResponse"}}}}}}},"/lead-api/sellers/{mobileSellerId}/sandbox/buyer-reply":{"post":{"tags":["sandbox"],"description":"Generate a buyer reply for a given seller and lead","operationId":"generateBuyerReply","parameters":[{"name":"mobileSellerId","in":"path","required":true,"schema":{"type":"string"},"example":12345},{"name":"leadId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxResponse"}}}}}}},"/lead-api/sellers/{mobileSellerId}/leads/{leadId}/status":{"post":{"tags":["lead-api"],"summary":"Update lead status for a lead","description":"Update the lead status for the given lead","operationId":"updateLeadStatus","parameters":[{"name":"mobileSellerId","in":"path","description":"Mobile.de Seller ID","required":true,"schema":{"type":"string"},"example":12345},{"name":"leadId","in":"path","description":"Lead ID","required":true,"schema":{"type":"string"},"example":"84d6dcfd-4db4-4cc5-88d9-b74c226c8c2a"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadStatusRequest"}}},"required":true},"responses":{"204":{"description":"Lead status successfully updated","content":{}},"400":{"description":"Invalid request data","content":{}},"404":{"description":"Unknown lead id","content":{}},"403":{"description":"Forbidden - insufficient permissions","content":{}}}}},"/lead-api/status":{"get":{"tags":["lead-api"],"description":"Status of Lead API","operationId":"getLeadApiStatus","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadApiStatusResponse"}}}}}}},"/lead-api/sellers/{mobileSellerId}/events":{"get":{"tags":["lead-api"],"description":"Get a full lead by its lead-id","operationId":"getLeadsForDealer","parameters":[{"name":"mobileSellerId","in":"path","required":true,"schema":{"type":"string"},"example":12345},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string","default":"20","maximum":20,"minimum":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadApiEventsResponse"}}}}}}}},"components":{"schemas":{"SandboxResponse":{"type":"object","properties":{"eventId":{"type":"string"},"leadId":{"type":"string"}},"required":["eventId","leadId"]},"UpdateLeadStatusRequest":{"type":"object","description":"Lead event data","properties":{"newStatus":{"type":"string","description":"Lead new status","enum":["IN_PROGRESS","SOLD","NOT_INTERESTED","SPAM"],"example":"IN_PROGRESS"},"occurredAt":{"type":["string","null"],"format":"instant","description":"When the status update occurred","example":"2025-06-30T14:18:36Z"},"traceId":{"type":["string","null"],"description":"Optional trace ID for tracking the event across systems","example":"trace-12345-abcde"}},"required":["newStatus"]},"LeadApiStatusResponse":{"type":"object","properties":{"status":{"type":"string","description":"Status of the Lead API.","example":"UP"}},"required":["status"]},"BuyerRepliedEventData":{"allOf":[{"$ref":"#/components/schemas/LeadEventData"},{"type":"object","properties":{"message":{"$ref":"#/components/schemas/Message","description":"The reply message from the buyer"}}}],"required":["message"]},"BuyerSearchBehaviourAdded":{"allOf":[{"$ref":"#/components/schemas/LeadEventData"},{"type":"object","properties":{"makeModels":{"type":"array","description":"List of make and model combinations the buyer has been searching for","items":{"$ref":"#/components/schemas/MakeModelInsight"}},"fuelTypes":{"type":"array","description":"List of fuel types the buyer has been searching for","items":{"$ref":"#/components/schemas/Insight"}},"gearTypes":{"type":"array","description":"List of transmission types the buyer has been searching for","items":{"$ref":"#/components/schemas/Insight"}},"mileage":{"oneOf":[{"$ref":"#/components/schemas/Mileage"},{"type":"null"}]},"firstRegistration":{"oneOf":[{"$ref":"#/components/schemas/FirstRegistration"},{"type":"null"}]}}}],"required":["fuelTypes","gearTypes","makeModels"]},"Delivery":{"type":"object","properties":{"selected":{"type":["boolean","null"],"description":"Whether delivery service is selected","example":true},"city":{"type":["string","null"],"description":"Delivery city","example":"Berlin"},"zipCode":{"type":["string","null"],"description":"Delivery zip code","example":"12345"}}},"Financing":{"type":"object","properties":{"selected":{"type":["boolean","null"],"description":"Whether financing is selected","example":true},"downPayment":{"type":["number","null"],"format":"double","description":"Down payment amount in euros","example":10000.0},"creditTerm":{"type":["integer","null"],"format":"int32","description":"Credit term in months","example":48},"monthlyInstallment":{"type":["number","null"],"format":"double","description":"Monthly installment amount in euros","example":200.0},"finalInstallment":{"type":["number","null"],"format":"double","description":"Final installment amount in euros"},"effectiveInterestRate":{"type":["number","null"],"format":"double","description":"Effective interest rate as percentage"}}},"FirstRegistration":{"type":"object","properties":{"min":{"type":"string","description":"Minimum first registration in yyyyMM format (e.g., 202301 for January 2023)","example":"202301"}},"required":["min"]},"Insight":{"type":"object","properties":{"value":{"type":"string","description":"The insight value (e.g., fuel type or gear type)","example":"DIESEL"}},"required":["value"]},"LeadApiEventsResponse":{"type":"object","properties":{"version":{"type":"string","description":"Current version of the Lead API.","example":"2025-08-04-poc"},"traceId":{"type":"string","description":"Identifier to track the flow of the request inside the system.","example":"dbdb88b0-40e6-4229-9e72-05dc51ce38f0"},"events":{"type":"array","items":{"$ref":"#/components/schemas/LeadEventResponse"}},"nextCursor":{"type":["string","null"],"description":"Cursor to continue querying with","example":"dXNlcjpXMDdRQ1JQQTQ="},"warnings":{"type":["array","null"],"description":"List of (possibly breaking) changes which the used API version is in conflict with. Contains a link to the corresponding entry inside the mobile.de changelog. ","items":{"type":"string"}}},"required":["events","traceId","version"]},"LeadEventData":{},"LeadEventResponse":{"type":"object","properties":{"occurredAt":{"type":"string","description":"Time when the lead was created in ISO 8601 format. ","example":"2025-06-30T14:18:36+02:00"},"eventId":{"type":"string","description":"The ID of the event. ","example":"7776dacb-4db4-4cc5-88d9-b74c226c8c2a"},"leadId":{"type":"string","description":"The ID of the lead. ","example":"84d6dcfd-4db4-4cc5-88d9-b74c226c8c2a"},"data":{"oneOf":[{"$ref":"#/components/schemas/BuyerRepliedEventData"},{"$ref":"#/components/schemas/BuyerSearchBehaviourAdded"},{"$ref":"#/components/schemas/MessagingLeadResubmittedEventData"},{"$ref":"#/components/schemas/MessagingLeadSubmittedEventData"}]}},"required":["data","eventId","leadId","occurredAt"]},"Leasing":{"type":"object","properties":{"selected":{"type":["boolean","null"],"description":"Whether leasing is selected","example":true},"contractTerm":{"type":["integer","null"],"format":"int32","description":"Contract term in months","example":48},"downPayment":{"type":["number","null"],"format":"double","description":"Down payment amount in euros","example":10000.0},"grossRate":{"type":["number","null"],"format":"double","description":"Gross monthly rate in euros","example":200.0},"netRate":{"type":["number","null"],"format":"double","description":"Net monthly rate in euros"},"mileage":{"type":["integer","null"],"format":"int32","description":"Annual mileage allowance in kilometers","example":20000}}},"MakeModelInsight":{"type":"object","properties":{"make":{"type":"string","description":"Vehicle manufacturer/make","example":"BMW"},"model":{"type":"string","description":"Vehicle model","example":"3 Series"}},"required":["make","model"]},"Message":{"type":"object","properties":{"text":{"type":"string","example":"Letzter Preis?"}},"required":["text"]},"MessagingLeadResubmittedEventData":{"allOf":[{"$ref":"#/components/schemas/LeadEventData"},{"type":"object","properties":{"message":{"$ref":"#/components/schemas/Message","description":"The follow-up message sent by the buyer"},"potentialBuyer":{"$ref":"#/components/schemas/PotentialBuyer","description":"Information about the potential buyer"},"vehicle":{"$ref":"#/components/schemas/Vehicle","description":"Information about the vehicle"}}}],"required":["message","potentialBuyer","vehicle"]},"MessagingLeadSubmittedEventData":{"allOf":[{"$ref":"#/components/schemas/LeadEventData"},{"type":"object","properties":{"message":{"$ref":"#/components/schemas/Message","description":"The message sent by the buyer"},"potentialBuyer":{"$ref":"#/components/schemas/PotentialBuyer","description":"Information about the potential buyer"},"source":{"type":"string","description":"Source platform where the lead originated.","enum":["MOBILE","SANDBOX","KLEINANZEIGEN"],"example":"MOBILE"},"vehicle":{"$ref":"#/components/schemas/Vehicle","description":"Information about the vehicle"}}}],"required":["message","potentialBuyer","source","vehicle"]},"Mileage":{"type":"object","properties":{"max":{"type":"integer","format":"int32","description":"Maximum mileage in kilometers","example":50000}},"required":["max"]},"PotentialBuyer":{"type":"object","properties":{"name":{"type":["string","null"],"example":"Mareike Mustermann"},"firstName":{"type":["string","null"],"example":"Mareike"},"lastName":{"type":["string","null"],"example":"Mustermann"},"email":{"type":["string","null"],"example":"m.mustermann@example.com"},"phone":{"oneOf":[{"$ref":"#/components/schemas/PotentialBuyerPhone"},{"type":"null"}]},"buyerIdentifier":{"type":["string","null"]},"testDrive":{"oneOf":[{"$ref":"#/components/schemas/TestDrive"},{"type":"null"}]},"tradeIn":{"oneOf":[{"$ref":"#/components/schemas/TradeIn"},{"type":"null"}]},"delivery":{"oneOf":[{"$ref":"#/components/schemas/Delivery"},{"type":"null"}]},"financing":{"oneOf":[{"$ref":"#/components/schemas/Financing"},{"type":"null"}]},"leasing":{"oneOf":[{"$ref":"#/components/schemas/Leasing"},{"type":"null"}]}}},"PotentialBuyerPhone":{"type":"object","properties":{"internationalPrefix":{"type":"integer","format":"int32","example":49},"number":{"type":"string","example":"17623457648"}},"required":["internationalPrefix","number"]},"TestDrive":{"type":"object","properties":{"selected":{"type":["boolean","null"],"description":"Whether test drive is selected","example":true},"date":{"type":["string","null"],"description":"Test drive date in YYYY-MM-DD format","example":"2023-10-01"},"time":{"type":["string","null"],"description":"Test drive time in HH:MM format","example":"10:00"}}},"TradeIn":{"type":"object","properties":{"selected":{"type":["boolean","null"],"description":"Whether trade-in is selected","example":true},"make":{"type":["string","null"],"description":"Vehicle make/manufacturer","example":"Volkswagen"},"model":{"type":["string","null"],"description":"Vehicle model","example":"Golf"},"firstRegistrationYear":{"type":["integer","null"],"format":"int32","description":"Year of first registration","example":2015},"firstRegistrationMonth":{"type":["string","null"],"description":"Month of first registration","example":"12"},"mileage":{"type":["integer","null"],"format":"int32","description":"Vehicle mileage in kilometers","example":30000},"fuelType":{"type":["string","null"],"description":"Type of fuel","example":"DIESEL"},"transmission":{"type":["string","null"],"description":"Type of transmission","example":"SEMIAUTOMATIC_GEAR"},"power":{"type":["integer","null"],"format":"int32","description":"Engine power","example":150},"powerUnit":{"type":["string","null"],"description":"Unit of power measurement (e.g., kW, HP)","example":"kW"},"accidentDamaged":{"type":["boolean","null"],"description":"Whether vehicle has accident damage","example":false},"numberOfPreviousOwners":{"type":["integer","null"],"format":"int32","description":"Number of previous owners","example":1},"exteriorColor":{"type":["string","null"],"description":"Exterior color of the vehicle","example":"Black"},"vehicleIdentificationNumber":{"type":["string","null"],"description":"Vehicle identification number (VIN)"},"doors":{"type":["string","null"],"description":"Number of doors","example":"TWO_OR_THREE"},"category":{"type":["string","null"],"description":"Vehicle category","example":"SmallCar"},"trimLevel":{"type":["string","null"],"description":"Vehicle trim level","example":"GLC 350e 4MATIC SUV"}}},"Vehicle":{"type":"object","properties":{"mobileAdId":{"type":"string","example":"123456"},"make":{"type":"string","example":"BMW"},"model":{"type":"string","example":"i3"},"conditionType":{"type":"string","enum":["NEW","USED"]},"type":{"type":"string","enum":["LKW","KRAD","WOMO","PKW","EBIKE"]},"customerNumber":{"type":["string","null"],"example":"123456"},"internalNumber":{"type":["string","null"],"example":"123456"},"firstRegistration":{"type":["string","null"],"example":"10/22"},"mileage":{"type":["integer","null"],"format":"int32","example":179537},"price":{"type":["string","null"],"example":"48999"},"usageType":{"type":["string","null"],"enum":["PRE_REGISTRATION","EMPLOYEES_CAR","CLASSIC","DEMONSTRATION"]},"vin":{"type":["string","null"],"example":"WVWZZZ3CZWE123456"}},"required":["conditionType","customerNumber","make","mobileAdId","model","type"]}},"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"}}}}