FlowAccount BillingNote API

The BillingNote API from FlowAccount — 8 operation(s) for billingnote.

OpenAPI Specification

flowaccount-billingnote-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: FlowAccount Open BatchImport BillingNote API
  version: 1.0.0
servers:
- url: https://openapi.flowaccount.com/sandbox
  description: The sandbox server
- url: https://openapi.flowaccount.com/v3-alpha
  description: The prod server
security:
- bearer: []
tags:
- name: BillingNote
paths:
  /{culture}/billing-notes:
    get:
      tags:
      - BillingNote
      summary: To query for documents.
      operationId: BillingNote_Index
      parameters:
      - name: SortBy
        in: query
        schema:
          type: string
          nullable: true
        x-position: 1
      - name: CurrentPage
        in: query
        schema:
          type: string
          nullable: true
        x-position: 2
      - name: PageSize
        in: query
        schema:
          type: string
          nullable: true
        x-position: 3
      - name: Filter
        in: query
        schema:
          type: string
          nullable: true
        x-position: 4
      - name: SearchString
        in: query
        schema:
          type: string
          nullable: true
        x-position: 5
      - name: CustomDocumentModels
        in: query
        schema:
          type: string
          nullable: true
        x-position: 6
      - name: Range
        in: query
        schema:
          type: string
          nullable: true
        x-position: 7
      - name: Month
        in: query
        schema:
          type: string
          nullable: true
        x-position: 8
      - name: Year
        in: query
        schema:
          type: string
          nullable: true
        x-position: 9
      - name: StartDate
        in: query
        schema:
          type: string
          nullable: true
        x-position: 10
      - name: EndDate
        in: query
        schema:
          type: string
          nullable: true
        x-position: 11
      - name: culture
        in: path
        required: true
        schema:
          type: string
        x-position: 12
      responses:
        '200':
          description: ''
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      security:
      - bearer: []
  /{culture}/billing-notes/{id}:
    get:
      tags:
      - BillingNote
      summary: To get details of a document
      operationId: BillingNote_Details
      parameters:
      - name: id
        in: path
        required: true
        description: Sql DocumentId
        schema:
          type: integer
          format: int64
        x-position: 1
      - name: culture
        in: path
        required: true
        schema:
          type: string
        x-position: 2
      responses:
        '200':
          description: ''
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      security:
      - bearer: []
    delete:
      tags:
      - BillingNote
      summary: To delete the document given a list of documentids
      operationId: BillingNote_Delete
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
        x-position: 1
      - name: culture
        in: path
        required: true
        schema:
          type: string
        x-position: 2
      responses:
        '200':
          description: ''
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      security:
      - bearer: []
  /{culture}/billing-notes/simple-document:
    post:
      tags:
      - BillingNote
      summary: To Create a document with SimpleDocument as the parameter
      operationId: BillingNote_Create
      parameters:
      - name: culture
        in: path
        required: true
        schema:
          type: string
        x-position: 2
      requestBody:
        x-name: simpleDocuments
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimpleDocument'
        required: true
        x-position: 1
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageSent'
      security:
      - bearer: []
  /{culture}/billing-notes/inline-document:
    post:
      tags:
      - BillingNote
      summary: To Create a document with InlineDocument as the parameter
      operationId: BillingNote_Create2
      parameters:
      - name: culture
        in: path
        required: true
        schema:
          type: string
        x-position: 2
      requestBody:
        x-name: inlineDocuments
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InlineDocument'
        required: true
        x-position: 1
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageSent'
      security:
      - bearer: []
  /{culture}/billing-notes/simple-document/{id}:
    put:
      tags:
      - BillingNote
      summary: To Update a document with simpleDocument as the parameter
      operationId: BillingNote_Edit
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
        x-position: 1
      - name: culture
        in: path
        required: true
        schema:
          type: string
        x-position: 3
      requestBody:
        x-name: simpleDocument
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimpleDocument'
        required: true
        x-position: 2
      responses:
        '200':
          description: ''
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      security:
      - bearer: []
  /{culture}/billing-notes/inline-document/{id}:
    put:
      tags:
      - BillingNote
      summary: To Update a document with inlineDocument as the parameter
      operationId: BillingNote_Edit2
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
        x-position: 1
      - name: culture
        in: path
        required: true
        schema:
          type: string
        x-position: 3
      requestBody:
        x-name: inlineDocument
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InlineDocument'
        required: true
        x-position: 2
      responses:
        '200':
          description: ''
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      security:
      - bearer: []
  /{culture}/billing-notes/{documentId}/status-key/{statusKey}:
    post:
      tags:
      - BillingNote
      summary: To change status by the document id and key
      operationId: BillingNote_ChangeStatusByKey
      parameters:
      - name: documentId
        in: path
        required: true
        schema:
          type: integer
          format: int64
        x-position: 1
      - name: statusKey
        in: path
        required: true
        schema:
          type: string
          nullable: true
        x-position: 2
      - name: culture
        in: path
        required: true
        schema:
          type: string
        x-position: 3
      responses:
        '200':
          description: ''
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      security:
      - bearer: []
  /{culture}/billing-notes/{id}/payments:
    post:
      tags:
      - BillingNote
      summary: To Accept payment with the paymentModel
      operationId: BillingNote_ReceivePayment
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
        x-position: 1
      - name: culture
        in: path
        required: true
        schema:
          type: string
        x-position: 3
      requestBody:
        x-name: sourcePayment
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentModel'
        required: true
        x-position: 2
      responses:
        '200':
          description: ''
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      security:
      - bearer: []
