This command will get a number of details about a given ticket.
https://api.textlocal.in/get_ticket_details/
<?php // Account details $apiKey = urlencode('Your apiKey'); // Survey details $ticket_id = 1234; // Prepare data for POST request $data = array('apikey' = $api_key, 'ticket_id' = $ticket_id); // Send the POST request with cURL $ch = curl_init('https://api.textlocal.in/get_ticket_details/'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); // Process your response here echo $response; ?>
<?php // Account details $api_key = urlencode('Your API key'); // Survey details $ticket_id = 1234; // Prepare data for POST request $data = 'apikey=' . $api_key . '&ticket_id=' . $ticket_id; // Send the GET request with cURL $ch = curl_init('https://api.textlocal.in/get_ticket_details/?' . $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); // Process your response here echo $response;
Sorry, we do not have an example for Class in the language you have chosen.
ticket_id | The ID of the ticket, found using get_tickets |
---|---|
Login Parameters (Additional Information) | |
apiKey | You can create these in your Messenger Control Panel (click here) for each application, and limit the usage of them by host IP Address. |
{ "ticket": { "group_id": 1234, "field": "Custom1", "type": "ticket", "name": "Coffee Promo", "complete": true, "deleted": false, "created": "2367-02-15 13:09:35", "expiry": -1, "web_page_created": true, "url_ref": "a1b2", "codes": { "prefix": "", "suffix": "", "numbers": false, "letters": true, "overwrite": true, "remaining": 11881375 }, "methods": { "web_page": true, "passbook": true, "qr_code": true, "barcode": true }, "web_page": { "page_title": "John's Bar", "additional_text": "A free Raktajino when redeemed at John's Bar.", "additional_footer_text": "Terms and conditions apply.", "image_url": "https://tx.gl/r/1r0S" } }, "status": "success" }
<?xml version="1.0" encoding="UTF-8"?> <response> <ticket> <group_id>1234</group_id> <field>Custom2</field> <type>ticket</type> <name>Coffee Promo</name> <complete>1</complete> <deleted></deleted> <created>2367-02-15 13:09:35</created> <expiry>-1</expiry> <web_page_created>1</web_page_created> <url_ref>a1b2</url_ref> <codes> <prefix></prefix> <suffix></suffix> <numbers></numbers> <letters>1</letters> <overwrite></overwrite> <remaining>11881375</remaining> </codes> <methods> <web_page>1</web_page> <passbook>1</passbook> <qr_code>1</qr_code> <barcode>1</barcode> </methods> <web_page> <page_title>John's Bar</page_title> <additional_text>A free Raktajino when redeemed at John's Bar.</additional_text> <additional_footer_text>Terms and conditions apply.</additional_footer_text> <image_url>https://tx.gl/r/1r0S</image_url> </web_page> </ticket> <status>success</status> </response>
Error Codes | |
221 | No ticket ID specified |
---|---|
220 | Invalid ticket ID specified |