POST/v1/auth/check-session

Validar sesión de API key

Confirma que el bearer token y el header X-Travelandz-Id corresponden a un developer profile activo y a una API key válida para el ambiente actual.

Confirma que el bearer token y el header X-Travelandz-Id corresponden a un developer profile activo y a una API key válida para el ambiente actual.

Endpoint

MétodoRutaAuth
POST/v1/auth/check-sessionAPI key requerida
Headers obligatorios:
HeaderDescripción
AuthorizationBearer <secret_key>. The secret is shown only once when the credential is created.
X-Travelandz-Id<public_key>:<profile_code>. The profile_code is the dp_-prefixed Developer Profile code shown in your dashboard. This binds the request to a profile and credential.
Content-TypeUse application/json for requests with a body.

Respuesta exitosa

json
json
{
  "session": {
    "profileCode": "dp_a1b2c3d4e5f6"
  }
}

Ejemplo

bash
bash
curl -X POST https://api.sandbox.travelandz.com/v1/auth/check-session \
  -H "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
  -H "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE"