Autenticación y permisosAuthentication and permissions
La API key se obtiene en autoservicio desde FV Pro, una vez que tu organización está activada. Si eres una organización nueva que solo quiere integrarse por API, antes nos envías un business case breve. Todas las peticiones se autentican con la key en la cabecera X-Api-Key.You get the API key through self-service in FV Pro, once your organization is activated. If you are a new organization that only wants to integrate via API, send us a short business case first. Every request is authenticated with the key in the X-Api-Key header.
El proceso completo: business case (solo organizaciones nuevas) → organización en FV Pro → datos fiscales → activación → solicitud de la clave → prueba con GET/auth.The full process: business case (new organizations only) → organization in FV Pro → tax details → activation → key request → test with GET/auth.
Paso 1. Envía tu business case (solo organizaciones nuevas)Step 1. Send your business case (new organizations only)
Si aún no trabajas con Fourvenues y quieres integrarte solo por API, envía una propuesta breve a integrations@fourvenues.com. Con una página basta:If you don't work with Fourvenues yet and want to integrate via API only, send a short proposal to integrations@fourvenues.com. One page is enough:
- Venues: con qué venues trabajas o quieres trabajar.Venues: which venues you work with or want to work with.
- Volumen: cuánto vendes al año (entradas, reservas o facturación aproximada).Volume: how much you sell per year (tickets, bookings or approximate revenue).
- Canales: en qué otras plataformas o ticketeras vendes hoy.Channels: which other platforms or ticketing providers you sell on today.
- Propuesta de valor: qué aporta la colaboración a los venues y a Fourvenues. Por ejemplo, nuevos públicos, mercados o tipos de cliente a los que llegas.Value proposition: what the partnership brings to the venues and to Fourvenues. For example, new audiences, markets or customer types you reach.
Paso 2. Crea tu organización en FV ProStep 2. Create your organization in FV Pro
| EntornoEnvironment | DóndeWhere | CuándoWhen |
|---|---|---|
| AlphaAlpha | alpha.pro.fourvenues.com | La primera vez, para desarrollar y probar la integración.The first time, to develop and test the integration. |
| ProducciónProduction | pro.fourvenues.com | Cuando la integración funciona en alpha y quieres pasar a venta real.When the integration works in alpha and you want to move to real sales. |
Cada entorno es independiente: tendrás una organización y una API key en alpha, y otra organización y otra key en producción. Repite los pasos 2 a 6 en cada entorno, incluidos los datos fiscales y la activación.Each environment is independent: you will have one organization and API key in alpha, and another organization and key in production. Repeat steps 2 to 6 in each environment, including tax details and activation.
Paso 3. Rellena los datos fiscalesStep 3. Fill in your tax details
Completa los datos fiscales de la organización en FV Pro. Sin ellos no se puede activar la cuenta.Complete your organization's tax details in FV Pro. Without them the account cannot be activated.
Paso 4. Solicita la activación de la cuentaStep 4. Request account activation
Pide la activación por email a integrations@fourvenues.com o al equipo de soporte. Fourvenues revisa la solicitud y activa la organización.Request activation by email at integrations@fourvenues.com or through the support team. Fourvenues reviews the request and activates the organization.
Indica en la solicitud si necesitas alta en la pasarela de pagos de Fourvenues. La necesitas en dos casos:State in your request whether you need to be onboarded onto the Fourvenues payment gateway. You need it in two cases:
- Vas a vender con la pasarela de pagos de Fourvenues.You will sell using the Fourvenues payment gateway.
- Quieres comprar entradas de prueba con la pasarela de Fourvenues.You want to buy test tickets with the Fourvenues gateway.
Paso 5. Solicita tu API keyStep 5. Request your API key
Con la cuenta activa, entra en Ajustes > Developer Portal > Solicitar clave. Fourvenues aprueba la solicitud y recibes la key automáticamente por email.Once the account is active, go to Settings > Developer Portal > Request key. Fourvenues approves the request and you receive the key automatically by email.
Importante: el enlace del email solo se puede abrir una vez. Al abrirlo verás la key por única vez. Cópiala en ese momento y guárdala en tu gestor de secretos antes de cerrar la página. La key no se puede volver a consultar.Important: the link in the email can only be opened once. When you open it you will see the key for the only time. Copy it right then and store it in your secrets manager before closing the page. The key cannot be viewed again.
Si pierdes la key, desde el Developer Portal puedes:If you lose the key, from the Developer Portal you can:
- Reenviarla: recibes una key nueva y la anterior queda cancelada.Resend it: you get a new key and the previous one is cancelled.
- Solicitar una nueva.Request a new one.
- Eliminar las que ya no uses.Delete the ones you no longer use.
Paso 6. Comprueba que funcionaStep 6. Check that it works
Llama siempre desde tu backend. Nunca expongas la key en el navegador ni en una app móvil. Solo se acepta HTTPS.Always call from your backend. Never expose the key in the browser or in a mobile app. Only HTTPS is accepted.
curl --request GET \
--url 'https://channels-service-alpha.fourvenues.com/auth' \
--header 'X-Api-Key: TU_API_KEY'{
"success": true,
"data": {
"message": "Authed",
"channel": {
"_id": "ch_abc123",
"name": "Mi Marketplace",
"slug": "mi-marketplace",
"currency": "EUR",
"hosts": [
{ "_id": "org_xyz789", "name": "Club Ejemplo", "slug": "club-ejemplo", "created_at": "2023-06-01T00:00:00.000Z" }
],
"created_at": "2024-10-01T00:00:00.000Z"
}
}
}hostsson los venues que te han añadido como partner. Usa su_idcomoorganization_iden el resto de llamadas. Si la lista sale vacía, ningún venue te ha añadido todavía.hostsare the venues that have added you as a partner. Use their_idasorganization_idin every other call. If the list is empty, no venue has added you yet.anfitrionses un campo antiguo con el mismo contenido y está deprecado. Usahosts.anfitrionsis a legacy field with the same content and is deprecated. Usehosts.- Si un venue te quita como partner, desaparece de
hostsy sus eventos dejan de aparecer. Tu catálogo debe reflejarlo (flujo 2).If a venue removes you as a partner, it disappears fromhostsand its events stop appearing. Your catalog must reflect this (flow 2).
Consigue tus venues partnerGet your partner venues
Tener una API key no te da acceso a ningún venue. Cada venue tiene que aceptar la colaboración contigo.Having an API key does not give you access to any venue. Each venue has to accept the partnership with you.
- Tu equipo contacta con los venues. Fourvenues no puede facilitar los contactos directos de los venues. La relación comercial es tuya.Your team contacts the venues. Fourvenues cannot share venues' direct contacts. The commercial relationship is yours.
- El venue activa la colaboración. Lo hace desde su panel de configuración en FV Pro o a través de su Account Manager en Fourvenues.The venue activates the partnership. It does so from its settings panel in FV Pro or through its Account Manager at Fourvenues.
- Compruébalo con
GET/auth. En cuanto la colaboración está activa, el venue aparece enhosts.Check it withGET/auth. As soon as the partnership is active, the venue appears inhosts.
Permisos y ciclo de vida de la keyKey permissions and lifecycle
| AspectoAspect | Qué significa para tiWhat it means for you |
|---|---|
| AlcanceScope | La key pertenece a tu organización y a un entorno. Solo ve los venues que te tienen como partner.The key belongs to your organization and to one environment. It only sees venues that have you as a partner. |
| CapabilitiesCapabilities | Cada key tiene habilitados solo los endpoints que necesitas (p. ej. preregister:write para el preregistro, o all:write). Si falta una, la llamada devuelve 403.Each key only has the endpoints you need enabled (e.g. preregister:write for pre-registration, or all:write). If one is missing, the call returns 403. |
| CaducidadExpiry | Las keys caducan. Solicita la nueva desde el Developer Portal antes de la fecha de expiración.Keys expire. Request the new one from the Developer Portal before the expiry date. |
| GestiónManagement | Desde el Developer Portal reenvías una key (cancela la anterior), solicitas nuevas o eliminas las antiguas.From the Developer Portal you resend a key (cancels the previous one), request new ones or delete old ones. |
| RevocaciónRevocation | Fourvenues puede revocar una key de inmediato si se usa mal.Fourvenues can revoke a key immediately if it is misused. |
Límites y erroresLimits and errors
No pases de 10 peticiones por segundo por key. Si recibes 429, reintenta con backoff exponencial.Do not exceed 10 requests per second per key. If you get 429, retry with exponential backoff.
| CódigoCode | CausaCause | Qué hacerWhat to do |
|---|---|---|
401 | Falta la cabecera o la key no es válidaThe header is missing or the key is invalid | Revisa el nombre X-Api-Key, el valor y que usas la key del entorno correcto.Check the X-Api-Key name, the value, and that you are using the key for the right environment. |
403 | La key no tiene permiso para ese endpoint o ese venueThe key has no permission for that endpoint or venue | Pide ampliar las capabilities o confirma que el venue te tiene como partner.Ask for extra capabilities or confirm that the venue has you as a partner. |
404 | El recurso no existe o no es visible para tu canalThe resource does not exist or is not visible to your channel | Revisa el _id o el slug.Check the _id or slug. |
429 | Has superado el límite de peticionesYou exceeded the request limit | Backoff exponencial.Exponential backoff. |
500 | Error inesperadoUnexpected error | Reintenta una vez. Si se repite, contacta con soporte.Retry once. If it repeats, contact support. |