components:
  schemas:
    PaymentModel:
      type: object
      additionalProperties: false
      properties:
        cashRemarks:
          type: string
          nullable: true
        excludeVat:
          type: number
          format: double
        cashTax:
          type: integer
          format: int32
        creditCardNumber:
          type: string
          nullable: true
        companyVatRate:
          type: integer
          format: int32
        net:
          type: number
          format: decimal
        bankAccountNumber:
          type: string
          nullable: true
        bankAccountId:
          type: integer
          format: int64
          nullable: true
        paymentMethod:
          $ref: '#/components/schemas/PaymentMethod'
        dateNow:
          type: string
          format: date-time
        amountCollected:
          type: number
          format: decimal
        amountWithheld:
          type: number
          format: decimal
        withholdingTax:
          type: number
          format: decimal
          nullable: true
        remarks:
          type: string
          nullable: true
        transferBankAccountId:
          type: integer
          format: int32
          nullable: true
        bankAccountCreditCardId:
          type: integer
          format: int32
          nullable: true
        charge:
          type: number
          format: decimal
        chequeDate:
          type: string
          format: date-time
          nullable: true
        chequeNumber:
          type: string
          nullable: true
        chequeBankAccountId:
          type: string
          nullable: true
        creditCardBankAccountId:
          type: string
          nullable: true
        remainingCollected:
          type: number
          format: decimal
          nullable: true
        remainingCollectedType:
          nullable: true
          oneOf:
          - $ref: '#/components/schemas/RemainingCollectedType'
        deductionAmount:
          type: number
          format: decimal
          nullable: true
        paymentDeductionType:
          nullable: true
          oneOf:
          - $ref: '#/components/schemas/DeductionType'
        pettyCashName:
          type: string
          nullable: true
        pettyCashId:
          type: integer
          format: int64
          nullable: true
        chequeId:
          type: integer
          format: int64
          nullable: true
        creditCardId:
          type: integer
          format: int64
          nullable: true
        otherChannelId:
          type: integer
          format: int64
          nullable: true
        chequeDepositDate:
          type: string
          format: date-time
          nullable: true
        chequeDepositBankId:
          type: integer
          format: int64
          nullable: true
        chequeCashingDate:
          type: string
          format: date-time
          nullable: true
        autoCreateWithholdingTax:
          type: boolean
        withholdingTaxIncomeType:
          $ref: '#/components/schemas/IncomeType'
        withholdingTaxIncomeDescription:
          type: string
          nullable: true
        withholdingTaxEntity:
          $ref: '#/components/schemas/Entity'
        exchangeRateFee:
          type: number
          format: decimal
          nullable: true
    SimpleDocument:
      example:
        items:
        - type: 1
          name: ค่าสินค้าและบริการ POS
          description: ''
          quantity: 1.0
          unitName: ''
          pricePerUnit: 210.28
          total: 210.28
          sellChartOfAccountCode: null
          buyChartOfAccountCode: null
          productCode: null
        documentReference: null
        exemptAmount: 0.0
        recordId: 0
        contactCode: null
        contactName: test_payload_mock_new1112
        contactAddress: ''
        contactTaxId: ''
        contactBranch: สำนักงานใหญ่
        contactPerson: ''
        contactEmail: ''
        contactNumber: ''
        contactZipCode: ''
        contactGroup: 1
        publishedOn: '2022-10-10T09:37:39.2943643+07:00'
        creditType: 3
        creditDays: 0
        dueDate: '2022-10-10T09:37:39.294366+07:00'
        salesName: Wongnai POS
        projectName: ''
        reference: null
        isVatInclusive: false
        useReceiptDeduction: true
        subTotal: 210.28
        discountPercentage: 0
        discountAmount: 0.0
        totalAfterDiscount: 210.28
        isVat: true
        vatAmount: 14.72
        grandTotal: 225.0
        documentShowWithholdingTax: false
        documentWithholdingTaxPercentage: 0
        documentWithholdingTaxAmount: 0.0
        documentDeductionType: 1
        documentDeductionAmount: 2.0
        remarks: POS ID 1\nรหัสถาดเก็บเงิน 5G5
        internalNotes: INV. No D/00002407\nหมายเลขใบเสร็จ / ID NUT9G
        showSignatureOrStamp: true
        documentStructureType: null
        externalId: null
        saleAndPurchaseChannel: ''
        rowIndex: null
      allOf:
      - $ref: '#/components/schemas/Document'
      - type: object
        additionalProperties: false
        properties:
          items:
            type: array
            nullable: true
            items:
              $ref: '#/components/schemas/SimpleProductItem'
          documentReference:
            type: array
            nullable: true
            items:
              $ref: '#/components/schemas/UpgradeDocument'
          exemptAmount:
            type: number
            format: decimal
            nullable: true
    ProductItem:
      type: object
      additionalProperties: false
      properties:
        type:
          type: integer
          format: int32
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        quantity:
          type: number
          format: decimal
        unitName:
          type: string
          nullable: true
        pricePerUnit:
          type: number
          format: decimal
        total:
          type: number
          format: decimal
        sellChartOfAccountCode:
          type: string
          nullable: true
        buyChartOfAccountCode:
          type: string
          nullable: true
        productCode:
          type: string
          nullable: true
    DeductionType:
      type: integer
      description: '0 = None

        1 = CashDiscount

        3 = Commission

        5 = ManagementFee

        7 = Roundings

        9 = Retentions'
      x-enumNames:
      - None
      - CashDiscount
      - Commission
      - ManagementFee
      - Roundings
      - Retentions
      enum:
      - 0
      - 1
      - 3
      - 5
      - 7
      - 9
    Document:
      type: object
      additionalProperties: false
      properties:
        recordId:
          type: integer
          format: int64
        contactCode:
          type: string
          nullable: true
        contactName:
          type: string
          nullable: true
        contactAddress:
          type: string
          nullable: true
        contactTaxId:
          type: string
          nullable: true
        contactBranch:
          type: string
          nullable: true
        contactPerson:
          type: string
          nullable: true
        contactEmail:
          type: string
          nullable: true
        contactNumber:
          type: string
          nullable: true
        contactZipCode:
          type: string
          nullable: true
        contactGroup:
          type: integer
          format: int32
        publishedOn:
          type: string
          format: date-time
        creditType:
          type: integer
          format: int32
        creditDays:
          type: integer
          format: int32
        dueDate:
          type: string
          format: date-time
        salesName:
          type: string
          nullable: true
        projectName:
          type: string
          nullable: true
        reference:
          type: string
          nullable: true
        isVatInclusive:
          type: boolean
        useReceiptDeduction:
          type: boolean
        subTotal:
          type: number
          format: decimal
        discountPercentage:
          type: integer
          format: int32
        discountAmount:
          type: number
          format: decimal
        totalAfterDiscount:
          type: number
          format: decimal
        isVat:
          type: boolean
        vatAmount:
          type: number
          format: decimal
        grandTotal:
          type: number
          format: decimal
        documentShowWithholdingTax:
          type: boolean
        documentWithholdingTaxPercentage:
          type: integer
          format: int32
        documentWithholdingTaxAmount:
          type: number
          format: decimal
        documentDeductionType:
          type: integer
          format: int32
        documentDeductionAmount:
          type: number
          format: decimal
        remarks:
          type: string
          nullable: true
        internalNotes:
          type: string
          nullable: true
        showSignatureOrStamp:
          type: boolean
        documentStructureType:
          type: string
          nullable: true
        externalId:
          type: string
          nullable: true
        saleAndPurchaseChannel:
          type: string
          nullable: true
        rowIndex:
          type: string
          nullable: true
    InlineProductItem:
      type: object
      additionalProperties: false
      properties:
        type:
          type: integer
          format: int32
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        quantity:
          type: number
          format: decimal
        unitName:
          type: string
          nullable: true
        pricePerUnit:
          type: number
          format: decimal
        total:
          type: number
          format: decimal
        sellChartOfAccountCode:
          type: string
          nullable: true
        buyChartOfAccountCode:
          type: string
          nullable: true
        discountAmount:
          type: number
          format: decimal
        vatRate:
          type: integer
          format: int32
    PaymentMethod:
      type: integer
      description: '0 = None

        1 = Cash

        3 = Cheque

        5 = Transfer

        7 = CreditCard

        9 = PushPay

        11 = PettyCash

        13 = Other

        51 = TransferByKConnect'
      x-enumNames:
      - None
      - Cash
      - Cheque
      - Transfer
      - CreditCard
      - PushPay
      - PettyCash
      - Other
      - TransferByKConnect
      enum:
      - 0
      - 1
      - 3
      - 5
      - 7
      - 9
      - 11
      - 13
      - 51
    MessageSent:
      type: object
      additionalProperties: false
      properties:
        messageId:
          type: string
          nullable: true
        externalDocumentId:
          type: string
          nullable: true
    UpgradeDocument:
      type: object
      additionalProperties: false
      properties:
        recordId:
          type: integer
          format: int64
        referenceDocumentSerial:
          type: string
          nullable: true
        referenceDocumentType:
          type: integer
          format: int64
    InlineDocument:
      allOf:
      - $ref: '#/components/schemas/Document'
      - type: object
        additionalProperties: false
        properties:
          discountType:
            type: integer
            format: int32
          useInlineDiscount:
            type: boolean
          useInlineVat:
            type: boolean
          exemptAmount:
            type: number
            format: decimal
            nullable: true
          vatableAmount:
            type: number
            format: decimal
            nullable: true
          items:
            type: array
            nullable: true
            items:
              $ref: '#/components/schemas/InlineProductItem'
          documentReference:
            type: array
            nullable: true
            items:
              $ref: '#/components/schemas/UpgradeDocument'
    SimpleProductItem:
      allOf:
      - $ref: '#/components/schemas/ProductItem'
      - type: object
        additionalProperties: false
    RemainingCollectedType:
      type: integer
      description: '1 = CashShortOrOver

        3 = CashDiscount

        5 = ExchangeRateDiff

        51 = SalesCashShortOrOver

        53 = SalesDiscount

        55 = SalesBankFee

        57 = SalesExchangeRateDiff'
      x-enumNames:
      - CashShortOrOver
      - CashDiscount
      - ExchangeRateDiff
      - SalesCashShortOrOver
      - SalesDiscount
      - SalesBankFee
      - SalesExchangeRateDiff
      enum:
      - 1
      - 3
      - 5
      - 51
      - 53
      - 55
      - 57
    IncomeType:
      type: integer
      description: '1 = Salary

        3 = Commission

        5 = Licensing

        7 = Interest

        9 = NetProfit30

        11 = NetProfit25

        13 = NetProfit20

        15 = NetProfitOther

        17 = TaxExemption

        19 = DividenFromShareOfProfit

        21 = PortionOfNetProfit

        23 = RecognitionOfProfit

        25 = TaxOther

        27 = RevenueDepartmentTax

        29 = Others'
      x-enumNames:
      - Salary
      - Commission
      - Licensing
      - Interest
      - NetProfit30
      - NetProfit25
      - NetProfit20
      - NetProfitOther
      - TaxExemption
      - DividenFromShareOfProfit
      - PortionOfNetProfit
      - RecognitionOfProfit
      - TaxOther
      - RevenueDepartmentTax
      - Others
      enum:
      - 1
      - 3
      - 5
      - 7
      - 9
      - 11
      - 13
      - 15
      - 17
      - 19
      - 21
      - 23
      - 25
      - 27
      - 29
    Entity:
      type: integer
      description: '1 = PND3

        3 = PND53

        5 = PND1K

        7 = PND1KSpecial

        9 = PND2

        11 = PND2K

        13 = PND3K

        15 = PND1'
      x-enumNames:
      - PND3
      - PND53
      - PND1K
      - PND1KSpecial
      - PND2
      - PND2K
      - PND3K
      - PND1
      enum:
      - 1
      - 3
      - 5
      - 7
      - 9
      - 11
      - 13
      - 15
  securitySchemes:
    bearer:
      type: http
      description: Specify the authorization token.
      scheme: bearer
      bearerFormat: Reference
x-generator: NSwag v13.11.3.0 (NJsonSchema v10.4.4.0 (Newtonsoft.Json v13.0.0.0))