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

# Cancel E-Way Bill

> Cancel E-Way Bill by passing E-Way Bill number and cancel reason code.

#### Request body schema

<Card title="View request body schema" icon="code" href="https://raw.githubusercontent.com/in-co-sandbox/in-co-sandbox-docs/refs/heads/main/data/gst/schema/request/e-way-bill/cancel_e_way_bill.json" arrow="true" horizontal />

> 📘 Only the generator can cancel the E-Way Bill.

> 🚧 The bill can be only cancelled within 24 hrs of generation.


## OpenAPI

````yaml api-reference/gst/compliance/openapi.json POST /gst/compliance/e-way-bill/consignor/bill/{ewb_no}/cancel
openapi: 3.0.1
info:
  title: compliance
  description: >-
    **GST Compliance API** enables businesses to automate compliance
    requirements like [Taxpayer
    verification](https://developer.sandbox.co.in/reference/search-gstin-api),
    [GSTR
    Filing](https://developer.sandbox.co.in/reference/gst-taxpayer-authentication),
    [Generating
    E-Invoices](https://developer.sandbox.co.in/reference/e-invoice-authentication-api),
    and [E-Way
    Bills](https://developer.sandbox.co.in/reference/e-way-bill-authentication-api).We
    provide these APIs from GSTN-authorised GST Suvidha Providers, handling the
    encryption-decryption and signing so you don't have to handle the
    complexities.
  version: 1.0.0
servers:
  - url: https://api.sandbox.co.in
  - url: https://test-api.sandbox.co.in
security: []
tags:
  - name: Public
  - name: Taxpayer
  - name: Taxpayer Auth
  - name: Returns
  - name: GSTR-1 Documents
  - name: File GSTR-1
  - name: GSTR-2A Documents
  - name: GSTR-2B Document
  - name: File GSTR-3B
  - name: GSTR-4
  - name: File GSTR-9
  - name: Invoice Management System
  - name: GSTR-1A Documents
  - name: File GSTR-1A
  - name: Ledgers
  - name: e-Invoice
  - name: Sales e-Invoices for return period
  - name: Purchase e-Invoices for return period
  - name: Front Office Notices
  - name: Front Office
  - name: AATO
  - name: e-Invoice1
  - name: Authentication
  - name: e-Invoice12
  - name: E-Way Bill
  - name: E-Way Bill1
  - name: Authentication1
  - name: Consignor
  - name: Consolidated E-Way Bill
  - name: Multi-Vehicle Movement
  - name: Consignee
  - name: Transporter
  - name: Consolidated E-Way Bill1
  - name: Multi-vehicle Movement
  - name: Common
paths:
  /gst/compliance/e-way-bill/consignor/bill/{ewb_no}/cancel:
    post:
      tags:
        - E-Way Bill1
        - Consignor
      summary: Cancel E-Way Bill
      operationId: cancelEWayBill
      parameters:
        - name: ewb_no
          in: path
          description: ''
          required: true
          example: ''
          schema:
            type: string
        - name: authorization
          in: header
          description: >-
            E-Way Bill access token. For token-generation steps, refer to the
            [Generate E-Way Bill
            Session](/recipes/gst/authentication/generate_e_way_bill_session)
            recipe, then pass the token in the authorization header.
          required: true
          example: ''
          schema:
            type: string
        - name: x-api-version
          in: header
          description: API version
          required: false
          example: ''
          schema:
            type: string
            default: 1.0.0
        - name: x-api-key
          in: header
          description: API key for identification
          required: true
          example: ''
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - ewbNo
                - cancelRsnCode
              properties:
                ewbNo:
                  type: number
                  description: E-Way Bill number
                  format: double
                cancelRsnCode:
                  type: integer
                  description: >-
                    Reason for cancellation. Possible values: 1 (Duplicate), 2
                    (Order Cancelled), 3 (Data Entry mistake), 4 (Others)
                  format: int32
                cancelRmrk:
                  type: string
                  description: Remarks
            examples:
              200 EWB cancelled:
                value:
                  ewbNo: 291010077005
                  cancelRsnCode: 2
                  cancelRmrk: Cancelled the order
                summary: 200 EWB cancelled
              312 EWB already cancelled/receiver cannot cancel EWB:
                value:
                  ewbNo: 291010077010
                  cancelRsnCode: 2
                  cancelRmrk: Cancelled the order
                summary: 312 EWB already cancelled/receiver cannot cancel EWB
              444 EWB cannot be cancelled as it is generated from NIC1:
                value:
                  ewbNo: 141011175250
                  cancelRsnCode: 2
                  cancelRmrk: Cancelled the order
                summary: 444 EWB cannot be cancelled as it is generated from NIC1
      responses:
        '200':
          description: >-
            200 EWB cancelled / 312 EWB already cancelled/receiver cannot cancel
            EWB / 444 EWB cannot be cancelled as it is generated from NIC1
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: number
                    example: 200
                  data:
                    type: object
                    properties:
                      alert:
                        type: string
                        nullable: true
                        example: null
                      data:
                        type: object
                        properties:
                          cancelDate:
                            type: string
                            example: 01/05/2024 07:56:00 PM
                          ewayBillNo:
                            type: string
                            example: '291010077005'
                      error:
                        type: object
                        properties:
                          errorCodes:
                            type: string
                            example: 312,
                      info:
                        type: string
                        example: ''
                      status:
                        type: string
                        example: '1'
                  timestamp:
                    type: number
                    example: 1763446641000
                  transaction_id:
                    type: string
                    example: e7da707c-76c2-4c7e-afb7-a9997d9ab5d3
              examples:
                200 EWB cancelled:
                  summary: 200 EWB cancelled
                  value:
                    code: 200
                    data:
                      alert: null
                      data:
                        cancelDate: 01/05/2024 07:56:00 PM
                        ewayBillNo: '291010077005'
                      status: '1'
                    timestamp: 1763446641000
                    transaction_id: e7da707c-76c2-4c7e-afb7-a9997d9ab5d3
                312 EWB already cancelled/receiver cannot cancel EWB:
                  summary: 312 EWB already cancelled/receiver cannot cancel EWB
                  value:
                    code: 200
                    data:
                      error:
                        errorCodes: 312,
                      info: ''
                      status: '0'
                    timestamp: 1763446641000
                    transaction_id: c8064ddf-e3dd-4b25-b426-e4e07394911c
                444 EWB cannot be cancelled as it is generated from NIC1:
                  summary: 444 EWB cannot be cancelled as it is generated from NIC1
                  value:
                    code: 200
                    data:
                      error:
                        errorCodes: 444,
                      info: ''
                      status: '0'
                    timestamp: 1740137786000
                    transaction_id: 6ec9fa9f-8e62-4438-9938-574d38f801b1
          headers: {}
      deprecated: false
      security: []

````