Partner API (landlord key)
A landlord who works with your portal can connect it to VIVIN without a VIVIN integration project: they create a key for your portal in VIVIN and send it to you, and your portal reads their units and sends bookings with it.
Before you start
| Item | Value |
|---|---|
| Who it is for | Booking portals, marketplaces and agencies that a VIVIN landlord gave a key to |
| Base URL | https://api.vivin.app/partner-api, HTTPS only |
| Credential | The landlord's key for your portal, starting with vivin_pk_. The landlord creates it in VIVIN and sends it to you |
| Scope | One key = one landlord account. To work with several VIVIN landlords, ask each of them for a key and keep them apart |
| Not included | Changing or cancelling a booking after it is sent |
| Interactive | Swagger UI at https://api.vivin.app/partner-api, OpenAPI file at https://api.vivin.app/partner-api-json |
Send the key
Put the key in the Authorization header of every request.
curl https://api.vivin.app/partner-api/listings \
-H "Authorization: Bearer <landlord-key>"
Keep the key on your server: it gives access to the landlord's units and lets you create bookings in their account. Never put it in a web page or a mobile app.
The landlord can switch your key off, replace it or delete it at any time. From then on every request with it answers 401: ask the landlord for a new key.
Routes
| Method | Path | What it does | Details |
|---|---|---|---|
GET | /partner-api/listings | Every unit of the landlord, with rent, fees, stay rules and blocked dates | Listings and availability |
GET | /partner-api/listings/{externalId} | One unit, always live | Retrieve a listing |
POST | /partner-api/bookings | Sends a booking confirmed on your portal to the landlord | Creating bookings |
GET | /partner-api/properties | Every property of the landlord with its rooms, photos and descriptions | Full catalogue |
GET | /partner-api/properties/{propertyId} | One property, always live | Full catalogue |
The listing object and the booking body are the same as for every VIVIN partner: read those pages with <prefix> = partner-api. The full catalogue is described below.
What the feed contains
- Every unit of the landlord's account that has a rent and is not archived. You do not need to link units first.
externalIdis VIVIN's ID for the unit (a UUID). Use it as your listing reference and send it back asexternalIdinPOST /partner-api/bookings.listingInternalNameis the landlord's own name for the unit, to help you match units on your side.- Prices are the landlord's own: VIVIN adds no markup for your portal.
- The list can be up to 5 minutes old.
GET /partner-api/listings/{externalId}is always live: check the dates there right before you send a booking.
Full catalogue
GET /partner-api/properties returns everything you need to publish the landlord's units: each property with its photos, description, address, coordinates and amenities, and its rooms with their own photos, prices, stay rules and payment rules. One room is one unit you can book: a bed, a room or a whole apartment.
curl https://api.vivin.app/partner-api/properties \
-H "Authorization: Bearer <landlord-key>"
200 OK with a JSON array of properties. An account with nothing to publish answers []. Abridged example:
[
{
"id": "11111111-1111-4111-8111-111111111111",
"name": "Example House",
"description": "Bright coliving house close to the metro.",
"address": {
"formatted": "Example Street 1, Lisboa",
"street": "Example Street",
"number": "1",
"postcode": "1000-001",
"city": "Lisboa",
"countryCode": "PT"
},
"latitude": 38.72,
"longitude": -9.14,
"currency": "EUR",
"facilities": ["wifi", "washing_machine", "kitchen"],
"billsIncluded": { "included": true, "monthlyCap": 40 },
"occupantType": "mixed",
"images": ["https://cdn.example.com/house-1.jpg"],
"rooms": [
{
"id": "22222222-2222-4222-8222-222222222222",
"name": "Room 1",
"type": "private_room",
"ensuite": false,
"maxOccupants": 1,
"facilities": ["desk", "wardrobe", "heating"],
"images": ["https://cdn.example.com/room-1.jpg"],
"status": "available",
"availableFrom": "2027-01-15",
"currency": "EUR",
"pricing": {
"rentType": "fixed",
"monthlyRent": 650,
"deposit": { "type": "fixed", "amount": 650 },
"fees": { "admin": { "type": "fixed", "amount": 150 } }
},
"leaseTerms": { "minStay": 3, "fixedPeriods": [] },
"paymentPlan": {
"cadence": "monthly",
"dueDay": 5,
"payAtBookingConfirmation": ["deposit", "first_rent"],
"summary": "Pay the €650 deposit and the first month's rent to confirm the booking. Rent of €650 is due on day 5 of each month."
}
}
]
}
]
- Room
idis VIVIN's ID for the unit, the same value asexternalIdinGET /partner-api/listings. Send it asexternalIdinGET /partner-api/listings/{externalId}andPOST /partner-api/bookings. - Amounts are in currency units (
650, not cents), in the room'scurrency, with no markup. - Variable rent:
pricing.rentTypeisvariableandpricing.rentByMonthlists the rent of each month (1= January) instead ofmonthlyRent. statusissold_outwhen no move-in date can be booked any more.availableFromis the first day a tenant can move in, after current bookings and blocked dates.paymentPlansays what the tenant pays to confirm the booking, at move-in and each month;summarysays it in plain English you can show.- Photos come cover first. Their URLs are permanent: a URL changes only when the landlord replaces or removes the photo. A photo just added can go out as a link that expires after about 7 days, until its permanent URL is ready.
- A value VIVIN does not hold is left out, never sent empty or guessed. New fields can be added at any time: ignore the ones you do not use.
- A unit that is archived or has no rent is not in the catalogue, as in
GET /partner-api/listings. A property with no such unit left is not in it either. - The landlord's internal tags, their email address and their own booking website links are never included.
- The list can be up to 5 minutes old.
GET /partner-api/properties/{propertyId}returns one property in the same shape and is always live.
Bookings
POST /partner-api/bookings works exactly like Creating bookings: VIVIN answers 201 when it has queued the booking and creates it within about a minute. The landlord sees your portal's name as the booking's platform, and is notified like for any other platform booking.
bookingId (your booking's ID, a UUID) is the idempotency key: a second request with a bookingId already imported creates no second booking. Retry only after a timeout or a 5xx, as described in Idempotency and retries.
Limits
Each key can make 120 requests per minute. Past that, VIVIN answers 429 with a Retry-After header. Requests from one IP address also count toward VIVIN's general limit of 600 per minute, whatever key they use: spread a large catalogue of landlords over time. One list and one catalogue every 10 minutes and a live check before each booking stay far below it.
Errors
| Status | When | What to do |
|---|---|---|
401 | Missing integration credentials: no Authorization header | Send Authorization: Bearer <key> |
401 | Invalid integration credentials: the key is wrong, switched off, replaced or deleted | Check the key. If it still fails, ask the landlord for a new one |
404 | The externalId is not one of the landlord's units, or the unit was archived | Refresh your list with GET /partner-api/listings |
404 | Property not found: the propertyId is not one of the landlord's properties, or none of its units can be published | Refresh your catalogue with GET /partner-api/properties |
429 | More than 120 requests with this key in a minute, or 600 from your IP address | Wait the seconds in the Retry-After header |
Every error has the JSON body described in Error handling.