{"openapi":"3.1.0","info":{"title":"Waca API","version":"1.0.0","description":"Car rental and car sales as an API, for travel apps, hotels, marketplaces and rental companies in Nigeria. Money is always in kobo (₦1 = 100 kobo).","contact":{"name":"Waca developer support","email":"developers@waca.com.ng"}},"servers":[{"url":"https://engine-production-0004.up.railway.app/api/v1","description":"Production and sandbox. The key decides: wc_live_… or wc_test_…"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Account","description":"Check your key and see what it is allowed to do.","x-group":"Getting around"},{"name":"Locations","description":"The airports where cars are collected and returned, and the terms to show your customers.","x-group":"Getting around"},{"name":"Rental cars","description":"Search cars for rent, read a car’s calendar, and list the extras and covers a customer can add.","x-group":"Rentals"},{"name":"Rental bookings","description":"Price a trip, book it, manage it, check the customer in, cancel it.","x-group":"Rentals"},{"name":"Reviews","description":"What customers say about a car, with its average rating. A customer reviews the car after the rental is returned (or the purchase is complete), and a review counts for that car only.","x-group":"Rentals"},{"name":"Cars for sale","description":"Search cars for sale, reserve one with a deposit, and follow the purchase through escrow.","x-group":"Sales"},{"name":"Earnings","description":"Your balance, every commission you earned and the payouts you received.","x-group":"Money"},{"name":"Events","description":"A record of everything that happened, readable by polling.","x-group":"Events and webhooks"},{"name":"Webhooks","description":"Get a signed message the moment something changes. Manage the address, the secret and the delivery log.","x-group":"Events and webhooks"},{"name":"Your fleet","description":"For businesses with their own cars (plan: fleet or both): add cars, photos and papers, open rental periods and list cars for sale.","x-group":"Your own cars"},{"name":"Sandbox","description":"Simulate a customer paying, collecting and returning a car, with a test key.","x-group":"Testing"}],"paths":{"/me":{"get":{"operationId":"get_me","tags":["Account"],"summary":"Who am I","description":"Returns the business behind this API key, its plan, what it may do, its commission rates and its limits. A good first call to check that a key works.","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Me"}},"required":["data"]},"example":{"data":{"key":{"id":4,"label":"Production server","mode":"live","prefix":"wc_live_9fK2","lastUsedAt":"2026-11-01T11:59:00.000Z","createdAt":"2026-10-20T08:00:00.000Z"},"limits":{"requestsPerMinute":120},"business":{"id":2,"name":"Alpha Rentals","plan":"both","status":"approved","website":"https://alpha.example"},"capabilities":{"sellOwnersCars":true,"ownFleet":true,"liveMode":true},"rates":{"rentalCommissionPercent":15,"rentalSoftwareFeePercent":3,"saleReferralPercent":1.5,"saleSoftwareFeePercent":1},"webhook":{"configured":true,"paused":false,"url":"https://alpha.example/hooks/waca"}}}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: more than 120 requests a minute. Wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/locations":{"get":{"operationId":"get_locations","tags":["Locations"],"summary":"List hand-over points","description":"The airports where cars are collected and returned. Any pick-up may be any drop-off (a one-way fee applies).","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Location"}}},"required":["data"]},"example":{"data":[{"code":"ABV","name":"Nnamdi Azikiwe International Airport, Abuja","city":"abuja","address":"Airport Road, Abuja","instructions":"Meet our agent at the arrivals hall.","openFrom":"00:00","openTo":"23:59"}]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/locations/{code}":{"get":{"operationId":"get_locations_code","tags":["Locations"],"summary":"Get a hand-over point","parameters":[{"name":"code","in":"path","required":true,"description":"The airport code.","schema":{"type":"string"},"example":"ABV"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Location"}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/terms":{"get":{"operationId":"get_terms","tags":["Locations"],"summary":"The rental and sale terms","description":"Plain text to show the customer before they pay.","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rental":{"type":"string"},"sale":{"type":"string"},"privacy":{"type":"string"},"policy":{"type":"object","properties":{"cancellation":{"type":"object","properties":{"fullRefundHours":{"type":"integer","description":"Cancelling this many hours or more before pick-up refunds 100% of the rental price."},"midRefundHours":{"type":"integer","description":"From here down to that many hours: midPercent."},"midPercent":{"type":"integer"},"latePercent":{"type":"integer","description":"Under midRefundHours (or a no-show): this percent of the rental price is refunded."}}},"lateReturn":{"type":"object","properties":{"percent":{"type":"integer","description":"The late-return hourly rate is the daily price ÷ 24 times this percent."},"graceMinutes":{"type":"integer","description":"Free minutes after the return time."}}}}}}}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/rentals/vehicles":{"get":{"operationId":"get_rentals_vehicles","tags":["Rental cars"],"summary":"Search cars for rent","description":"With `from` and `to`, only cars that are free for the period are returned, each with a price `quote`. Add `include_unavailable=true` to see why a car is not free. Cars are bookable only inside the availability periods their owner (or you, for your own cars) has opened.","parameters":[{"name":"location","in":"query","required":false,"description":"Pick-up airport code.","schema":{"type":"string"},"example":"ABV"},{"name":"from","in":"query","required":false,"description":"Pick-up, ISO 8601 with offset.","schema":{"type":"string"},"example":"2026-11-20T10:00:00+01:00"},{"name":"to","in":"query","required":false,"description":"Return, ISO 8601 with offset. At most 90 days after `from`.","schema":{"type":"string"},"example":"2026-11-23T10:00:00+01:00"},{"name":"class","in":"query","required":false,"description":"economy, sedan, suv, van or luxury.","schema":{"type":"string"}},{"name":"transmission","in":"query","required":false,"description":"automatic or manual.","schema":{"type":"string"}},{"name":"fuel","in":"query","required":false,"description":"petrol, diesel, hybrid or electric.","schema":{"type":"string"}},{"name":"min_seats","in":"query","required":false,"description":"Minimum number of seats.","schema":{"type":"integer"}},{"name":"min_price","in":"query","required":false,"description":"Cheapest daily price, kobo.","schema":{"type":"integer"}},{"name":"max_price","in":"query","required":false,"description":"Dearest daily price, kobo.","schema":{"type":"integer"}},{"name":"extras","in":"query","required":false,"description":"Comma-separated extra codes, priced into each quote.","schema":{"type":"string"},"example":"gps,child_seat"},{"name":"include_unavailable","in":"query","required":false,"description":"true to include cars that are not free.","schema":{"type":"boolean"}},{"name":"sort","in":"query","required":false,"description":"recommended (the default: well-reviewed cars come first, cars nobody has reviewed yet are treated as typical), rating (highest average first), price_asc, price_desc or newest.","schema":{"type":"string","enum":["recommended","rating","price_asc","price_desc","newest"]}},{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"type":"integer"},"example":1},{"name":"limit","in":"query","required":false,"description":"Items per page (1–100). Default 20.","schema":{"type":"integer"},"example":20}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VehicleWithAvailability"}},"page":{"type":"integer","description":"The page you asked for."},"totalPages":{"type":"integer"},"total":{"type":"integer","description":"How many items match in all."}},"required":["data","page","totalPages","total"]},"example":{"data":[{"id":12,"title":"2021 Toyota Camry","make":"Toyota","model":"Camry","year":2021,"class":"sedan","transmission":"automatic","fuel":"petrol","seats":5,"colour":"Silver","photos":["https://api.waca.com.ng/api/media/file/camry-1.jpg"],"dailyRate":4500000,"deposit":8000000,"location":{"id":1,"code":"ABV","name":"Nnamdi Azikiwe International Airport, Abuja","city":"abuja"},"availability":{"available":true,"reason":null,"quote":{"currency":"NGN","days":3,"dailyRate":4500000,"lines":[{"code":"rental","label":"Car rental","quantity":3,"unitAmount":4500000,"amount":13500000},{"code":"gps","label":"GPS navigation","quantity":3,"unitAmount":150000,"amount":450000}],"listSubtotal":13950000,"discount":null,"subtotal":13950000,"deposit":8000000,"total":21950000}}}],"page":1,"totalPages":1,"total":1}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/rentals/vehicles/{id}":{"get":{"operationId":"get_rentals_vehicles_id","tags":["Rental cars"],"summary":"Get a car","parameters":[{"name":"id","in":"path","required":true,"description":"The car’s id.","schema":{"type":"integer"},"example":12},{"name":"from","in":"query","required":false,"description":"Pick-up, to include availability and a quote.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"Return.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VehicleWithAvailability"}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/rentals/vehicles/{id}/availability":{"get":{"operationId":"get_rentals_vehicles_id_availability","tags":["Rental cars"],"summary":"A car’s calendar","description":"When the car can be booked, for drawing a calendar. `windows` are the periods the car is on offer, `booked` the periods already taken (never any customer details) and `free` what remains once the turnaround time between rentals is kept.","parameters":[{"name":"id","in":"path","required":true,"description":"The car’s id.","schema":{"type":"integer"},"example":12},{"name":"from","in":"query","required":false,"description":"Start of the range. Default now.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"End of the range. Default 60 days after `from`. At most 180 days.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Calendar"}},"required":["data"]},"example":{"data":{"vehicleId":12,"range":{"from":"2026-11-01T00:00:00.000Z","to":"2026-12-01T00:00:00.000Z"},"windows":[{"from":"2026-11-01T00:00:00.000Z","to":"2026-12-01T00:00:00.000Z"}],"booked":[{"from":"2026-11-10T09:00:00.000Z","to":"2026-11-12T09:00:00.000Z"}],"free":[{"from":"2026-11-01T00:00:00.000Z","to":"2026-11-10T07:30:00.000Z"},{"from":"2026-11-12T10:30:00.000Z","to":"2026-12-01T00:00:00.000Z"}],"rules":{"minLeadMinutes":120,"turnaroundMinutes":90,"maxRentalDays":90}}}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/rentals/classes":{"get":{"operationId":"get_rentals_classes","tags":["Rental cars"],"summary":"Kinds of car on offer","description":"Each class (economy, sedan, suv…) with how many cars there are and the cheapest daily price. Good for a “choose a type” screen.","parameters":[{"name":"location","in":"query","required":false,"description":"Limit to one airport.","schema":{"type":"string"},"example":"ABV"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ClassSummary"}}},"required":["data"]},"example":{"data":[{"class":"economy","count":4,"fromDailyRate":3000000,"maxSeats":5,"transmissions":["automatic","manual"]}]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/rentals/options":{"get":{"operationId":"get_rentals_options","tags":["Rental cars"],"summary":"Extras and insurance covers","description":"What a customer can add to a rental. Pass the `code`s in `extras` when you quote or book.","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Option"}}},"required":["data"]},"example":{"data":[{"code":"gps","kind":"extra","name":"GPS navigation","description":"Offline maps for Nigeria","pricing":"per_day","price":150000}]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/rentals/quotes":{"post":{"operationId":"post_rentals_quotes","tags":["Rental bookings"],"summary":"Price a trip","description":"The exact price for a car, dates and extras, before anything is created. Adds a one-way fee when the drop-off is a different airport.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vehicleId":{"type":"integer"},"from":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"to":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"extras":{"type":"array","items":{"type":"string"}},"dropoffLocation":{"type":"string","description":"Airport code. Default: the car’s own airport."}},"required":["vehicleId","from","to"]},"example":{"vehicleId":12,"from":"2026-11-20T10:00:00+01:00","to":"2026-11-23T10:00:00+01:00","extras":["gps"],"dropoffLocation":"ABV"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"required":["data"]},"example":{"data":{"currency":"NGN","days":3,"dailyRate":4500000,"lines":[{"code":"rental","label":"Car rental","quantity":3,"unitAmount":4500000,"amount":13500000},{"code":"gps","label":"GPS navigation","quantity":3,"unitAmount":150000,"amount":450000}],"listSubtotal":13950000,"discount":null,"subtotal":13950000,"deposit":8000000,"total":21950000}}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/rentals/bookings":{"post":{"operationId":"post_rentals_bookings","tags":["Rental bookings"],"summary":"Create a booking","description":"Holds the car for about 20 minutes and returns a `checkoutUrl` to send the customer to. The booking becomes `confirmed` by itself when the payment succeeds: you do not call anything. Two customers can never hold the same car for overlapping dates; the loser gets 409.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value you choose (a UUID). Repeat the request with the same key and you get the same result, not a second booking.","schema":{"type":"string"},"example":"6b2f7c3e-6f0a-4a3e-9d1c-1c2b6f1a9e55"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vehicleId":{"type":"integer"},"from":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"to":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"pickupLocation":{"type":"string","description":"Airport code. Default: the car’s own."},"dropoffLocation":{"type":"string"},"extras":{"type":"array","items":{"type":"string"}},"customer":{"$ref":"#/components/schemas/CustomerInput"},"flightNumber":{"type":"string","description":"Arrival flight, e.g. W3123."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Up to 10 pairs, keys up to 40 characters, values up to 500."},"returnUrl":{"type":"string","description":"Where the customer lands after paying. We add ?booking=WC-…"}},"required":["vehicleId","from","to","customer"]},"example":{"vehicleId":12,"from":"2026-11-20T10:00:00+01:00","to":"2026-11-23T10:00:00+01:00","pickupLocation":"ABV","dropoffLocation":"ABV","extras":["gps"],"customer":{"name":"Chidi Obi","email":"chidi@example.com","phone":"+2348031234567","licenseNumber":"ABC12345","licenseExpiry":"2029-05-01T00:00:00+01:00"},"flightNumber":"W3123","metadata":{"order_id":"A-1001"},"returnUrl":"https://shop.example/booking"}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Booking"}},"required":["data"]},"example":{"data":{"reference":"WC-7KQ2M9XA","status":"pending_payment","test":false,"from":"2026-11-20T09:00:00.000Z","to":"2026-11-23T09:00:00.000Z","vehicle":{"id":12,"title":"2021 Toyota Camry","make":"Toyota","model":"Camry","year":2021,"class":"sedan","transmission":"automatic","fuel":"petrol","seats":5,"colour":"Silver","photos":["https://api.waca.com.ng/api/media/file/camry-1.jpg"],"dailyRate":4500000,"deposit":8000000,"location":{"id":1,"code":"ABV","name":"Nnamdi Azikiwe International Airport, Abuja","city":"abuja"}},"pickup":{"code":"ABV","name":"Nnamdi Azikiwe International Airport, Abuja","instructions":"Meet our agent at the arrivals hall, next to the information desk."},"dropoff":{"code":"ABV","name":"Nnamdi Azikiwe International Airport, Abuja"},"customer":{"name":"Chidi Obi","email":"chidi@example.com","phone":"+2348031234567"},"price":{"currency":"NGN","days":3,"lines":[{"code":"rental","label":"Car rental","quantity":3,"unitAmount":4500000,"amount":13500000},{"code":"gps","label":"GPS navigation","quantity":3,"unitAmount":150000,"amount":450000}],"listSubtotal":13950000,"discount":null,"subtotal":13950000,"deposit":8000000,"total":21950000,"refunded":0},"commission":2092500,"flightNumber":"W3123","checkedInAt":null,"arrivalNote":null,"metadata":{"order_id":"A-1001"},"createdAt":"2026-11-01T12:00:00.000Z","holdExpiresAt":"2026-11-01T12:20:00.000Z","checkoutUrl":"https://checkout.paystack.com/abc123"}}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: more than 120 requests a minute. Wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any","x-idempotent":true},"get":{"operationId":"get_rentals_bookings","tags":["Rental bookings"],"summary":"List bookings","description":"Your own bookings, newest first. A business sees everything any of its keys made.","parameters":[{"name":"status","in":"query","required":false,"description":"pending_payment, confirmed, active, completed, cancelled or expired.","schema":{"type":"string","enum":["pending_payment","confirmed","active","completed","cancelled","expired"]}},{"name":"from","in":"query","required":false,"description":"Pick-up on or after.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"Pick-up before.","schema":{"type":"string"}},{"name":"email","in":"query","required":false,"description":"The customer’s email (any case).","schema":{"type":"string"}},{"name":"vehicle_id","in":"query","required":false,"description":"Only this car.","schema":{"type":"integer"}},{"name":"created_from","in":"query","required":false,"description":"Made on or after.","schema":{"type":"string"}},{"name":"created_to","in":"query","required":false,"description":"Made before.","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"type":"integer"},"example":1},{"name":"limit","in":"query","required":false,"description":"Items per page (1–100). Default 20.","schema":{"type":"integer"},"example":20}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Booking"}},"page":{"type":"integer","description":"The page you asked for."},"totalPages":{"type":"integer"},"total":{"type":"integer","description":"How many items match in all."}},"required":["data","page","totalPages","total"]}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/rentals/bookings/{reference}":{"get":{"operationId":"get_rentals_bookings_reference","tags":["Rental bookings"],"summary":"Get a booking","description":"An unpaid booking carries its `checkoutUrl`, so a customer can come back and pay.","parameters":[{"name":"reference","in":"path","required":true,"description":"The booking reference.","schema":{"type":"string"},"example":"WC-7KQ2M9XA"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Booking"}},"required":["data"]},"example":{"data":{"reference":"WC-7KQ2M9XA","status":"pending_payment","test":false,"from":"2026-11-20T09:00:00.000Z","to":"2026-11-23T09:00:00.000Z","vehicle":{"id":12,"title":"2021 Toyota Camry","make":"Toyota","model":"Camry","year":2021,"class":"sedan","transmission":"automatic","fuel":"petrol","seats":5,"colour":"Silver","photos":["https://api.waca.com.ng/api/media/file/camry-1.jpg"],"dailyRate":4500000,"deposit":8000000,"location":{"id":1,"code":"ABV","name":"Nnamdi Azikiwe International Airport, Abuja","city":"abuja"}},"pickup":{"code":"ABV","name":"Nnamdi Azikiwe International Airport, Abuja","instructions":"Meet our agent at the arrivals hall, next to the information desk."},"dropoff":{"code":"ABV","name":"Nnamdi Azikiwe International Airport, Abuja"},"customer":{"name":"Chidi Obi","email":"chidi@example.com","phone":"+2348031234567"},"price":{"currency":"NGN","days":3,"lines":[{"code":"rental","label":"Car rental","quantity":3,"unitAmount":4500000,"amount":13500000},{"code":"gps","label":"GPS navigation","quantity":3,"unitAmount":150000,"amount":450000}],"listSubtotal":13950000,"discount":null,"subtotal":13950000,"deposit":8000000,"total":21950000,"refunded":0},"commission":2092500,"flightNumber":"W3123","checkedInAt":null,"arrivalNote":null,"metadata":{"order_id":"A-1001"},"createdAt":"2026-11-01T12:00:00.000Z","holdExpiresAt":"2026-11-01T12:20:00.000Z","checkoutUrl":"https://checkout.paystack.com/abc123"}}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"},"patch":{"operationId":"patch_rentals_bookings_reference","tags":["Rental bookings"],"summary":"Update a booking","description":"Change the customer’s contact details, the arrival flight, or your own metadata, until the rental is over. Dates, car and price cannot be changed: cancel and book again. In `metadata`, a value of `null` removes that key.","parameters":[{"name":"reference","in":"path","required":true,"description":"The booking reference.","schema":{"type":"string"},"example":"WC-7KQ2M9XA"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"}}},"flightNumber":{"type":["string","null"]},"metadata":{"type":"object","properties":{},"description":"Merged into the existing metadata."}}},"example":{"customer":{"phone":"+2348099990000"},"flightNumber":"BA75","metadata":{"note":"vip","order_id":null}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Booking"}},"required":["data"]}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/rentals/bookings/{reference}/cancel":{"post":{"operationId":"post_rentals_bookings_reference_cancel","tags":["Rental bookings"],"summary":"Cancel a booking","description":"Releases an unpaid booking, or refunds a paid one by this policy: 100% of the rental price back if the pick-up is 12 hours or more away, 95% from 6 to 12 hours, 90% under 6 hours (or if the car was never collected). The deposit always comes back in full. What is not refunded is a cancellation fee that stays with the platform: the car owner and any selling business earn nothing from a cancelled booking. The refund is sent through the payment provider and recorded; `GET /rentals/bookings/{reference}` carries the statement in `settlement`. A booking whose car was collected cannot be cancelled: it ends when the car is returned.","parameters":[{"name":"reference","in":"path","required":true,"description":"The booking reference.","schema":{"type":"string"},"example":"WC-7KQ2M9XA"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CancelledBooking"}},"required":["data"]},"example":{"data":{"reference":"WC-7KQ2M9XA","status":"cancelled","test":false,"from":"2026-11-20T09:00:00.000Z","to":"2026-11-23T09:00:00.000Z","vehicle":{"id":12,"title":"2021 Toyota Camry","make":"Toyota","model":"Camry","year":2021,"class":"sedan","transmission":"automatic","fuel":"petrol","seats":5,"colour":"Silver","photos":["https://api.waca.com.ng/api/media/file/camry-1.jpg"],"dailyRate":4500000,"deposit":8000000,"location":{"id":1,"code":"ABV","name":"Nnamdi Azikiwe International Airport, Abuja","city":"abuja"}},"pickup":{"code":"ABV","name":"Nnamdi Azikiwe International Airport, Abuja","instructions":"Meet our agent at the arrivals hall, next to the information desk."},"dropoff":{"code":"ABV","name":"Nnamdi Azikiwe International Airport, Abuja"},"customer":{"name":"Chidi Obi","email":"chidi@example.com","phone":"+2348031234567"},"price":{"currency":"NGN","days":3,"lines":[{"code":"rental","label":"Car rental","quantity":3,"unitAmount":4500000,"amount":13500000},{"code":"gps","label":"GPS navigation","quantity":3,"unitAmount":150000,"amount":450000}],"listSubtotal":13950000,"discount":null,"subtotal":13950000,"deposit":8000000,"total":21950000,"refunded":0},"commission":2092500,"flightNumber":"W3123","checkedInAt":null,"arrivalNote":null,"metadata":{"order_id":"A-1001"},"createdAt":"2026-11-01T12:00:00.000Z","holdExpiresAt":"2026-11-01T12:20:00.000Z","checkoutUrl":"https://checkout.paystack.com/abc123","refundPercent":100,"refund":{"requested":21950000,"ok":true}}}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/rentals/bookings/{reference}/checkin":{"post":{"operationId":"post_rentals_bookings_reference_checkin","tags":["Rental bookings"],"summary":"Online check-in","description":"Once a booking is paid the customer can check in: arrival flight and time, a note for our agent, and the licence details if they were not known yet. Our agent sees it at hand-over.","parameters":[{"name":"reference","in":"path","required":true,"description":"The booking reference.","schema":{"type":"string"},"example":"WC-7KQ2M9XA"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"flightNumber":{"type":"string"},"expectedArrival":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"notes":{"type":"string","description":"Up to 300 characters."},"licenseNumber":{"type":"string"},"licenseExpiry":{"type":"string","format":"date-time","description":"ISO 8601 date-time."}}},"example":{"flightNumber":"BA75","expectedArrival":"2026-11-20T14:30:00+01:00","notes":"Two suitcases and a child seat"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Booking"}},"required":["data"]}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/rentals/vehicles/{id}/reviews":{"get":{"operationId":"get_rentals_vehicles_id_reviews","tags":["Reviews"],"summary":"Reviews of a rental car","description":"The published reviews of one car, newest first, with the average and how many reviews gave each number of stars. Customers can review only after the rental is returned, once per rental, and a review counts for that car alone. Cars with good reviews are listed first by default.","parameters":[{"name":"id","in":"path","required":true,"description":"The car’s id.","schema":{"type":"integer"},"example":12},{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"type":"integer"},"example":1},{"name":"limit","in":"query","required":false,"description":"Items per page (1–100). Default 20.","schema":{"type":"integer"},"example":20}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"average":{"type":["number","null"]},"count":{"type":"integer"},"distribution":{"type":"object","properties":{"1":{"type":"integer"},"2":{"type":"integer"},"3":{"type":"integer"},"4":{"type":"integer"},"5":{"type":"integer"}}}}},"data":{"type":"array","items":{"$ref":"#/components/schemas/Review"}},"page":{"type":"integer"},"totalPages":{"type":"integer"},"total":{"type":"integer"}}},"example":{"summary":{"average":4.7,"count":3,"distribution":{"1":0,"2":0,"3":0,"4":1,"5":2}},"data":[{"rating":5,"title":"Spotless","comment":"Clean car, easy pick-up at the airport.","name":"Chidi E.","kind":"rental","createdAt":"2026-11-24T09:00:00.000Z"}],"page":1,"totalPages":1,"total":3}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/sales/vehicles/{id}/reviews":{"get":{"operationId":"get_sales_vehicles_id_reviews","tags":["Reviews"],"summary":"Reviews of a car for sale","description":"The reviews of the car behind a sale listing: they belong to the car, whether people rented it or bought it.","parameters":[{"name":"id","in":"path","required":true,"description":"The sale listing’s id.","schema":{"type":"integer"},"example":31},{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"type":"integer"},"example":1},{"name":"limit","in":"query","required":false,"description":"Items per page (1–100). Default 20.","schema":{"type":"integer"},"example":20}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"average":{"type":["number","null"]},"count":{"type":"integer"},"distribution":{"type":"object","properties":{"1":{"type":"integer"},"2":{"type":"integer"},"3":{"type":"integer"},"4":{"type":"integer"},"5":{"type":"integer"}}}}},"data":{"type":"array","items":{"$ref":"#/components/schemas/Review"}},"page":{"type":"integer"},"totalPages":{"type":"integer"},"total":{"type":"integer"}}}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/sales/vehicles":{"get":{"operationId":"get_sales_vehicles","tags":["Cars for sale"],"summary":"Search cars for sale","parameters":[{"name":"make","in":"query","required":false,"description":"Brand (partial match).","schema":{"type":"string"},"example":"toyota"},{"name":"model","in":"query","required":false,"description":"Model (partial match).","schema":{"type":"string"}},{"name":"city","in":"query","required":false,"description":"abuja or lagos.","schema":{"type":"string"}},{"name":"class","in":"query","required":false,"description":"economy, sedan, suv, van or luxury.","schema":{"type":"string"}},{"name":"yearMin","in":"query","required":false,"description":"Oldest model year.","schema":{"type":"integer"}},{"name":"yearMax","in":"query","required":false,"description":"Newest model year.","schema":{"type":"integer"}},{"name":"priceMin","in":"query","required":false,"description":"Lowest price, kobo.","schema":{"type":"integer"}},{"name":"priceMax","in":"query","required":false,"description":"Highest price, kobo.","schema":{"type":"integer"}},{"name":"sort","in":"query","required":false,"description":"price_asc (default), price_desc or newest.","schema":{"type":"string","enum":["price_asc","price_desc","newest"]}},{"name":"page","in":"query","required":false,"description":"Page number.","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Items per page (1–50).","schema":{"type":"integer"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SaleListing"}},"page":{"type":"integer","description":"The page you asked for."},"totalPages":{"type":"integer"},"total":{"type":"integer","description":"How many items match in all."}},"required":["data","page","totalPages","total"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/sales/vehicles/{id}":{"get":{"operationId":"get_sales_vehicles_id","tags":["Cars for sale"],"summary":"Get a car for sale","parameters":[{"name":"id","in":"path","required":true,"description":"The listing id.","schema":{"type":"integer"},"example":31}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SaleListing"}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/sales/orders":{"post":{"operationId":"post_sales_orders","tags":["Cars for sale"],"summary":"Reserve a car","description":"Reserves the car with a deposit (default 2% of the price, at least ₦50,000) and returns the deposit `checkoutUrl`. Only one buyer can hold a car at a time. The buyer pays the balance by bank transfer into escrow; the seller is paid only after the car and papers are handed over.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value you choose (a UUID). Repeat the request with the same key and you get the same result, not a second booking.","schema":{"type":"string"},"example":"6b2f7c3e-6f0a-4a3e-9d1c-1c2b6f1a9e55"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"listingId":{"type":"integer"},"buyer":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"idNumber":{"type":"string","description":"Optional: NIN or passport, for the transfer of ownership."}},"required":["name","email","phone"]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"returnUrl":{"type":"string"}},"required":["listingId","buyer"]},"example":{"listingId":31,"buyer":{"name":"Bola Ade","email":"bola@example.com","phone":"+2348066660002"},"metadata":{"cart":"C-77"}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SaleOrder"}},"required":["data"]},"example":{"data":{"reference":"WS-4HZ8P2LD","status":"pending_payment","test":false,"vehicle":{"id":12,"title":"2021 Toyota Camry","make":"Toyota","model":"Camry","year":2021,"class":"sedan","transmission":"automatic","fuel":"petrol","seats":5,"colour":"Silver","photos":["https://api.waca.com.ng/api/media/file/camry-1.jpg"],"dailyRate":4500000,"deposit":8000000,"location":{"id":1,"code":"ABV","name":"Nnamdi Azikiwe International Airport, Abuja","city":"abuja"}},"buyer":{"name":"Bola Ade","email":"bola@example.com","phone":"+2348066660002"},"price":{"currency":"NGN","total":800000000,"deposit":5000000,"balanceDue":795000000,"refunded":0},"commission":1200000,"holdExpiresAt":null,"reservedUntil":"2026-11-08T12:00:00.000Z","metadata":{"cart":"C-77"},"createdAt":"2026-11-01T12:00:00.000Z","checkoutUrl":"https://checkout.paystack.com/xyz789"}}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any","x-idempotent":true},"get":{"operationId":"get_sales_orders","tags":["Cars for sale"],"summary":"List orders","parameters":[{"name":"status","in":"query","required":false,"description":"pending_payment, reserved, paid, completed, cancelled or expired.","schema":{"type":"string"}},{"name":"listing_id","in":"query","required":false,"description":"Only this listing.","schema":{"type":"integer"}},{"name":"email","in":"query","required":false,"description":"The buyer’s email.","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"type":"integer"},"example":1},{"name":"limit","in":"query","required":false,"description":"Items per page (1–100). Default 20.","schema":{"type":"integer"},"example":20}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SaleOrder"}},"page":{"type":"integer","description":"The page you asked for."},"totalPages":{"type":"integer"},"total":{"type":"integer","description":"How many items match in all."}},"required":["data","page","totalPages","total"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/sales/orders/{reference}":{"get":{"operationId":"get_sales_orders_reference","tags":["Cars for sale"],"summary":"Get an order","description":"Status: `pending_payment` → `reserved` (deposit paid, car held about 7 days) → `paid` (balance received into escrow) → `completed` (car and papers handed over), or `cancelled` / `expired`.","parameters":[{"name":"reference","in":"path","required":true,"description":"The order reference.","schema":{"type":"string"},"example":"WS-4HZ8P2LD"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SaleOrder"}},"required":["data"]},"example":{"data":{"reference":"WS-4HZ8P2LD","status":"reserved","test":false,"vehicle":{"id":12,"title":"2021 Toyota Camry","make":"Toyota","model":"Camry","year":2021,"class":"sedan","transmission":"automatic","fuel":"petrol","seats":5,"colour":"Silver","photos":["https://api.waca.com.ng/api/media/file/camry-1.jpg"],"dailyRate":4500000,"deposit":8000000,"location":{"id":1,"code":"ABV","name":"Nnamdi Azikiwe International Airport, Abuja","city":"abuja"}},"buyer":{"name":"Bola Ade","email":"bola@example.com","phone":"+2348066660002"},"price":{"currency":"NGN","total":800000000,"deposit":5000000,"balanceDue":795000000,"refunded":0},"commission":1200000,"holdExpiresAt":null,"reservedUntil":"2026-11-08T12:00:00.000Z","metadata":{"cart":"C-77"},"createdAt":"2026-11-01T12:00:00.000Z"}}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/sales/orders/{reference}/cancel":{"post":{"operationId":"post_sales_orders_reference_cancel","tags":["Cars for sale"],"summary":"Cancel an order","description":"A buyer can withdraw before paying. After the deposit, our support team decides the refund: you get a 409.","parameters":[{"name":"reference","in":"path","required":true,"description":"The order reference.","schema":{"type":"string"},"example":"WS-4HZ8P2LD"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SaleOrder"}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"any"}},"/balance":{"get":{"operationId":"get_balance","tags":["Earnings"],"summary":"Your balance","description":"What you can be paid now, what is held until rentals and sales complete, and what has been paid out.","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Balance"}},"required":["data"]},"example":{"data":{"currency":"NGN","available":12500000,"pending":4200000,"paidOut":68000000}}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"business"}},"/commissions":{"get":{"operationId":"get_commissions","tags":["Earnings"],"summary":"List your commissions","description":"Every commission you earned or gave back, with the booking or sale it came from. Live bookings only: sandbox activity never touches money.","parameters":[{"name":"status","in":"query","required":false,"description":"held, released or reversal.","schema":{"type":"string","enum":["held","released","reversal"]}},{"name":"from","in":"query","required":false,"description":"Created on or after.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"Created before.","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"type":"integer"},"example":1},{"name":"limit","in":"query","required":false,"description":"Items per page (1–100). Default 20.","schema":{"type":"integer"},"example":20}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Commission"}},"page":{"type":"integer","description":"The page you asked for."},"totalPages":{"type":"integer"},"total":{"type":"integer","description":"How many items match in all."}},"required":["data","page","totalPages","total"]},"example":{"data":[{"id":91,"createdAt":"2026-11-20T09:05:00.000Z","type":"rental","reference":"WC-7KQ2M9XA","kind":"earning","status":"held","amount":2092500,"releasedAt":null,"note":"Booking WC-7KQ2M9XA"}],"page":1,"totalPages":1,"total":1}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"business"}},"/payouts":{"get":{"operationId":"get_payouts","tags":["Earnings"],"summary":"List your payouts","description":"The transfers made to your bank account.","parameters":[{"name":"status","in":"query","required":false,"description":"pending, paid or failed.","schema":{"type":"string","enum":["pending","paid","failed"]}},{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"type":"integer"},"example":1},{"name":"limit","in":"query","required":false,"description":"Items per page (1–100). Default 20.","schema":{"type":"integer"},"example":20}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Payout"}},"page":{"type":"integer","description":"The page you asked for."},"totalPages":{"type":"integer"},"total":{"type":"integer","description":"How many items match in all."}},"required":["data","page","totalPages","total"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"business"}},"/events":{"get":{"operationId":"get_events","tags":["Events"],"summary":"List events","description":"What happened to your bookings and sales, newest first, with the same objects a webhook would carry. Works whether or not you have a webhook, so an integration that prefers polling can follow `starting_after` from the last event it saw. A live key sees live events; a test key sees sandbox events.","parameters":[{"name":"type","in":"query","required":false,"description":"Only this event type.","schema":{"type":"string","enum":["booking.confirmed","booking.active","booking.completed","booking.cancelled","booking.expired","sale.reserved","sale.paid","sale.completed","sale.cancelled","sale.expired"]}},{"name":"reference","in":"query","required":false,"description":"Only events about this booking or order.","schema":{"type":"string"}},{"name":"starting_after","in":"query","required":false,"description":"An event id: return events older than it.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Events per page (1–100). Default 20.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"hasMore":{"type":"boolean"}},"required":["data","hasMore"]},"example":{"data":[{"id":"evt_3f1c9a2b7d4e5f6a8b0c1d2e","type":"booking.confirmed","created":1767200000,"livemode":true,"data":{"object":{"reference":"WC-7KQ2M9XA","status":"pending_payment","test":false,"from":"2026-11-20T09:00:00.000Z","to":"2026-11-23T09:00:00.000Z","vehicle":{"id":12,"title":"2021 Toyota Camry","make":"Toyota","model":"Camry","year":2021,"class":"sedan","transmission":"automatic","fuel":"petrol","seats":5,"colour":"Silver","photos":["https://api.waca.com.ng/api/media/file/camry-1.jpg"],"dailyRate":4500000,"deposit":8000000,"location":{"id":1,"code":"ABV","name":"Nnamdi Azikiwe International Airport, Abuja","city":"abuja"}},"pickup":{"code":"ABV","name":"Nnamdi Azikiwe International Airport, Abuja","instructions":"Meet our agent at the arrivals hall, next to the information desk."},"dropoff":{"code":"ABV","name":"Nnamdi Azikiwe International Airport, Abuja"},"customer":{"name":"Chidi Obi","email":"chidi@example.com","phone":"+2348031234567"},"price":{"currency":"NGN","days":3,"lines":[{"code":"rental","label":"Car rental","quantity":3,"unitAmount":4500000,"amount":13500000},{"code":"gps","label":"GPS navigation","quantity":3,"unitAmount":150000,"amount":450000}],"listSubtotal":13950000,"discount":null,"subtotal":13950000,"deposit":8000000,"total":21950000,"refunded":0},"commission":2092500,"flightNumber":"W3123","checkedInAt":null,"arrivalNote":null,"metadata":{"order_id":"A-1001"},"createdAt":"2026-11-01T12:00:00.000Z","holdExpiresAt":"2026-11-01T12:20:00.000Z","checkoutUrl":"https://checkout.paystack.com/abc123"}}}],"hasMore":false}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"business"}},"/events/{id}":{"get":{"operationId":"get_events_id","tags":["Events"],"summary":"Get an event","parameters":[{"name":"id","in":"path","required":true,"description":"The event id.","schema":{"type":"string"},"example":"evt_3f1c9a2b7d4e5f6a8b0c1d2e"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Event"}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"business"}},"/webhook":{"get":{"operationId":"get_webhook","tags":["Webhooks"],"summary":"Webhook status","description":"The address we send events to, whether it is paused, and delivery counts. The signing secret is never readable.","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookStatus"}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"business"},"put":{"operationId":"put_webhook","tags":["Webhooks"],"summary":"Set the webhook address","description":"Public `https` addresses only (private networks are refused, now and at every delivery). The first time, the response carries the signing `secret` (`whsec_…`): copy it, it is shown once.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]},"example":{"url":"https://alpha.example/hooks/waca"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string"},"secret":{"type":"string","description":"Only the first time."},"note":{"type":"string"}}}},"required":["data"]},"example":{"data":{"url":"https://alpha.example/hooks/waca","secret":"whsec_MfKQ9r8GsBn…","note":"Copy this signing secret now. It will not be shown again."}}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"business"},"delete":{"operationId":"delete_webhook","tags":["Webhooks"],"summary":"Turn webhooks off","description":"Events are still recorded; read them with `GET /events`.","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"business"}},"/webhook/test":{"post":{"operationId":"post_webhook_test","tags":["Webhooks"],"summary":"Send a test event","description":"Sends a `webhook.test` event now and tells you how your server answered.","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string"},"httpStatus":{"type":["integer","null"]},"error":{"type":["string","null"]},"attempts":{"type":"integer"}}}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"business"}},"/webhook/rotate":{"post":{"operationId":"post_webhook_rotate","tags":["Webhooks"],"summary":"Rotate the signing secret","description":"A new secret, shown once. The old one stops working immediately.","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"secret":{"type":"string"},"note":{"type":"string"}}}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"business"}},"/webhook/resume":{"post":{"operationId":"post_webhook_resume","tags":["Webhooks"],"summary":"Resume a paused webhook","description":"After three deliveries in a row give up, the webhook is paused (and you are emailed). Events are held, not lost. Fix your server, then resume: everything held is sent.","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"released":{"type":"integer","description":"How many held events were queued."}}}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"business"}},"/webhook/deliveries":{"get":{"operationId":"get_webhook_deliveries","tags":["Webhooks"],"summary":"Delivery log","description":"Each attempt to reach your server: what we sent, how it answered and whether we will retry.","parameters":[{"name":"status","in":"query","required":false,"description":"queued, delivered, failed or held.","schema":{"type":"string","enum":["queued","delivered","failed","held"]}},{"name":"event","in":"query","required":false,"description":"Only this event type.","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"type":"integer"},"example":1},{"name":"limit","in":"query","required":false,"description":"Items per page (1–100). Default 20.","schema":{"type":"integer"},"example":20}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Delivery"}},"page":{"type":"integer","description":"The page you asked for."},"totalPages":{"type":"integer"},"total":{"type":"integer","description":"How many items match in all."}},"required":["data","page","totalPages","total"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"business"}},"/webhook/deliveries/{id}/retry":{"post":{"operationId":"post_webhook_deliveries_id_retry","tags":["Webhooks"],"summary":"Retry a delivery","description":"Sends it again with the same body and event id.","parameters":[{"name":"id","in":"path","required":true,"description":"The delivery id.","schema":{"type":"integer"},"example":118}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string"},"httpStatus":{"type":["integer","null"]},"error":{"type":["string","null"]}}}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"business"}},"/fleet/vehicles":{"get":{"operationId":"get_fleet_vehicles","tags":["Your fleet"],"summary":"List your cars","description":"Your own cars, with their review status. Needs the fleet plan.","parameters":[{"name":"status","in":"query","required":false,"description":"pending_review, approved, rejected or suspended.","schema":{"type":"string"}},{"name":"purpose","in":"query","required":false,"description":"rent or sell.","schema":{"type":"string","enum":["rent","sell"]}},{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"type":"integer"},"example":1},{"name":"limit","in":"query","required":false,"description":"Items per page (1–100). Default 20.","schema":{"type":"integer"},"example":20}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FleetVehicle"}},"page":{"type":"integer","description":"The page you asked for."},"totalPages":{"type":"integer"},"total":{"type":"integer","description":"How many items match in all."}},"required":["data","page","totalPages","total"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"fleet"},"post":{"operationId":"post_fleet_vehicles","tags":["Your fleet"],"summary":"Add a car","description":"The car starts `pending_review`: our team checks the papers before it can be booked or sold. Upload photos and papers next. Prices are whole naira, in kobo.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FleetVehicleInput"},"example":{"make":"Toyota","model":"Hilux","year":2022,"plate":"ABC123XY","colour":"White","class":"suv","transmission":"manual","fuel":"diesel","seats":5,"location":"ABV","dailyRate":6500000,"deposit":20000000}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FleetVehicle"}},"required":["data"]}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"fleet"}},"/fleet/vehicles/{id}":{"get":{"operationId":"get_fleet_vehicles_id","tags":["Your fleet"],"summary":"Get one of your cars","parameters":[{"name":"id","in":"path","required":true,"description":"The car’s id.","schema":{"type":"integer"},"example":12}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FleetVehicle"}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"fleet"},"patch":{"operationId":"patch_fleet_vehicles_id","tags":["Your fleet"],"summary":"Change a car","description":"Prices, colour, location and so on. Changing what the car is (make, model, year, plate) sends it back to review; a price change does not. Switching to `sell` is refused while a rental is under way.","parameters":[{"name":"id","in":"path","required":true,"description":"The car’s id.","schema":{"type":"integer"},"example":12}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FleetVehicleInput"},"example":{"dailyRate":7000000}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FleetVehicle"}},"required":["data"]}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"fleet"},"delete":{"operationId":"delete_fleet_vehicles_id","tags":["Your fleet"],"summary":"Delete a car","description":"The same as \"Delete this car\" in your dashboard. Refused (409) while a rental is booked or under way, or a buyer has reserved the car. A car that never had a booking or a sale is erased. A car with history is taken off the road for good: its rental periods are cancelled, any listing is withdrawn, and it no longer appears in your list or on any site, but its record is kept because past bookings and earnings refer to it. `deleted` is true when it was erased.","parameters":[{"name":"id","in":"path","required":true,"description":"The car’s id.","schema":{"type":"integer"},"example":12}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean"},"removed":{"type":"boolean"}}}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"fleet"}},"/fleet/vehicles/{id}/photos":{"post":{"operationId":"post_fleet_vehicles_id_photos","tags":["Your fleet"],"summary":"Upload a photo","description":"multipart/form-data with a `file` field: JPEG, PNG or WebP up to 10 MB; up to 12 photos per car. The first is the main photo.","parameters":[{"name":"id","in":"path","required":true,"description":"The car’s id.","schema":{"type":"integer"},"example":12}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FleetVehicle"}},"required":["data"]}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"fleet"}},"/fleet/vehicles/{id}/photos/{index}":{"delete":{"operationId":"delete_fleet_vehicles_id_photos_index","tags":["Your fleet"],"summary":"Remove a photo","parameters":[{"name":"id","in":"path","required":true,"description":"The car’s id.","schema":{"type":"integer"},"example":12},{"name":"index","in":"path","required":true,"description":"Position of the photo, from 0.","schema":{"type":"integer"},"example":0}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FleetVehicle"}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"fleet"}},"/fleet/vehicles/{id}/documents":{"post":{"operationId":"post_fleet_vehicles_id_documents","tags":["Your fleet"],"summary":"Upload a paper","description":"multipart/form-data: `file` (a photo or PDF up to 10 MB) and `kind` (`insurance` or `registration`). Private: only our team and you can see it.","parameters":[{"name":"id","in":"path","required":true,"description":"The car’s id.","schema":{"type":"integer"},"example":12}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"kind":{"type":"string","enum":["insurance","registration"]}},"required":["file","kind"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FleetVehicle"}},"required":["data"]}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"fleet"}},"/fleet/vehicles/{id}/availability":{"get":{"operationId":"get_fleet_vehicles_id_availability","tags":["Your fleet"],"summary":"List rental periods","description":"The periods your car is on offer. Customers can book it only inside these.","parameters":[{"name":"id","in":"path","required":true,"description":"The car’s id.","schema":{"type":"integer"},"example":12},{"name":"status","in":"query","required":false,"description":"active, ended or cancelled.","schema":{"type":"string","enum":["active","ended","cancelled"]}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Period"}}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"fleet"},"post":{"operationId":"post_fleet_vehicles_id_availability","tags":["Your fleet"],"summary":"Open a rental period","description":"Periods of one car cannot overlap, and cannot be in the past.","parameters":[{"name":"id","in":"path","required":true,"description":"The car’s id.","schema":{"type":"integer"},"example":12}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"to":{"type":"string","format":"date-time","description":"ISO 8601 date-time."}},"required":["from","to"]},"example":{"from":"2026-11-05T00:00:00+01:00","to":"2026-11-30T23:59:00+01:00"}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Period"}},"required":["data"]}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"fleet"}},"/fleet/vehicles/{id}/availability/{windowId}":{"delete":{"operationId":"delete_fleet_vehicles_id_availability_windowId","tags":["Your fleet"],"summary":"Close a rental period","description":"Refused (409) while a customer has booked inside it.","parameters":[{"name":"id","in":"path","required":true,"description":"The car’s id.","schema":{"type":"integer"},"example":12},{"name":"windowId","in":"path","required":true,"description":"The period’s id.","schema":{"type":"integer"},"example":7}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Period"}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"fleet"}},"/fleet/vehicles/{id}/listing":{"get":{"operationId":"get_fleet_vehicles_id_listing","tags":["Your fleet"],"summary":"Get the sale listing","parameters":[{"name":"id","in":"path","required":true,"description":"The car’s id.","schema":{"type":"integer"},"example":12}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FleetListing"}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"fleet"},"post":{"operationId":"post_fleet_vehicles_id_listing","tags":["Your fleet"],"summary":"Offer the car for sale","description":"The car must be set to `purpose: \"sell\"` first. The listing starts in review. Buyers reserve it through `POST /sales/orders`, with your keys only.","parameters":[{"name":"id","in":"path","required":true,"description":"The car’s id.","schema":{"type":"integer"},"example":12}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingInput"},"example":{"askingPrice":150000000,"mileageKm":42000,"vin":"1HGCM82633A123456","condition":"good","description":"One careful owner"}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FleetListing"}},"required":["data"]}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"fleet"},"patch":{"operationId":"patch_fleet_vehicles_id_listing","tags":["Your fleet"],"summary":"Change the listing","description":"A changed chassis number sends a live listing back to review; a price change does not.","parameters":[{"name":"id","in":"path","required":true,"description":"The car’s id.","schema":{"type":"integer"},"example":12}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingInput"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FleetListing"}},"required":["data"]}}}},"400":{"description":"invalid: something in the request is wrong. The message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"fleet"},"delete":{"operationId":"delete_fleet_vehicles_id_listing","tags":["Your fleet"],"summary":"Withdraw the listing","description":"Not possible once a buyer has reserved the car (409).","parameters":[{"name":"id","in":"path","required":true,"description":"The car’s id.","schema":{"type":"integer"},"example":12}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"withdrawn":{"type":"boolean"}}}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"fleet"}},"/sandbox/bookings/{reference}/{step}":{"post":{"operationId":"post_sandbox_bookings_reference_step","tags":["Sandbox"],"summary":"Move a test booking forward","description":"With a **test key**, simulate what happens in real life so you can watch your webhooks and your own code react: `pay` (the customer pays → `confirmed`), `activate` (the customer collects the car → `active`) and `complete` (the car is back → `completed`). Only test bookings made with test keys of your own business.","parameters":[{"name":"reference","in":"path","required":true,"description":"The booking reference.","schema":{"type":"string"},"example":"WC-7KQ2M9XA"},{"name":"step","in":"path","required":true,"description":"pay, activate or complete.","schema":{"type":"string","enum":["pay","activate","complete"]},"example":"pay"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Booking"}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"test"}},"/sandbox/orders/{reference}/{step}":{"post":{"operationId":"post_sandbox_orders_reference_step","tags":["Sandbox"],"summary":"Move a test purchase forward","description":"With a **test key**: `pay-deposit` (→ `reserved`), `pay-balance` (the transfer reaches escrow → `paid`) and `complete` (car and papers handed over → `completed`).","parameters":[{"name":"reference","in":"path","required":true,"description":"The order reference.","schema":{"type":"string"},"example":"WS-4HZ8P2LD"},{"name":"step","in":"path","required":true,"description":"pay-deposit, pay-balance or complete.","schema":{"type":"string","enum":["pay-deposit","pay-balance","complete"]},"example":"pay-deposit"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SaleOrder"}},"required":["data"]}}}},"401":{"description":"unauthorized: the API key is missing, wrong or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such thing, or it is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict / unavailable: it cannot be done in the current state, or the car was just taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-access":"test"}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Your API key: `Authorization: Bearer wc_live_…` (production) or `wc_test_…` (sandbox)."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid","unauthorized","forbidden","not_found","unavailable","conflict","payment","rate_limited","server_error"],"description":"A stable code to branch on."},"message":{"type":"string","description":"A sentence a person can read. Safe to show."},"requestId":{"type":"string","description":"Quote this to support."}},"required":["code","message"]}},"required":["error"]},"Location":{"type":"object","properties":{"code":{"type":"string","description":"Short code, e.g. ABV or LOS."},"name":{"type":"string"},"city":{"type":"string"},"address":{"type":["string","null"]},"instructions":{"type":["string","null"],"description":"Where our agent meets the customer."},"openFrom":{"type":"string","description":"Opening time, HH:MM (Nigerian time)."},"openTo":{"type":"string"}},"required":["code","name","city"]},"Vehicle":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string","description":"e.g. “2021 Toyota Camry”."},"make":{"type":"string"},"model":{"type":"string"},"year":{"type":"integer"},"class":{"type":"string","enum":["economy","sedan","suv","van","luxury"]},"transmission":{"type":"string","enum":["automatic","manual"]},"fuel":{"type":"string","enum":["petrol","diesel","hybrid","electric"]},"seats":{"type":"integer"},"colour":{"type":["string","null"]},"photos":{"type":"array","items":{"type":"string","description":"Photo URL."}},"dailyRate":{"type":"integer","description":"Price per 24 hours."},"deposit":{"type":"integer","description":"Refundable deposit."},"location":{"type":"object","properties":{"id":{"type":"integer"},"code":{"type":"string"},"name":{"type":"string"},"city":{"type":"string"}},"required":["code"]},"rating":{"type":["object","null"],"properties":{"average":{"type":"number","description":"Average of 1 to 5 stars, one decimal."},"count":{"type":"integer","description":"Published reviews of this car."}}}},"required":["id","title","class","dailyRate","location"]},"QuoteLine":{"type":"object","properties":{"code":{"type":"string","description":"rental, an extra’s code, one_way or discount."},"label":{"type":"string"},"quantity":{"type":"integer"},"unitAmount":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"amount":{"type":"integer","description":"Negative for a discount."},"pricing":{"type":"string","enum":["per_day","flat","discount"]}},"required":["code","label","amount"]},"Quote":{"type":"object","properties":{"currency":{"type":"string","description":"Always NGN."},"days":{"type":"integer","description":"Billable days: 24-hour blocks from pick-up, with 60 minutes’ grace."},"dailyRate":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"lines":{"type":"array","items":{"$ref":"#/components/schemas/QuoteLine"}},"listSubtotal":{"type":"integer","description":"Before any discount."},"discount":{"type":["object","null"],"properties":{"code":{"type":"string"},"label":{"type":"string"},"amount":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."}}},"subtotal":{"type":"integer","description":"What the rental costs (car + extras). Revenue is split from this."},"deposit":{"type":"integer","description":"Refundable hold, never revenue."},"total":{"type":"integer","description":"subtotal + deposit: what is charged up front."}},"required":["days","lines","subtotal","deposit","total"]},"Availability":{"type":"object","properties":{"available":{"type":"boolean"},"reason":{"type":["string","null"],"enum":["too_soon","already_booked","outside_availability","unavailable"],"description":"Why it is not available."},"quote":{"$ref":"#/components/schemas/Quote","type":[null,"null"]}},"required":["available"]},"VehicleWithAvailability":{"allOf":[{"$ref":"#/components/schemas/Vehicle"},{"type":"object","properties":{"availability":{"$ref":"#/components/schemas/Availability","type":[null,"null"]}}}]},"Option":{"type":"object","properties":{"code":{"type":"string","description":"Pass this in `extras`."},"kind":{"type":"string","enum":["extra","insurance"]},"name":{"type":"string"},"description":{"type":["string","null"]},"pricing":{"type":"string","enum":["per_day","flat"]},"price":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."}},"required":["code","name","pricing","price"]},"Customer":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string","description":"International format preferred, e.g. +2348031234567."}},"required":["name","email","phone"]},"CustomerInput":{"type":"object","properties":{"name":{"type":"string","description":"Full name as on the driver’s licence."},"email":{"type":"string"},"phone":{"type":"string"},"licenseNumber":{"type":"string","description":"The driver’s licence number."},"licenseExpiry":{"type":"string","format":"date-time","description":"Must be after the rental ends."},"licenseCountry":{"type":"string","description":"ISO country code. Default NG."}},"required":["name","email","phone","licenseNumber"]},"Booking":{"type":"object","properties":{"reference":{"type":"string","description":"e.g. WC-7KQ2M9XA. Show it to your customer."},"status":{"type":"string","enum":["pending_payment","confirmed","active","completed","cancelled","expired"]},"test":{"type":"boolean","description":"True for a sandbox booking."},"from":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"to":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"vehicle":{"$ref":"#/components/schemas/Vehicle"},"pickup":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"instructions":{"type":["string","null"]}}},"dropoff":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}}},"customer":{"$ref":"#/components/schemas/Customer"},"price":{"type":"object","properties":{"currency":{"type":"string"},"days":{"type":"integer"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/QuoteLine"}},"listSubtotal":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"discount":{"type":["object","null"],"properties":{"code":{"type":["string","null"]},"amount":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."}}},"subtotal":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"deposit":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"total":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"refunded":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."}}},"commission":{"type":"integer","description":"Your commission on this booking (businesses only)."},"flightNumber":{"type":["string","null"]},"checkedInAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date-time."},"arrivalNote":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Your own key/value pairs."},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"holdExpiresAt":{"type":["string","null"],"format":"date-time","description":"While unpaid: when the car is released."},"checkoutUrl":{"type":"string","description":"Send the customer here to pay (only while unpaid)."},"cancellation":{"type":"object","properties":{"allowed":{"type":"boolean","description":"False once it is cancelled, collected or finished."},"refundPercent":{"type":"integer","description":"Share of the rental price refunded if cancelled right now: 100 (12 h or more before pick-up), 95 (6 to 12 h), 90 (under 6 h). The deposit always comes back in full."},"rentalRefund":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"fee":{"type":"integer","description":"The cancellation fee that would be kept."},"depositReturned":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"refundTotal":{"type":"integer","description":"What goes back to the customer in all."},"changesAt":{"type":["string","null"],"format":"date-time","description":"When the refund drops to the next level."},"nextPercent":{"type":["integer","null"],"description":"The refund percent from then on."}}},"earlyReturn":{"type":["object","null"],"properties":{"requestedAt":{"type":["string","null"],"format":"date-time","description":"When the customer asked to return early (the clock stops there if the car arrives within the grace period)."},"timeBasedPaid":{"type":"integer","description":"The part of the rental price that is for time (spread evenly over the booked period)."},"bookedSeconds":{"type":"integer"},"usedSeconds":{"type":"integer"},"unusedSeconds":{"type":"integer"},"rentalRefund":{"type":"integer","description":"Refund for the unused time if the car is returned now."},"depositReturned":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."}}},"overstay":{"type":["object","null"],"properties":{"lateSeconds":{"type":"integer","description":"Seconds past the return time."},"graceSeconds":{"type":"integer","description":"Free seconds after the return time."},"billedSeconds":{"type":"integer","description":"Late seconds that are charged (after the grace period)."},"ratePerHour":{"type":"integer","description":"The late rate per hour, frozen when the booking was made."},"chargeSoFar":{"type":"integer","description":"The late charge if the car were handed back now (it runs to the second)."}}},"lateTerms":{"type":"object","properties":{"ratePerHour":{"type":"integer","description":"What a late return costs per hour (to the second) once the grace period has passed. Frozen when the booking was made."},"graceMinutes":{"type":"integer","description":"Free minutes after the return time."}}},"tripUpdates":{"type":["object","null"],"properties":{"whatsapp":{"type":"boolean","description":"True when the customer opted in to WhatsApp updates."},"schedule":{"type":"array","items":{"type":"object","properties":{"stage":{"type":"string"},"label":{"type":"string"},"at":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"done":{"type":"boolean"}}}}}},"review":{"type":"object","properties":{"allowed":{"type":"boolean","description":"True once the car is returned and no review has been left yet."},"submittedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date-time."}}},"returnedAt":{"type":["string","null"],"format":"date-time","description":"When the car was handed back."},"balance":{"type":["object","null"],"properties":{"due":{"type":"integer","description":"What the customer still owes after the car came back (a late charge larger than the deposit)."},"paidAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date-time."}}},"settlement":{"oneOf":[{"$ref":"#/components/schemas/Settlement"},{"type":"null"}],"description":"The closing statement, once the booking is cancelled or the car is back."}},"required":["reference","status","from","to","vehicle","price"]},"Review":{"type":"object","properties":{"rating":{"type":"integer","description":"1 to 5 stars."},"title":{"type":["string","null"]},"comment":{"type":["string","null"]},"name":{"type":"string","description":"The first name and the first letter of the last name."},"kind":{"type":"string","enum":["rental","purchase"]},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date-time."}},"required":["rating","name","createdAt"]},"Settlement":{"type":"object","properties":{"kind":{"type":"string","enum":["cancellation","early_return","completed"]},"at":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"rentalPaid":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"depositPaid":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"paid":{"type":"integer","description":"Everything the customer paid."},"refundPercent":{"type":"integer","description":"Cancellation only: the share of the rental price refunded."},"rentalRefund":{"type":"integer","description":"Rental price refunded (a cancellation, or the unused time of an early return)."},"rentalKept":{"type":"integer","description":"Rental price kept: a cancellation fee, or the price of the time used."},"depositReturned":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"depositKept":{"type":"integer","description":"Held back by our staff for damage, fuel or fines."},"depositKeptReason":{"type":"string"},"refundTotal":{"type":"integer","description":"What goes back to the customer in all."},"usage":{"type":"object","properties":{"bookedSeconds":{"type":"integer"},"usedSeconds":{"type":"integer"},"unusedSeconds":{"type":"integer"},"returnedAt":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"requestedAt":{"type":"string","format":"date-time","description":"ISO 8601 date-time."}}},"late":{"type":"object","properties":{"lateSeconds":{"type":"integer"},"graceSeconds":{"type":"integer"},"billedSeconds":{"type":"integer"},"ratePerHour":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"charge":{"type":"integer","description":"The late-return charge."},"fromDeposit":{"type":"integer","description":"The part taken from the deposit."},"balanceDue":{"type":"integer","description":"The part the customer still owes."},"waived":{"type":"boolean"},"waivedReason":{"type":"string"}}}},"required":["kind","at","paid","rentalRefund","depositReturned","refundTotal"]},"CancelledBooking":{"allOf":[{"$ref":"#/components/schemas/Booking"},{"type":"object","properties":{"refundPercent":{"type":"integer","description":"Share of the rental price refunded: 100, 50 or 0."},"refund":{"type":["object","null"],"properties":{"requested":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"ok":{"type":"boolean"}}}}}]},"SaleListing":{"type":"object","properties":{"id":{"type":"integer","description":"Pass as `listingId` to reserve."},"vehicle":{"$ref":"#/components/schemas/Vehicle"},"price":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"reservationDeposit":{"type":"integer","description":"What the buyer pays now to hold the car."},"mileageKm":{"type":"integer"},"condition":{"type":"string","enum":["excellent","good","fair","needs_work"]},"accidentHistory":{"type":"string","enum":["none","minor","major"]},"origin":{"type":"string","enum":["nigerian_used","foreign_used_duty_paid","new"]},"vin":{"type":"string","description":"Chassis number."},"description":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","vehicle","price"]},"SaleOrder":{"type":"object","properties":{"reference":{"type":"string","description":"e.g. WS-7KQ2M9XA."},"status":{"type":"string","enum":["pending_payment","reserved","paid","completed","cancelled","expired"]},"test":{"type":"boolean"},"vehicle":{"$ref":"#/components/schemas/Vehicle"},"buyer":{"$ref":"#/components/schemas/Customer"},"price":{"type":"object","properties":{"currency":{"type":"string"},"total":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"deposit":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"balanceDue":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"refunded":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."}}},"commission":{"type":"integer","description":"Your referral commission (businesses only)."},"holdExpiresAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date-time."},"reservedUntil":{"type":["string","null"],"format":"date-time","description":"While reserved: when the hold ends."},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"checkoutUrl":{"type":"string","description":"The deposit payment link (while unpaid)."}},"required":["reference","status","vehicle","price"]},"Event":{"type":"object","properties":{"id":{"type":"string","description":"evt_… The same id a webhook for this event carries."},"type":{"type":"string","enum":["booking.confirmed","booking.active","booking.completed","booking.cancelled","booking.expired","sale.reserved","sale.paid","sale.completed","sale.cancelled","sale.expired","webhook.test"]},"created":{"type":"integer","description":"Unix seconds."},"livemode":{"type":"boolean"},"data":{"type":"object","properties":{"object":{"oneOf":[{"$ref":"#/components/schemas/Booking"},{"$ref":"#/components/schemas/SaleOrder"}],"description":"The booking or order, exactly as the API returns it."}}}},"required":["id","type","created","data"]},"Delivery":{"type":"object","properties":{"id":{"type":"integer"},"eventId":{"type":"string"},"event":{"type":"string"},"reference":{"type":["string","null"]},"livemode":{"type":"boolean"},"status":{"type":"string","enum":["queued","delivered","failed","held"]},"attempts":{"type":"integer"},"lastStatusCode":{"type":["integer","null"]},"lastError":{"type":["string","null"]},"nextAttemptAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date-time."},"deliveredAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date-time."},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date-time."}}},"Balance":{"type":"object","properties":{"currency":{"type":"string"},"available":{"type":"integer","description":"Can be paid out now."},"pending":{"type":"integer","description":"Held until the rental or sale is completed."},"paidOut":{"type":"integer","description":"Already transferred to your bank account."}}},"Commission":{"type":"object","properties":{"id":{"type":"integer"},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"type":{"type":"string","enum":["rental","sale"]},"reference":{"type":["string","null"]},"kind":{"type":"string","enum":["earning","reversal"]},"status":{"type":"string","enum":["held","released","reversal"]},"amount":{"type":"integer","description":"Negative for a reversal."},"releasedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date-time."},"note":{"type":["string","null"]}}},"Payout":{"type":"object","properties":{"id":{"type":"integer"},"reference":{"type":"string"},"amount":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"status":{"type":"string","enum":["pending","paid","failed"]},"transferReference":{"type":["string","null"]},"failureReason":{"type":["string","null"]},"paidAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date-time."},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date-time."}}},"WebhookStatus":{"type":"object","properties":{"url":{"type":["string","null"]},"hasSecret":{"type":"boolean"},"pausedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date-time."},"failures":{"type":"integer","description":"Deliveries in a row that gave up."},"counts":{"type":"object","properties":{"delivered":{"type":"integer"},"failed":{"type":"integer"},"queued":{"type":"integer"},"held":{"type":"integer"}}}}},"FleetVehicle":{"allOf":[{"$ref":"#/components/schemas/Vehicle"},{"type":"object","properties":{"plate":{"type":"string"},"purpose":{"type":"string","enum":["rent","sell"]},"status":{"type":"string","enum":["pending_review","approved","rejected","suspended","sold","removed"]},"reviewNote":{"type":["string","null"],"description":"Why it was rejected or what is missing."},"papers":{"type":"object","properties":{"insuranceExpiry":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date-time."},"roadworthinessExpiry":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date-time."},"hasInsurance":{"type":"boolean"},"hasRegistration":{"type":"boolean"}}},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date-time."}}}]},"FleetVehicleInput":{"type":"object","properties":{"make":{"type":"string"},"model":{"type":"string"},"year":{"type":"integer"},"plate":{"type":"string","description":"Unique. Saved in capitals without spaces."},"colour":{"type":"string"},"class":{"type":"string","enum":["economy","sedan","suv","van","luxury"]},"transmission":{"type":"string","enum":["automatic","manual"]},"fuel":{"type":"string","enum":["petrol","diesel","hybrid","electric"]},"seats":{"type":"integer"},"location":{"type":"string","description":"Airport code, e.g. ABV."},"dailyRate":{"type":"integer","description":"At least ₦1,000 (100000). Whole naira."},"deposit":{"type":"integer","description":"Whole naira."},"purpose":{"type":"string","enum":["rent","sell"],"description":"Default rent."},"insuranceExpiry":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"roadworthinessExpiry":{"type":"string","format":"date-time","description":"ISO 8601 date-time."}},"required":["make","model","year","plate","location"]},"Period":{"type":"object","properties":{"id":{"type":"integer"},"from":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"to":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"status":{"type":"string","enum":["active","ended","cancelled"]},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date-time."}}},"FleetListing":{"allOf":[{"$ref":"#/components/schemas/SaleListing"},{"type":"object","properties":{"reviewNote":{"type":["string","null"]}}}]},"ListingInput":{"type":"object","properties":{"askingPrice":{"type":"integer","description":"At least ₦100,000."},"mileageKm":{"type":"integer"},"vin":{"type":"string","description":"Chassis number (11–17 characters)."},"condition":{"type":"string","enum":["excellent","good","fair","needs_work"]},"accidentHistory":{"type":"string","enum":["none","minor","major"]},"origin":{"type":"string","enum":["nigerian_used","foreign_used_duty_paid","new"]},"description":{"type":"string"}},"required":["askingPrice","mileageKm","vin"]},"Me":{"type":"object","properties":{"key":{"type":"object","properties":{"id":{"type":"integer"},"label":{"type":["string","null"]},"mode":{"type":"string","enum":["live","test"]},"prefix":{"type":"string","description":"The first characters of the key (never the key)."},"lastUsedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date-time."},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date-time."}}},"limits":{"type":"object","properties":{"requestsPerMinute":{"type":"integer"}}},"business":{"type":["object","null"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"plan":{"type":"string","enum":["marketplace","fleet","both"]},"status":{"type":"string","enum":["pending","approved","suspended","rejected"]},"website":{"type":["string","null"]}}},"capabilities":{"type":"object","properties":{"sellOwnersCars":{"type":"boolean"},"ownFleet":{"type":"boolean"},"liveMode":{"type":"boolean","description":"False until we approve your business."}}},"rates":{"type":"object","properties":{"rentalCommissionPercent":{"type":"number"},"rentalSoftwareFeePercent":{"type":"number"},"saleReferralPercent":{"type":"number"},"saleSoftwareFeePercent":{"type":"number"}},"description":"Your rates, in percent: your own agreed ones or our defaults."},"webhook":{"type":"object","properties":{"configured":{"type":"boolean"},"paused":{"type":"boolean"},"url":{"type":["string","null"]}}}}},"ClassSummary":{"type":"object","properties":{"class":{"type":"string","enum":["economy","sedan","suv","van","luxury"]},"count":{"type":"integer"},"fromDailyRate":{"type":"integer","description":"Amount in kobo (₦1 = 100 kobo)."},"maxSeats":{"type":"integer"},"transmissions":{"type":"array","items":{"type":"string"}}}},"Calendar":{"type":"object","properties":{"vehicleId":{"type":"integer"},"range":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"to":{"type":"string","format":"date-time","description":"ISO 8601 date-time."}}},"windows":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"to":{"type":"string","format":"date-time","description":"ISO 8601 date-time."}}}},"booked":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"to":{"type":"string","format":"date-time","description":"ISO 8601 date-time."}}}},"free":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"ISO 8601 date-time."},"to":{"type":"string","format":"date-time","description":"ISO 8601 date-time."}}}},"rules":{"type":"object","properties":{"minLeadMinutes":{"type":"integer","description":"The earliest pick-up from now."},"turnaroundMinutes":{"type":"integer","description":"Time the car needs between two rentals."},"maxRentalDays":{"type":"integer"}}}}}}}}