Search terminal actions BETA
POST
/v2/terminals/actions/search
Retrieves a filtered list of Terminal action requests created by the account making the request.
Terminal action requests are available for 30 days.
Name | Description |
---|---|
query
|
Queries terminal actions based on given conditions and sort order. Leaving this unset will return all actions with the default sort order. |
cursor
|
A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See Pagination for more information. |
limit
|
Limit the number of results returned for a single request. |
Response Fields
Name | Description |
---|---|
errors
|
Information on errors encountered during the request. |
action
|
The requested search result of |
cursor
|
The pagination cursor to be used in a subsequent request. If empty, this is the final response. See Pagination for more information. |
Examples
POST
/v2/terminals/actions/search
cURL
- cURL
- Ruby
- Python
- C#
- Java
- PHP
- Node.js
curl https://connect.squareup.com/v2/terminals/actions/search \
-X POST \
-H 'Square-Version: 2022-07-20' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"limit": 2,
"query": {
"sort": {
"sort_order": "DESC"
},
"filter": {
"created_at": {
"start_at": "2022-04-01T00:00:00.000Z"
}
}
}
}'
Response JSON
{
"action": [
{
"id": "termapia:oBGWlAats8xWCiCE",
"device_id": "DEVICE_ID",
"deadline_duration": "PT5M",
"status": "IN_PROGRESS",
"created_at": "2022-04-08T15:14:04.895Z",
"updated_at": "2022-04-08T15:14:05.446Z",
"location_id": "LOCATION_ID",
"type": "SAVE_CARD",
"app_id": "APP_ID",
"save_card_options": {
"customer_id": "CUSTOMER_ID",
"reference_id": "user-id-1"
}
},
{
"id": "termapia:K2NY2YSSml3lTiCE",
"device_id": "DEVICE_ID",
"deadline_duration": "PT5M",
"status": "COMPLETED",
"created_at": "2022-04-08T15:14:01.210Z",
"updated_at": "2022-04-08T15:14:09.861Z",
"location_id": "LOCATION_ID",
"type": "SAVE_CARD",
"app_id": "APP_ID",
"save_card_options": {
"customer_id": "CUSTOMER_ID",
"card_id": "ccof:CARD_ID",
"reference_id": "user-id-1"
}
}
],
"cursor": "CURSOR"
}