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

# Create redemption

> Creates a redemption for a specific coupon using the corresponding `couponId` value.



## OpenAPI

````yaml redemptions.openapi post /coupons/{couponId}/redemptions
openapi: 3.0.0
info:
  title: Offers - Redemptions
  description: >-
    fabric Redemption API lets shoppers use a coupon to get discount or other
    benefit, configured on the coupon, during checkout. These endpoints let
    merchants create and manage such redemption records.
  version: 3.0.0
  x-audience: external-public
  termsOfService: https://fabric.inc/terms-of-use
  contact:
    name: Offers support
    email: support@fabric.inc
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
servers:
  - url: https://api.fabric.inc/v3
    description: Production environment
security: []
externalDocs:
  description: Find out more about Offers
  url: https://developer.fabric.inc/docs/offers-overview
paths:
  /coupons/{couponId}/redemptions:
    post:
      tags:
        - Redemptions
      summary: Create redemption
      description: >-
        Creates a redemption for a specific coupon using the corresponding
        `couponId` value.
      operationId: createRedemptionDeprecated
      parameters:
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xClientId'
        - $ref: '#/components/parameters/xFabricRequestId'
        - name: couponId
          in: path
          description: >-
            A 24-character system-generated coupon ID generated using the
            [create coupon](/v3/api-reference/offers/coupons/create-coupon)
            endpoint.
          required: true
          schema:
            type: string
            example: 614b58924e92f6861ac9d43b
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createRedemptionRequestDeprecated'
      responses:
        '201':
          description: Created
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/createRedemptionResponseDeprecated'
        '400':
          description: Bad request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/couponIdNotValid'
                  - $ref: '#/components/schemas/missingTenantHeader'
                  - $ref: '#/components/schemas/error400'
        '401':
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error401'
        '500':
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error500'
      deprecated: true
      security:
        - AuthorizationToken: []
components:
  parameters:
    xFabricTenantId:
      in: header
      name: x-fabric-tenant-id
      schema:
        type: string
        minLength: 24
        maxLength: 24
      required: true
      example: 5f328bf0b5f328bf0b5f328b
      description: >-
        A header used by fabric to identify the tenant making the request. You
        must include tenant id in the authentication header for an API request
        to access any of fabric’s endpoints. You can retrieve the tenant id ,
        which is also called account id, from
        [Copilot](/v3/platform/settings/account-details/getting-the-account-id).
        This header is required.
    xFabricChannelId:
      in: header
      name: x-fabric-channel-id
      schema:
        type: string
        example: '12'
      description: >-
        x-fabric-channel-id identifies the sales channel where the API request
        is being made; primarily for multichannel use cases. The channel ids are
        12 corresponding to US and 13 corresponding to Canada. The default
        channel id is 12. This field is required.
    xClientId:
      in: header
      name: x-client-id
      schema:
        type: string
      required: false
      example: copilot
      description: >-
        A unique identifier obtained from
        [Copilot](/v3/platform/settings/api-apps/getting-system-app-credentials)
        for the System app in the fabric ecosystem, essential for OpenID Connect
        authentication flows.
    xFabricRequestId:
      in: header
      name: x-fabric-request-id
      description: A unique request ID.
      required: false
      schema:
        type: string
        example: 263e731c-45c8-11ed-b878-0242ac120002
  schemas:
    createRedemptionRequestDeprecated:
      $ref: '#/components/schemas/redemptionRequestDeprecated'
    createRedemptionResponseDeprecated:
      $ref: '#/components/schemas/redemptionDeprecated'
    couponIdNotValid:
      type: object
      description: Invalid coupon ID
      properties:
        type:
          description: The error code.
          type: string
          example: COUPON_ID_NOT_VALID
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: Coupon ID isn't valid, it must be a valid Object ID
    missingTenantHeader:
      type: object
      description: Tenant header is missing
      properties:
        type:
          description: The error code.
          type: string
          example: TENANT_HEADER_REQUIRED
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: x-fabric-tenant-id header is required
    error400:
      type: object
      description: Bad request error
      properties:
        type:
          description: The error code.
          type: string
          example: BAD_REQUEST
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: Bad request
    error401:
      type: object
      description: Unauthorized error
      properties:
        type:
          description: The error code.
          type: string
          example: UNAUTHORIZED
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: Invalid credentials
    error500:
      type: object
      description: Internal server error
      properties:
        type:
          description: The error code.
          type: string
          example: INTERNAL_SERVER_ERROR
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: Internal server error
    redemptionRequestDeprecated:
      type: object
      description: Coupon redemption details
      required:
        - orderId
        - couponCode
      properties:
        couponCode:
          description: Coupon code to be redeemed
          type: string
          example: BESTSUMMER
        orderId:
          description: Purchase order ID associated with the coupon redemption
          type: string
          example: 1590-2016-12345-7897
        userId:
          description: ID of the user who redeems the coupon
          type: string
          example: 614b58924e92f61234567890
          nullable: true
        email:
          description: Email address of the user who redeems the coupon
          type: string
          example: guest@example.com
          nullable: true
    redemptionDeprecated:
      type: object
      description: Coupon's redemption details
      required:
        - id
        - couponCode
        - orderId
        - couponId
      properties:
        id:
          description: A 24-character system-generated redemption ID.
          type: string
          example: 614b58924e92f6861ac9d43b
        couponId:
          description: >-
            A 24-character system-generated coupon ID generated using the
            [create coupon](/v3/api-reference/offers/coupons/create-coupon)
            endpoint.
          type: string
          example: 614b58924e92f6861ac91234
        couponCode:
          description: Coupon code to redeem
          type: string
          example: BESTSUMMER
        orderId:
          description: Purchase order ID associated with the coupon redemption
          type: string
          example: 1590-2016-12345
        userId:
          description: ID of the user who redeems the coupon
          type: string
          example: 614b58924e92f61234567890
        email:
          description: Email address of the user who redeems the coupon
          type: string
          example: guest@example.com
          nullable: true
        createdAt:
          description: >-
            The timestamp in UTC format of when the coupon redemption was
            created.
          type: string
          format: date-time
          example: '2020-12-14T12:15:43.646Z'
        updatedAt:
          description: >-
            The timestamp in UTC format of when the coupon redemption was last
            updated.
          type: string
          format: date-time
          example: '2021-12-14T12:15:43.646Z'
  headers:
    xFabricRequestIdResponse:
      description: Unique request ID
      schema:
        type: string
        example: 263e731c-45c8-11ed-b878-0242ac120002
  securitySchemes:
    AuthorizationToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````