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

# Cancel coupon redemptions

> If any of the provided coupons or redemptions is not found, the error will be returned, but all found redemptions will be cancelled.
The error will contain coupons that were not found.

Idempotency key is required, and should be the same as the one used during the initial redemption.
It is not possible to cancel redemptions with different idempotency keys, send multiple requests instead.



## OpenAPI

````yaml openapi/coupon-v1.json POST /api/v1/customers/{customerId}/coupons/cancel-redeem
openapi: 3.0.4
info:
  title: Coupon.Api
  version: v1
servers:
  - url: https://{host}/coupon
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security: []
paths:
  /api/v1/customers/{customerId}/coupons/cancel-redeem:
    post:
      tags:
        - Customers
      summary: Cancel coupon redemptions
      description: >-
        If any of the provided coupons or redemptions is not found, the error
        will be returned, but all found redemptions will be cancelled.

        The error will contain coupons that were not found.


        Idempotency key is required, and should be the same as the one used
        during the initial redemption.

        It is not possible to cancel redemptions with different idempotency
        keys, send multiple requests instead.
      parameters:
        - name: customerId
          in: path
          description: Customer Id
          required: true
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: >-
            Identifier for request used to determine if it is a retry, or a new
            request
          required: true
          schema:
            type: string
      requestBody:
        description: List of coupon ids to cancel redemptions
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
          text/json:
            schema:
              type: array
              items:
                type: string
          application/*+json:
            schema:
              type: array
              items:
                type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Coupon.Client.Models.Response.CouponIdsResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoopFoundation.Commons.Contracts.WebServiceError
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
components:
  schemas:
    Coupon.Client.Models.Response.CouponIdsResponse:
      type: object
      properties:
        couponIds:
          type: array
          items:
            type: string
          description: Ids of Coupons that were successfully processed
          nullable: true
      additionalProperties: false
    LoopFoundation.Commons.Contracts.WebServiceError:
      required:
        - message
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
        message:
          minLength: 1
          type: string
        details:
          nullable: true
      additionalProperties: false
    Microsoft.AspNetCore.Mvc.ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}

````