Get all Callback Logs
Callback Logs Endpoint
Retrieve details of all Callbacklogs.
https://sandbox.tickpay.com/api/v1/callbacklogs
Request
To access this endpoint, you need to provide a valid access token in the Authorization header.
- cURL
- C#
- JavaScript
- Python
- Java
- PHP
Use the following cURL command to retrieve details of all Callbacklogs:
curl -X 'GET' \
'https://sandbox.tickpay.com/api/v1/callbackLogs?status=SUCCESS&pageNumber=1&pageSize=10' \
-H 'accept: application/json' \
-H 'Authorization: Bearer your_access_token'
Use the following csharp command to retrieve details of all Callbacklogs:
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
string url = "https://sandbox.tickpay.com/api/v1/callbackLogs?status=SUCCESS&pageNumber=1&pageSize=10";
string accessToken = "your_access_token";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("accept", "application/json");
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
HttpResponseMessage response = await client.GetAsync(url);
if (response.IsSuccessStatusCode)
{
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine("Response data:");
Console.WriteLine(responseBody);
}
else
{
Console.WriteLine($"Error fetching data: {response.StatusCode}");
}
}
}
}
Use the following javascript command to retrieve details of all Callbacklogs:
const fetch = require('node-fetch');
const url = 'https://sandbox.tickpay.com/api/v1/callbackLogs?status=SUCCESS&pageNumber=1&pageSize=10';
const accessToken = 'your_access_token';
fetch(url, {
method: 'GET',
headers: {
'accept': 'application/json',
'Authorization': `Bearer ${accessToken}`
}
})
.then(response => response.json())
.then(data => {
console.log('Response data:', data);
})
.catch(error => {
console.error('Error fetching data:', error);
});
Use the following python command to retrieve details of all Callbacklogs:
import requests
url = 'https://sandbox.tickpay.com/api/v1/callbackLogs?status=SUCCESS&pageNumber=1&pageSize=10'
access_token = 'your_access_token'
headers = {
'accept': 'application/json',
'Authorization': f'Bearer {access_token}'
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
data = response.json()
print('Response data:')
print(data)
else:
print(f'Error fetching data: {response.status_code}')
Use the following java command to retrieve details of all Callbacklogs:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Main {
public static void main(String[] args) {
String url = "https://sandbox.tickpay.com/api/v1/callbackLogs?status=SUCCESS&pageNumber=1&pageSize=10";
String accessToken = "your_access_token";
try {
URL apiUrl = new URL(url);
HttpURLConnection connection = (HttpURLConnection) apiUrl.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("accept", "application/json");
connection.setRequestProperty("Authorization", "Bearer " + accessToken);
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println("Response data:");
System.out.println(response.toString());
} else {
System.out.println("Error fetching data: " + responseCode);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
Use the following php command to retrieve details of all Callbacklogs:
<?php
$endpoint = 'https://sandbox.tickpay.com/api/v1/callbackLogs?status=SUCCESS&pageNumber=1&pageSize=10';
$access_token = 'your_access_token';
$ch = curl_init($endpoint);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'accept: application/json',
'Authorization: Bearer ' . $access_token,
]);
$response = curl_exec($ch);
curl_close($ch);
?>
Query parameters
| Parameter | Description | Required |
|---|---|---|
operation | Status of the callback call. Accepted values | false |
pageSize | Number of items to include per page. | true |
pageNumber | The page number to retrieve. | true |
Accepted values
| Parameter | Description |
|---|---|
operation | SUCCESS, ERROR |
Response
The response will contain a data object, along with additional information:
{
"messageError": null,
"success": true,
"pageNumber": 1,
"pageSize": 10,
"totalItems": 0,
"totalPages": 0,
"items": []
}
Response Properties
| Parameter | Description | Default Value |
|---|---|---|
messageError | Error message. | null |
success | Indicates whether the request was successful. | true |
pageNumber | Indicates the current page number. | 0 |
pageSize | Indicates the page size. | 0 |
totalItems | Total number of items. | 0 |
totalPages | Total number of pages. | 0 |
items Properties | All logs searched | [] |