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

# Retrieve redemptions

> Retrieve all discount redemptions. Either couponRef or promocodeRef is required. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>



## OpenAPI

````yaml /assets/openapi.json get /discounts/redemptions/v1
openapi: 3.0.2
info:
  title: Spacebring
  version: 1.0.0
  termsOfService: https://www.spacebring.com/terms
servers:
  - url: https://api.spacebring.com
security: []
paths:
  /discounts/redemptions/v1:
    get:
      tags:
        - Discounts
      summary: Retrieve redemptions
      description: >-
        Retrieve all discount redemptions. Either couponRef or promocodeRef is
        required. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code>
        or <code>invoices</code>
      operationId: getDiscountRedemptions
      parameters:
        - in: query
          name: couponRef
          description: The id of the coupon. Either couponRef or promocodeRef is required
          schema:
            type: string
            format: uuid
          required: false
        - in: query
          name: promocodeRef
          description: >-
            The id of the promocode. Either couponRef or promocodeRef is
            required
          schema:
            type: string
            format: uuid
          required: false
        - in: query
          name: limit
          schema:
            type: integer
            format: int64
            minimum: 1
            maximum: 100
            default: 25
          description: The number of items to return
        - in: query
          name: nextPageToken
          schema:
            $ref: '#/components/schemas/nextPageToken'
          description: Token to retrieve the next page of results.
        - in: header
          name: spacebring-network-id
          schema:
            type: string
            format: uuid
          required: false
          description: >-
            The id of the network. Required when using bearer token
            authentication
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  redemptions:
                    type: array
                    items:
                      $ref: '#/components/schemas/discountRedemption'
                  nextPageToken:
                    $ref: '#/components/schemas/nextPageToken'
                  searchQueryNext:
                    $ref: '#/components/schemas/searchQueryNext'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
      security:
        - BasicAuth: []
        - OAuth2:
            - invoices.readonly
            - invoices
components:
  schemas:
    nextPageToken:
      type: string
      description: >-
        Opaque cursor token for retrieving the next page of results. Pass this
        value as the `nextPageToken` query parameter in your next request.
    discountRedemption:
      type: object
      properties:
        coupon:
          type: object
          properties:
            amountOff:
              type: number
              nullable: true
            currencyCode:
              nullable: true
              type: string
            enabledForCredits:
              type: boolean
              nullable: true
            id:
              type: string
              format: uuid
            limitedItems:
              type: object
              properties:
                enabled:
                  type: boolean
                values:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      title:
                        type: string
            limitedRedemption:
              type: object
              properties:
                enabled:
                  type: boolean
                usage:
                  type: integer
                value:
                  type: integer
            percentOff:
              type: number
              nullable: true
            type:
              type: string
              enum:
                - creditPackages
                - desks
                - equipment
                - events
                - products
                - rooms
                - subscriptionItems
        createDate:
          $ref: '#/components/schemas/dateSchema'
        customer:
          type: object
          properties:
            id:
              type: string
            title:
              nullable: true
              type: string
            type:
              type: string
              enum:
                - user
                - company
            user:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                name:
                  type: string
                photoUrl:
                  nullable: true
                  type: string
                surname:
                  type: string
        locationRef:
          type: string
          format: uuid
        networkRef:
          type: string
          format: uuid
        product:
          type: object
          properties:
            bookingRef:
              type: string
              format: uuid
              nullable: true
            creditPackageRef:
              type: string
              format: uuid
              nullable: true
            eventTicketRef:
              type: string
              format: uuid
              nullable: true
            optionRef:
              type: string
              format: uuid
              nullable: true
            orderRef:
              type: string
              format: uuid
              nullable: true
            subscriptionItemRef:
              type: string
              format: uuid
              nullable: true
            title:
              nullable: true
              type: string
            type:
              type: string
              enum:
                - booking
                - creditPackage
                - eventTicket
                - order
                - subscriptionItem
              nullable: true
        promocode:
          type: object
          properties:
            code:
              type: string
            expiration:
              type: object
              properties:
                date:
                  $ref: '#/components/schemas/dateSchema'
                enabled:
                  type: boolean
            id:
              type: string
              format: uuid
            limitByFirstPurchase:
              type: boolean
            limitedRedemption:
              type: object
              properties:
                enabled:
                  type: boolean
                usage:
                  type: integer
                value:
                  type: integer
        promocodeRef:
          type: string
          format: uuid
          nullable: true
    searchQueryNext:
      type: string
      description: >-
        Pre-built query string for the next page of results. Contains all active
        filter parameters combined with the next page token, ready to append to
        the endpoint URL.
    responseError:
      type: object
      properties:
        message:
          type: string
        type:
          type: string
    dateSchema:
      format: date-time
      type: string
      description: The date and time in ISO 8601 format, e.g. 2021-05-21T10:00:00Z
  securitySchemes:
    BasicAuth:
      type: http
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#basic-authentication)
        for how to authorize your requests
      scheme: basic
    OAuth2:
      type: oauth2
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#oauth2)
        for how to authorize your requests
      flows:
        authorizationCode:
          authorizationUrl: https://api.spacebring.com/oauth2/authorize
          tokenUrl: https://api.spacebring.com/oauth2/token
          refreshUrl: https://api.spacebring.com/oauth2/token
          scopes:
            benefits.readonly: Read benefits and applications
            benefits: Read and write benefits and applications
            community.readonly: Read community companies and memberships
            community: Read and write community companies and memberships
            events.readonly: Read events and tickets
            events: Read and write events and tickets
            feed.readonly: Read feed posts
            feed: Read and write feed posts
            invoices.readonly: Read invoices
            invoices: Read and write invoices
            locations.readonly: Read locations
            locations: Read and write locations
            plans.readonly: Read plans
            plans: Read and write plans
            resources.readonly: Read resources and bookings
            resources: Read and write resources and bookings
            subscriptions.readonly: Read subscriptions
            subscriptions: Read and write subscriptions
            shop.readonly: Read products and orders
            shop: Read and write products and orders
            support.readonly: Read support tickets
            support: Read and write support tickets
            transactions.readonly: Read transactions
            transactions: Read and write transactions
            visitors.readonly: Read visitors
            visitors: Read and write visitors

````