2.2 Clear Physical Tid Endpoint
The Clear physical tid endpoint is used to clear a physical terminal ID (Tid) from a POS device via POST request.
There is no JSON payload needed for this endpoint, just put the physical terminal ID (Tid) as a path parameter in the url.
Example on UAT:
https://boarding.uat.valitor.com/physicaltidapi/physicaltid/clear/00000010
Note: The physical terminal ID (Tid) must be exactly 8 characters and leading with zero if needed.
Example request
The API Documentation explains what is required in most of the fields
Below are code examples on how you can implement the POST method for physical tids:
using (var httpClient = new HttpClient())
{
httpClient.BaseAddress = new Uri("https://boarding.uat.valitor.com/physicaltidapi/");
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
// The Api key will be provided by Rapyd's implementation specialist
httpClient.DefaultRequestHeaders.Add("Apikey", apiKey);
// The Api version should be the latest version by default - see API documentation for more info
httpClient.DefaultRequestHeaders.Add("api-version", apiVersion);
var physicalTidToClear = "00000010";
var response = httpClient.PostAsync("physicaltid/clear/{physicalTidToClear}", null);
}
var axios = require('axios');
const apiKey = 'your-api-key';
const apiVersion = '1.0';
const physicalTidToClear = '00000010';
const baseURL = 'https://boarding.uat.valitor.com/physicaltidapi/';
const headers = {
'Apikey': apiKey,
'api-version': apiVersion,
};
axios.post(`${baseURL}physicaltid/clear/${physicalTidToClear}`, null, { headers })
.then(response => {
console.log('Request successful:', response.data);
})
.catch(error => {
console.error('Error:', error);
});
import http.client
api_key = 'your-api-key'
api_version = '1.0'
physical_tid_to_clear = '00000010'
# Define the connection to the server
conn = http.client.HTTPSConnection('boarding.uat.valitor.com')
# Set the headers
headers = {
'Apikey': api_key,
'api-version': api_version,
}
# Define the request URL with the path parameter
url = f'/physicaltidapi/physicaltid/clear/{physical_tid_to_clear}'
# Send the POST request
conn.request('POST', url, headers=headers)
# Get the response
response = conn.getresponse()
if response.status == 200:
print('Request successful')
data = response.read()
print(data.decode('utf-8')) # Print the response data
else:
print(f'Error: {response.status}, {response.reason}')
# Close the connection
conn.close()
Reponses
Example response
The below example response (20O Ok) will be returned if physical terminal ID (Tid) was successfully cleared.
200 Ok