Get Collections API

Get Collections

get

Retrieves a list of available collections.

Authorizations
Header parameters
Acceptstring · enumRequired

The request must accept JSON responses.

Possible values:
x-api-keystringRequired

API key required for authentication.

Example: YOUR_API_KEY_HERE
Responses
200
A list of collections retrieved successfully.
application/json
get
GET /api/v1/collections HTTP/1.1
Host: app.dynamicmockups.com
x-api-key: text
Accept: application/json
{
  "data": [
    {
      "uuid": "f63c0cfa-f106-463e-bbf9-5514b5164245",
      "name": "Coffee Mugs collection",
      "mockup_count": 2,
      "created_at": "2024-08-28 13:11:05 UTC",
      "updated_at": "2024-08-28 13:11:05 UTC",
      "created_at_timestamp": 1724850665,
      "updated_at_timestamp": 1724850665
    }
  ],
  "success": true,
  "message": ""
}

Export OpenAPI specification for Get Collections API

Use Collection UUID to filter Mockups

Collections are powerful and give you more flexibility and organization in your project.

Use Collection UUID as collection_uuid an optional query parameter in Get Mockups API to list mockups that belong to the provided collection UUID.

This way you can communicate with all mockups inside a collection instead of getting them all without knowing which one you exactly need.

Example Use case

Let's say you need to render images for all tea mugs with your company logo on them, but there's a problem, you have more than 100 mug mockups and you have mugs for coffee, tea, and oatmeal.

Without collections, you would need to hardcode more than 30 mockup UUIDs manually for each tea mug.

The best way to achieve flexibility and render only mugs that are designed for the tea is to create a collection of "Tea mugs", put all tea mug mockups inside that collection, and call Get Mockups API with an optional collection_uuid filter.

Now that you have all the tea mug mockups retrieved, you can easily call Render API for each tea mug mockup and render an image.

Last updated

Was this helpful?