Generate a marketplace handoff URL for a vendor
POST/api/marketplace/links/:vendorSlug
Returns an Ownli-hosted handoff URL for the given vendor. The integrator renders this URL as an anchor (button, card, deep link) inside its own app; clicking lands the end user on Ownli's hosted handoff page, which collects any missing fields and forwards the user to the vendor.
Authentication (server-side only): this endpoint must be called from the partner's backend, authenticated either with an Authorization: Bearer token from POST /api/auth/token or with the legacy PartnerId/ClientId/ClientSecret headers. Credentials must never be embedded in browser or mobile client code — link generation is a server-to-server call, and the calling partner is identified from the credentials (used for attribution and user ownership).
User continuity: Ownli resolves users by user.email/user.phone. The first call for a user not yet known to Ownli creates them (which is why email or phone is required); subsequent calls with the same email/phone resolve to the same user, so repeat visits skip data the user already provided.
Vehicle context: optional. Supply a VIN (preferred) or license plate + state if the partner already knows the vehicle — Ownli enriches year/make/model from the VIN automatically. If omitted, the handoff page collects vehicle details from the end user.
Link lifetime: the returned URL embeds a single-use token with a limited TTL (24 hours by default). Generate the link at render time rather than caching it; an expired link sends the user to a recovery flow instead of the vendor.
Category entry points: in addition to concrete vendor slugs, category-level slugs (for example insurance) are supported. These defer vendor selection — the end user is matched to the best vendor in the category during the handoff flow.
Request
Path Parameters
Vendor identifier issued by Ownli at integration time. Either a concrete vendor slug (e.g. acme-warranty) or a category-level entry point (e.g. insurance) that defers vendor selection to the handoff flow.
- application/json
Body
required
user
object
End-user context supplied by the partner when generating a marketplace link. At least one of email or phone is required so Ownli can find-or-create the underlying user — repeat calls with the same email/phone resolve to the same Ownli user. Fields are vendor-agnostic; vendor-specific extras can be added later.
Possible values: <= 254 characters
End-user email. Used to resolve against an existing Ownli user if one exists.
Possible values: <= 32 characters
End-user phone in E.164 format.
Possible values: <= 64 characters
End-user first name.
Possible values: <= 64 characters
End-user last name.
Possible values: >= 2 characters and <= 2 characters
End-user state (2-letter US code). Most vendors require this for eligibility.
vehicle
object
Vehicle the end user is interested in. VIN preferred; license-plate + state is a fallback. Both optional — if neither is supplied, the handoff UI collects this from the end user.
Possible values: <= 32 characters
Vehicle VIN. Preferred identifier — when present we look up or create the Vehicle by VIN.
Possible values: <= 16 characters
Vehicle license plate. Fallback identifier; requires licensePlateState.
Possible values: >= 2 characters and <= 2 characters
State that issued the license plate. Required when licensePlate is supplied.
Responses
- 200
- 400
- 401
- 404
- 500
Handoff URL generated.
- application/json
- Schema
- Example (from schema)
Schema
Ownli-hosted handoff URL. Short-lived — render and use within the user's session.
{
"url": "https://api.ownli.app/marketplace/handoff/tok_abc123def456"
}
Invalid parameters. Possible error codes
-
ERROR_INVALID_PARAMETERS (missing or malformed request fields)
-
IDENTITY_REQUIRED (the request must include user.email or user.phone)
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
Authorization error e.g. due to invalid or missing credentials.
Unknown vendor. Possible error codes
-
VENDOR_NOT_FOUND (no vendor matches the vendorSlug path parameter)
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
Internal error.
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}