Create
curl --request POST \
--url https://api.example.com/v1/terminals \
--header 'Content-Type: application/json' \
--data '
{
"nickname": "<string>",
"registration_code": "<string>",
"device_id": "<string>",
"configuration": {
"prompt_tip": true,
"tip_amounts": [
123
],
"prompt_cvv": true,
"prompt_postal_code": true,
"prompt_amount_confirmation": true,
"prompt_signature": true,
"key_card": true
}
}
'import requests
url = "https://api.example.com/v1/terminals"
payload = {
"nickname": "<string>",
"registration_code": "<string>",
"device_id": "<string>",
"configuration": {
"prompt_tip": True,
"tip_amounts": [123],
"prompt_cvv": True,
"prompt_postal_code": True,
"prompt_amount_confirmation": True,
"prompt_signature": True,
"key_card": True
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
nickname: '<string>',
registration_code: '<string>',
device_id: '<string>',
configuration: {
prompt_tip: true,
tip_amounts: [123],
prompt_cvv: true,
prompt_postal_code: true,
prompt_amount_confirmation: true,
prompt_signature: true,
key_card: true
}
})
};
fetch('https://api.example.com/v1/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/v1/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([
'nickname' => '<string>',
'registration_code' => '<string>',
'device_id' => '<string>',
'configuration' => [
'prompt_tip' => true,
'tip_amounts' => [
123
],
'prompt_cvv' => true,
'prompt_postal_code' => true,
'prompt_amount_confirmation' => true,
'prompt_signature' => true,
'key_card' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/v1/terminals"
payload := strings.NewReader("{\n \"nickname\": \"<string>\",\n \"registration_code\": \"<string>\",\n \"device_id\": \"<string>\",\n \"configuration\": {\n \"prompt_tip\": true,\n \"tip_amounts\": [\n 123\n ],\n \"prompt_cvv\": true,\n \"prompt_postal_code\": true,\n \"prompt_amount_confirmation\": true,\n \"prompt_signature\": true,\n \"key_card\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/terminals")
.header("Content-Type", "application/json")
.body("{\n \"nickname\": \"<string>\",\n \"registration_code\": \"<string>\",\n \"device_id\": \"<string>\",\n \"configuration\": {\n \"prompt_tip\": true,\n \"tip_amounts\": [\n 123\n ],\n \"prompt_cvv\": true,\n \"prompt_postal_code\": true,\n \"prompt_amount_confirmation\": true,\n \"prompt_signature\": true,\n \"key_card\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/terminals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"nickname\": \"<string>\",\n \"registration_code\": \"<string>\",\n \"device_id\": \"<string>\",\n \"configuration\": {\n \"prompt_tip\": true,\n \"tip_amounts\": [\n 123\n ],\n \"prompt_cvv\": true,\n \"prompt_postal_code\": true,\n \"prompt_amount_confirmation\": true,\n \"prompt_signature\": true,\n \"key_card\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"terminals": [
{
"id": "<string>",
"make": "<string>",
"model": "<string>",
"serial_number": "<string>",
"nickname": "<string>",
"status": "<string>"
}
],
"request_id": "000000000000000000000",
"errors": [
{
"type": "<string>",
"message": null
}
]
}{
"errors": [
{
"type": "<string>",
"message": null
}
],
"request_id": "000000000000000000000"
}Terminals
Create
Create a new terminal.
Sample request:
POST v1/terminals/
{
"nickname":"NICKNAME",
"registration_code":"******"
}
POST
/
v1
/
terminals
Create
curl --request POST \
--url https://api.example.com/v1/terminals \
--header 'Content-Type: application/json' \
--data '
{
"nickname": "<string>",
"registration_code": "<string>",
"device_id": "<string>",
"configuration": {
"prompt_tip": true,
"tip_amounts": [
123
],
"prompt_cvv": true,
"prompt_postal_code": true,
"prompt_amount_confirmation": true,
"prompt_signature": true,
"key_card": true
}
}
'import requests
url = "https://api.example.com/v1/terminals"
payload = {
"nickname": "<string>",
"registration_code": "<string>",
"device_id": "<string>",
"configuration": {
"prompt_tip": True,
"tip_amounts": [123],
"prompt_cvv": True,
"prompt_postal_code": True,
"prompt_amount_confirmation": True,
"prompt_signature": True,
"key_card": True
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
nickname: '<string>',
registration_code: '<string>',
device_id: '<string>',
configuration: {
prompt_tip: true,
tip_amounts: [123],
prompt_cvv: true,
prompt_postal_code: true,
prompt_amount_confirmation: true,
prompt_signature: true,
key_card: true
}
})
};
fetch('https://api.example.com/v1/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/v1/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([
'nickname' => '<string>',
'registration_code' => '<string>',
'device_id' => '<string>',
'configuration' => [
'prompt_tip' => true,
'tip_amounts' => [
123
],
'prompt_cvv' => true,
'prompt_postal_code' => true,
'prompt_amount_confirmation' => true,
'prompt_signature' => true,
'key_card' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/v1/terminals"
payload := strings.NewReader("{\n \"nickname\": \"<string>\",\n \"registration_code\": \"<string>\",\n \"device_id\": \"<string>\",\n \"configuration\": {\n \"prompt_tip\": true,\n \"tip_amounts\": [\n 123\n ],\n \"prompt_cvv\": true,\n \"prompt_postal_code\": true,\n \"prompt_amount_confirmation\": true,\n \"prompt_signature\": true,\n \"key_card\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/terminals")
.header("Content-Type", "application/json")
.body("{\n \"nickname\": \"<string>\",\n \"registration_code\": \"<string>\",\n \"device_id\": \"<string>\",\n \"configuration\": {\n \"prompt_tip\": true,\n \"tip_amounts\": [\n 123\n ],\n \"prompt_cvv\": true,\n \"prompt_postal_code\": true,\n \"prompt_amount_confirmation\": true,\n \"prompt_signature\": true,\n \"key_card\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/terminals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"nickname\": \"<string>\",\n \"registration_code\": \"<string>\",\n \"device_id\": \"<string>\",\n \"configuration\": {\n \"prompt_tip\": true,\n \"tip_amounts\": [\n 123\n ],\n \"prompt_cvv\": true,\n \"prompt_postal_code\": true,\n \"prompt_amount_confirmation\": true,\n \"prompt_signature\": true,\n \"key_card\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"terminals": [
{
"id": "<string>",
"make": "<string>",
"model": "<string>",
"serial_number": "<string>",
"nickname": "<string>",
"status": "<string>"
}
],
"request_id": "000000000000000000000",
"errors": [
{
"type": "<string>",
"message": null
}
]
}{
"errors": [
{
"type": "<string>",
"message": null
}
],
"request_id": "000000000000000000000"
}Body
application/jsontext/jsonapplication/*+json
Terminal nickname will be displayed on the terminal, and in the console.
Required string length:
1 - 20Pattern:
^[0-9A-Za-z _-]*$Registration code is listed on your powered up terminal. This is a 6 character code.
Minimum string length:
1Device identifier is on the back of your terminal. This is an 8 character code. Required for Canadian processing.
Show child attributes
Show child attributes
⌘I