API Reference
Resolve a public-provider redirect
Recheck one Expedia.com or Booking.com public comparison when Search, Flexible Search, or hotel room offers returns nextAction.type=resolve_public_redirect. Requires the calling application's effective shopping:read scope.
/api/v1/agent-commerce/hotels/:propertyId/public-redirectHeaders
Authorizationstring · required
Bearer $BREK_AGENT_API_KEY. Keep the key server-side.
Content-Typestring · required
application/json
Parameters
propertyIdpath string · required
Copy the opaque propertyId from the same Search or Hotel Offers result and the returned action. Never substitute hotel.hotelCode, an MCP, consumer-site, provider, or transient source identifier.
bodyobject · required
Copy nextAction.body exactly from the current response: provider, checkIn, checkOut, occupancies, and optional currency. Do not reconstruct or edit it.
Request
{
"provider": "expedia",
"checkIn": "<selected check-in: YYYY-MM-DD>",
"checkOut": "<selected check-out: YYYY-MM-DD>",
"occupancies": [{ "paxes": [{ "age": 34 }] }],
"currency": "USD"
}cURL
Replace every placeholder and run this from a trusted server-side environment. Never expose the API key in browser code.
curl --request POST "https://api.brek.com/api/v1/agent-commerce/hotels/${PROPERTY_ID}/public-redirect" \
--header "Authorization: Bearer $BREK_AGENT_API_KEY" \
--header "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"provider": "expedia",
"checkIn": "<selected check-in: YYYY-MM-DD>",
"checkOut": "<selected check-out: YYYY-MM-DD>",
"occupancies": [{ "paxes": [{ "age": 34 }] }],
"currency": "USD"
}
JSONResponse
{
"object": "agent_commerce.public_redirect",
"propertyId": "hotel_123",
"provider": "Expedia.com",
"nextAction": {
"type": "redirect",
"url": "https://www.expedia.com/hotel/example",
"termsOwner": "Expedia.com"
},
"revShare": {
"eligible": false,
"basis": "none",
"reason": "external_provider_checkout"
}
}400 · Public provider unsupported
Use only the provider returned in a current resolve_public_redirect action.
{
"error": {
"code": "agent_commerce_public_provider_unsupported",
"message": "Only Expedia.com and Booking.com are supported.",
"status": 400,
"requestId": "req_...",
"retryable": false,
"details": []
}
}400 · Trusted redirect unavailable
Discard the action and Search again. Never construct or repair an external URL.
{
"error": {
"code": "agent_commerce_public_redirect_unavailable",
"message": "The selected public provider did not return a trusted HTTPS destination. Search again before redirecting the traveler.",
"status": 400,
"requestId": "req_...",
"retryable": false,
"details": []
}
}Response fields
objectagent_commerce.public_redirect
Typed read-only public-provider navigation response.
propertyId / providerstring
The hotel and external terms owner rechecked for this current action.
nextActionobject
Always type=redirect with the current allowlisted HTTPS URL and termsOwner. This response replaces an older shopping action.
revShareobject
Always ineligible with basis=none and reason=external_provider_checkout in v1.
Read-only resolver; external checkout