BitelioBitelio

Crear una sesión de encuesta nativa

El servidor del comercio autentica al cliente y vincula su dispositivo antes de solicitar la sesión. Requires retention:view and retention:edit, active mobile permission and an accepted MOBILE_API delivery. contactId must match that exact delivery. receiptToken stays on the server. The returned token expires after 15 minutes (or invitation expiry), is bound to deviceId and is revoked by permission updates. Never put a secret key in the app. 120 requests/project/minute. See /guides/native-surveys.

POST
/v1/retention/mobile-survey-sessions

Authorization

ApiKeyAuth

AuthorizationBearer <token>

Autenticación mediante clave de API. Las claves secretas (sk_*) son obligatorias en todos los endpoints excepto /v1/track. Las claves públicas (pk_*) solo funcionan con el endpoint /v1/track para el seguimiento de eventos desde el cliente. El proyecto se deriva automáticamente de la clave.

In: header

Request Body

application/json

deliveryId*string
Formatuuid
contactId*string
Lengthlength <= 100
receiptToken*string
Formatuuid
deviceId*string
Match^[A-Za-z0-9_-]{16,128}$
[key: string]?never

Response Body

application/json

curl -X POST "https://bitelio-api.heltia.com/v1/retention/mobile-survey-sessions" \  -H "Content-Type: application/json" \  -d '{    "deliveryId": "73dc828d-801d-4d29-b7e4-e046662a5901",    "contactId": "string",    "receiptToken": "f7b0d1df-daa1-490a-b9fc-05372d34c946",    "deviceId": "string"  }'
{
  "sessionToken": "string",
  "expiresAt": "2019-08-24T14:15:22Z",
  "capabilities": {
    "nativeQuestions": true,
    "conditionalQuestions": true,
    "resume": true,
    "choice": true,
    "multipleChoice": true,
    "rating": true,
    "explicitSubmission": true
  }
}
Empty
Empty
Empty
Empty
Empty
Empty