> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zype.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Redemption Codes

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Monetization",
    "version": "1.0.0",
    "description": ""
  },
  "servers": [
    {
      "url": "https://api.zype.com/"
    }
  ],
  "security": [
    {
      "api_key": []
    }
  ],
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "api_key",
        "in": "query"
      }
    }
  },
  "paths": {
    "/redemption_codes": {
      "get": {
        "summary": "List Redemption Codes",
        "description": "",
        "tags": [
          "Redemption Codes"
        ],
        "operationId": "listRedemptionCodes",
        "parameters": [
          {
            "name": "id",
            "$ref": "#/paths/~1plans/get/parameters/0"
          },
          {
            "name": "created_at",
            "$ref": "#/paths/~1plans/get/parameters/1"
          },
          {
            "name": "q",
            "$ref": "#/paths/~1plans/get/parameters/2"
          },
          {
            "name": "order",
            "$ref": "#/paths/~1plans/get/parameters/3"
          },
          {
            "name": "sort",
            "$ref": "#/paths/~1plans/get/parameters/4"
          },
          {
            "name": "page",
            "$ref": "#/paths/~1plans/get/parameters/5"
          },
          {
            "name": "per_page",
            "$ref": "#/paths/~1plans/get/parameters/6"
          },
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by code"
          },
          {
            "name": "expiration_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Filter by created at date using times in ISO8601 format\nNote: Range filters can be applied by adding a suffix: ‘.gt’, ‘.gte’, ‘.lt’, ‘lte’ (Example: expires_at.gte)\n+ Examples\n    + `2017-01-01T00:00:00-00:00` - in ISO8601 format\n    + `1483228800` - Unix timestamps"
          },
          {
            "name": "redeemed_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Filter by created at date using times in ISO8601 format\nNote: Range filters can be applied by adding a suffix: ‘.gt’, ‘.gte’, ‘.lt’, ‘lte’ (Example: expires_at.gte)\n+ Examples\n    + `2017-01-01T00:00:00-00:00` - in ISO8601 format\n    + `1483228800` - Unix timestamps"
          },
          {
            "name": "pass_plan_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter records by a pass plan ID"
          },
          {
            "name": "plan_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter records by plan ID"
          },
          {
            "name": "playlist_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter records by playlist ID"
          },
          {
            "name": "transaction_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter records by transaction ID"
          },
          {
            "name": "video_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter records by video ID"
          },
          {
            "name": "api_key",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "title": "RedemptionCodesResponse",
                  "type": "object",
                  "properties": {
                    "response": {
                      "type": "array",
                      "items": {
                        "$ref": "#/paths/~1redemption_codes/post/responses/201/content/application~1json/schema/properties/response"
                      },
                      "description": ""
                    },
                    "pagination": {
                      "$ref": "#/paths/~1plans/get/responses/200/content/application~1json/schema/properties/pagination"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1plans/post/responses/422/content/application~1json/schema"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Redemption Codes",
        "description": "",
        "tags": [
          "Redemption Codes"
        ],
        "operationId": "createRedemptionCode",
        "requestBody": {
          "description": "",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "RedemptionCodeRequest",
                "type": "object",
                "required": [
                  "redemption_code"
                ],
                "properties": {
                  "redemption_code": {
                    "type": "object",
                    "title": "RedemptionCodeProperties",
                    "required": [
                      "code",
                      "expiration_date"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Use this param to specify your own code. If no code is sent, one will automatically be generated."
                      },
                      "expiration_date": {
                        "type": "string",
                        "description": "Expiration date for the redemption code. Example: 2017-01-15."
                      },
                      "video_id": {
                        "type": "string",
                        "description": "The ID of the video that the user will be entitled to upon redeeming the code. Required if the redemption code is for a video."
                      },
                      "playlist_id": {
                        "type": "string",
                        "description": "The ID of the playlist that the user will be entitled to upon redeeming the code. Required if the redemption code is for a playlist."
                      },
                      "plan_id": {
                        "type": "string",
                        "description": "The ID of the subscription plan that the user will be subscribed to upon redeeming the code. Required if the redemption code is for a subscription."
                      },
                      "pass_plan_id": {
                        "type": "string",
                        "description": "The ID of the pass plan that the user will have access to upon redeeming the code. Required if the redemption code is for a pass plan."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "title": "RedemptionCodeResponse",
                  "type": "object",
                  "properties": {
                    "response": {
                      "title": "RedemptionCode",
                      "type": "object",
                      "properties": {
                        "_id": {
                          "type": "string"
                        },
                        "content_title": {
                          "type": "string"
                        },
                        "content_type": {
                          "type": "string"
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "redeemed_at": {
                          "type": "string"
                        },
                        "site_id": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        },
                        "nice_code": {
                          "type": "string"
                        },
                        "available": {
                          "type": "string"
                        },
                        "redeemed": {
                          "type": "string"
                        },
                        "expired": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        },
                        "expiration_date": {
                          "type": "string"
                        },
                        "video_id": {
                          "type": "string"
                        },
                        "pass_plan_id": {
                          "type": "string"
                        },
                        "plan_id": {
                          "type": "string"
                        },
                        "playlist_id": {
                          "type": "string"
                        },
                        "transaction_id": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1plans/post/responses/422/content/application~1json/schema"
                }
              }
            }
          }
        }
      }
    }
  }
}
```