Skip to main content
GET
/
v1
/
trash-bin
List Bin Entries
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/trash-bin \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "object": "list",
  "data_ref": "data",
  "data": [
    {
      "id": "tbe_0eb6515f758ae37126",
      "created_at": "2024-05-07T09:15:13.218Z",
      "deleted_by_user_id": "user_JjB45t4Rpl4t1n0oMRlj6trzXKsh7FGX7",
      "resource_id": "v_JPfnb5ChY1HdNnaMkA0ikra4gIg0dja6",
      "resource_type": "voucher",
      "resource_name": "Trash-Discount-123",
      "resource_parent_id": "camp_ITQtKkrPOxL1a55uSU7tqbCL",
      "object": "voucher"
    },
    {
      "id": "tbe_0eb651ca7b8ae37184",
      "created_at": "2024-05-07T09:17:02.827Z",
      "deleted_by_user_id": "user_JjB45t4Rpl4t1n0oMRlj6trzXKsh7FGX7",
      "resource_id": "sku_0eb651c09e0ae37178",
      "resource_type": "sku",
      "resource_name": "Trash container icy blue",
      "resource_parent_id": "prod_0eb651c04395147085",
      "object": "sku"
    }
  ],
  "total": 2,
  "has_more": true,
  "more_starting_after": "tbe_0eb651ca7b8ae37184"
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

limit
integer

Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

Required range: 1 <= x <= 100
order
enum<string>

Orders the bin entries according to the bin entry ID. The dash - preceding a sorting option means sorting in a descending order.

Available options:
id,
-id
starting_after_id
string

A cursor for pagination. It retrieves the results starting after a result with the given ID.

filters
object

Filters for listing bin entries.

Response

Returns the list of all the bin entries matching the query parameters.

Retrieves a list of the resources moved the bin.

object
enum<string>
default:list
required

The type of the object represented by JSON. This object stores information about the bin entries in a dictionary.

Available options:
list
data_ref
enum<string>
default:data
required

Identifies the name of the attribute that contains the array of bin entry objects.

Available options:
data
data
Trash Bin Item · object[]
required

Array of bin entry objects.

total
integer
required

The total number of bin entries. This is the number of the entries returned in the array, not the number of all matching results or all resources currently moved to the bin.

has_more
boolean
required

As query results are always limited (by the limit parameter), the has_more flag indicates if there are more records for given filter parameters. This lets you know if you can run another request with a starting_after_id query or a different limit to get more records returned in the results.

more_starting_after
string

If has_more is true, it returns an ID that can be used to return another page of results. Use the ID in the starting_after_id query parameter to display another page of the results occuring after the field with that ID.

I