younifyd
Menu

List Bin Entries

List Bin Entries

GET/v1/trash-bin

Use it in a workflow

  1. Add a step and choose the Voucherify connector.
  2. Pick the List Bin Entries action (under Bin).
  3. Fill in the fields below, then reference the result from later steps as {{listBinEntries.response.data}}.

Request

Query parameters

limitinteger

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.

orderstring

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

One ofid-id

starting_after_idstring

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

filtersobject

Filters for listing bin entries.

junctionstring

Logical Operator Between Filters. Filter by conditions set on the `junction` parameter indicating how the `conditions` should be accounted for in the query. An `AND` is an all-inclusive logical operator, meaning the `AND` operator displays a record if **ALL** the conditions separated by AND are TRUE, while an `OR` operator displays a record if **ANY** of the conditions separated by OR is TRUE.

One ofandor

idobject1 fields

Unique identifier of the bin entry.

resource_typeobject1 fields

Resource type of the resource moved to the bin.

resource_nameobject1 fields

Name of the resource moved to the bin: the name of the campaign, voucher, product, or SKU.

resource_idobject1 fields

Unique identifier of the resource moved to the bin.

Response

Returns 200 with an object. Read it in later steps with {{listBinEntries.response.data.<field>}}.

objectstring

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

One oflistDefault "list"

data_refstring

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

One ofdataDefault "data"

dataarray<object>

Array of bin entry objects.

idstring

Unique identifier of the trash bin entry. It should not be confused with the ID of the resource moved to the bin.

created_atstring (date-time)

Timestamp representing the date and time when the resource was moved to the bin. The value for this parameter is shown in the ISO 8601 format.

deleted_by_user_idstring

Unique identifier of the user who moved the resource to the bin. It returns a user ID if the resource was moved to the bin through an action in the website. It returns a `null` if the resource was deleted through the API.

resource_idstring

Unique identifier of the resource moved to the bin, i.e. an ID of a campaign, product, SKU, or voucher.

resource_typestring

Type of the resource moved to the bin.

One ofcampaignproductskuvoucher

resource_namestring

Name of the resouce moved to the bin. It is the name of the campaign, product or SKU, or the voucher code.

resource_parent_idstring

Unique identifier of the parent resource. For a voucher, it is a campaign ID, except for generic (standalone) vouchers. For an SKU, it is the product ID. It returns `null` for campaigns and base products.

objectstring

The type of the object represented by JSON. It is equal to the `resource_type`.

One ofcampaignproductskuvoucher

totalinteger

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_moreboolean

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_afterstring

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.

json
{
  "object": "list",
  "data_ref": "data",
  "data": [
    {
      "id": "tbe_0e8213a0a78020ec64",
      "created_at": "2024-03-27T19:24:26.142Z",
      "deleted_by_user_id": "user_lNTg47u7Ip0Smgcm1k3ShHuUdH4qToNc",
      "resource_id": "v_ZUFwkglCEWaEfXqkJYd3uogTEEHEEU8S",
      "resource_type": "voucher",
      "resource_name": "BLCKFRIDAY_2024",
      "resource_parent_id": "camp_snn0eQL0PYWl5b6lY6HQNPfb",
      "object": "voucher"
    }
  ],
  "total": 0,
  "has_more": false,
  "more_starting_after": "string"
}

Need more? See the Voucherify guide for connection setup and behaviour shared by every action.