openapi: 3.0.0
info:
  title: E-Way Bills
  description: An e-Way Bill (EWB) is an electronic document generated on the GST portal for the movement of goods within or across states in India. e-Way Bills are required for transactions whose consignment value crosses the threshold defined by the GSTN. The e-Way Bills module in Zoho Inventory lets you generate, update, cancel, extend, and print EWBs for invoices, credit notes, delivery challans, and other supported transactions in the India edition.
  contact: {}
  version: 1.0.0
servers:
  - url: https://www.zohoapis.com/inventory/v1
    description: API Endpoint
tags:
  - name: ewaybills
    description: e-Way Bills Module (India edition)
paths:
  /ewaybills:
    post:
      tags:
        - ewaybills
      operationId: create_an_ewaybill
      summary: Create an e-Way Bill
      description: Create an e-Way Bill for a transaction such as an invoice, credit note, or delivery challan. The transaction is identified by <code>entity_id</code> and <code>entity_type</code>. Set <code>action</code> to <code>save_generate</code> to generate the e-Way Bill on the GST portal in the same call. Available only in the India edition.
      x-node_available_in:
        - in
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create-an-ewaybill-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create-an-ewaybill-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.CREATE
    get:
      tags:
        - ewaybills
      operationId: list_ewaybills
      summary: List e-Way Bills
      description: Get the list of e-Way Bills generated for the organization. Filter by transaction type, status, date range, branch, or specific entity IDs. Available only in the India edition.
      x-node_available_in:
        - in
      parameters:
        - name: entity_type
          in: query
          required: true
          description: 'Type of transaction whose e-Way Bills are to be fetched. Allowed Values: <code>invoice</code>, <code>creditnote</code>, <code>deliverychallan</code>.'
          schema:
            type: string
          example: invoice
        - name: status
          in: query
          required: false
          description: 'Status of the e-Way Bill. Allowed Values: <code>draft</code>, <code>generated</code>, <code>cancelled</code>, <code>expired</code>, <code>excluded</code>.'
          schema:
            type: string
          example: generated
        - name: filter_by
          in: query
          required: false
          description: 'Filter e-Way Bills by transaction date. Allowed Values: <code>TransactionDate.ThisMonth</code>, <code>TransactionDate.ThisQuarter</code>, <code>TransactionDate.ThisYear</code>, <code>TransactionDate.PreviousMonth</code>, <code>TransactionDate.PreviousQuarter</code>, <code>TransactionDate.PreviousYear</code>, <code>TransactionDate.CustomDate</code>.'
          schema:
            type: string
          example: TransactionDate.ThisMonth
        - name: sort_column
          in: query
          required: false
          description: 'Column on which the list is sorted. Allowed Values: <code>entity_date</code>, <code>expires_in</code>, <code>ewaybill_date</code>, <code>created_time</code>.'
          schema:
            type: string
          example: ewaybill_date
        - name: sort_order
          in: query
          required: false
          description: 'Order in which the list is sorted. Allowed Values: <code>A</code> (ascending) and <code>D</code> (descending).'
          schema:
            type: string
          example: D
        - name: entity_ids
          in: query
          required: false
          description: Comma-separated list of transaction IDs whose e-Way Bills are to be fetched. Maximum of 200 IDs.
          schema:
            type: string
          example: 460000000098765,460000000098766
        - name: branch_id
          in: query
          required: false
          description: ID of the branch.
          schema:
            type: string
          example: '460000001012345'
        - name: location_id
          in: query
          required: false
          description: ID of the location.
          schema:
            type: string
          example: '460000001123456'
        - name: from_date
          in: query
          required: false
          description: 'Start date of the date range. Format: <code>yyyy-mm-dd</code>.'
          schema:
            type: string
          example: '2025-01-01'
        - name: to_date
          in: query
          required: false
          description: 'End date of the date range. Format: <code>yyyy-mm-dd</code>.'
          schema:
            type: string
          example: '2025-01-31'
        - name: export_format
          in: query
          required: false
          description: 'When provided, exports the list in the specified format. Allowed Values: <code>ewaybill</code>.'
          schema:
            type: string
            enum:
              - ewaybill
          example: ewaybill
        - name: page
          in: query
          description: Page number to be fetched. Default value is 1.
          required: false
          schema:
            type: integer
            default: 1
          example: 1
        - name: per_page
          in: query
          description: Number of records to be fetched per page. Default value is 10.
          required: false
          schema:
            type: integer
            default: 10
          example: 10
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-ewaybills-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.reports.READ
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /ewaybills/{ewaybill_id}:
    get:
      tags:
        - ewaybills
      operationId: get_an_ewaybill
      summary: Retrieve an e-Way Bill
      description: Get the details of an e-Way Bill, including transporter, vehicle, dispatch, and shipping information. Available only in the India edition.
      x-node_available_in:
        - in
      parameters:
        - name: print
          in: query
          required: false
          description: Set to <code>true</code> to retrieve the printable representation of the e-Way Bill. Allowed values <code>true</code> and <code>false</code>.
          schema:
            type: boolean
            default: false
          example: false
        - name: include
          in: query
          required: false
          description: 'Include additional content in the response. Allowed Values: <code>html</code>.'
          schema:
            type: string
          example: html
        - name: template_type
          in: query
          required: false
          description: 'Template format used to render the e-Way Bill. Allowed Values: <code>simple</code> and <code>detailed</code>.'
          schema:
            type: string
          example: detailed
        - name: print_with_document
          in: query
          required: false
          description: Set to <code>true</code> to combine the e-Way Bill with the source document in the printable output. Allowed values <code>true</code> and <code>false</code>.
          schema:
            type: boolean
            default: false
          example: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-an-ewaybill-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.invoices.READ
    put:
      tags:
        - ewaybills
      operationId: update_an_ewaybill
      summary: Update an e-Way Bill
      description: Update the details of an existing e-Way Bill. Use the <code>action</code> query parameter to control whether the changes are saved as a draft, generated on the GST portal, or marked as manually generated. Available only in the India edition.
      x-node_available_in:
        - in
      parameters:
        - name: action
          in: query
          required: false
          description: 'Action to be performed when the e-Way Bill is updated. Allowed Values: <code>save</code>, <code>save_generate</code>, <code>manually_generated</code>.'
          schema:
            type: string
          example: save_generate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-an-ewaybill-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-an-ewaybill-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.UPDATE
    delete:
      tags:
        - ewaybills
      operationId: delete_an_ewaybill
      summary: Delete an e-Way Bill
      description: Delete an e-Way Bill from the organization. Generated e-Way Bills cannot be deleted; cancel them on the GST portal first. Available only in the India edition.
      x-node_available_in:
        - in
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-an-ewaybill-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.estimates.DELETE
    parameters:
      - name: ewaybill_id
        in: path
        required: true
        description: Unique identifier of the e-Way Bill.
        schema:
          type: string
        example: '460000000123456'
      - $ref: '#/components/parameters/organization_id'
  /ewaybills/{ewaybill_id}/cancel:
    post:
      tags:
        - ewaybills
      operationId: cancel_an_ewaybill
      summary: Cancel an e-Way Bill
      description: Cancel a generated e-Way Bill on the GST portal. The e-Way Bill can be cancelled within 24 hours of generation, provided it has not been verified during transit. Available only in the India edition.
      x-node_available_in:
        - in
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/cancel-an-ewaybill-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cancel-an-ewaybill-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.CREATE
    parameters:
      - name: ewaybill_id
        in: path
        required: true
        description: Unique identifier of the e-Way Bill.
        schema:
          type: string
        example: '460000000123456'
      - $ref: '#/components/parameters/organization_id'
  /ewaybills/{ewaybill_id}/sync:
    post:
      tags:
        - ewaybills
      operationId: sync_an_ewaybill
      summary: Sync an e-Way Bill
      description: Pull the latest status of an e-Way Bill from the GST portal and update it in Zoho Inventory. Available only in the India edition.
      x-node_available_in:
        - in
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sync-an-ewaybill-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.reports.CREATE
    parameters:
      - name: ewaybill_id
        in: path
        required: true
        description: Unique identifier of the e-Way Bill.
        schema:
          type: string
        example: '460000000123456'
      - $ref: '#/components/parameters/organization_id'
  /ewaybills/exclude:
    post:
      tags:
        - ewaybills
      operationId: exclude_ewaybills
      summary: Exclude e-Way Bills
      description: Mark a set of transactions as not requiring an e-Way Bill so they are excluded from the e-Way Bills list. Available only in the India edition.
      x-node_available_in:
        - in
      parameters:
        - name: entity_ids
          in: query
          required: true
          description: Comma-separated list of transaction IDs to be excluded. Maximum of 50 IDs.
          schema:
            type: string
          example: 460000000098765,460000000098766
        - name: entity_type
          in: query
          required: true
          description: 'Type of transaction. Allowed Values: <code>invoice</code>, <code>creditnote</code>, <code>deliverychallan</code>.'
          schema:
            type: string
          example: invoice
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/exclude-ewaybills-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.CREATE
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /ewaybills/restore:
    post:
      tags:
        - ewaybills
      operationId: restore_ewaybills
      summary: Restore e-Way Bills
      description: Move previously excluded transactions back into the list of transactions that require an e-Way Bill. Available only in the India edition.
      x-node_available_in:
        - in
      parameters:
        - name: entity_ids
          in: query
          required: true
          description: Comma-separated list of transaction IDs to be restored. Maximum of 50 IDs.
          schema:
            type: string
          example: 460000000098765,460000000098766
        - name: entity_type
          in: query
          required: true
          description: 'Type of transaction. Allowed Values: <code>invoice</code>, <code>creditnote</code>, <code>deliverychallan</code>.'
          schema:
            type: string
          example: invoice
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/restore-ewaybills-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.CREATE
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /ewaybills/{ewaybill_id}/vehicles:
    post:
      tags:
        - ewaybills
      operationId: add_vehicle_to_ewaybill
      summary: Add a vehicle to an e-Way Bill
      description: Update the vehicle details of an e-Way Bill on the GST portal during transit (for example, when the vehicle is changed at a transhipment point). Available only in the India edition.
      x-node_available_in:
        - in
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-vehicle-to-ewaybill-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-vehicle-to-ewaybill-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.CREATE
    parameters:
      - name: ewaybill_id
        in: path
        required: true
        description: Unique identifier of the e-Way Bill.
        schema:
          type: string
        example: '460000000123456'
      - $ref: '#/components/parameters/organization_id'
  /ewaybills/{ewaybill_id}/vehicles/{vehicle_id}:
    put:
      tags:
        - ewaybills
      operationId: update_vehicle_in_ewaybill
      summary: Update a vehicle in an e-Way Bill
      description: Update an existing vehicle entry in an e-Way Bill. Available only in the India edition.
      x-node_available_in:
        - in
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-vehicle-in-ewaybill-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-vehicle-in-ewaybill-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.UPDATE
    parameters:
      - name: ewaybill_id
        in: path
        required: true
        description: Unique identifier of the e-Way Bill.
        schema:
          type: string
        example: '460000000123456'
      - name: vehicle_id
        in: path
        required: true
        description: Unique identifier of the vehicle entry.
        schema:
          type: string
        example: '460000000345678'
      - $ref: '#/components/parameters/organization_id'
  /ewaybills/{ewaybill_id}/extendvalidity:
    put:
      tags:
        - ewaybills
      operationId: extend_ewaybill_validity
      summary: Extend the validity of an e-Way Bill
      description: Extend the validity of an e-Way Bill on the GST portal when goods cannot be transported within the original validity period. The extension can be requested between 8 hours before and 8 hours after the e-Way Bill expires. Available only in the India edition.
      x-node_available_in:
        - in
      parameters:
        - name: vehicle_id
          in: query
          required: false
          description: ID of the vehicle for which the validity is to be extended.
          schema:
            type: string
          example: '460000000345678'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/extend-ewaybill-validity-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/extend-ewaybill-validity-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.UPDATE
    parameters:
      - name: ewaybill_id
        in: path
        required: true
        description: Unique identifier of the e-Way Bill.
        schema:
          type: string
        example: '460000000123456'
      - $ref: '#/components/parameters/organization_id'
  /ewaybills/{ewaybill_id}/multivehicle/initiate:
    post:
      tags:
        - ewaybills
      operationId: initiate_multi_vehicle_movement
      summary: Initiate a multi-vehicle movement
      description: Initiate a multi-vehicle movement for an e-Way Bill when the consignment is split across multiple vehicles between two consignment points. Available only in the India edition.
      x-node_available_in:
        - in
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/initiate-multi-vehicle-movement-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/initiate-multi-vehicle-movement-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.CREATE
    parameters:
      - name: ewaybill_id
        in: path
        required: true
        description: Unique identifier of the e-Way Bill.
        schema:
          type: string
        example: '460000000123456'
      - $ref: '#/components/parameters/organization_id'
  /ewaybills/{ewaybill_id}/multivehicle/{group_id}/vehicles:
    post:
      tags:
        - ewaybills
      operationId: add_vehicles_to_multi_vehicle_movement
      summary: Add vehicles to a multi-vehicle movement
      description: Add up to five vehicles to an existing multi-vehicle movement group of an e-Way Bill. Available only in the India edition.
      x-node_available_in:
        - in
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/add-vehicles-to-multi-vehicle-movement-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-vehicles-to-multi-vehicle-movement-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.CREATE
    parameters:
      - name: ewaybill_id
        in: path
        required: true
        description: Unique identifier of the e-Way Bill.
        schema:
          type: string
        example: '460000000123456'
      - name: group_id
        in: path
        required: true
        description: Unique identifier of the multi-vehicle movement group.
        schema:
          type: string
        example: '460000000456789'
      - $ref: '#/components/parameters/organization_id'
  /ewaybills/{ewaybill_id}/multivehicle/{group_id}/vehicles/{updated_vehicle_id}:
    post:
      tags:
        - ewaybills
      operationId: change_vehicle_in_multi_vehicle_movement
      summary: Change a vehicle in a multi-vehicle movement
      description: Replace an existing vehicle entry in a multi-vehicle movement group of an e-Way Bill. Available only in the India edition.
      x-node_available_in:
        - in
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/change-vehicle-in-multi-vehicle-movement-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/change-vehicle-in-multi-vehicle-movement-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.CREATE
    parameters:
      - name: ewaybill_id
        in: path
        required: true
        description: Unique identifier of the e-Way Bill.
        schema:
          type: string
        example: '460000000123456'
      - name: group_id
        in: path
        required: true
        description: Unique identifier of the multi-vehicle movement group.
        schema:
          type: string
        example: '460000000456789'
      - name: updated_vehicle_id
        in: path
        required: true
        description: Unique identifier of the vehicle to be replaced.
        schema:
          type: string
        example: '460000000567890'
      - $ref: '#/components/parameters/organization_id'
  /ewaybills/transporters:
    get:
      tags:
        - ewaybills
      operationId: list_transporters
      summary: List transporters
      description: Get the list of transporters configured for the organization. Available only in the India edition.
      x-node_available_in:
        - in
      parameters:
        - name: page
          in: query
          description: Page number to be fetched. Default value is 1.
          required: false
          schema:
            type: integer
            default: 1
          example: 1
        - name: per_page
          in: query
          description: Number of records to be fetched per page. Default value is 200.
          required: false
          schema:
            type: integer
            default: 200
          example: 200
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-transporters-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.invoices.READ
    post:
      tags:
        - ewaybills
      operationId: create_a_transporter
      summary: Create a transporter
      description: Create a transporter that can be associated with e-Way Bills generated for the organization. Available only in the India edition.
      x-node_available_in:
        - in
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create-a-transporter-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create-a-transporter-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.CREATE
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /ewaybills/transporters/{transporter_id}:
    put:
      tags:
        - ewaybills
      operationId: update_a_transporter
      summary: Update a transporter
      description: Update the details of an existing transporter. Available only in the India edition.
      x-node_available_in:
        - in
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-a-transporter-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-a-transporter-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.UPDATE
    parameters:
      - name: transporter_id
        in: path
        required: true
        description: Unique identifier of the transporter.
        schema:
          type: string
        example: '460000000234567'
      - $ref: '#/components/parameters/organization_id'
  /ewaybills/{ewaybill_id}/transporters/{transporter_id}:
    put:
      tags:
        - ewaybills
      operationId: update_ewaybill_transporter
      summary: Update the transporter of an e-Way Bill
      description: Update the transporter associated with an e-Way Bill. Available only in the India edition.
      x-node_available_in:
        - in
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-ewaybill-transporter-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.UPDATE
    parameters:
      - name: ewaybill_id
        in: path
        required: true
        description: Unique identifier of the e-Way Bill.
        schema:
          type: string
        example: '460000000123456'
      - name: transporter_id
        in: path
        required: true
        description: Unique identifier of the transporter.
        schema:
          type: string
        example: '460000000234567'
      - $ref: '#/components/parameters/organization_id'
  /ewaybills/address/dispatchfrom:
    get:
      tags:
        - ewaybills
      operationId: list_dispatch_from_addresses
      summary: List dispatch-from addresses
      description: Get the list of addresses from which goods can be dispatched while generating e-Way Bills. Available only in the India edition.
      x-node_available_in:
        - in
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-dispatch-from-addresses-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.READ
    post:
      tags:
        - ewaybills
      operationId: create_dispatch_from_address
      summary: Create a dispatch-from address
      description: Add a new dispatch-from address to be used while generating e-Way Bills. Available only in the India edition.
      x-node_available_in:
        - in
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create-dispatch-from-address-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create-dispatch-from-address-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.CREATE
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /ewaybills/address/dispatchfrom/{address_id}:
    delete:
      tags:
        - ewaybills
      operationId: delete_dispatch_from_address
      summary: Delete a dispatch-from address
      description: Delete a dispatch-from address from the list of addresses available for e-Way Bill generation. Available only in the India edition.
      x-node_available_in:
        - in
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-dispatch-from-address-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.estimates.DELETE
    parameters:
      - name: address_id
        in: path
        required: true
        description: Unique identifier of the dispatch-from address.
        schema:
          type: string
        example: '460000000678901'
      - $ref: '#/components/parameters/organization_id'
  /settings/ewaybills:
    get:
      tags:
        - ewaybills
      operationId: get_ewaybill_settings
      summary: Get e-Way Bill settings
      description: Get the e-Way Bill settings configured for the organization, including the credentials registered with the GST portal and the activation status. Available only in the India edition.
      x-node_available_in:
        - in
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-ewaybill-settings-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.READ
    put:
      tags:
        - ewaybills
      operationId: update_ewaybill_settings
      summary: Update e-Way Bill settings
      description: Update the GST portal credentials used for generating e-Way Bills. Available only in the India edition.
      x-node_available_in:
        - in
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-ewaybill-settings-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-ewaybill-settings-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.UPDATE
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /settings/ewaybills/enable:
    post:
      tags:
        - ewaybills
      operationId: enable_ewaybill
      summary: Enable e-Way Bills
      description: Enable the e-Way Bills tab for the organization. Available only in the India edition.
      x-node_available_in:
        - in
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/enable-ewaybill-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.CREATE
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /settings/ewaybills/disable:
    post:
      tags:
        - ewaybills
      operationId: disable_ewaybill
      summary: Disable e-Way Bills
      description: Disable the e-Way Bills tab for the organization. Available only in the India edition.
      x-node_available_in:
        - in
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/disable-ewaybill-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.CREATE
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /settings/ewaybills/deactivate:
    post:
      tags:
        - ewaybills
      operationId: deactivate_ewaybill_credentials
      summary: Deactivate e-Way Bill credentials
      description: Deactivate the GST portal credentials registered for e-Way Bill generation. Available only in the India edition.
      x-node_available_in:
        - in
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deactivate-ewaybill-credentials-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.CREATE
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /settings/{tax_settings_id}/ewaybills:
    get:
      tags:
        - ewaybills
      operationId: get_ewaybill_credentials
      summary: Get e-Way Bill credentials
      description: Get the GST portal credentials registered for the specified tax settings. Available only in the India edition.
      x-node_available_in:
        - in
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-ewaybill-credentials-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.READ
    put:
      tags:
        - ewaybills
      operationId: update_ewaybill_credentials
      summary: Update e-Way Bill credentials
      description: Update the GST portal credentials for the specified tax settings. Available only in the India edition.
      x-node_available_in:
        - in
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-ewaybill-credentials-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-ewaybill-credentials-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.UPDATE
    parameters:
      - name: tax_settings_id
        in: path
        required: true
        description: Unique identifier of the tax settings record for which the e-Way Bill credentials apply.
        schema:
          type: string
        example: '460000000789012'
      - $ref: '#/components/parameters/organization_id'
  /settings/{tax_settings_id}/ewaybills/deactivate:
    post:
      tags:
        - ewaybills
      operationId: deactivate_ewaybill_credentials_for_tax_settings
      summary: Deactivate e-Way Bill credentials for tax settings
      description: Deactivate the GST portal credentials registered under the specified tax settings record. Available only in the India edition.
      x-node_available_in:
        - in
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deactivate-ewaybill-credentials-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInventory.settings.CREATE
    parameters:
      - name: tax_settings_id
        in: path
        required: true
        description: Unique identifier of the tax settings record.
        schema:
          type: string
        example: '460000000789012'
      - $ref: '#/components/parameters/organization_id'
