> ## 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/v1/redemptions
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/v1/redemptions:
    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:
              description: Fixed discount amount.
              nullable: true
              type: number
            currencyCode:
              description: Currency code for amountOff.
              nullable: true
              type: string
            enabledForCredits:
              description: Whether the coupon applies to credit purchases.
              nullable: true
              type: boolean
            id:
              type: string
              format: uuid
              description: Unique identifier of the coupon.
            limitedItems:
              type: object
              properties:
                enabled:
                  type: boolean
                  description: Whether item-level limits are enabled.
                values:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Unique identifier of the limited item.
                      title:
                        description: Display name of the limited item.
                        type: string
                      type:
                        type: string
                        enum:
                          - roomBookings
                          - eventSpaceBookings
                          - conferenceRoomBookings
                          - meetingRoomBookings
                          - phoneBoothBookings
                          - stationBookings
                          - studioBookings
                          - hotDeskBookings
                          - dedicatedDeskBookings
                          - parkingBookings
                          - equipmentBookings
                          - eventTickets
                          - shopProducts
                          - packages
                          - subscriptionItems
                        description: Product type of the limited item.
                    required:
                      - id
                      - type
                    additionalProperties: false
                    description: Product or package the coupon is limited to.
                  description: Items the coupon applies to when limits are enabled.
              required:
                - enabled
                - values
              additionalProperties: false
              description: Item-level redemption limits.
            limitedRedemption:
              type: object
              properties:
                enabled:
                  type: boolean
                  description: Whether redemption limits are enabled.
                usage:
                  type: number
                  description: Current redemption count.
                value:
                  type: number
                  description: Maximum redemption count.
              required:
                - enabled
                - usage
                - value
              additionalProperties: false
              description: Redemption limits for the coupon.
            percentOff:
              description: Percentage discount amount.
              nullable: true
              type: number
            productTypes:
              type: array
              items:
                type: string
                enum:
                  - roomBookings
                  - eventSpaceBookings
                  - conferenceRoomBookings
                  - meetingRoomBookings
                  - phoneBoothBookings
                  - stationBookings
                  - studioBookings
                  - hotDeskBookings
                  - dedicatedDeskBookings
                  - parkingBookings
                  - equipmentBookings
                  - eventTickets
                  - shopProducts
                  - packages
                  - subscriptionItems
              description: Product types the coupon applies to.
            type:
              description: Deprecated coupon category.
              type: string
              enum:
                - creditPackages
                - desks
                - equipment
                - events
                - products
                - rooms
                - subscriptionItems
          required:
            - id
            - limitedItems
            - limitedRedemption
          additionalProperties: false
          description: Coupon that was redeemed.
        createDate:
          type: string
          format: date-time
          description: ISO timestamp of when the redemption was created.
        customer:
          type: object
          properties:
            id:
              type: string
              description: ID of the customer membership or company.
            title:
              description: Display name of the customer.
              nullable: true
              type: string
            type:
              type: string
              enum:
                - user
                - company
              description: Whether the customer is a user or company.
            user:
              description: User details when the customer is a member.
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Unique identifier of the user.
                name:
                  type: string
                  description: First name of the user.
                photoUrl:
                  description: Profile photo URL.
                  nullable: true
                  type: string
                surname:
                  type: string
                  description: Surname of the user.
              required:
                - id
                - name
                - photoUrl
                - surname
              additionalProperties: false
          required:
            - id
            - type
          additionalProperties: false
          description: Customer who redeemed the discount.
        locationRef:
          type: string
          format: uuid
          description: ID of the location where the redemption occurred.
        networkRef:
          type: string
          format: uuid
          description: ID of the network where the redemption occurred.
        product:
          type: object
          properties:
            bookingRef:
              description: ID of the related booking.
              nullable: true
              type: string
              format: uuid
            creditPackageRef:
              description: ID of the related credit package.
              nullable: true
              type: string
              format: uuid
            eventTicketRef:
              description: ID of the related event ticket.
              nullable: true
              type: string
              format: uuid
            optionRef:
              description: ID of the related shop product option.
              nullable: true
              type: string
              format: uuid
            orderRef:
              description: ID of the related shop order.
              nullable: true
              type: string
              format: uuid
            subscriptionItemRef:
              description: ID of the related subscription item.
              nullable: true
              type: string
              format: uuid
            title:
              description: Display title of the redeemed product.
              nullable: true
              type: string
            type:
              description: Type of product that was discounted.
              nullable: true
              type: string
              enum:
                - booking
                - creditPackage
                - eventTicket
                - order
                - subscriptionItem
          additionalProperties: false
          description: Product that received the discount.
        promocode:
          description: Promocode that was redeemed, when applicable.
          type: object
          properties:
            code:
              type: string
              description: Promocode string.
            expiration:
              type: object
              properties:
                date:
                  description: ISO timestamp when the promocode expires.
                  type: string
                  format: date-time
                enabled:
                  type: boolean
                  description: Whether the promocode has an expiration date.
              required:
                - enabled
              additionalProperties: false
              description: Promocode expiration settings.
            id:
              type: string
              format: uuid
              description: Unique identifier of the promocode.
            limitByFirstPurchase:
              type: boolean
              description: Whether the promocode is limited to first-time purchases.
            limitedRedemption:
              type: object
              properties:
                enabled:
                  type: boolean
                  description: Whether redemption limits are enabled.
                usage:
                  type: number
                  description: Current redemption count.
                value:
                  type: number
                  description: Maximum redemption count.
              required:
                - enabled
                - usage
                - value
              additionalProperties: false
              description: Redemption limits for the promocode.
          required:
            - code
            - expiration
            - id
            - limitByFirstPurchase
            - limitedRedemption
          additionalProperties: false
        promocodeRef:
          description: ID of the promocode that was redeemed.
          nullable: true
          type: string
          format: uuid
      required:
        - coupon
        - createDate
        - customer
        - locationRef
        - networkRef
        - product
      additionalProperties: false
    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
  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 contracts, credit notes, discounts and invoices
            invoices: Read and write contract, credit notes, discounts and 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

````