# createInvoice

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v0/invoice:
    post:
      summary: createInvoice
      deprecated: false
      description: ''
      operationId: createInvoiceUsingPOST
      tags:
        - >-
          Account Receivable/APIs - Account Receivable /Invoice
          Management/invoice-controller
        - invoice-controller
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceCreateRequest'
            example: ''
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ApplicationResponse%C2%ABInvoiceResponse%C2%BB
          headers: {}
          x-apidog-name: OK
        '400':
          description: ''
          content:
            application/json:
              schema: &ref_0
                $ref: '#/components/schemas/ApplicationResponse'
          headers: {}
          x-apidog-name: Bad Request
        '401':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Unauthorized
        '403':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Forbidden
        '404':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Not Found
        '422':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Unprocessable Request
        '500':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Server Error
      security: []
      x-apidog-folder: >-
        Account Receivable/APIs - Account Receivable /Invoice
        Management/invoice-controller
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-18880676-run
components:
  schemas:
    InvoiceCreateRequest:
      type: object
      required:
        - baseAmount
        - customerId
        - dueDate
        - invoiceNumber
        - sellerId
      properties:
        approvalStatus:
          type: string
          enum:
            - APPROVER_APPROVAL_PENDING
            - APPROVER_APPROVED
            - APPROVER_REJECTED
            - BANK_APPROVED
            - CHECKER_APPROVAL_PENDING
            - CHECKER_APPROVED
            - CHECKER_REJECTED
            - MAKER_APPROVAL_PENDING
            - MAKER_APPROVED
            - MAKER_REJECTED
          description: Status of the invoice approval
        balanceAmount:
          type: number
          description: Remaining balance amount for the invoice
        baseAmount:
          type: number
          minimum: 0.1
          description: Base amount of the invoice
        cgst:
          type: number
          description: Central Goods and Services Tax amount
        chargeCustomer:
          type: boolean
          description: Indicates if the charge is to be applied to the customer
        customerId:
          type: string
          pattern: ^KC[A-Z0-9]{14}$
          description: Unique identifier for the customer
        description:
          type: string
          description: Description of the invoice
        dispatchNow:
          type: boolean
          description: Indicates if the invoice should be dispatched immediately
        dueDate:
          type: string
          format: date
          description: Due date for the invoice payment
        emailAddress:
          type: string
          description: Email address associated with the invoice
        externalId:
          type: string
          description: External identifier for the invoice
        gstExclusive:
          type: boolean
          description: Indicates if the invoice amount is exclusive of GST
        igst:
          type: number
          description: Integrated Goods and Services Tax amount
        invoiceDate:
          type: string
          examples:
            - dd MMM yyyy HH:mm
          description: Date of the invoice
        invoiceNumber:
          type: string
          description: Unique number for the invoice
        mobileNumber:
          type: string
          description: Mobile number associated with the invoice
        netAmount:
          type: number
          description: Net amount of the invoice
        paidThrough:
          type: string
          enum:
            - COLLECTIONS
            - PAYABLES
          description: Method through which the invoice is paid
        partialPaymentAllowed:
          type: boolean
          description: Indicates if partial payments are allowed for the invoice
        payableReferenceId:
          type: string
          description: Reference ID for the payable
        poNumber:
          type: string
          description: Purchase Order number associated with the invoice
        receivableStatus:
          type: string
          enum:
            - PAID
            - PARTIAL_PAID
            - REJECT
            - UNPAID
          description: Status of the invoice receivable
        sellerId:
          type: string
          pattern: ^CEK[A-Z0-9]{7}$
          description: Unique identifier for the seller
        sgst:
          type: number
          description: State Goods and Services Tax amount
        tds:
          type: number
          description: Tax Deducted at Source amount
        totalReceived:
          type: number
          description: Total amount received for the invoice
        via:
          type: string
          description: Medium through which the invoice is processed
      title: InvoiceCreateRequest
      x-apidog-orders:
        - approvalStatus
        - balanceAmount
        - baseAmount
        - cgst
        - chargeCustomer
        - customerId
        - description
        - dispatchNow
        - dueDate
        - emailAddress
        - externalId
        - gstExclusive
        - igst
        - invoiceDate
        - invoiceNumber
        - mobileNumber
        - netAmount
        - paidThrough
        - partialPaymentAllowed
        - payableReferenceId
        - poNumber
        - receivableStatus
        - sellerId
        - sgst
        - tds
        - totalReceived
        - via
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApplicationResponse«InvoiceResponse»:
      type: object
      properties:
        errorResponse: &ref_2
          $ref: '#/components/schemas/ErrorResponse'
        payload:
          $ref: '#/components/schemas/InvoiceResponse'
        response_code:
          type: integer
          format: int32
        response_message:
          type: string
      title: ApplicationResponse«InvoiceResponse»
      x-apidog-orders:
        - errorResponse
        - payload
        - response_code
        - response_message
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    InvoiceResponse:
      type: object
      properties:
        approvalStatus: &ref_1
          $ref: '#/components/schemas/EnumModel%C2%ABstring%C2%BB'
        attachmentUrl:
          type: string
        balanceAmount:
          type: number
        baseAmount:
          type: number
        cgst:
          type: number
        createdBy:
          type: string
        createdByEmail:
          type: string
        createdByMobile:
          type: string
        createdByName:
          type: string
        createdOn:
          type: string
          format: date-time
        customerId:
          type: string
        customerLegalName:
          type: string
        description:
          type: string
        dispatched:
          type: boolean
        dispatchedOn:
          type: string
          format: date-time
        dueDate:
          type: string
          format: date
        externalId:
          type: string
        hasKeyContacts:
          type: boolean
        igst:
          type: number
        invoiceAttachments:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/InvoiceAttachmentResponse'
        invoiceDate:
          type: string
          format: date-time
        invoiceId:
          type: string
        invoiceNumber:
          type: string
        modifiedBy:
          type: string
        modifiedByEmail:
          type: string
        modifiedByMobile:
          type: string
        modifiedByName:
          type: string
        modifiedOn:
          type: string
          format: date-time
        netAmount:
          type: number
        partialPaymentAllowed:
          type: boolean
        payableReferenceId:
          type: string
        paymentLink:
          type: string
        payoutStatus: *ref_1
        poNumber:
          type: string
        receivableStatus: *ref_1
        sellerId:
          type: string
        sgst:
          type: number
        tds:
          type: number
        totalReceived:
          type: number
        via:
          type: string
      title: InvoiceResponse
      x-apidog-orders:
        - approvalStatus
        - attachmentUrl
        - balanceAmount
        - baseAmount
        - cgst
        - createdBy
        - createdByEmail
        - createdByMobile
        - createdByName
        - createdOn
        - customerId
        - customerLegalName
        - description
        - dispatched
        - dispatchedOn
        - dueDate
        - externalId
        - hasKeyContacts
        - igst
        - invoiceAttachments
        - invoiceDate
        - invoiceId
        - invoiceNumber
        - modifiedBy
        - modifiedByEmail
        - modifiedByMobile
        - modifiedByName
        - modifiedOn
        - netAmount
        - partialPaymentAllowed
        - payableReferenceId
        - paymentLink
        - payoutStatus
        - poNumber
        - receivableStatus
        - sellerId
        - sgst
        - tds
        - totalReceived
        - via
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    InvoiceAttachmentResponse:
      type: object
      properties:
        attachmentSource:
          type: string
          enum:
            - TALLY_INVOICE
            - UI_INVOICE
        createdBy:
          type: string
        deleted:
          type: boolean
        fileExt:
          type: string
        invoiceAttachmentId:
          type: string
        modifiedBy:
          type: string
        originalFilename:
          type: string
        primary:
          type: boolean
        referenceId:
          type: string
        remarks:
          type: string
        shared:
          type: boolean
        url:
          type: string
      title: InvoiceAttachmentResponse
      x-apidog-orders:
        - attachmentSource
        - createdBy
        - deleted
        - fileExt
        - invoiceAttachmentId
        - modifiedBy
        - originalFilename
        - primary
        - referenceId
        - remarks
        - shared
        - url
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    EnumModel«string»:
      type: object
      properties:
        label:
          type: string
        name:
          type: string
          enum:
            - PAID
            - PARTIAL_PAID
            - REJECT
            - UNPAID
      title: EnumModel«string»
      x-apidog-orders:
        - label
        - name
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ErrorResponse:
      type: object
      properties:
        apiSubErrors:
          type: array
          items:
            $ref: '#/components/schemas/ApiSubError'
        errorMessage:
          type: string
        errorType:
          type: string
          enum:
            - CLIENT_REQUEST_ABORT
            - CLIENT_REQUEST_ERROR
            - INVALID_ACCESS
            - RECORD_NOT_FOUND
            - SYSTEM_ERROR
            - UNAUTHORIZED
            - UNKNOWN_ERROR
            - UNPROCESSABLE_REQUEST
            - VALIDATION_ERROR
        requestId:
          type: string
        timestamp:
          type: string
          examples:
            - yyyy-MM-dd HH:mm:ss
      title: ErrorResponse
      x-apidog-orders:
        - apiSubErrors
        - errorMessage
        - errorType
        - requestId
        - timestamp
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApiSubError:
      type: object
      title: ApiSubError
      x-apidog-orders: []
      properties: {}
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApplicationResponse:
      type: object
      properties:
        errorResponse: *ref_2
        payload:
          type: object
          x-apidog-orders: []
          properties: {}
          x-apidog-ignore-properties: []
        response_code:
          type: integer
          format: int32
        response_message:
          type: string
      title: ApplicationResponse
      x-apidog-orders:
        - errorResponse
        - payload
        - response_code
        - response_message
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
