List by a bulk sms ID
List of all requests by a SMS Bulk ID
Authorizations
Seção intitulada “Authorizations ”Parameters
Seção intitulada “ Parameters ”Path Parameters
Seção intitulada “Path Parameters ”Unique entity UUID
Bulk ID
Query Parameters
Seção intitulada “Query Parameters ”Current page
Sort order direction (ascending or descending)
Sort a list by ‘date’ property
Partial case-insensitive text filter by a IP address
Partial case-insensitive text filter by a destination URL
Partial filter short links by user agent (partial match)
Código do país
Exact filter entities by the country code
Exact filter entities by the country codes
Partial case-insensitive text filter by a referer
Data da solicitação de link curto
Exact filter short link requests by exact date
Exact filter short link requests by date (array of values)
Tipo da solicitação de link curto
Exact filter short links by type (exact match)
Range filter short links by type (array of values)
Partial case-insensitive text filter by a browser name
Partial case-insensitive text filter by a operation system name
Partial case-insensitive text filter by a operation system version
Partial case-insensitive text filter by a software type
Partial case-insensitive text filter by a hardware type
Data da solicitação de link curto
Range filter short link requests by date range
Data da solicitação de link curto
Filtrar solicitações de links curtos por data maior que
Data da solicitação de link curto
Filtrar solicitações de links curtos por data maior ou igual
Data da solicitação de link curto
Filtrar solicitações de links curtos por data menor que
Data da solicitação de link curto
Filtrar solicitações de links curtos por data menor ou igual
Responses
Seção intitulada “ Responses ”Short_link_requests collection
object
Short link campaigns
object
JSON-LD ID
JSON-LD type
Identificador único da solicitação de link curto
Endereço IP da solicitação de link curto
Agente do usuário da solicitação de link curto
URL da solicitação de link curto
Data da solicitação de link curto
Código do país
Referenciador da solicitação de link curto
Link curto associado à solicitação
Tipo da solicitação de link curto
Navegador usado para a solicitação de link curto
Versão do navegador usada para a solicitação de link curto
Sistema operacional usado para a solicitação de link curto
Versão do sistema operacional usada para a solicitação de link curto
Tipo de software usado para a solicitação de link curto
Tipo de hardware usado para a solicitação de link curto
Pagination links for navigating the collection
object
Search and filtering template for the collection
object
object
Example
{ "member": [ { "@context": { "hydra": "http://www.w3.org/ns/hydra/core#" }, "ip": "192.168.1.1", "country": "US", "short_link": "https://example.com/", "type": 0 } ], "hydra:view": { "@id": "string", "@type": "string", "hydra:first": "string", "hydra:last": "string", "hydra:previous": "string", "hydra:next": "string" }}Short link campaigns
object
Identificador único da solicitação de link curto
Endereço IP da solicitação de link curto
Agente do usuário da solicitação de link curto
URL da solicitação de link curto
Data da solicitação de link curto
Código do país
Referenciador da solicitação de link curto
Link curto associado à solicitação
Tipo da solicitação de link curto
Navegador usado para a solicitação de link curto
Versão do navegador usada para a solicitação de link curto
Sistema operacional usado para a solicitação de link curto
Versão do sistema operacional usada para a solicitação de link curto
Tipo de software usado para a solicitação de link curto
Tipo de hardware usado para a solicitação de link curto
Example
[ { "ip": "192.168.1.1", "country": "US", "short_link": "https://example.com/", "type": 0 }]Invalid input
Client ID or API key isn’t active or invalid!
Account isn’t activated. Please wait or contact to support!
Resource not found
O endereço IP foi bloqueado temporariamente, pois durante um curto período de tempo foram enviadas várias solicitações com credenciais inválidas. Aguarde e tente mais tarde.
Code Samples
#!/usr/bin/env bashcurl -X GET https://api.lox24.eu/bulks/{bulk_id_here}/requests \ -H 'X-LOX24-AUTH-TOKEN: 1234567:e3f3a759b6677959b6ebfcxxxxxxxxxx'using Newtonsoft.Json.Linq;using System;using System.IO;using System.Net;using System.Text;
namespace Lox24.Api{ class client { static void Main() { string key = "1234567:e3f3a759b6677959b6ebfcxxxxxxxxxx"; string bulk = "bulk_id_here"; string url = "https://api.lox24.eu/bulks/" + bulk + "/requests?page=1";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(url); httpWebRequest.ReadWriteTimeout = 100000; httpWebRequest.Accept = "application/json"; // or "application/ld+json" httpWebRequest.Method = "GET"; //httpWebRequest.KeepAlive = true; httpWebRequest.Headers.Add("X-LOX24-AUTH-TOKEN", key); httpWebRequest.Credentials = CredentialCache.DefaultNetworkCredentials;
try { using (HttpWebResponse resp = (HttpWebResponse)httpWebRequest.GetResponse()) { int respCode = (int)resp.StatusCode; Console.WriteLine("Success:{0} {1}", respCode, "collection response");
Stream respStream = resp.GetResponseStream(); using (StreamReader sr = new StreamReader(respStream, Encoding.UTF8)) { string responseText = sr.ReadToEnd(); Console.WriteLine("responseText : {0}", responseText); } } } catch (System.Net.WebException ex) { var webResponse = ex.Response as System.Net.HttpWebResponse; Console.WriteLine("Error:{0}", webResponse.StatusCode);
switch (webResponse.StatusCode) { case HttpStatusCode.Unauthorized: // 401 Console.WriteLine("Error:401 Client ID or API key isn't active or invalid!"); break; case HttpStatusCode.Forbidden: // 403 Console.WriteLine("Error:403 Account isn't activated. Please wait or contact to support!"); break; case HttpStatusCode.InternalServerError: // 500 case HttpStatusCode.BadGateway: //502 case HttpStatusCode.ServiceUnavailable: // 503 case HttpStatusCode.GatewayTimeout: // 504 Console.WriteLine("System error! Please contact to LOX24 support!"); break; } } } }package main
import ( "fmt" "io/ioutil" "log" "net/http")
func main() {
const Method = "GET" const URL = "https://api.lox24.eu/bulks/{bulk_id_here}/requests?page=1" const Token = "1234567:e3f3a759b6677959b6ebfcxxxxxxxxxx"
client := &http.Client{}
req, err := http.NewRequest(Method, URL, nil) if err != nil { log.Fatal(err) }
req.Header.Add("X-LOX24-AUTH-TOKEN", Token) req.Header.Add("Accept", "application/json")
res, err := client.Do(req) if err != nil { log.Fatal(err) }
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body) if err != nil { log.Fatal(err) }
switch res.StatusCode { case 200: fmt.Println((string(body))) case 401: fmt.Println("Error: code = 401 - Client ID or API key isn't active or invalid!") case 403: fmt.Println("Error: code = 403 - Account isn't activated. Please wait or contact to support!") default: fmt.Printf("Error: code = %d\n", res.StatusCode) }}package eu.lox24.doc.sms_clicks;
import java.io.IOException;import java.net.HttpURLConnection;import java.net.URI;import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;import java.time.Duration;
public class GetCollection {
public static void main(String[] args) {
var key = "1234567:e3f3a759b6677959b6ebfcxxxxxxxxxx"; var url = "https://api.lox24.eu/bulks/{bulk_id_here}/requests?page=1";
var httpRequest = HttpRequest.newBuilder(URI.create(url)) .timeout(Duration.ofMillis(100000)) .setHeader("Accept", "application/json") // or application/ld+json .setHeader("X-LOX24-AUTH-TOKEN", key) .GET() .build();
var client = HttpClient.newBuilder() .version(HttpClient.Version.HTTP_1_1) // Http 1.1 clients are kept alive be default .build();
try { var httpResponse = client.send(httpRequest, HttpResponse.BodyHandlers.ofString());
if (httpResponse.statusCode() == HttpURLConnection.HTTP_OK) { System.out.println("Success:" + httpResponse.statusCode() + " collection response"); System.out.println("Response text : \n" + httpResponse.body()); } else { System.out.println("Error: something went wrong, code(" + httpResponse.statusCode() + ")");
switch (httpResponse.statusCode()) {
case HttpURLConnection.HTTP_UNAUTHORIZED: // 401 System.out.println("Error:401 Client ID or API key isn't active or invalid!"); break; case HttpURLConnection.HTTP_FORBIDDEN: // 403 System.out.println("Error:403 Account isn't activated. Please wait or contact to support!"); break; case HttpURLConnection.HTTP_INTERNAL_ERROR: // 500 case HttpURLConnection.HTTP_BAD_GATEWAY: //502 case HttpURLConnection.HTTP_UNAVAILABLE: // 503 case HttpURLConnection.HTTP_GATEWAY_TIMEOUT: // 504 System.out.println("System error! Please contact to LOX24 support!"); break; }
}
} catch (IOException | InterruptedException e) { e.printStackTrace(); } }}const host = 'api.lox24.eu';const token = "1234567:e3f3a759b6677959b6ebfcxxxxxxxxxx";
var query = "page=1";
const https = require('https');const options = { hostname: host, path: '/bulks/{bulk_id_here}/requests?' + query, method: 'GET', headers: { 'Accept': 'application/json', 'X-LOX24-AUTH-TOKEN': token }}
const req = https.request(options, res => { if (res.statusCode == 200) { console.log('Success: code = 200 - list response'); res.on('data', d => { process.stdout.write(d) }) } else if (res.statusCode == 401) { console.log("Error: code = 401 - Client ID or API key isn't active or invalid!"); } else if (res.statusCode == 403) { console.log("Error: code = 403 - Account isn't activated. Please wait or contact to support!"); } else { console.log("Error: code = " + res.statusCode ); }
});
req.on('error', error => { console.error(error)});
req.end();<?php
$token = '1234567:e3f3a759b6677959b6ebfcxxxxxxxxxx';$bulkId = 'bulk_id';
$uri = "https://api.lox24.eu/bulks/$bulkId/requests";
$filters = [ 'page' => 1,];
$uri .= $filters ? '?' . http_build_query($filters) : '';$curl = curl_init();
curl_setopt_array($curl, [ CURLOPT_URL => $uri, CURLOPT_HTTPHEADER => [ "X-LOX24-AUTH-TOKEN: $token", 'Accept: application/json', // or application/ld+json ], CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 20, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,]);
$response = curl_exec($curl);$code = curl_getinfo($curl, CURLINFO_HTTP_CODE);curl_close($curl);
$data = json_decode($response, JSON_OBJECT_AS_ARRAY);
if(200 === $code) { echo 'Success: response data = ' . var_export($data, true);} else { echo "Error: code = $code, data = " . var_export($data, true);}import jsonimport requests
token = "1234567:e3f3a759b6677959b6ebfcxxxxxxxxxx"bulkId = "bulk_id"
url = "https://api.lox24.eu/bulks/{bulk_id}/requests?page=1"
headers = { 'Accept': 'application/json', # or application/ld+json 'X-LOX24-AUTH-TOKEN': token,}
try: # timeout is 100 seconds res = requests.get(url, headers=headers, timeout=100) if res.status_code != 200: res.raise_for_status() else: print(f'Success: code = {res.status_code} - items collection response') print("Response: ", json.dumps(res.json(), indent=4))
except requests.HTTPError: if res.status_code == 401: print("Error: code = 401 - Client ID or API key isn't active or invalid!") elif res.status_code == 403: print("Error: code = 403 - Account isn't activated. Please wait or contact to support!") elif res.status_code in (500, 502, 503, 504): print("System error! Please contact to LOX24 support!") else: print(f"Error: code {res.status_code}") print(json.dumps(res.json(), indent=4))