> ## 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 a document

<Note>
  Customer id and Product id should be unique, if a new id is sent, a new
  Customer/Product with given details will be automatically created. For
  Product If an existing id is sent, the details will not override the
  original product details. They will be applicable only to the current
  document. For updating the product details, use the update product API
</Note>


## OpenAPI

````yaml post /v2/doc
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/doc:
    post:
      tags:
        - Document V2
      summary: Create a document
      operationId: v2_post_invoice_resource
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BaseDocumentV2'
            examples:
              basic:
                value:
                  document_type: invoice
                  document_date: 15-11-2024
                  due_date: 15-11-2024
                  party:
                    id: CUST123
                    type: customer
                    name: John Doe
                  items:
                    - id: ITEM123455667ghg
                      name: Item Namgergggree
                      quantity: 1
                      unit_price: 200
                      tax_rate: 18
                      price_with_tax: 236
                      net_amount: 200
                      total_amount: 236
                      item_type: Product
              advanced:
                value:
                  document_type: invoice
                  document_date: 15-11-2024
                  party:
                    id: CUST123
                    type: customer
                    name: John Doe
                    country_code: '91'
                    phone_number: '1234567890'
                    company_name: Company Name
                    email: johndoe@example.com
                    gstin: 27AARCS7202C1ZD
                    shipping_address:
                      addr_id: 1
                      addr_id_v2: addr1
                      address_line1: 123 Street
                      address_line2: Apt 4B
                      city: Hyderabad City
                      state: TELANGANA
                      country: India
                      pincode: '500032'
                    billing_address:
                      addr_id: 1
                      addr_id_v2: addr1
                      address_line1: 123 Street
                      address_line2: Apt 4B
                      city: Hyderabad City
                      state: TELANGANA
                      country: India
                      pincode: '500032'
                  due_date: 15-11-2024
                  reference: Reference Text
                  notes: Notes for the document
                  terms: Terms and Conditions
                  items:
                    - id: ITEM123455667ghg
                      name: Item Namgergggree
                      quantity: 1
                      unit_price: 200
                      tax_rate: 18
                      price_with_tax: 236
                      net_amount: 200
                      total_amount: 236
                      discount_percent: 0
                      discount_amount: 0
                      description: Item Description
                      hsn_code: '1234'
                      item_type: Product
                      unit: kg
                      category: Electronics
                    - id: ITEM123fgd4vh5
                      name: Item Name12hfdfdf345
                      quantity: 1
                      unit_price: 200
                      tax_rate: 18
                      price_with_tax: 236
                      net_amount: 200
                      total_amount: 236
                      discount_percent: 0
                      discount_amount: 0
                      description: Item Description 12345
                      hsn_code: '1234'
                      item_type: Product
                      unit: kg
                      category: Electronics
                  payments:
                    - amount: 100
                      method: upi
                      notes: Payment notes
                      bank_details:
                        account_number: '1234567890'
                        ifsc: SBIN0000001
                        bank_name: State Bank of India
                        branch: Mumbai
                  company_shipping_address:
                    addr_id: 1
                    addr_id_v2: addr1
                    address_line1: 123 Street
                    address_line2: Apt 4B
                    city: Hyderabad City
                    state: TELANGANA
                    country: India
                    pincode: '500032'
                  company_billing_address:
                    addr_id: 1
                    addr_id_v2: addr1
                    address_line1: 123 Street
                    address_line2: Apt 4B
                    city: Hyderabad City
                    state: TELANGANA
                    country: India
                    pincode: '500032'
              einvoice:
                value:
                  document_type: invoice
                  document_date: 15-11-2024
                  party:
                    id: '236'
                    name: Vasu
                    type: customer
                    country_code: '91'
                    phone_number: '1234567890'
                    email: johndoe@example.com
                    company_name: Vason Company
                    gstin: 36ACZPT7516P1ZA
                    shipping_address:
                      addr_id: 1
                      addr_id_v2: addr1
                      address_line1: 5-11, vema street
                      address_line2: ''
                      city: Hyderabad South East
                      state: TELANGANA
                      country: India
                      pincode: '500030'
                    billing_address:
                      addr_id: 1
                      addr_id_v2: addr1
                      address_line1: 5-11, vema street
                      address_line2: ''
                      city: Hyderabad
                      state: TELANGANA
                      country: India
                      pincode: '500032'
                  due_date: 15-11-2024
                  reference: Reference Text
                  notes: Notes for the document
                  terms: Terms and Conditions
                  items:
                    - id: ac_1.56
                      name: Ac 1.56 Ton 5 Star
                      quantity: 1
                      unit_price: 200
                      tax_rate: 18
                      price_with_tax: 236
                      discount_percent: 0
                      discount_amount: 0
                      net_amount: 200
                      total_amount: 236
                      description: Item Description
                      hsn_code: '04022910'
                      item_type: Product
                      unit: kg
                      category: Electronics
                  payments:
                    - amount: 100
                      method: upi
                      notes: Payment notes
                      bank_details:
                        account_number: '1234567890'
                        ifsc: SBIN0000001
                        bank_name: State Bank of India
                        branch: Mumbai
                  einvoice: true
              export:
                value:
                  document_type: invoice
                  document_date: 15-11-2024
                  party:
                    id: CUST123
                    type: customer
                    name: John Doe
                    country_code: '91'
                    phone_number: '1234567890'
                    company_name: Company Name
                    email: johndoe@example.com
                    gstin: 27AARCS7202C1ZD
                    shipping_address:
                      addr_id: 2
                      addr_id_v2: addr1
                      address_line1: 123 Street
                      address_line2: Apt 4B
                      city: London
                      state: OTHER TERRITORY
                      country: United Kingdom
                      pincode: '788787'
                    billing_address:
                      addr_id: 2
                      addr_id_v2: addr1
                      address_line1: 123 Street
                      address_line2: Apt 4B
                      city: London
                      state: OTHER TERRITORY
                      country: United Kingdom
                      pincode: '788787'
                  due_date: 15-11-2024
                  reference: Reference Text
                  notes: Notes for the document
                  terms: Terms and Conditions
                  items:
                    - id: ITEM123455667ghg
                      name: Item Namgergggree
                      quantity: 1
                      unit_price: 200
                      tax_rate: 18
                      price_with_tax: 236
                      net_amount: 200
                      total_amount: 236
                      discount_percent: 0
                      discount_amount: 0
                      description: Item Description
                      hsn_code: '1234'
                      item_type: Product
                      unit: kg
                      category: Electronics
                    - id: ITEM123fgd4vh5
                      name: Item Name12hfdfdf345
                      quantity: 1
                      unit_price: 200
                      tax_rate: 18
                      price_with_tax: 236
                      net_amount: 200
                      total_amount: 236
                      discount_percent: 0
                      discount_amount: 0
                      description: Item Description 12345
                      hsn_code: '1234'
                      item_type: Product
                      unit: kg
                      category: Electronics
                  payments:
                    - amount: 100
                      method: upi
                      notes: Payment notes
                      bank_details:
                        account_number: '1234567890'
                        ifsc: SBIN0000001
                        bank_name: State Bank of India
                        branch: Mumbai
                  is_export: true
                  export_invoice_details:
                    shipping_bill_date: 27-08-2024
                    shipping_bill_number: ''
                    shipping_port_code: ''
                    export_type: SEZ without IGST Payment
                    conversion_factor: 1
                    country_id: United Kingdom
                    currency_id: USD
              convert_document:
                value:
                  document_type: sales_return
                  document_date: 15-11-2024
                  party:
                    id: '236'
                    name: Vasu
                    type: customer
                    country_code: '91'
                    phone_number: '1234567890'
                    email: johndoe@example.com
                    company_name: Vason Company
                    gstin: 36ACZPT7516P1ZA
                    shipping_address:
                      addr_id: 1
                      addr_id_v2: addr1
                      address_line1: 5-11, vema street
                      address_line2: ''
                      city: Hyderabad South East
                      state: TELANGANA
                      country: India
                      pincode: '500030'
                    billing_address:
                      addr_id: 1
                      addr_id_v2: addr1
                      address_line1: 5-11, vema street
                      address_line2: ''
                      city: Hyderabad
                      state: TELANGANA
                      country: India
                      pincode: '500032'
                  due_date: 15-11-2024
                  reference: Reference Text
                  notes: Notes for the document
                  terms: Terms and Conditions
                  items:
                    - id: ac_1.56
                      name: Ac 1.56 Ton 5 Star
                      quantity: 1
                      unit_price: 200
                      tax_rate: 18
                      price_with_tax: 236
                      discount_percent: 0
                      discount_amount: 0
                      net_amount: 200
                      total_amount: 236
                      description: Item Description
                      hsn_code: '04022910'
                      item_type: Product
                      unit: kg
                      category: Electronics
                  payments:
                    - amount: 100
                      method: upi
                      notes: Payment notes
                      bank_details:
                        account_number: '1234567890'
                        ifsc: SBIN0000001
                        bank_name: State Bank of India
                        branch: Mumbai
                  convert:
                    convert_from: invoice
                    hash_id: SLxrwOh7QQnW
              custom_fields:
                value:
                  document_type: invoice
                  document_date: 15-11-2024
                  party:
                    id: CUST123
                    type: customer
                    name: John Doe
                    country_code: '91'
                    phone_number: '1234567890'
                    company_name: Company Name
                    email: johndoe@example.com
                    gstin: 27AARCS7202C1ZD
                    shipping_address:
                      addr_id: 1
                      addr_id_v2: addr1
                      address_line1: 123 Street
                      address_line2: Apt 4B
                      city: Hyderabad City
                      state: TELANGANA
                      country: India
                      pincode: '500032'
                    billing_address:
                      addr_id: 1
                      addr_id_v2: addr1
                      address_line1: 123 Street
                      address_line2: Apt 4B
                      city: Hyderabad City
                      state: TELANGANA
                      country: India
                      pincode: '500032'
                  due_date: 15-11-2024
                  reference: Reference Text
                  notes: Notes for the document
                  terms: Terms and Conditions
                  items:
                    - id: ITEM123455667ghg
                      name: Item Namgergggree
                      quantity: 1
                      unit_price: 200
                      tax_rate: 18
                      price_with_tax: 236
                      net_amount: 200
                      total_amount: 236
                      discount_percent: 0
                      discount_amount: 0
                      description: Item Description
                      hsn_code: '1234'
                      item_type: Product
                      unit: kg
                      category: Electronics
                      custom_columns:
                        - label: Weight
                          value: '1236'
                    - id: ITEM123fgd4vh5
                      name: Item Name12hfdfdf345
                      quantity: 1
                      unit_price: 200
                      tax_rate: 18
                      price_with_tax: 236
                      net_amount: 200
                      total_amount: 236
                      discount_percent: 0
                      discount_amount: 0
                      description: Item Description 12345
                      hsn_code: '1234'
                      item_type: Product
                      unit: kg
                      category: Electronics
                      custom_columns:
                        - label: abcd
                          value: '45'
                        - label: Weight
                          value: '1'
                  payments:
                    - amount: 100
                      method: upi
                      notes: Payment notes
                      bank_details:
                        account_number: '1234567890'
                        ifsc: SBIN0000001
                        bank_name: State Bank of India
                        branch: Mumbai
                  custom_headers:
                    - label: JOB DATE
                      value: xchj
                    - label: 'MASTER BL NO :'
                      value: '1'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocCreateResponseV2'
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocCreateResponseV2'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocCreateResponseV2'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocCreateResponseV2'
components:
  schemas:
    BaseDocumentV2:
      required:
        - document_date
        - document_type
        - items
      type: object
      properties:
        serial_number:
          type: string
          description: Serial Number (deprecated, please use New Serial Number)
          example: INV123
        serial_number_v2:
          type: object
          example:
            prefix: INV
            doc_number: 1
            suffix: '2024'
          allOf:
            - $ref: '#/components/schemas/SerialNumber'
        document_type:
          type: string
          description: Value should always be the string 'invoice'
          example: invoice
          enum:
            - invoice
            - subscription
            - pro_forma_invoice
            - estimate
            - sales_return
            - purchase_return
            - delivery_challan
            - purchase
        document_date:
          type: string
          description: DD-MM-YYYY
          example: 11-06-2024
        party:
          type: object
          description: >-
            Party. If there are any changes made to the party details, we will
            update those details and any documents linked to this party ID will
            be updated to reflect the changes.
          allOf:
            - $ref: '#/components/schemas/Party'
        due_date:
          type: string
          description: DD-MM-YYYY
          example: 11-06-2024
        reference:
          type: string
          description: Any references you want to add to the doc
          example: Reference Text
        notes:
          type: string
          description: >-
            Notes to show in invoice - please check template in swipe
            application to see where this is displayed
          example: Notes for the document
        terms:
          type: string
          description: >-
            Terms to show in invoice - please check template in swipe
            application to see where this is displayed
          example: Terms and Conditions
        items:
          type: array
          description: Array of Products/Services, refer Item Object below for parameters
          items:
            $ref: '#/components/schemas/DocItemV2'
        warehouse_id:
          type: integer
          description: Warehouse ID
          example: -1
        extra_discount:
          type: number
          description: Adjustment on overall invoice, doesn’t effect any tax amounts.
          example: 20
        round_off:
          type: boolean
          description: Should Round Off total amount
          example: true
          default: false
        payments:
          type: array
          description: Array of Payments, refer Payment Object for parameters
          items:
            $ref: '#/components/schemas/PaymentV2'
        bank_details:
          type: object
          description: >-
            Bank Details, it is used to display bank details in document PDFs.
            No payments are associated with these bank details.
          allOf:
            - $ref: '#/components/schemas/BankDetails'
        tds_id:
          type: integer
          description: >-
            You can check the tds id and details mapping from
            https://developers.getswipe.in/api-reference/references#tds-tax-deducted-at-source
        tcs_id:
          type: integer
          description: >-
            You can check the tcs id and details mapping from
            https://developers.getswipe.in/api-reference/references#tcs-tax-collected-at-source
        charges_and_deductions:
          type: array
          description: >-
            Array of Charges and Deductions, refer Additional Charges Deductions
            Object for parameters
          items:
            $ref: '#/components/schemas/AdditionalChargesDeductionsV2'
        company_shipping_address:
          type: object
          description: >-
            Company shipping from Address, refer Shipping Address Object for
            parameters
          allOf:
            - $ref: '#/components/schemas/ShippingAddressV2'
        company_billing_address:
          type: object
          description: Company billing Address, refer Billing Address Object for parameters
          allOf:
            - $ref: '#/components/schemas/ShippingAddressV2'
        einvoice:
          type: boolean
          description: Generate einvoice
          example: false
        is_export:
          type: boolean
          description: Is Export
          example: false
        is_multi_currency:
          type: boolean
          description: Is Multi Currency
          example: false
        export_invoice_details:
          type: object
          description: Export Invoice Details
          allOf:
            - $ref: '#/components/schemas/ExportInvoiceDetailsV2'
        is_subscription:
          type: boolean
          description: Is Subscription
          example: false
        subscription_details:
          type: object
          description: Subscription Details
          allOf:
            - $ref: '#/components/schemas/Subscription'
        convert:
          type: object
          description: >-
            Convert Document. Needed only when the document is already created
            and you want to convert it to another document
          allOf:
            - $ref: '#/components/schemas/Convert'
        custom_headers:
          type: array
          description: >-
            Document Custom Headers. Custom headers should already be added in
            Swipe Portal.
          example:
            - label: Custom Header 1
              value: Value 1
          items:
            $ref: '#/components/schemas/CustomHeaders'
    DocCreateResponseV2:
      type: object
      properties:
        success:
          type: boolean
          example: true
          default: true
        message:
          type: string
          description: Success Message
          example: Message
        error_code:
          type: string
          description: Error Code
          example: ''
        errors:
          type: object
          properties: {}
          description: Error details
        data:
          $ref: '#/components/schemas/DocCreateData'
    SerialNumber:
      type: object
      properties:
        prefix:
          type: string
          example: INV-, INV/2024, INV-2024/25, INV/2024-25
        doc_number:
          type: integer
          example: 1
        suffix:
          type: string
          example: '-suffix, /-suffix,-/suffix, /suffix'
    Party:
      required:
        - id
        - name
        - type
      type: object
      properties:
        id:
          type: string
          description: Unique id for each party.
          example: CUST123
        type:
          type: string
          description: |-
            Party type, use only specified values.
                                       Party type customer can be used for creating invoices, sales returns, estimates, pro forma invoices and delivery challans.
                                       Party type vendor can be used for creating purchases, purchase orders & purchase returns, .
                                       
          example: customer
          enum:
            - customer
            - vendor
        name:
          type: string
          description: Name of the Party
          example: John Doe
        country_code:
          type: string
          description: Party Phone Number Country code
          example: '91'
        phone_number:
          type: string
          description: Party Phone Number
          example: '1234567890'
        company_name:
          type: string
          description: Company Name
          example: Company Name
        email:
          type: string
          description: Party Email
          example: johndoe@example.com
        gstin:
          type: string
          description: GSTIN
          example: 27AARCS7202C1ZD
        shipping_address:
          type: object
          description: >-
            Party shipping to Address, refer Shipping Address Object for
            parameters
          allOf:
            - $ref: '#/components/schemas/ShippingAddressV2'
        billing_address:
          type: object
          description: >-
            Party billing to Address, refer Shipping Address Object for
            parameters
          allOf:
            - $ref: '#/components/schemas/ShippingAddressV2'
    DocItemV2:
      required:
        - id
        - item_type
        - name
        - net_amount
        - price_with_tax
        - quantity
        - total_amount
        - unit_price
      type: object
      properties:
        id:
          type: string
          description: >-
            Unique id for each item. If a new id  is sent, a new Item with the
            below details will be automatically created. if existing Item id is
            sent the details will not override the original item details. They
            will be applicable only to the current documents. Use update item to
            actually update the item details in swipe
          example: ITEM123
        name:
          type: string
          description: Name of the Product
          example: Item Name
        quantity:
          type: number
          description: Quantity
          example: 1
        unit_price:
          type: number
          description: Price per item without Tax
          example: 100
        tax_rate:
          type: number
          description: Tax percentage for each item . Only valid tax rates are accepted
          example: 18
        price_with_tax:
          type: number
          description: Price per item with Tax
          example: 118
        net_amount:
          type: number
          description: Net Amount
          example: 100
        total_amount:
          type: number
          description: |-
            Item total amount (Net Amount + Tax).
                                       We calculate the discount amount by multiplying the item's quantity, unit price, and discount percentage. If a discount amount is provided instead, we reverse-calculate the percentage. If no discount is given, it is set to 0.
                                    
          example: 118
        discount_percent:
          type: number
          description: Discount Percent
          example: 10
        discount_amount:
          type: number
          description: Discount Amount, will be ignored if discount_percent is provided
          example: 10
        description:
          type: string
          description: Item Description
          example: Item Description
        hsn_code:
          type: string
          description: HSN Code. HSN Code can only be of length 4,6 & 8
          example: '1234'
        item_type:
          type: string
          description: Product or Service enum
          example: Product
          enum:
            - Product
            - Service
        unit:
          type: string
          description: >-
            Item quantity unit. You can find the GST-approved units in the UQC
            Codes section at: https://einvoice1.gst.gov.in/Others/MasterCodes.
          example: kg
        category:
          type: string
          description: Category
          example: Electronics
        custom_columns:
          type: array
          description: >-
            Item Custom Fields. Custom fields should already be added in Swipe
            Portal.
          example:
            - label: Custom Field 1
              value: Value 1
          items:
            $ref: '#/components/schemas/ItemCustomFields'
    PaymentV2:
      required:
        - amount
        - method
      type: object
      properties:
        amount:
          type: number
          description: Payment Amount
          example: 100
        method:
          type: string
          description: Payment method, use only specified values
          example: upi
          enum:
            - cash
            - card
            - upi
            - netBanking
            - cheque
            - emi
        notes:
          type: string
          description: Any internal notes for payment
          example: Payment notes
        bank_details:
          type: object
          description: >-
            Bank Details, refer Bank Details Object below for parameters, If
            account_number, ifsc matched with existing bank details, it will be
            used, else new bank details will be added to your swipe account. It
            will link document payments to your company bank details.
          allOf:
            - $ref: '#/components/schemas/BankDetails'
    BankDetails:
      required:
        - account_number
        - bank_name
        - branch
        - ifsc
      type: object
      properties:
        account_number:
          type: string
          description: Account Number
          example: '1234567890'
        ifsc:
          type: string
          description: IFSC Code
          example: SBIN0000001
        bank_name:
          type: string
          description: Bank Name
          example: State Bank of India
        branch:
          type: string
          description: Branch
          example: Mumbai
    AdditionalChargesDeductionsV2:
      required:
        - amount
        - id
        - name
        - tax_rate
        - type
      type: object
      properties:
        id:
          type: integer
          description: Unique ID for the charge/deduction. 0 < id <= 999999
          example: 1
        name:
          type: string
          description: Name of the charge/deduction.
          example: Delivery Charge
        amount:
          type: number
          description: Total Amount
          example: 100
        tax_rate:
          type: number
          description: Tax Rate
          example: 18
        sac_code:
          type: string
          description: SAC Code
          example: '1234'
        type:
          type: string
          description: Type
          example: charge
          enum:
            - charge
            - deduction
    ShippingAddressV2:
      required:
        - 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
        addr_id_v2:
          type: string
          description: >-
            Address ID. It must be alphanumeric, not empty, and up to 16
            characters long.
          example: addr1
        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'
    ExportInvoiceDetailsV2:
      required:
        - conversion_factor
        - export_type
      type: object
      properties:
        shipping_bill_date:
          type: string
          description: Shipping Bill Date [DD-MM-YYYY]
          example: 14-02-2024
        shipping_bill_number:
          type: string
          description: Shipping Bill Number
          example: '123456'
        shipping_port_code:
          type: string
          description: Shipping Port Code
          example: '123456'
        export_type:
          type: string
          description: Export Type
          example: With Payment of Tax
          enum:
            - Export under bond/LUT
            - Export with IGST
            - SEZ with IGST Payment
            - SEZ without IGST Payment
            - Deemed Export
            - Multi Currency
        conversion_factor:
          type: number
          description: >-
            The conversion factor represents the rate used to convert foreign
            currencies into Indian rupees. For example, if you're invoicing in
            dollars, and 1 dollar equals 84 rupees, the conversion factor would
            be 84
        country_id:
          type: string
          description: Country ID
          example: Afghanistan
          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
        currency_id:
          type: string
          description: >-
            Currency ID, if not provided, the default country currency will be
            used, please refer to the currency list from
            https://developers.getswipe.in/api-reference/references#currency-details
          example: AED
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - BWP
            - BYN
            - BZD
            - CAD
            - CDF
            - CHF
            - CLP
            - CNY
            - COP
            - CRC
            - CUP
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - FOK
            - GBP
            - GEL
            - GGP
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - IMP
            - INR
            - IQD
            - IRR
            - ISK
            - JEP
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KID
            - KMF
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRU
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZN
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLE
            - SLL
            - SOS
            - SRD
            - SSP
            - STN
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TOP
            - TRY
            - TTD
            - TVD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - UYU
            - UZS
            - VES
            - VND
            - VUV
            - WST
            - XAF
            - XCD
            - XDR
            - XOF
            - XPF
            - YER
            - ZAR
            - ZMW
            - ZWL
    Subscription:
      type: object
      properties:
        start_time:
          type: string
          description: Start Time [DD-MM-YYYY]
          format: date
          example: '1919-08-17T00:00:00.000Z'
        end_time:
          type: string
          description: End Time [DD-MM-YYYY]
          format: date
          example: '1919-08-18T00:00:00.000Z'
        repeat:
          type: integer
          description: 'Repeat in value, Frequency of the repetition '
          example: 1
        repeat_type:
          type: string
          description: Repeat type, Entity of the repetition
          example: days
          enum:
            - days
            - weeks
            - months
            - years
        send_email:
          type: boolean
        send_sms:
          type: boolean
        send_wtsp:
          type: boolean
    Convert:
      required:
        - convert_from
        - hash_id
      type: object
      properties:
        convert_from:
          type: string
          description: The document type which is being converted
          example: invoice
          enum:
            - invoice
            - estimate
            - pro_forma_invoice
            - sales_return
            - purchase_return
        hash_id:
          type: string
          description: Hash ID
          example: SL123
    CustomHeaders:
      required:
        - label
        - value
      properties:
        label:
          type: string
        value:
          type: string
      type: object
    DocCreateData:
      type: object
      properties:
        hash_id:
          type: string
          description: Hash ID
          example: SL123
        serial_number:
          type: string
          description: Serial Number
          example: SL123
        irn:
          type: string
          description: IRN
        qr_code:
          type: string
          description: QR Code
    ItemCustomFields:
      required:
        - label
        - value
      properties:
        label:
          type: string
        value:
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication header of the form Bearer <token>, where <token>
        is your auth token.

````