Crear Customer Portal Session
Changed onCrea una sesión de un Customer en el Customer Portal y devuelve la url con la que entra.
Se usa para llevar a un Customer al portal desde un canal propio: la url que viene en la respuesta es el enlace que se le entrega.
billing_data.id_customer es obligatorio. Si no se envía billing_data.id_account, la sesión queda asociada al Account principal de la organización.
expiration_datetime es obligatorio, debe quedar al menos 30 minutos en el futuro y se interpreta en UTC. Al llegar esa fecha la sesión pasa sola al estado expired, sin necesidad de llamar a la operación de expiración.
external_id es una referencia propia opcional y no puede repetirse entre las Customer Portal Sessions ni las Checkout Sessions de la organización: un valor ya usado devuelve 409. flow_name elige el flujo con el que abre el portal y por defecto es "0". Lo que venga en additional_metadata se guarda tal cual y se devuelve en las lecturas de la sesión.
Al crear la sesión se despacha un mensaje al Customer con el enlace: con la plantilla indicada en template si se envía, y en caso contrario según la configuración de mensajería de la organización, sobre el canal indicado en communication_channel. Ese despacho es asincrónico y no condiciona la creación: si falla, la sesión igual queda creada.
Request
- Base URLhttps://api.trytoku.com
- URLhttps://api.trytoku.com/v2/customer-portal-sessions
- AuthAPI key in header x-api-key
Headers
Llave de API de una Account, para operar sobre esa Account en lugar de la principal.
Request body
Response
Successful Response
Changes
- breaking
request body became required
- breaking
removed the enum value
mailof the request property - breaking
removed the enum value
smsof the request property - breaking
removed the enum value
wspof the request property - breaking
the
request property type changed fromstringtoobject - breaking
the
request property format changed from no format todate-time - breaking
removed the media type
application/jsonfor the response with the status - breaking
removed the media type
application/jsonfor the response with the status - warning
deleted the
headerrequest parameterx-api-key - info
api operation id
post_v2-customer-portal-sessionsremoved and replaced withcreate_handler - info
api tag
Customer Portaladded - info
added the new optional
headerrequest parameterx-account-key - info
added the new optional request property
- info
added the new optional request property
/ - info
added the new optional request property
- info
added the new optional request property
- info
the
request property default value0was added - info
removed the non-success response with the status
- info
added the optional property
to the response with the status
- breaking