# List products

Returns your products, newest first. Cursor-paginated.

Endpoint: GET /products
Security: ClientKey, SecretKey

## Security:

  - `ClientKey` (unknown)
    apiKey in header X-Dime-Client

  - `SecretKey` (unknown)
    http bearer

## Query parameters:

  - `limit` (integer)
    How many records to return, 1–100.

  - `starting_after` (string)
    Return records after this one. Pass the `token` of the last record on
the previous page to walk forward.

  - `ending_before` (string)
    Return records before this one, to walk backward. Pass the `token` of
the first record on the page you have.

  - `status` (string)

  - `min_price` (number)

  - `max_price` (number)

  - `min_inventory` (integer)
    Minimum `quantity` in stock.

  - `max_inventory` (integer)

  - `search` (string)
    Matches against the product name.

  - `category` (string)
    Only products in this category, by the category's `token`. An unknown token returns an empty list.

## Response 200:

  - `200` (unknown)
    A page of products.

## Response 200 fields (application/json):

  - `object` (string, required)
    Enum: "list"

  - `data` (array, required)

  - `data.name` (string, required)
    Example: Shampoo

  - `data.description` (string, required)
    Example: 500ml, sulfate free.

  - `data.status` (string, required)
    Enum: "PUBLISHED", "DRAFT"

  - `data.visible` (string)
    Enum: "PUBLIC", "PRIVATE"

  - `data.price` (number, required)
    Example: 1200

  - `data.sale_price` (number)

  - `data.currency` (string, required)
    Enum: "USD", "JMD", "GBP", "EUR", "TTD", "BBD", "XCD", "GYD", "SRD"

  - `data.quantity` (integer)
    Units in stock.

  - `data.sell_out_of_stock` (boolean)

  - `data.show_quantity_selector` (boolean)

  - `data.image_url` (string | null)

  - `data.additional_images` (array)

  - `data.sku` (string | null)

  - `data.external_id` (string | null)
    Your own reference for the product.

  - `data.tags` (array)

  - `data.variation` (object | null)
    Variant attributes, for example
`{ "enabled": true, "attributes": [{ "name": "Size", "value": ["S", "M"] }] }`.

  - `data.supplier` (object | array | null)

  - `data.enable_shipping` (boolean)

  - `data.shipping` (number)

  - `data.shipping_text` (string | null)

  - `data.enable_tax` (boolean)

  - `data.tax` (number)

  - `data.is_sale_price_inc_tax` (boolean)

  - `data.is_tax_exemptable` (boolean)

  - `data.enable_notes` (boolean)

  - `data.enable_reviews` (boolean)

  - `data.enable_return` (boolean)

  - `data.return_text` (string | null)

  - `data.enable_recurring` (boolean)

  - `data.recurring_frequency` (string | null)
    Required when `enable_recurring` is true.

  - `data.recurring_billing_cycle` (integer | null)

  - `data.recurring_start_date` (string | null)

  - `data.recurring_end_date` (string | null)

  - `data.recurring_end_type` (string | null)
    Enum: "DATE", "CYCLE", "CANCEL", "null"

  - `data.trial_period_days` (integer | null)

  - `data.object` (string)
    Enum: "product"

  - `data.token` (string)
    Identifies the product. Use it in URLs and wherever a request refers to the product.
    Example: prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE

  - `data.original_price` (number | null)

  - `data.discount_percentage` (number | null)

  - `data.categories` (array)

  - `data.categories.token` (string)
    Example: cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3

  - `data.categories.name` (string)

  - `data.created_at` (string)

  - `data.updated_at` (string)

  - `has_more` (boolean, required)
    Example: true

## Response 400:

  - `400` (unknown)
    The request was rejected.

## Response 400 fields (application/json):

  - `error` (object, required)

  - `error.type` (string, required)
    Which kind of failure occurred. Always one of four values, so
a client can branch on `type` before reading `code`.
    Enum: "invalid_request_error", "card_error", "idempotency_error", "api_error"

  - `error.code` (string, required)
    Example: parameter_missing

  - `error.message` (string, required)
    Example: Order ID is required.

  - `error.param` (string)
    The field that caused the failure, when applicable.
    Example: id

## Response 401:

  - `401` (unknown)
    The client key or secret key was missing, not recognized, or the two do not belong to the same key.

## Response 401 fields (application/json):

  - `error` (object, required)

  - `error.type` (string, required)
    Which kind of failure occurred. Always one of four values, so
a client can branch on `type` before reading `code`.
    Enum: "invalid_request_error", "card_error", "idempotency_error", "api_error"

  - `error.code` (string, required)
    Example: parameter_missing

  - `error.message` (string, required)
    Example: Order ID is required.

  - `error.param` (string)
    The field that caused the failure, when applicable.
    Example: id

## Response 200 examples:

  - `A page of products` (unknown)

## Response 400 examples:

  - `A required field was absent` (unknown)

## Response 401 examples:

  - `unauthorized` (unknown)

  - `Client key sent without its secret key` (unknown)

