Skip to content

2.1 Request Physical Tid Endpoint

The Request physical tid endpoint is used to request a physical terminal ID (Tid) to a POS device via POST request.

A JSON payload containing an agreement id and a terminal id. The payload is posted and a physical tid will be selected from a pool of tids and assuming it is available for assignment, it will be assigned accordingly.

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);

    string jsonPayload = "see JSON payload below";

    var content = new StringContent(jsonPayload, Encoding.UTF8, "application/json");
    var response = httpClient.PostAsync("physicaltid",content);

}
var axios = require('axios');
var data = JSON.stringify({see payload below});

var config = {
    method: 'post',
    url: 'https://boarding.uat.valitor.com/physicaltidapi/physicaltid',
    headers: {
        'api-version': '1.0',
        'apiKey': apiKey,
        'Content-Type': 'application/json'
    },
    data: data
};
axios(config)
    .then(function (response) {
        console.log(JSON.stringify(response.data));
    })
    .catch(function (error) {
        console.log(error);
    });
import http.client
import json

conn = http.client.HTTPSConnection("https://boarding.uat.valitor.com")
payload = json.dumps({"see JSON payload below"})
headers = {
    'api-version': '2.0',
    'apiKey': apiKey,
    'Content-Type': 'application/json'
}
conn.request("POST", "/physicaltidapi/physicaltid", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Request payloads

Example request payload

Below is an example on how the JSON request payload might look like with the two required properties, agreementId and terminalId.

{
  "agreementId": 100994,
  "terminalId": 10001019
}

Reponses

Example response

The below example response (201 Created) will be returned if a physical terminal ID (Tid) was successfully added to agreementId and terminalId

201 Created

{
    "data": {
        "physicalTid": "34550118"
    },
    "success": true,
    "statusCode": 201,
    "message": "Created"
}