Will Call
Especificación de ticketAccess para la Emisión de Tickets con Will Call
El sistema de emisión de tickets permite la inclusión de un redemptionCode
para gestionar la recogida de tickets mediante la opción de Will Call.
Este redemption code se establece a través del campo ticketAccess.redemptionCode
.
El cual debe ser actualizado durante todo el ciclo de vida del ticket.
Configuración Inicial
-
A nivel de evento: Es necesario que la opción de Will Call esté configurada en el evento antes de que cualquier ticket sea emitido.
-
Emisión del Ticket: Durante la emisión de cada ticket, el campo
ticketAccess.redemptionCode
debe contener el redemption code específico para la recogida en Will Call. Este código permitirá que el comprador del ticket pueda recogerlo el día del evento. -
Reventa y Transferencia: Si el ticket es revendido o transferido a otro usuario, es crucial que el valor del campo
ticketAccess.redemptionCode
sea actualizado para reflejar el nuevo redemption code. Este código debe ser único para cada transacción y asegurar que el ticket pueda ser recogido por la persona correspondiente.
Ejemplos de Implementación
Aquí, el campo de ticket access contiene un redemption code adecuado.
"ticketAccess": {
"redemptionCode": "123456789"
}
- cURL
- Python
- Java
- PHP
A continuación les brindamos un ejemplo de cómo notificar a menta de la emisión de un ticket, con datos ficticios, utilizando cURL.
curl -X POST 'https://api.mentatickets.com/v1/tickets'
-H 'Authorization: YOUR_API_KEY'
-H 'Content-Type: application/json'
--data-raw '[
{
"ticketOptionId": "0001",
"showId": "4726",
"externalReferenceEventId": "the-lion-king-broadway",
"buyer": "buyer@emaildomain.com",
"ticketId": "111",
"ticketAccess": {
"type": "URL",
"locator": "https://storage.googleapis.com/default_mentatickets-core/Captura%20de%20pantalla%202023-03-21%20a%20la(s)%2010.46.42.png",
"redemptionCode": "123456789"
}
"props": {
"seating": {
"row": "A",
"seat": "12",
"section": "VIP",
"door": "North",
"image": "https://example.com/seating-image.png"
}
}
}
]'
A continuación les brindamos un ejemplo de cómo notificar a menta de la emisión de un ticket, con datos ficticios, utilizando Python.
import requests
import json
url = "https://api.mentatickets.com/v1/tickets"
headers = {
"Authorization": "YOUR_API_KEY",
"Content-Type": "application/json",
}
ticketOptionId = "0001"
showId = "4726"
externalReferenceEventId = "the-lion-king-broadway"
buyer = "buyer@emaildomain.com"
ticketId = "111"
ticketAccessType = "OTHER"
locator = "D02KWWKS029F"
redemptionCode = "123456789"
data = [
{
"ticketOptionId": ticketOptionId,
"showId": showId,
"externalReferenceEventId": externalReferenceEventId,
"buyer": buyer,
"ticketId": ticketId,
"ticketAccess": {
"type": ticketAccessType,
"locator": locator,
"status": status,
"redemptionCode": redemptionCode,
},
"props": {
"seating": {
"row": "A",
"seat": "12",
"section": "VIP",
"door": "North",
"image": "https://example.com/seating-image.png"
}
}
}
]
response = requests.post(url, headers=headers, data=json.dumps(data))
A continuación les brindamos un ejemplo de cómo notificar a menta de la emisión de un ticket, con datos ficticios, utilizando Java.
import okhttp3.*;
import java.io.IOException;
OkHttpClient client = new OkHttpClient();
MediaType JSON = MediaType.get("application/json; charset=utf-8");
String ticketOptionId = "0001";
String showId = "4726";
String externalReferenceEventId = "the-lion-king-broadway";
String buyer = "buyer@emaildomain.com";
String ticketId = "111";
String ticketAccessType = "OTHER";
String locator = "D02KWWKS029F"
String redemptionCode = "123456789"
String json = String.format("""
[
{
"ticketOptionId": "%s",
"showId": "%s",
"externalReferenceEventId": "%s",
"buyer": "%s",
"ticketId": "%s",
"ticketAccess": {
"type": "%s",
"locator": "%s",
"status": "%s"
"redemptionCode": "%s",
},
"props": {
"seating": {
"row": "A",
"seat": "12",
"section": "VIP",
"door": "North",
"image": "https://example.com/seating-image.png"
}
}
}
]
""", ticketOptionId, showId, externalReferenceEventId, buyer, ticketId, ticketAccessType, locator, status);
RequestBody body = RequestBody.create(JSON, json);
Request request = new Request.Builder()
.url("https://api.mentatickets.com/v1/tickets")
.post(body)
.addHeader("Authorization", "YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
} catch (IOException e) {
e.printStackTrace();
}
A continuación les brindamos un ejemplo de cómo notificar a menta de la emisión de un ticket, con datos ficticios, utilizando PHP.
<?php
$url = "https://api.mentatickets.com/v1/tickets";
$headers = array(
"Authorization: YOUR_API_KEY",
"Content-Type: application/json",
);
$data = array(
array(
"ticketOptionId" => "0001",
"showId" => "4726",
"externalReferenceEventId" => "the-lion-king-broadway",
"buyer" => "buyer@emaildomain.com",
"ticketId" => "111",
"ticketAccess" => array(
"type" => "OTHER",
"locator" => "D02KWWKS029F",
"redemptionCode" => "123456789",
),
"props" => array(
"seating" => array(
"row" => "A",
"seat" => "12",
"section" => "VIP",
"door" => "North",
"image" => "https://example.com/seating-image.png"
)
)
)
);
$json_data = json_encode($data);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Respuesta JSON
{
"status": 200,
"data": [{TICKETDATA}],
"errors": null
}
Para mas información detallada de Ticket y Seating diríjase a la sección de datos de ticket