Skip to main content
Vindicia Knowledge Center

List all products

List all products

Retrieves all Product objects.

Route (URL) Parameters

None.

Query Parameters

Parameter Default Description Required
limit 20 A limit on the number of objects to be returned, between 1 and 100. No
starting_after none A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list. No
ending_before none A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list. No

Accepts

None.

Returns

JSON A list array with a data property that contains an array of up to limit Products, starting after the specified starting_after Product (or ending before the specified ending_before Product). Each entry in the array is a full Product object. If no more Products are available, the resulting array will be empty. This request should never throw an error.

A list of Product objects matching the query. Also:

  • “total_count”: Integer count of the number of Products in the returned list.
  • “url”: The query string provided in the request
  • “next”: The route (partial URL) to the next Product object (string to select the “next”); included id should match that of the last object returned here
  • “previous”: The route (partial URL) to the previous Product object (string to select the “previous”); included id should match that of the first object returned here
  • cURL
  • Java
Example Request
curl -X GET  \
-u acaff38d462f9430d5cbcbaf:a575771fc679b9de \  
"https://api.prodtest.vindicia.com/products?limit=3&starting_after=prod_1234"
The above command returns JSON structured like this:
{
    "object" : "List",
    "data" : [
        {
            "object" : "Product",
            "id" : "prod_1234",
            "vid" : "acaff38d462f9430d5cbcbafa575771fc679b9de",

            "name" : "Charlie Brown",
            "shipping_address" : {
                "line1" : "123 Main St.",
                "city" : "Jamestown",
                "district" : "NY",
                "postal_code" : "12345",
                "country" : "US"
            },

            "email" : "charlie.brown@peanuts.com",
            "email_type" : "html",
            "language" : "en-US",
            "currency" : "USD",

            "notify_before_billing" : true,

            "metadata" : {
                "favorite activity" : "flying kites",
                "favorite dog" : "Snoopy"
            },

            "url" : "/products/prod_1234"
        }
    ],
    "count" : 4,
    "next" : "/products?starting_after=prod_1234&limit=1",
    "url" : "/products",
    "filter" : "limit=1"
}
import com.vindicia.client.CashBox;

CashBox.apiKey = "acaff38d462f9430d5cbcbafa575771fc679b9de";

Map<string,> params = new HashMap<string,>();
params.put("limit",  1);

Product.list(params);
The above command returns JSON structured like this:
{
    "object" : "List",
    "data" : [
        {
            "object" : "Product",
            "id" : "prod_1234",
            "vid" : "acaff38d462f9430d5cbcbafa575771fc679b9de",

            "name" : "Charlie Brown",
            "shipping_address" : {
                "line1" : "123 Main St.",
                "city" : "Jamestown",
                "district" : "NY",
                "postal_code" : "12345",
                "country" : "US"
            },

            "email" : "charlie.brown@peanuts.com",
            "email_type" : "html",
            "language" : "en-US",
            "currency" : "USD",

            "notify_before_billing" : true,

            "metadata" : {
                "favorite activity" : "flying kites",
                "favorite dog" : "Snoopy"
            },

            "url" : "/products/prod_1234"
        }
    ],
    "count" : 4,
    "next" : "/products?starting_after=prod_1234&limit=1",
    "url" : "/products",
    "filter" : "limit=1"
}

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top