> ## 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 reservation

> If the ReservedBy is different than one that already populated, error will be returned and reservation will not be cancelled. 

If provided coupons were not found, error will be returned and reservation will not be cancelled.



## OpenAPI

````yaml openapi/coupon-v1.json POST /api/v1/customers/{customerId}/coupons/cancel-reservation
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-reservation:
    post:
      tags:
        - Customers
      summary: Cancel coupon reservation
      description: >-
        If the ReservedBy is different than one that already populated, error
        will be returned and reservation will not be cancelled. 


        If provided coupons were not found, error will be returned and
        reservation will not be cancelled.
      parameters:
        - name: customerId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Coupon.Client.Models.Request.CancelCouponsReservationRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/Coupon.Client.Models.Request.CancelCouponsReservationRequest
          application/*+json:
            schema:
              $ref: >-
                #/components/schemas/Coupon.Client.Models.Request.CancelCouponsReservationRequest
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Coupon.Client.Models.Response.CancelCouponsReservationResponse
        '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.Request.CancelCouponsReservationRequest:
      required:
        - couponIds
        - reservedBy
      type: object
      properties:
        reservedBy:
          minLength: 1
          type: string
        couponIds:
          type: array
          items:
            type: string
      additionalProperties: false
    Coupon.Client.Models.Response.CancelCouponsReservationResponse:
      type: object
      properties:
        couponIds:
          type: array
          items:
            type: string
          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: {}

````