---
updatedAt: 2025-06-10T21:13:17.000Z
agentTools:
  projectIndex: https://developers.cleeng.com/llms.txt
---

# Fetch offers

This endpoint lets you list all your offers that meet the requirements given in the API request. For example, it allows you to filter offers by offer type or offer status.

Additional **response header:** **x-total-count**. It will show the number of offers.

## Errors

| HTTP Status code | Error code         | Message                  |
| :--------------- | :----------------- | :----------------------- |
| 400              | REQ0002            | Invalid query parameters |
| 401              | AUTH0001           | Missing required JWT     |
| 401              | AUTH0002           | Invalid JWT token        |
| 500              | SXXXX (X - number) | Internal Server Error    |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "mediastore-api",
    "version": "2.1"
  },
  "servers": [
    {
      "url": "https://mediastoreapi-sandbox.cleeng.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/offers": {
      "get": {
        "summary": "Fetch offers",
        "description": "This endpoint lets you list all your offers that meet the requirements given in the API request. For example, it allows you to filter offers by offer type or offer status.\n\nAdditional **response header:** **x-total-count**. It will show the number of offers.",
        "operationId": "fetch-offers",
        "parameters": [
          {
            "name": "pageNumber",
            "in": "query",
            "description": "Pagination parameter. It indicates the page number. By default, this parameter is equal to 1.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageLimit",
            "in": "query",
            "description": "Pagination parameter. It indicates the number of items on a page. By default, 15 results per page are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "A search key. The endpoint should search by title and `offerId` (including the main offer and offer localizations).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type[]",
            "in": "query",
            "description": "Filters results by offer type (possible values: subscription, pass, vod, live).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filters results by offer status (active, inactive, all). By default all offers are listed.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "appStoreName",
            "in": "query",
            "description": "Filters results by one of the allowed values: `amazon`, `android`, `apple`, `roku`, `samsung`, `vizio`. This parameter must be used together with the `appStoreProductId`. It cannot be used alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "appStoreProductId",
            "in": "query",
            "description": "Filters results by App store product id. This parameter must be used together with the `appStoreName`. It cannot be used alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Filters results based on offer `externalProperties` field that can be configured during offer creation in the Cleeng Dashboard (Custom parameters).   The required format is an object with key and value. The object needs to be parsed to string and then encoded. To do that use encodeURI function.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "OK": {
                    "value": "{\n    \"responseData\": [\n           {\n            \"id\": \"S123456789\",\n            \"longId\": \"S123456789_DE\",\n            \"title\": \"My Offer\",\n            \"active\": true,\n            \"price\": {\n                \"amount\": 1000,\n                \"currency\": \"EUR\",\n                \"taxIncluded\": true\n           },\n            \"active\": true|false, // if false - offer was deactivated\n            \"type\": \"subscription\", // One of: subscription, pass, rental, live, single\n            \"billingCycle\": {\n              \"periodUnit\": \"month\",\n              \"amount\": 3\n           },\n             \"entitlement\": {\n               \"expirationPolicy\": \"fixed-date|duration\",\n               \"expiresAt\": 1732482308, //only when policy is fixed-date\n               \"duration\": { //only when policy is duration\n                 \"amount\": 2,\n                 \"periodUnit\": \"month\"\n               }\n            }, \n             \"externalProperties\": [],\n             \"customExternalValue\": \"12934324\",\n             \"appStoreProductIds\": {\n               \"roku\": \"aaa-bbb-ccc\"\n            },\n              \"createdAt\": 1622482308,\n              \"updatedAt\": 1622482308,\n              \"imageUrl\": \"https://tenor.com/view/dance-moves-dancing-singer-groovy-gif-17029825\", \n              \"tags\": [\"tag-1\", \"tag-2\"],\n              \"hasLandingPage\": false\n            },\n          {//seasonal subscription\n              \"id\": \"S987654321\",\n              \"longId\": \"S987654321_DE\",\n              \"title\": \"My Offer\",\n              \"price\": {\n                 \"amount\": 1000,\n                 \"currency\": \"EUR\",\n                 \"taxIncluded\": true,\n                 \"rules\": [//only present when rules are set on seasonal subscription\n                  {\n\t\t\t\t           \"from\": 1678431600,\n\t\t\t\t           \"to\": 1678446000,\n\t\t\t\t           \"name\": \"Mid-season\",\n\t\t\t\t           \"amount\": 25.00\n\t\t\t           },\n\t\t\t\t         {\n\t\t\t\t           \"from\": 1678448000,\n\t\t\t\t           \"to\": 1678449000,\n\t\t\t\t           \"name\": \"Early-bird\",\n\t\t\t\t           \"amount\": 100.00\n\t\t\t           }\n               ]  \n             },\n              \"active\": true|false, // if false - offer was deactivated\n              \"type\": \"subscription\", // One of: subscription, pass, rental, live, single\n              \"billingCycle\": {\n                \"periodUnit\": \"season\",\n                \"amount\": 1\n             },\n             \"externalProperties\": {\n               \"customExternalValue\": \"12934324\"\n               },\n             \"appStoreProductIds\": {\n               \"roku\": \"aaa-bbb-ccc\"\n             },\n             \"createdAt\": 1622482308,\n             \"updatedAt\": 1622482308,\n             \"imageUrl\": \"https://tenor.com/view/dance-moves-dancing-singer-groovy-gif-17029825\",\n             \"tags\": [ ],\n             \"hasLandingPage\": false,\n             \"seasonGroupId\": \"7301d6a3-b179-4d76-886d-93de5f99487c\",\n             \"giftable\": false\n            }\n    ],\n   \t\"errors\": []\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Bad Request": {
                    "value": "{\n    \"errors\": [\n        \"Possible types: active, inactive, all\"\n    ],\n    \"message\": \"Invalid query parameters\",\n    \"code\": \"REQ0002\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "Possible types: active, inactive, all"
                      }
                    },
                    "message": {
                      "type": "string",
                      "example": "Invalid query parameters"
                    },
                    "code": {
                      "type": "string",
                      "example": "REQ0002"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Unauthorized": {
                    "value": "{\n    \"errors\": [\n        \"Missing required JWT\"\n    ],\n    \"message\": \"Missing required JWT\",\n    \"code\": \"AUTH0001\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "Missing required JWT"
                      }
                    },
                    "message": {
                      "type": "string",
                      "example": "Missing required JWT"
                    },
                    "code": {
                      "type": "string",
                      "example": "AUTH0001"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "500",
            "content": {
              "application/json": {
                "examples": {
                  "Internal Server Error": {
                    "value": "{\n\"errors\": [\n\"Internal server error\"\n],\n\"message\": \"Internal server error\",\n\"code\": \"string\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "Internal server error"
                      }
                    },
                    "message": {
                      "type": "string",
                      "example": "Internal server error"
                    },
                    "code": {
                      "type": "string",
                      "example": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```