curl --request POST \
--url https://api.example.com/terminal-management/terminals \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-profile-id: <x-profile-id>' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"terminal_name": "Store 123 Terminal 1",
"merchant_id": "mer_1234567890",
"profile_id": "pro_1234567890",
"terminal_type": "pos",
"tms_id": "tms_1234567890",
"terminal_id_from_tms": "TMS12345",
"serial_number": "SN12345678",
"location": {
"address": "123 Main St",
"city": "San Francisco",
"state": "CA",
"country": "US",
"postal_code": "94105"
},
"capabilities": {
"emv": true,
"contactless": true,
"magstripe": true,
"pin": true
},
"metadata": {}
}
'import requests
url = "https://api.example.com/terminal-management/terminals"
payload = {
"terminal_name": "Store 123 Terminal 1",
"merchant_id": "mer_1234567890",
"profile_id": "pro_1234567890",
"terminal_type": "pos",
"tms_id": "tms_1234567890",
"terminal_id_from_tms": "TMS12345",
"serial_number": "SN12345678",
"location": {
"address": "123 Main St",
"city": "San Francisco",
"state": "CA",
"country": "US",
"postal_code": "94105"
},
"capabilities": {
"emv": True,
"contactless": True,
"magstripe": True,
"pin": True
},
"metadata": {}
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"x-profile-id": "<x-profile-id>",
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
'x-profile-id': '<x-profile-id>',
'x-api-key': '<x-api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
terminal_name: 'Store 123 Terminal 1',
merchant_id: 'mer_1234567890',
profile_id: 'pro_1234567890',
terminal_type: 'pos',
tms_id: 'tms_1234567890',
terminal_id_from_tms: 'TMS12345',
serial_number: 'SN12345678',
location: {
address: '123 Main St',
city: 'San Francisco',
state: 'CA',
country: 'US',
postal_code: '94105'
},
capabilities: {emv: true, contactless: true, magstripe: true, pin: true},
metadata: {}
})
};
fetch('https://api.example.com/terminal-management/terminals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/terminal-management/terminals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'terminal_name' => 'Store 123 Terminal 1',
'merchant_id' => 'mer_1234567890',
'profile_id' => 'pro_1234567890',
'terminal_type' => 'pos',
'tms_id' => 'tms_1234567890',
'terminal_id_from_tms' => 'TMS12345',
'serial_number' => 'SN12345678',
'location' => [
'address' => '123 Main St',
'city' => 'San Francisco',
'state' => 'CA',
'country' => 'US',
'postal_code' => '94105'
],
'capabilities' => [
'emv' => true,
'contactless' => true,
'magstripe' => true,
'pin' => true
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>",
"x-profile-id: <x-profile-id>",
"x-tenant-id: <x-tenant-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/terminal-management/terminals"
payload := strings.NewReader("{\n \"terminal_name\": \"Store 123 Terminal 1\",\n \"merchant_id\": \"mer_1234567890\",\n \"profile_id\": \"pro_1234567890\",\n \"terminal_type\": \"pos\",\n \"tms_id\": \"tms_1234567890\",\n \"terminal_id_from_tms\": \"TMS12345\",\n \"serial_number\": \"SN12345678\",\n \"location\": {\n \"address\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"postal_code\": \"94105\"\n },\n \"capabilities\": {\n \"emv\": true,\n \"contactless\": true,\n \"magstripe\": true,\n \"pin\": true\n },\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("x-profile-id", "<x-profile-id>")
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/terminal-management/terminals")
.header("x-tenant-id", "<x-tenant-id>")
.header("x-profile-id", "<x-profile-id>")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"terminal_name\": \"Store 123 Terminal 1\",\n \"merchant_id\": \"mer_1234567890\",\n \"profile_id\": \"pro_1234567890\",\n \"terminal_type\": \"pos\",\n \"tms_id\": \"tms_1234567890\",\n \"terminal_id_from_tms\": \"TMS12345\",\n \"serial_number\": \"SN12345678\",\n \"location\": {\n \"address\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"postal_code\": \"94105\"\n },\n \"capabilities\": {\n \"emv\": true,\n \"contactless\": true,\n \"magstripe\": true,\n \"pin\": true\n },\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/terminal-management/terminals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["x-profile-id"] = '<x-profile-id>'
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"terminal_name\": \"Store 123 Terminal 1\",\n \"merchant_id\": \"mer_1234567890\",\n \"profile_id\": \"pro_1234567890\",\n \"terminal_type\": \"pos\",\n \"tms_id\": \"tms_1234567890\",\n \"terminal_id_from_tms\": \"TMS12345\",\n \"serial_number\": \"SN12345678\",\n \"location\": {\n \"address\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"postal_code\": \"94105\"\n },\n \"capabilities\": {\n \"emv\": true,\n \"contactless\": true,\n \"magstripe\": true,\n \"pin\": true\n },\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"terminal_id": "term_1234567890",
"terminal_name": "Store 123 Terminal 1",
"merchant_id": "mer_1234567890",
"profile_id": "pro_1234567890",
"organization_id": "org_1234567890",
"tms_id": "tms_1234567890",
"terminal_id_from_tms": "TMS12345",
"serial_number": "SN12345678",
"terminal_type": "pos",
"status": "active",
"last_seen": "2023-11-07T05:31:56Z",
"location": {
"address": "123 Main St",
"city": "San Francisco",
"state": "CA",
"country": "US",
"postal_code": "94105"
},
"capabilities": {
"emv": true,
"contactless": true,
"magstripe": true,
"pin": true
},
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
}Terminal-Create
Create a new terminal for a merchant.
Before creating the Terminal account, it is mandatory to create a merchant.
curl --request POST \
--url https://api.example.com/terminal-management/terminals \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-profile-id: <x-profile-id>' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"terminal_name": "Store 123 Terminal 1",
"merchant_id": "mer_1234567890",
"profile_id": "pro_1234567890",
"terminal_type": "pos",
"tms_id": "tms_1234567890",
"terminal_id_from_tms": "TMS12345",
"serial_number": "SN12345678",
"location": {
"address": "123 Main St",
"city": "San Francisco",
"state": "CA",
"country": "US",
"postal_code": "94105"
},
"capabilities": {
"emv": true,
"contactless": true,
"magstripe": true,
"pin": true
},
"metadata": {}
}
'import requests
url = "https://api.example.com/terminal-management/terminals"
payload = {
"terminal_name": "Store 123 Terminal 1",
"merchant_id": "mer_1234567890",
"profile_id": "pro_1234567890",
"terminal_type": "pos",
"tms_id": "tms_1234567890",
"terminal_id_from_tms": "TMS12345",
"serial_number": "SN12345678",
"location": {
"address": "123 Main St",
"city": "San Francisco",
"state": "CA",
"country": "US",
"postal_code": "94105"
},
"capabilities": {
"emv": True,
"contactless": True,
"magstripe": True,
"pin": True
},
"metadata": {}
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"x-profile-id": "<x-profile-id>",
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
'x-profile-id': '<x-profile-id>',
'x-api-key': '<x-api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
terminal_name: 'Store 123 Terminal 1',
merchant_id: 'mer_1234567890',
profile_id: 'pro_1234567890',
terminal_type: 'pos',
tms_id: 'tms_1234567890',
terminal_id_from_tms: 'TMS12345',
serial_number: 'SN12345678',
location: {
address: '123 Main St',
city: 'San Francisco',
state: 'CA',
country: 'US',
postal_code: '94105'
},
capabilities: {emv: true, contactless: true, magstripe: true, pin: true},
metadata: {}
})
};
fetch('https://api.example.com/terminal-management/terminals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/terminal-management/terminals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'terminal_name' => 'Store 123 Terminal 1',
'merchant_id' => 'mer_1234567890',
'profile_id' => 'pro_1234567890',
'terminal_type' => 'pos',
'tms_id' => 'tms_1234567890',
'terminal_id_from_tms' => 'TMS12345',
'serial_number' => 'SN12345678',
'location' => [
'address' => '123 Main St',
'city' => 'San Francisco',
'state' => 'CA',
'country' => 'US',
'postal_code' => '94105'
],
'capabilities' => [
'emv' => true,
'contactless' => true,
'magstripe' => true,
'pin' => true
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>",
"x-profile-id: <x-profile-id>",
"x-tenant-id: <x-tenant-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/terminal-management/terminals"
payload := strings.NewReader("{\n \"terminal_name\": \"Store 123 Terminal 1\",\n \"merchant_id\": \"mer_1234567890\",\n \"profile_id\": \"pro_1234567890\",\n \"terminal_type\": \"pos\",\n \"tms_id\": \"tms_1234567890\",\n \"terminal_id_from_tms\": \"TMS12345\",\n \"serial_number\": \"SN12345678\",\n \"location\": {\n \"address\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"postal_code\": \"94105\"\n },\n \"capabilities\": {\n \"emv\": true,\n \"contactless\": true,\n \"magstripe\": true,\n \"pin\": true\n },\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("x-profile-id", "<x-profile-id>")
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/terminal-management/terminals")
.header("x-tenant-id", "<x-tenant-id>")
.header("x-profile-id", "<x-profile-id>")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"terminal_name\": \"Store 123 Terminal 1\",\n \"merchant_id\": \"mer_1234567890\",\n \"profile_id\": \"pro_1234567890\",\n \"terminal_type\": \"pos\",\n \"tms_id\": \"tms_1234567890\",\n \"terminal_id_from_tms\": \"TMS12345\",\n \"serial_number\": \"SN12345678\",\n \"location\": {\n \"address\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"postal_code\": \"94105\"\n },\n \"capabilities\": {\n \"emv\": true,\n \"contactless\": true,\n \"magstripe\": true,\n \"pin\": true\n },\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/terminal-management/terminals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["x-profile-id"] = '<x-profile-id>'
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"terminal_name\": \"Store 123 Terminal 1\",\n \"merchant_id\": \"mer_1234567890\",\n \"profile_id\": \"pro_1234567890\",\n \"terminal_type\": \"pos\",\n \"tms_id\": \"tms_1234567890\",\n \"terminal_id_from_tms\": \"TMS12345\",\n \"serial_number\": \"SN12345678\",\n \"location\": {\n \"address\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"postal_code\": \"94105\"\n },\n \"capabilities\": {\n \"emv\": true,\n \"contactless\": true,\n \"magstripe\": true,\n \"pin\": true\n },\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"terminal_id": "term_1234567890",
"terminal_name": "Store 123 Terminal 1",
"merchant_id": "mer_1234567890",
"profile_id": "pro_1234567890",
"organization_id": "org_1234567890",
"tms_id": "tms_1234567890",
"terminal_id_from_tms": "TMS12345",
"serial_number": "SN12345678",
"terminal_type": "pos",
"status": "active",
"last_seen": "2023-11-07T05:31:56Z",
"location": {
"address": "123 Main St",
"city": "San Francisco",
"state": "CA",
"country": "US",
"postal_code": "94105"
},
"capabilities": {
"emv": true,
"contactless": true,
"magstripe": true,
"pin": true
},
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
}Body
Name of the terminal
"Store 123 Terminal 1"
Merchant ID associated with the terminal
"mer_1234567890"
Profile ID associated with the terminal
"pro_1234567890"
Type of terminal
pos, mpos, standalone "pos"
TMS provider ID associated with the terminal
"tms_1234567890"
Terminal ID from the TMS provider
"TMS12345"
Serial number of the terminal
"SN12345678"
Location details of the terminal
Show child attributes
Show child attributes
Capabilities of the terminal
Show child attributes
Show child attributes
Additional metadata for the terminal
Response
Terminal created successfully
Unique identifier for the terminal
"term_1234567890"
Name of the terminal
"Store 123 Terminal 1"
Merchant ID associated with the terminal
"mer_1234567890"
Profile ID associated with the terminal
"pro_1234567890"
Organization ID associated with the terminal
"org_1234567890"
TMS provider ID associated with the terminal
"tms_1234567890"
Terminal ID from the TMS provider
"TMS12345"
Serial number of the terminal
"SN12345678"
Type of terminal
pos, mpos, standalone "pos"
Status of the terminal
active, inactive, pending "active"
Timestamp when the terminal was last seen
Location details of the terminal
Show child attributes
Show child attributes
Capabilities of the terminal
Show child attributes
Show child attributes
Additional metadata for the terminal
Timestamp when the terminal was created
Timestamp when the terminal was last modified