Create terminal action BETA
POST
/v2/terminals/actions
Creates a Terminal action request and sends it to the specified device.
Name | Description |
---|---|
idempotency_
Required
|
A unique string that identifies this See Idempotency keys for more information. |
action
Required
|
The Action to create. |
Response Fields
Name | Description |
---|---|
errors
|
Information on errors encountered during the request. |
action
|
The created |
Examples
POST
/v2/terminals/actions
cURL
- cURL
- Ruby
- Python
- C#
- Java
- PHP
- Node.js
curl https://connect.squareup.com/v2/terminals/actions \
-X POST \
-H 'Square-Version: 2022-07-20' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"idempotency_key": "thahn-70e75c10-47f7-4ab6-88cc-aaa4076d065e",
"action": {
"device_id": "{{DEVICE_ID}}",
"type": "SAVE_CARD",
"deadline_duration": "PT5M",
"save_card_options": {
"customer_id": "{{CUSTOMER_ID}}",
"reference_id": "user-id-1"
}
}
}'
Response JSON
{
"action": {
"id": "termapia:jveJIAkkAjILHkdCE",
"device_id": "DEVICE_ID",
"deadline_duration": "PT5M",
"status": "PENDING",
"created_at": "2021-07-28T23:22:07.476Z",
"updated_at": "2021-07-28T23:22:07.476Z",
"location_id": "LOCATION_ID",
"type": "SAVE_CARD",
"app_id": "APP_ID",
"save_card_options": {
"customer_id": "CUSTOMER_ID",
"reference_id": "user-id-1"
}
}
}