Update terminal reader
curl --request PATCH \
--url https://b.anny.co/api/v1/terminal-readers/{terminal_reader_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "terminal-readers",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attributes": {
"label": "<string>"
},
"relationships": {
"location": {
"data": {
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
}
}
'import requests
url = "https://b.anny.co/api/v1/terminal-readers/{terminal_reader_id}"
payload = { "data": {
"type": "terminal-readers",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attributes": { "label": "<string>" },
"relationships": { "location": { "data": {
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
} } }
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
type: 'terminal-readers',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
attributes: {label: '<string>'},
relationships: {
location: {data: {type: '<string>', id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}}
}
}
})
};
fetch('https://b.anny.co/api/v1/terminal-readers/{terminal_reader_id}', 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://b.anny.co/api/v1/terminal-readers/{terminal_reader_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'type' => 'terminal-readers',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'attributes' => [
'label' => '<string>'
],
'relationships' => [
'location' => [
'data' => [
'type' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+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://b.anny.co/api/v1/terminal-readers/{terminal_reader_id}"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"terminal-readers\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attributes\": {\n \"label\": \"<string>\"\n },\n \"relationships\": {\n \"location\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://b.anny.co/api/v1/terminal-readers/{terminal_reader_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"type\": \"terminal-readers\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attributes\": {\n \"label\": \"<string>\"\n },\n \"relationships\": {\n \"location\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/terminal-readers/{terminal_reader_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": {\n \"type\": \"terminal-readers\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attributes\": {\n \"label\": \"<string>\"\n },\n \"relationships\": {\n \"location\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "terminal-readers",
"attributes": {
"label": "<string>",
"provider_reader_id": "<string>",
"serial_number": "<string>",
"device_type": "<string>",
"device_sw_version": "<string>",
"ip_address": "<string>",
"status": "online",
"is_tap_to_pay": true,
"is_synced": true,
"display_label": "<string>",
"last_seen_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"links": {
"self": "<string>"
},
"relationships": {
"location": {
"data": {
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"links": {
"self": "<string>"
}
},
"payment_account": {
"data": {
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"links": {
"self": "<string>"
}
}
}
}
}Terminal Payments
Update terminal reader
Updates the reader’s label or assigned location.
PATCH
/
api
/
v1
/
terminal-readers
/
{terminal_reader_id}
Update terminal reader
curl --request PATCH \
--url https://b.anny.co/api/v1/terminal-readers/{terminal_reader_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "terminal-readers",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attributes": {
"label": "<string>"
},
"relationships": {
"location": {
"data": {
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
}
}
'import requests
url = "https://b.anny.co/api/v1/terminal-readers/{terminal_reader_id}"
payload = { "data": {
"type": "terminal-readers",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attributes": { "label": "<string>" },
"relationships": { "location": { "data": {
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
} } }
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
type: 'terminal-readers',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
attributes: {label: '<string>'},
relationships: {
location: {data: {type: '<string>', id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}}
}
}
})
};
fetch('https://b.anny.co/api/v1/terminal-readers/{terminal_reader_id}', 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://b.anny.co/api/v1/terminal-readers/{terminal_reader_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'type' => 'terminal-readers',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'attributes' => [
'label' => '<string>'
],
'relationships' => [
'location' => [
'data' => [
'type' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+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://b.anny.co/api/v1/terminal-readers/{terminal_reader_id}"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"terminal-readers\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attributes\": {\n \"label\": \"<string>\"\n },\n \"relationships\": {\n \"location\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://b.anny.co/api/v1/terminal-readers/{terminal_reader_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"type\": \"terminal-readers\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attributes\": {\n \"label\": \"<string>\"\n },\n \"relationships\": {\n \"location\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/terminal-readers/{terminal_reader_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": {\n \"type\": \"terminal-readers\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attributes\": {\n \"label\": \"<string>\"\n },\n \"relationships\": {\n \"location\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "terminal-readers",
"attributes": {
"label": "<string>",
"provider_reader_id": "<string>",
"serial_number": "<string>",
"device_type": "<string>",
"device_sw_version": "<string>",
"ip_address": "<string>",
"status": "online",
"is_tap_to_pay": true,
"is_synced": true,
"display_label": "<string>",
"last_seen_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"links": {
"self": "<string>"
},
"relationships": {
"location": {
"data": {
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"links": {
"self": "<string>"
}
},
"payment_account": {
"data": {
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"links": {
"self": "<string>"
}
}
}
}
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Pfadparameter
Terminal reader UUID
Abfrageparameter
Organization ID
Body
application/vnd.api+json
Show child attributes
Show child attributes
Antwort
OK
A physical Stripe Terminal card reader registered to an organization.
Show child attributes
Show child attributes
⌘I