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

# Create Eway Bill

<Note>
  To create an EwayBill first connect to [EwayBill Portal](https://app.getswipe.in/ewaybills).
</Note>


## OpenAPI

````yaml post /v2/ewaybill/{doc_hash_id}
openapi: 3.0.1
info:
  title: SwipeAPI
  description: Partner API
  version: '2.0'
servers:
  - url: https://app.getswipe.in/api/partner
security:
  - bearerAuth: []
tags:
  - name: Document
    description: Document related operations
  - name: Customer
    description: Customer related operations
  - name: Payment
    description: Payment related operations
  - name: Product
    description: Product related operations
  - name: Utility
    description: Generic operations
  - name: Subscriptions
    description: Subscriptions related operations
  - name: Document V2
    description: Document related operations
  - name: Customer V2
    description: Customer related operations
  - name: Payment V2
    description: Payment related operations
  - name: Product V2
    description: Product related operations
  - name: Subscriptions V2
    description: Subscriptions related operations
  - name: Utility V2
    description: Generic operations
  - name: Vendor V2
    description: Vendor related operations
  - name: EwayBill
    description: EwayBill related operations
  - name: Inventory V2
    description: Inventory related operations
paths:
  /v2/ewaybill/{doc_hash_id}:
    post:
      tags:
        - EwayBill
      summary: Create Eway Bill
      operationId: v2_post_eway_bill
      parameters:
        - name: doc_hash_id
          in: path
          description: The hash id of the document
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EwayBillModel'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponseEwayBill'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEwayBill'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEwayBill'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEwayBill'
components:
  schemas:
    EwayBillModel:
      required:
        - dispatch_from
        - dispatch_to
        - sub_supply_type
        - supply_type
        - transport_mode
        - transporter_doc_date
      type: object
      properties:
        supply_type:
          type: string
          description: >-
            Indicates whether the supply is outward (from the sender) or inward
            (to the sender)
          example: Outward
          enum:
            - Outward
            - Inward
        sub_supply_type:
          type: string
          description: Specifies the nature of supply, such as sale, transfer, or job work.
          example: Supply
          enum:
            - Supply
            - Export
            - Job Work
            - SKD/CKD/Lots
            - Recipient Not Known
            - For Own Use
            - Job Work Returns
            - Sales Returns
            - Exhibition or fairs
            - Line Sales
            - Others
        transporter_doc_date:
          type: string
          description: The date on which the transporter issued the document(DD-MM-YYYY)
          example: 05-03-2025
        dispatch_from:
          type: object
          description: Dispatch From Address
          allOf:
            - $ref: '#/components/schemas/EwayBillAddress'
        dispatch_to:
          type: object
          description: Dispatch To Address
          allOf:
            - $ref: '#/components/schemas/EwayBillAddress'
        vehicle_type:
          type: string
          description: >-
            Specifies whether the vehicle is regular or special (e.g.,
            over-dimensional cargo).
          example: Regular
          enum:
            - Regular
            - Over Dimensional Cargo
        transaction_type:
          type: string
          description: >-
            Defines the type of transaction, such as regular, bill-to-ship-to,
            or bill-from-dispatch-from.
          example: Regular
          enum:
            - Regular
            - Bill To - Ship To
            - Bill From - Dispatch From
            - Combination of 2 and 3
        transport_mode:
          type: string
          description: Mode of transportation used (e.g., road, rail, air, or ship)
          example: Road
          enum:
            - Road
            - Rail
            - Air
            - Ship or Ship Cum Road/Rail
        ship_to_gstin:
          type: string
          description: >-
            GSTIN of the consignee, or 'URP' if unregistered. Mandatory when
            transaction_type is 'Bill To - Ship To' or 'Combination of 2 and 3'.
          example: 29ABCDE1234F1Z5
          maxLength: 15
        sub_supply_type_description:
          type: string
          description: Additional description of the sub-supply type.
          example: Supply of goods
        transporter_id:
          type: string
          description: A unique identification number assigned to the transporter.
          example: '123456'
        transporter_name:
          type: string
          description: The name of the transporter handling the shipment.
          example: Transporter Name
        vehicle_number:
          type: string
          description: The registration number of the vehicle carrying the goods.
          example: KA01AB1234
        transporter_doc_number:
          type: string
          description: A reference number of the document issued by the transporter.
          example: '123456'
    SuccessResponseEwayBill:
      type: object
      properties:
        success:
          type: boolean
          description: Success
          example: true
        message:
          type: string
          description: Message
          example: Eway Bill created successfully
    ErrorEwayBill:
      type: object
      properties:
        success:
          type: boolean
          example: false
          default: false
        error_code:
          type: string
          description: >-
            Error Code unique for a specific error. For ewaybill portal errors,
            error_code will be PORTAL_ERROR_[ewaybill_portal_errorcode] ex:
            PORTAL_ERROR_2247, we can refer description for error code from here
            https://einvoice1.gst.gov.in/others/geterrorcodes/EWB
          example: INVALID_HASH_ID
        message:
          type: string
          description: Error message
          example: Some error occurred
        errors:
          type: object
          properties: {}
          description: Error details
    EwayBillAddress:
      required:
        - addr_id
        - address_line1
        - address_line2
        - city
        - country
        - pincode
        - state
      type: object
      properties:
        addr_id:
          type: integer
          description: >-
            Address ID. Value should be n >= 0 and n <= 999999, It will
            automatically update the existing address if the address ID already
            exists.
                                              
          example: -1
        address_line1:
          type: string
          description: Address Line 1
          example: 123 Street
        address_line2:
          type: string
          description: Address Line 2
          example: Apt 4B
        city:
          type: string
          description: City
          example: City Name
        state:
          type: string
          description: |-
            State.
                                           Select OTHER TERRITORY for countries other than India.
                                           You can copy the state details from https://developers.getswipe.in/api-reference/references#state-details
                                           
          example: State Name
          enum:
            - JAMMU AND KASHMIR
            - HIMACHAL PRADESH
            - PUNJAB
            - CHANDIGARH
            - UTTARAKHAND
            - HARYANA
            - DELHI
            - RAJASTHAN
            - UTTAR PRADESH
            - BIHAR
            - SIKKIM
            - ARUNACHAL PRADESH
            - NAGALAND
            - MANIPUR
            - MIZORAM
            - TRIPURA
            - MEGHALAYA
            - ASSAM
            - WEST BENGAL
            - JHARKHAND
            - ODISHA
            - CHHATTISGARH
            - MADHYA PRADESH
            - GUJARAT
            - DADRA & NAGAR HAVELI & DAMAN & DIU
            - MAHARASHTRA
            - ANDHRAPRADESH(BEFOREADDED)
            - KARNATAKA
            - GOA
            - LAKSHWADEEP
            - KERALA
            - TAMIL NADU
            - PUDUCHERRY
            - ANDAMAN & NICOBAR
            - TELANGANA
            - ANDHRA PRADESH
            - LADAKH(NEWLYADDED)
            - OTHER TERRITORY
        country:
          type: string
          description: >-
            Country. You can copy the country details from
            https://developers.getswipe.in/api-reference/references#country-array
          example: Country Name
          enum:
            - Afghanistan
            - Albania
            - Algeria
            - Andorra
            - Angola
            - Antigua and Barbuda
            - Argentina
            - Armenia
            - Australia
            - Austria
            - Azerbaijan
            - Bahamas
            - Bahrain
            - Bangladesh
            - Barbados
            - Belarus
            - Belgium
            - Belize
            - Benin
            - Bhutan
            - Bolivia
            - Bosnia and Herzegovina
            - Botswana
            - Brazil
            - Brunei
            - Bulgaria
            - Burkina Faso
            - Burundi
            - Cabo Verde
            - Cambodia
            - Cameroon
            - Canada
            - Central African Republic
            - Chad
            - Chile
            - China
            - Colombia
            - Comoros
            - Congo, Democratic Republic of the
            - Congo, Republic of the
            - Costa Rica
            - Croatia
            - Cuba
            - Cyprus
            - Czechia
            - Denmark
            - Djibouti
            - Dominica
            - Dominican Republic
            - Ecuador
            - Egypt
            - El Salvador
            - Equatorial Guinea
            - Eritrea
            - Estonia
            - Eswatini
            - Ethiopia
            - Fiji
            - Finland
            - France
            - Gabon
            - Gambia
            - Georgia
            - Germany
            - Ghana
            - Greece
            - Grenada
            - Guatemala
            - Guinea
            - Guinea-Bissau
            - Guyana
            - Haiti
            - Honduras
            - Hungary
            - Iceland
            - India
            - Indonesia
            - Iran
            - Iraq
            - Ireland
            - Israel
            - Italy
            - Jamaica
            - Japan
            - Jordan
            - Kazakhstan
            - Kenya
            - Kiribati
            - Korea, North
            - Korea, South
            - Kosovo
            - Kuwait
            - Kyrgyzstan
            - Laos
            - Latvia
            - Lebanon
            - Lesotho
            - Liberia
            - Libya
            - Liechtenstein
            - Lithuania
            - Luxembourg
            - Madagascar
            - Malawi
            - Malaysia
            - Maldives
            - Mali
            - Malta
            - Marshall Islands
            - Mauritania
            - Mauritius
            - Mexico
            - Micronesia
            - Moldova
            - Monaco
            - Mongolia
            - Montenegro
            - Morocco
            - Mozambique
            - Myanmar
            - Namibia
            - Nauru
            - Nepal
            - Netherlands
            - New Zealand
            - Nicaragua
            - Niger
            - Nigeria
            - North Macedonia
            - Norway
            - Oman
            - Pakistan
            - Palau
            - Palestine
            - Panama
            - Papua New Guinea
            - Paraguay
            - Peru
            - Philippines
            - Poland
            - Portugal
            - Qatar
            - Romania
            - Russia
            - Rwanda
            - Saint Kitts and Nevis
            - Saint Lucia
            - Saint Vincent and the Grenadines
            - Samoa
            - San Marino
            - Sao Tome and Principe
            - Saudi Arabia
            - Senegal
            - Serbia
            - Seychelles
            - Sierra Leone
            - Singapore
            - Slovakia
            - Slovenia
            - Solomon Islands
            - Somalia
            - South Africa
            - South Sudan
            - Spain
            - Sri Lanka
            - Sudan
            - Suriname
            - Sweden
            - Switzerland
            - Syria
            - Taiwan
            - Tajikistan
            - Tanzania
            - Thailand
            - Timor-Leste
            - Togo
            - Tonga
            - Trinidad and Tobago
            - Tunisia
            - Turkey
            - Turkmenistan
            - Tuvalu
            - Uganda
            - Ukraine
            - United Arab Emirates
            - United Kingdom
            - United States
            - Uruguay
            - Uzbekistan
            - Vanuatu
            - Vatican City
            - Venezuela
            - Vietnam
            - Yemen
            - Zambia
            - Zimbabwe
        pincode:
          type: string
          description: Pincode
          example: '123456'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication header of the form Bearer <token>, where <token>
        is your auth token.

````