components:
  parameters:
    organization_id:
      name: organization_id
      description: 'ID of the organization. Note: This value is a set of numeric characters.'
      in: query
      required: true
      schema:
        type: string
      example: '10234695'
  schemas:
    gendoc-attributes-schema:
      $ref: '#/components/schemas/ewaybill-response'
    ewaybill-response:
      type: object
      description: An e-Way Bill generated for a transaction. Available only in the India edition.
      properties:
        ewaybill_id:
          type: string
          description: Unique identifier of the e-Way Bill.
          example: '460000000123456'
        entity_id:
          type: string
          description: ID of the source transaction (invoice, credit note, or delivery challan) for which the e-Way Bill is generated.
          example: '460000000098765'
        entity_type:
          type: string
          description: 'Type of the source transaction. Allowed Values: <code>invoice</code>, <code>creditnote</code>, <code>deliverychallan</code>.'
          example: invoice
        entity_number:
          type: string
          description: Reference number of the source transaction.
          example: INV-00045
        entity_date_formatted:
          type: string
          description: Date of the source transaction, formatted per the organization preference.
          example: 15 Jan 2025
        entity_status:
          type: string
          description: Status of the source transaction.
          example: sent
        supplier_gstin:
          type: string
          description: GSTIN of the supplier.
          example: 29ABCDE1234F1Z5
        customer_name:
          type: string
          description: Name of the customer.
          example: Zylker Trading Co.
        customer_gstin:
          type: string
          description: GSTIN of the customer.
          example: 27FGHIJ5678K1Z2
        ewaybill_number:
          type: string
          description: 12-digit e-Way Bill number issued by the GST portal.
          example: '123456789012'
        eway_bill_number:
          type: string
          description: Alias of <code>ewaybill_number</code>.
          example: '123456789012'
        ewaybill_date:
          type: string
          description: Date and time when the e-Way Bill was generated on the GST portal.
          example: '2025-01-15 10:30:00'
        ewaybill_start_date:
          type: string
          description: Date when the e-Way Bill validity starts.
          example: '2025-01-15'
        ewaybill_start_date_formatted:
          type: string
          description: Validity start date formatted per the organization preference.
          example: 15 Jan 2025
        ewaybill_expiry_date:
          type: string
          description: Date and time when the e-Way Bill validity expires.
          example: '2025-01-16 10:30:00'
        ewaybill_status:
          type: string
          description: 'Status of the e-Way Bill. Allowed Values: <code>draft</code>, <code>generated</code>, <code>cancelled</code>, <code>expired</code>, <code>excluded</code>.'
          example: generated
        ewaybill_status_formatted:
          type: string
          description: Display version of the e-Way Bill status.
          example: Generated
        ewaybill_type:
          type: string
          description: 'Type of e-Way Bill. Allowed Values: <code>general</code> and <code>gold</code>.'
          example: general
        validity_days:
          type: integer
          description: Number of days for which the e-Way Bill is valid.
          example: 1
        can_allow_print_ewaybill:
          type: boolean
          description: Indicates whether the e-Way Bill can be printed.
          example: true
        can_allow_cancel_ewaybill:
          type: boolean
          description: Indicates whether the e-Way Bill can still be cancelled (within 24 hours of generation and not verified during transit).
          example: true
        cancel_reason:
          type: string
          description: Reason code chosen while cancelling the e-Way Bill.
          example: duplicate
        cancel_reason_formatted:
          type: string
          description: Display version of the cancellation reason.
          example: Duplicate
        cancel_remarks:
          type: string
          description: Free-form remarks captured while cancelling the e-Way Bill. Max-length [50].
          example: Duplicate entry
        cancel_remarks_formatted:
          type: string
          description: Display version of the cancellation remarks.
          example: Duplicate entry
        transporter_id:
          type: string
          description: ID of the transporter associated with the e-Way Bill.
          example: '460000000234567'
        transporter_name:
          type: string
          description: Name of the transporter. Max-length [255].
          example: Speedy Logistics
        transporter_license:
          type: string
          description: License number of the transporter. Max-length [100].
          example: TL-998877
        transporter_registration_id:
          type: string
          description: GSTIN or transporter ID issued by the GST portal. Max-length [15].
          example: 12AAAAA0000A1Z5
        sub_supply_type:
          type: string
          description: 'Reason for the transportation of goods. Allowed Values: <code>supply</code>, <code>export</code>, <code>job_work</code>, <code>sktd</code>, <code>recipient_not_known</code>, <code>for_own_use</code>, <code>exhibition_or_fairs</code>, <code>line_sales</code>, <code>others</code>.'
          example: supply
        sub_supply_type_desc:
          type: string
          description: Description for the sub-supply type when <code>sub_supply_type</code> is <code>others</code>. Max-length [20].
          example: Sample movement
        distance:
          type: integer
          description: Approximate distance, in kilometres, between the dispatch and shipping addresses.
          example: 350
        transportation_mode:
          type: string
          description: 'Mode of transportation. Allowed Values: <code>road</code>, <code>rail</code>, <code>air</code>, <code>ship</code>.'
          example: road
        transporter_document_number:
          type: string
          description: Document number associated with the consignment (Lorry Receipt, Railway Receipt, Airway Bill, or Bill of Lading). Max-length [30].
          example: LR-12345
        transporter_document_date:
          type: string
          description: 'Date of the transporter document. Format: <code>yyyy-mm-dd</code>.'
          example: '2025-01-15'
        vehicle_number:
          type: string
          description: Registration number of the vehicle carrying the consignment. Max-length [20].
          example: KA01AB1234
        vehicle_type:
          type: string
          description: 'Type of vehicle. Allowed Values: <code>regular</code> and <code>over_dimensional_cargo</code>.'
          example: regular
        vehicle_type_formatted:
          type: string
          description: Display version of the vehicle type.
          example: Regular
        vehicle_permit_type:
          type: string
          description: Permit type of the vehicle.
          example: national
        vehicle_permit_type_formatted:
          type: string
          description: Display version of the vehicle permit type.
          example: National
        vehicle_permit_number:
          type: string
          description: Permit number of the vehicle.
          example: PMT-998877
        vehicle_model_year:
          type: integer
          description: Year in which the vehicle was manufactured.
          example: 2022
        vehicle_reg_place:
          type: string
          description: Place where the vehicle is registered.
          example: Bengaluru
        vehicle_gross_weight:
          type: number
          format: double
          description: Gross weight of the vehicle, in metric tonnes.
          example: 12.5
        insurer:
          type: string
          description: Name of the insurance provider for the consignment.
          example: Acme Insurance Ltd.
        insurance_policy_number:
          type: string
          description: Policy number of the consignment insurance.
          example: POL-123456789
        place_of_dispatch:
          type: string
          description: State code from which the consignment is dispatched.
          example: '29'
        place_of_delivery:
          type: string
          description: State code to which the consignment is delivered.
          example: '27'
        ship_to_state_code:
          type: string
          description: State code of the shipping address. Used when the ship-to state differs from the customer billing state.
          example: '27'
        dispatch_from_address_id:
          type: string
          description: ID of the dispatch-from address.
          example: '460000000678901'
        ship_to_address_id:
          type: string
          description: ID of the shipping address.
          example: '460000000678902'
        entity_total:
          type: number
          format: double
          description: Total value of the source transaction.
          example: 50000
        is_vehicle_details_push_failed:
          type: boolean
          description: Indicates whether the latest attempt to push vehicle details to the GST portal failed.
          example: false
        vehicle_details:
          type: array
          description: List of vehicle entries linked to the e-Way Bill.
          items:
            $ref: '#/components/schemas/ewaybill-vehicle-detail'
        multivehicle_group_details:
          type: array
          description: Multi-vehicle movement groups for the e-Way Bill.
          items:
            $ref: '#/components/schemas/multivehicle-group-detail'
    ewaybill-vehicle-detail:
      type: object
      properties:
        transportation_mode:
          type: string
          description: 'Mode of transportation. Allowed Values: <code>road</code>, <code>rail</code>, <code>air</code>, <code>ship</code>.'
          example: road
        transportation_mode_formatted:
          type: string
          example: Road
        transporter_document_number:
          type: string
          example: LR-12345
        transporter_document_date:
          type: string
          example: '2025-01-15'
        vehicle_number:
          type: string
          example: KA01AB1234
        updated_time:
          type: string
          example: '2025-01-15 10:35:00'
        operation_type:
          type: string
          description: 'Operation that produced this vehicle entry. Allowed Values: <code>create</code>, <code>update</code>, <code>multi_vehicle</code>.'
          example: create
        from_place:
          type: string
          example: Bengaluru
        from_state:
          type: string
          description: State code from which the vehicle starts.
          example: '29'
        from_state_formatted:
          type: string
          example: Karnataka
        reason:
          type: string
          description: 'Reason for the vehicle change. Allowed Values: <code>due_to_break_down</code>, <code>due_to_transhipment</code>, <code>first_time</code>, <code>others</code>.'
          example: first_time
        remarks:
          type: string
          example: Initial dispatch
        vehicle_type:
          type: string
          example: regular
        vehicle_type_formatted:
          type: string
          example: Regular
        vehicle_permit_type:
          type: string
          example: national
        vehicle_permit_number:
          type: string
          example: PMT-998877
        vehicle_model_year:
          type: integer
          example: 2022
        vehicle_reg_place:
          type: string
          example: Bengaluru
        insurer:
          type: string
          example: Acme Insurance Ltd.
        insurance_policy_number:
          type: string
          example: POL-123456789
        vehicle_gross_weight:
          type: number
          format: double
          example: 12.5
        group_number:
          type: string
          description: Group number when the vehicle is part of a multi-vehicle movement.
          example: '1'
    multivehicle-group-detail:
      type: object
      properties:
        group_id:
          type: string
          example: '460000000456789'
        group_name:
          type: string
          example: Group 1
        from_place:
          type: string
          example: Bengaluru
        from_state:
          type: string
          example: '29'
        from_state_formatted:
          type: string
          example: Karnataka
        reason:
          type: string
          example: first_time
        to_place:
          type: string
          example: Mumbai
        to_state:
          type: string
          example: '27'
        to_state_formatted:
          type: string
          example: Maharashtra
        remarks:
          type: string
          example: Split shipment
        group_number:
          type: string
          example: '1'
        group_number_formatted:
          type: string
          example: Group 1
        total_quantity:
          type: number
          format: double
          example: 5000
        transportation_mode:
          type: string
          example: road
        transportation_mode_formatted:
          type: string
          example: Road
        operation_type:
          type: string
          example: multi_vehicle
        unit_id:
          type: string
          example: '460000000999111'
        unit:
          type: string
          example: kg
        uqc:
          type: string
          description: Unique Quantity Code as defined by the GST portal.
          example: KGS
        vehicle_details:
          type: array
          items:
            $ref: '#/components/schemas/multivehicle-detail'
    multivehicle-detail:
      type: object
      properties:
        vehicle_id:
          type: string
          example: '460000000345678'
        transportation_mode:
          type: string
          example: road
        transportation_mode_formatted:
          type: string
          example: Road
        transporter_document_number:
          type: string
          example: LR-12345
        transporter_document_date:
          type: string
          example: '2025-01-15'
        vehicle_number:
          type: string
          example: KA01AB1234
        updated_time:
          type: string
          example: '2025-01-15 10:35:00'
        operation_type:
          type: string
          example: multi_vehicle
        from_place:
          type: string
          example: Bengaluru
        from_state:
          type: string
          example: '29'
        from_state_formatted:
          type: string
          example: Karnataka
        reason:
          type: string
          example: due_to_transhipment
        remarks:
          type: string
          example: Mid-route swap
        vehicle_type:
          type: string
          example: regular
        vehicle_type_formatted:
          type: string
          example: Regular
        quantity:
          type: number
          format: double
          example: 1000
        group_number:
          type: string
          example: '1'
        group_number_formatted:
          type: string
          example: Group 1
        is_cancelled:
          type: boolean
          example: false
        multivehicle_group_id:
          type: string
          example: '460000000456789'
    ewaybill-list-item:
      type: object
      properties:
        ewaybill_id:
          type: string
          example: '460000000123456'
        entity_id:
          type: string
          example: '460000000098765'
        entity_type:
          type: string
          example: invoice
        ewaybill_type:
          type: string
          example: general
        entity_number:
          type: string
          example: INV-00045
        entity_date:
          type: string
          example: '2025-01-15'
        customer_name:
          type: string
          example: Zylker Trading Co.
        customer_gstin:
          type: string
          example: 27FGHIJ5678K1Z2
        total:
          type: number
          format: double
          example: 50000
        ewaybill_number:
          type: string
          example: '123456789012'
        ewaybill_status:
          type: string
          example: generated
        ewaybill_status_formatted:
          type: string
          example: Generated
        ewaybill_date:
          type: string
          example: '2025-01-15'
        expires_in:
          type: string
          example: '2025-01-16'
        is_expired:
          type: boolean
          example: false
    transporter-response:
      type: object
      properties:
        transporter_id:
          type: string
          description: Unique identifier of the transporter.
          example: '460000000234567'
        transporter_name:
          type: string
          description: Name of the transporter. Max-length [255].
          example: Speedy Logistics
        transporter_license:
          type: string
          description: License number of the transporter. Max-length [100].
          example: TL-998877
        transporter_registration_id:
          type: string
          description: GSTIN or transporter ID issued by the GST portal. Max-length [15].
          example: 12AAAAA0000A1Z5
    dispatch-from-address-response:
      type: object
      properties:
        address_id:
          type: string
          description: Unique identifier of the dispatch-from address.
          example: '460000000678901'
        attention:
          type: string
          example: Warehouse Manager
        company_name:
          type: string
          example: Zylker Inc.
        address:
          type: string
          example: 12, MG Road
        street2:
          type: string
          example: Indiranagar
        city:
          type: string
          example: Bengaluru
        state:
          type: string
          example: Karnataka
        state_code:
          type: string
          example: '29'
        zip:
          type: string
          example: '560001'
        country:
          type: string
          example: India
        country_code:
          type: string
          example: IN
        phone:
          type: string
          example: +91 80 12345678
        fax:
          type: string
          example: +91 80 12345679
    ewaybill-credentials-response:
      type: object
      properties:
        ewaybill_username:
          type: string
          description: GST portal username registered for e-Way Bill generation.
          example: gstapi_user
        tax_reg_no:
          type: string
          description: GSTIN registered with the e-Way Bill credentials.
          example: 29ABCDE1234F1Z5
        is_active:
          type: boolean
          description: Indicates whether the credentials are currently active.
          example: true
        is_ewaybill_enabled:
          type: boolean
          description: Indicates whether the e-Way Bills tab is enabled for the organization.
          example: true
        ewb_preference:
          type: object
          properties:
            ewb_types:
              type: array
              items:
                type: object
                properties:
                  ewb_type:
                    type: string
                    description: 'Type of e-Way Bill. Allowed Values: <code>general</code> and <code>gold</code>.'
                    example: general
                  threshold:
                    type: number
                    format: double
                    description: Threshold value above which an e-Way Bill is required.
                    example: 50000
                  is_enabled:
                    type: boolean
                    example: true
    page:
      type: integer
      description: Current page in the result set.
      example: 1
    per_page:
      type: integer
      description: Number of records per page in the result set.
      example: 10
    has_more_page:
      type: boolean
      description: Indicates whether more pages are available.
      example: false
    report_name:
      type: string
      description: Name of the report being run.
      example: e-Way Bills
    applied_filter:
      type: string
      description: Filter applied on the list.
      example: TransactionDate.ThisMonth
    sort_column:
      type: string
      description: Column on which the list is sorted.
      example: ewaybill_date
    sort_order:
      type: string
      description: 'Order in which the list is sorted. Allowed Values: <code>A</code> (ascending) and <code>D</code> (descending).'
      example: D
    page_context:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/page'
        per_page:
          $ref: '#/components/schemas/per_page'
        has_more_page:
          $ref: '#/components/schemas/has_more_page'
        report_name:
          $ref: '#/components/schemas/report_name'
        applied_filter:
          $ref: '#/components/schemas/applied_filter'
        sort_column:
          $ref: '#/components/schemas/sort_column'
        sort_order:
          $ref: '#/components/schemas/sort_order'
    list-ewaybills-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        ewaybills:
          type: array
          items:
            $ref: '#/components/schemas/ewaybill-list-item'
        page_context:
          $ref: '#/components/schemas/page_context'
    get-an-ewaybill-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        ewaybill:
          $ref: '#/components/schemas/ewaybill-response'
    create-an-ewaybill-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The e-Way Bill details have been saved.
          readOnly: true
        ewaybill:
          $ref: '#/components/schemas/ewaybill-response'
    update-an-ewaybill-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The e-Way Bill details have been saved.
          readOnly: true
        ewaybill:
          $ref: '#/components/schemas/ewaybill-response'
    delete-an-ewaybill-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The e-Way Bill has been deleted.
          readOnly: true
    cancel-an-ewaybill-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The e-Way Bill has been cancelled.
          readOnly: true
    sync-an-ewaybill-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The e-Way Bill has been synced successfully.
          readOnly: true
    exclude-ewaybills-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The selected transactions have been excluded from e-Way Bill generation.
          readOnly: true
    restore-ewaybills-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The selected transactions have been restored for e-Way Bill generation.
          readOnly: true
    add-vehicle-to-ewaybill-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The vehicle details have been added to the e-Way Bill.
          readOnly: true
        vehicle_details:
          $ref: '#/components/schemas/ewaybill-vehicle-detail'
    update-vehicle-in-ewaybill-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The vehicle details have been updated.
          readOnly: true
        vehicle_details:
          $ref: '#/components/schemas/ewaybill-vehicle-detail'
    extend-ewaybill-validity-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The e-Way Bill validity has been extended.
          readOnly: true
    initiate-multi-vehicle-movement-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The multi-vehicle movement has been initiated.
          readOnly: true
        multivehicle_group_details:
          type: array
          items:
            $ref: '#/components/schemas/multivehicle-group-detail'
    add-vehicles-to-multi-vehicle-movement-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The vehicles have been added to the multi-vehicle movement.
          readOnly: true
        vehicle_response_details:
          type: array
          items:
            type: object
            properties:
              vehicle_id:
                type: string
                example: '460000000345678'
              status:
                type: string
                example: success
              message:
                type: string
                example: Vehicle added.
    change-vehicle-in-multi-vehicle-movement-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The vehicle in the multi-vehicle movement has been updated.
          readOnly: true
        multivehicle_group_details:
          type: array
          items:
            $ref: '#/components/schemas/multivehicle-group-detail'
    list-transporters-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        transporters:
          type: array
          items:
            $ref: '#/components/schemas/transporter-response'
        page_context:
          $ref: '#/components/schemas/page_context'
    create-a-transporter-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The transporter has been added.
          readOnly: true
        transporter:
          $ref: '#/components/schemas/transporter-response'
    update-a-transporter-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The transporter details have been updated.
          readOnly: true
        transporter:
          $ref: '#/components/schemas/transporter-response'
    update-ewaybill-transporter-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The transporter has been updated for the e-Way Bill.
          readOnly: true
        transporter:
          $ref: '#/components/schemas/transporter-response'
    list-dispatch-from-addresses-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/dispatch-from-address-response'
    create-dispatch-from-address-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The dispatch-from address has been added.
          readOnly: true
        address:
          $ref: '#/components/schemas/dispatch-from-address-response'
    delete-dispatch-from-address-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The dispatch-from address has been deleted.
          readOnly: true
    get-ewaybill-settings-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        ewaybill_settings:
          $ref: '#/components/schemas/ewaybill-credentials-response'
    update-ewaybill-settings-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The e-Way Bill credentials have been updated.
          readOnly: true
        ewaybill_settings:
          $ref: '#/components/schemas/ewaybill-credentials-response'
    enable-ewaybill-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The e-Way Bills module has been enabled successfully.
          readOnly: true
    disable-ewaybill-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The e-Way Bills module has been disabled successfully.
          readOnly: true
    deactivate-ewaybill-credentials-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The e-Way Bill integration has been deactivated successfully.
          readOnly: true
        ewaybill_settings:
          $ref: '#/components/schemas/ewaybill-credentials-response'
    get-ewaybill-credentials-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        ewaybill_settings:
          $ref: '#/components/schemas/ewaybill-credentials-response'
    update-ewaybill-credentials-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The e-Way Bill credentials have been updated.
          readOnly: true
        ewaybill_settings:
          $ref: '#/components/schemas/ewaybill-credentials-response'
    create-an-ewaybill-request:
      required:
        - entity_id
      type: object
      properties:
        entity_id:
          type: string
          description: ID of the source transaction (invoice, credit note, or delivery challan) for which the e-Way Bill is generated.
          example: '460000000098765'
        entity_type:
          type: string
          description: 'Type of the source transaction. Allowed Values: <code>invoice</code>, <code>creditnote</code>, <code>deliverychallan</code>.'
          example: invoice
        branch_id:
          type: string
          description: ID of the branch.
          example: '460000001012345'
        location_id:
          type: string
          description: ID of the location.
          example: '460000001123456'
        ewaybill_number:
          type: string
          description: 12-digit e-Way Bill number issued by the GST portal. Required only when <code>action</code> is <code>manually_generated</code>. Max-length [15].
          example: '123456789012'
        ewaybill_date:
          type: string
          description: 'Date when the e-Way Bill was generated on the GST portal. Format: <code>yyyy-mm-dd</code>.'
          example: '2025-01-15'
        transporter_id:
          type: string
          description: ID of the transporter associated with the e-Way Bill.
          example: '460000000234567'
        transportation_mode:
          type: string
          description: 'Mode of transportation. Allowed Values: <code>road</code>, <code>rail</code>, <code>air</code>, <code>ship</code>.'
          example: road
        transaction_type:
          type: string
          description: 'Transaction type for the e-Way Bill. Allowed Values: <code>regular</code>, <code>bill_to_ship_to</code>, <code>bill_from_dispatch_from</code>, <code>combination_of_2_and_3</code>.'
          example: regular
        dispatch_from_address_id:
          type: string
          description: ID of the dispatch-from address.
          example: '460000000678901'
        ship_to_address_id:
          type: string
          description: ID of the shipping address.
          example: '460000000678902'
        sub_supply_type:
          type: string
          description: 'Reason for the transportation of goods. Allowed Values: <code>supply</code>, <code>export</code>, <code>job_work</code>, <code>sktd</code>, <code>recipient_not_known</code>, <code>for_own_use</code>, <code>exhibition_or_fairs</code>, <code>line_sales</code>, <code>others</code>.'
          example: supply
        sub_supply_type_desc:
          type: string
          description: Description for the sub-supply type when <code>sub_supply_type</code> is <code>others</code>. Max-length [20].
          example: Sample movement
        vehicle_number:
          type: string
          description: Registration number of the vehicle. Max-length [20].
          example: KA01AB1234
        transporter_document_number:
          type: string
          description: Document number associated with the consignment. Max-length [30].
          example: LR-12345
        transporter_document_date:
          type: string
          description: 'Date of the transporter document. Format: <code>yyyy-mm-dd</code>.'
          example: '2025-01-15'
        ship_to_state_code:
          type: string
          description: State code of the shipping address.
          example: '27'
        distance:
          type: integer
          description: Approximate distance, in kilometres, between the dispatch and shipping addresses.
          example: 350
        validity_days:
          type: integer
          description: Number of days for which the e-Way Bill is valid.
          example: 1
        vehicle_type:
          type: string
          description: 'Type of vehicle. Allowed Values: <code>regular</code> and <code>over_dimensional_cargo</code>. Max-length [100].'
          example: regular
        vehicle_permit_type:
          type: string
          description: Permit type of the vehicle. Max-length [100].
          example: national
        vehicle_permit_number:
          type: string
          description: Permit number of the vehicle. Max-length [100].
          example: PMT-998877
        vehicle_model_year:
          type: integer
          description: Year in which the vehicle was manufactured.
          example: 2022
        vehicle_reg_place:
          type: string
          description: Place where the vehicle is registered. Max-length [100].
          example: Bengaluru
        vehicle_gross_weight:
          type: number
          format: double
          description: Gross weight of the vehicle, in metric tonnes.
          example: 12.5
        insurer:
          type: string
          description: Name of the insurance provider for the consignment. Max-length [100].
          example: Acme Insurance Ltd.
        insurance_policy_number:
          type: string
          description: Policy number of the consignment insurance. Max-length [150].
          example: POL-123456789
        action:
          type: string
          description: 'Action to be performed. Allowed Values: <code>save</code>, <code>save_generate</code>, <code>manually_generated</code>.'
          example: save_generate
    update-an-ewaybill-request:
      type: object
      allOf:
        - $ref: '#/components/schemas/create-an-ewaybill-request'
    cancel-an-ewaybill-request:
      required:
        - reason
      type: object
      properties:
        reason:
          type: string
          description: 'Reason code for cancelling the e-Way Bill. Allowed Values: <code>duplicate</code>, <code>order_cancelled</code>, <code>data_entry_mistake</code>, <code>others</code>.'
          example: duplicate
        remarks:
          type: string
          description: Free-form remarks for the cancellation. Max-length [50].
          example: Duplicate entry
    add-vehicle-to-ewaybill-request:
      required:
        - transportation_mode
        - from_place
        - from_state
        - reason
      type: object
      properties:
        vehicle_id:
          type: string
          description: ID of the vehicle entry being modified.
          example: '460000000345678'
        vehicle_number:
          type: string
          description: Registration number of the vehicle. Max-length [20].
          example: KA01AB1234
        vehicle_type:
          type: string
          description: 'Type of vehicle. Allowed Values: <code>regular</code> and <code>over_dimensional_cargo</code>. Max-length [100].'
          example: regular
        transportation_mode:
          type: string
          description: 'Mode of transportation. Allowed Values: <code>road</code>, <code>rail</code>, <code>air</code>, <code>ship</code>.'
          example: road
        from_place:
          type: string
          description: Place from which the vehicle is starting. Max-length [50].
          example: Bengaluru
        from_state:
          type: string
          description: State code from which the vehicle is starting.
          example: '29'
        reason:
          type: string
          description: 'Reason for the vehicle update. Allowed Values: <code>due_to_break_down</code>, <code>due_to_transhipment</code>, <code>first_time</code>, <code>others</code>.'
          example: first_time
        remarks:
          type: string
          description: Remarks for the vehicle update. Max-length [50].
          example: Initial dispatch
        transporter_document_number:
          type: string
          description: Document number associated with the consignment. Max-length [30].
          example: LR-12345
        transporter_document_date:
          type: string
          description: 'Date of the transporter document. Format: <code>yyyy-mm-dd</code>.'
          example: '2025-01-15'
    update-vehicle-in-ewaybill-request:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-vehicle-to-ewaybill-request'
    extend-ewaybill-validity-request:
      type: object
      properties:
        current_place:
          type: string
          description: Current place of the consignment. Max-length [50].
          example: Pune
        current_state:
          type: string
          description: State code of the current location of the consignment.
          example: '27'
        current_pincode:
          type: string
          description: PIN Code of the current location.
          example: '411001'
        consignment_mode:
          type: string
          description: 'Mode of consignment. Allowed Values: <code>in_transit</code> and <code>in_movement</code>.'
          example: in_movement
        vehicle_type:
          type: string
          description: 'Type of vehicle. Allowed Values: <code>regular</code> and <code>over_dimensional_cargo</code>.'
          example: regular
        vehicle_number:
          type: string
          description: Registration number of the vehicle. Max-length [20].
          example: KA01AB1234
        transporter_document_number:
          type: string
          description: Document number associated with the consignment. Max-length [30].
          example: LR-12345
        transporter_document_date:
          type: string
          description: 'Date of the transporter document. Format: <code>yyyy-mm-dd</code>.'
          example: '2025-01-15'
        remaining_distance:
          type: integer
          description: Remaining distance to the destination, in kilometres.
          example: 200
        address_line_1:
          type: string
          description: Address line 1 of the current location. Max-length [200].
          example: 12, MG Road
        address_line_2:
          type: string
          description: Address line 2 of the current location. Max-length [200].
          example: Near Central Park
        address_line_3:
          type: string
          description: Address line 3 of the current location. Max-length [200].
          example: Pune
        extend_reason:
          type: string
          description: 'Reason for extending the validity. Allowed Values: <code>natural_calamity</code>, <code>law_and_order</code>, <code>transhipment</code>, <code>accident</code>, <code>others</code>.'
          example: transhipment
        extend_remarks:
          type: string
          description: Free-form remarks for the validity extension. Max-length [50].
          example: Vehicle breakdown
    initiate-multi-vehicle-movement-request:
      required:
        - reason
        - from_place
        - from_state
        - to_place
        - to_state
        - transportation_mode
        - unit_id
      type: object
      properties:
        reason:
          type: string
          description: 'Reason for initiating the multi-vehicle movement. Allowed Values: <code>due_to_break_down</code>, <code>due_to_transhipment</code>, <code>first_time</code>, <code>others</code>.'
          example: due_to_transhipment
        remarks:
          type: string
          description: Remarks for the multi-vehicle movement. Max-length [50].
          example: Split shipment for transhipment
        from_place:
          type: string
          description: Place from which the consignment is split. Max-length [50].
          example: Bengaluru
        from_state:
          type: string
          description: State code from which the consignment is split.
          example: '29'
        to_place:
          type: string
          description: Place at which the consignment is recombined. Max-length [50].
          example: Mumbai
        to_state:
          type: string
          description: State code at which the consignment is recombined.
          example: '27'
        transportation_mode:
          type: string
          description: 'Mode of transportation. Allowed Values: <code>road</code>, <code>rail</code>, <code>air</code>, <code>ship</code>.'
          example: road
        total_quantity:
          type: number
          format: double
          description: Total quantity of the consignment.
          example: 5000
        unit_id:
          type: string
          description: ID of the unit of measurement.
          example: '460000000999111'
    add-vehicles-to-multi-vehicle-movement-request:
      required:
        - vehicle_number
        - transporter_document_number
      type: object
      properties:
        vehicle_number:
          type: string
          description: Registration number of the vehicle. Max-length [20].
          example: KA01AB1234
        transporter_document_number:
          type: string
          description: Document number associated with the consignment. Max-length [30].
          example: LR-12345
        transporter_document_date:
          type: string
          description: 'Date of the transporter document. Format: <code>yyyy-mm-dd</code>.'
          example: '2025-01-15'
        quantity:
          type: number
          format: double
          description: Quantity carried by this vehicle.
          example: 1000
    change-vehicle-in-multi-vehicle-movement-request:
      required:
        - transporter_document_number
        - vehicle_number
        - reason
        - from_place
        - from_state
      type: object
      properties:
        transporter_document_number:
          type: string
          description: Document number associated with the consignment. Max-length [30].
          example: LR-12345
        vehicle_number:
          type: string
          description: Registration number of the vehicle. Max-length [20].
          example: KA01AB1234
        reason:
          type: string
          description: 'Reason for changing the vehicle. Allowed Values: <code>due_to_break_down</code>, <code>due_to_transhipment</code>, <code>first_time</code>, <code>others</code>.'
          example: due_to_break_down
        remarks:
          type: string
          description: Remarks for the vehicle change. Max-length [50].
          example: Replacement vehicle
        from_place:
          type: string
          description: Place from which the new vehicle is starting. Max-length [50].
          example: Pune
        from_state:
          type: string
          description: State code from which the new vehicle is starting.
          example: '27'
    create-a-transporter-request:
      required:
        - transporter_name
        - transporter_registration_id
      type: object
      properties:
        transporter_name:
          type: string
          description: Name of the transporter. Max-length [255].
          example: Speedy Logistics
        transporter_license:
          type: string
          description: License number of the transporter. Max-length [100].
          example: TL-998877
        transporter_registration_id:
          type: string
          description: GSTIN or transporter ID issued by the GST portal. Max-length [15].
          example: 12AAAAA0000A1Z5
    update-a-transporter-request:
      type: object
      allOf:
        - $ref: '#/components/schemas/create-a-transporter-request'
    create-dispatch-from-address-request:
      required:
        - address
        - city
        - state_code
        - zip
      type: object
      properties:
        attention:
          type: string
          example: Warehouse Manager
        company_name:
          type: string
          example: Zylker Inc.
        address:
          type: string
          description: Address line. Max-length [500].
          example: 12, MG Road
        street2:
          type: string
          description: Second address line. Max-length [500].
          example: Indiranagar
        city:
          type: string
          example: Bengaluru
        state:
          type: string
          example: Karnataka
        state_code:
          type: string
          description: State code as defined by the GST portal.
          example: '29'
        zip:
          type: string
          description: PIN Code of the address.
          example: '560001'
        country:
          type: string
          example: India
        country_code:
          type: string
          example: IN
        phone:
          type: string
          example: +91 80 12345678
        fax:
          type: string
          example: +91 80 12345679
    update-ewaybill-settings-request:
      required:
        - ewaybill_username
        - ewaybill_password
      type: object
      properties:
        ewaybill_username:
          type: string
          description: GST portal username registered for e-Way Bill generation. Max-length [3000].
          example: gstapi_user
        ewaybill_password:
          type: string
          description: GST portal password for the registered username. Max-length [3000].
          example: StrongP@ssw0rd
    update-ewaybill-credentials-request:
      type: object
      allOf:
        - $ref: '#/components/schemas/update-ewaybill-settings-request'
  securitySchemes:
    Zoho_Auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.zoho.com/oauth/v2/auth
          scopes:
            ZohoInventory.settings.CREATE: Create Settings
            ZohoInventory.settings.READ: Read Settings
            ZohoInventory.settings.UPDATE: Update Settings
            ZohoInventory.invoices.READ: Read Invoices
            ZohoInventory.reports.READ: Read Reports
            ZohoInventory.reports.CREATE: Create Reports
            ZohoInventory.estimates.DELETE: Delete Estimates
