Skip to main content

Car Rental by Domain (v1)

Method & Path

POST /api/v1/public/carrental/by-domain

Actual path: /v1/public/carrental/by-domain

Description

Resolve car rental workspace by custom domain. Used when the booking site is served on a custom domain (e.g. rent.example.com). Returns publicSlug and workspaceId so the client can call public car rental endpoints with the slug.

Authentication

None. Public endpoint.

Headers

HeaderRequiredDescription
Content-TypeYesapplication/json

Request Body

FieldTypeRequiredDescription
domainstringNoDomain to resolve (e.g. rent.example.com). If omitted, the server uses the request Host header.

Example:

{
"domain": "rent.example.com"
}

Response 200 OK

{
"publicSlug": "demo-rentals",
"workspaceId": "507f1f77bcf86cd799439011"
}

Common Errors

CodeDescription
400 Bad RequestDomain or Host header missing.
404 Not FoundNo car rental found for this domain (domain not registered or not verified/active).