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

# Create sales order async

## Field support per integration

> [accordion] AbaConnect
>
> > [!NOTE]
> >
> > This endpoint is **[asynchronous](https://docs.maesn.com/async-task.md)**. The response returns a `taskId`. Use `/asyncTask/{taskId}` to check the task status and obtain the final result once it is ready.
>
> Supported request parameters:
>
> **billingContactId** `string`
>
> A whole number with at most 10 digits.
>
> **comment** `string`
>
> **contactId** `string`
>
> A whole number with at most 10 digits.
>
> **lineItems** `LineItem[]`
>
> **properties**
>
> **description** `string` *required*
>
> **lineNumber** `string`
>
> A unique identifier for this line item, used so other line items can reference it as their parent via `parentLineNumber`. Only needed when this line is part of a collective position — either as the parent or as a child.
> Must be a whole number between 1 and 999 (max 3 digits).
>
> **optional** `boolean`
>
> **parentLineNumber** `string`
>
> The `lineNumber` of this line's parent. Setting this turns the line into a child of a collective position — the line it points to (and this line itself) will be grouped together as a collective position instead of a standalone line item.
> Collective positions support one level of nesting only: a line referenced as a `parentLineNumber` cannot itself have a `parentLineNumber`.
>
> **quantity** `number`
>
> At most 16 digits, with at most 4 after the decimal point.
>
> **totalDiscountPercentage** `number`
>
> At most 12 digits, with at most 4 after the decimal point.
>
> **unitAmount** `number`
>
> Price per unit. At most 20 digits, with at most 8 after the decimal point.
>
> **unitName** `string`
>
> Supported values: `Piece`, `Hour`
>
> **projectId** `string` *required*
>
> A whole number with at most 12 digits.
>
> **totalDiscountPercentage** `number`
>
> **version** `string`
>
> A whole number with at most 4 digits.


## OpenAPI

````yaml post /accounting/salesOrders/async
openapi: 3.0.0
info:
  title: Maesn unified API
  description: The Maesn unified API description
  version: '1.0'
  contact: {}
servers:
  - url: https://api.maesn.dev
security: []
tags:
  - name: maesn
    description: ''
paths:
  /accounting/salesOrders/async:
    post:
      tags:
        - accounting
      operationId: createSalesOrderAsync
      parameters:
        - name: X-API-KEY
          description: API key
          in: header
          schema:
            type: string
          required: true
        - name: X-ACCOUNT-KEY
          description: Account key
          in: header
          schema:
            type: string
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSalesOrderRequestDto'
      responses:
        '202':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/TaskIdResponseDto'
                        type: object
components:
  schemas:
    CreateSalesOrderRequestDto:
      type: object
      properties:
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        billingContactId:
          type: string
          example: eaa28f49-6028-4b6e-bb12-d8f6278073fc
        comment:
          type: string
          example: Due today
        contactId:
          type: string
          example: eaa28f49-6028-4b6e-bb12-d8f6278073fc
        currency:
          type: string
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - BWP
            - BYR
            - BZD
            - CAD
            - CDF
            - CHF
            - CLP
            - CNY
            - COP
            - CRC
            - CUC
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EEK
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GQE
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LTL
            - LVL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRO
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZM
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - UYU
            - UZS
            - VEB
            - VND
            - VUV
            - WST
            - XAF
            - XCD
            - XDR
            - XOF
            - XPF
            - YER
            - ZAR
            - ZMK
            - ZWR
          example: EUR
        deliveryDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/CreateSalesOrderLineItemRequestDto'
        oneLineAddress:
          type: string
          example: Main street 45, Berlin
        orderDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        projectId:
          type: string
          example: '1'
        shippingContactId:
          type: string
          example: eaa28f49-6028-4b6e-bb12-d8f6278073fc
        status:
          type: string
          enum:
            - OPEN
            - CLOSED
          example: OPEN
        totalDiscountAmount:
          description: Total discount applied, in the document currency.
          type: string
          example: 10
        totalDiscountPercentage:
          description: Total discount applied, as a percentage.
          type: string
          example: 10
        totalGrossAmount:
          description: >-
            Gross total — the net amount plus tax (the total payable, including
            VAT).
          type: string
          example: 109
        totalNetAmount:
          description: Net total — the sum of all line amounts before tax (excluding VAT).
          type: string
          example: 100
        totalTaxAmount:
          description: Tax (VAT) total — the difference between the gross and net totals.
          type: string
          example: 19
        version:
          type: string
          example: '1'
    BaseResponseDto:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/MetaResponse'
        data:
          oneOf:
            - type: object
            - type: array
    TaskIdResponseDto:
      type: object
      properties:
        taskId:
          type: string
          example: 02cc5849-b23c-48fe-8a9b-96f74bfc9571
    Address:
      type: object
      properties:
        addressLine1:
          type: string
          example: Main street 45
        addressLine2:
          type: string
          example: 2nd floor
        city:
          type: string
          example: Berlin
        countryCode:
          type: string
          enum:
            - AD
            - AE
            - AF
            - AG
            - AI
            - AL
            - AM
            - AO
            - AQ
            - AR
            - AS
            - AT
            - AU
            - AW
            - AX
            - AZ
            - BA
            - BB
            - BD
            - BE
            - BF
            - BG
            - BH
            - BI
            - BJ
            - BL
            - BM
            - BN
            - BO
            - BQ
            - BR
            - BS
            - BT
            - BV
            - BW
            - BY
            - BZ
            - CA
            - CC
            - CD
            - CF
            - CG
            - CH
            - CI
            - CK
            - CL
            - CM
            - CN
            - CO
            - CR
            - CU
            - CV
            - CW
            - CX
            - CY
            - CZ
            - DE
            - DJ
            - DK
            - DM
            - DO
            - DZ
            - EC
            - EE
            - EG
            - EH
            - ER
            - ES
            - ET
            - FI
            - FJ
            - FK
            - FM
            - FO
            - FR
            - GA
            - GB
            - GD
            - GE
            - GF
            - GG
            - GH
            - GI
            - GL
            - GM
            - GN
            - GP
            - GQ
            - GR
            - GS
            - GT
            - GU
            - GW
            - GY
            - HK
            - HM
            - HN
            - HR
            - HT
            - HU
            - ID
            - IE
            - IL
            - IM
            - IN
            - IO
            - IQ
            - IR
            - IS
            - IT
            - JE
            - JM
            - JO
            - JP
            - KE
            - KG
            - KH
            - KI
            - KM
            - KN
            - KP
            - KR
            - KW
            - KY
            - KZ
            - LA
            - LB
            - LC
            - LI
            - LK
            - LR
            - LS
            - LT
            - LU
            - LV
            - LY
            - MA
            - MC
            - MD
            - ME
            - MF
            - MG
            - MH
            - MK
            - ML
            - MM
            - MN
            - MO
            - MP
            - MQ
            - MR
            - MS
            - MT
            - MU
            - MV
            - MW
            - MX
            - MY
            - MZ
            - NA
            - NC
            - NE
            - NF
            - NG
            - NI
            - NL
            - 'NO'
            - NP
            - NR
            - NU
            - NZ
            - OM
            - PA
            - PE
            - PF
            - PG
            - PH
            - PK
            - PL
            - PM
            - PN
            - PR
            - PT
            - PW
            - PY
            - QA
            - RE
            - RO
            - RS
            - RU
            - RW
            - SA
            - SB
            - SC
            - SD
            - SE
            - SG
            - SH
            - SI
            - SJ
            - SK
            - SL
            - SM
            - SN
            - SO
            - SR
            - SS
            - ST
            - SV
            - SX
            - SY
            - SZ
            - TC
            - TD
            - TF
            - TG
            - TH
            - TJ
            - TK
            - TL
            - TM
            - TN
            - TO
            - TR
            - TT
            - TV
            - TW
            - TZ
            - UA
            - UG
            - UM
            - US
            - UY
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - YE
            - YT
            - ZA
            - ZM
            - ZW
          example: DE
        postalCode:
          type: string
          example: '10243'
        type:
          type: string
          enum:
            - BILLING
            - DELIVERY
            - SELLING
          example: BILLING
    CreateSalesOrderLineItemRequestDto:
      type: object
      properties:
        itemId:
          type: string
          example: efa82f42-fd85-11e1-a21f-0800200c9a33
        description:
          type: string
          example: SEOUL Guest Chair, red
        itemName:
          type: string
          example: RED CHAIR
        lineNumber:
          type: string
          example: '2'
        optional:
          type: boolean
          example: true
        parentLineNumber:
          type: string
          example: '1'
        quantity:
          type: number
          example: 1
        taxCode:
          type: string
          example: CODE.19
        taxRatePercentage:
          type: number
          example: 19
        totalDiscountAmount:
          description: Discount applied to the line item, in the document currency.
          type: number
          example: 10
        totalDiscountPercentage:
          description: Discount applied to the line item, as a percentage.
          type: number
          example: 10
        totalGrossAmount:
          description: Gross amount of the line item — net plus tax (including VAT).
          type: number
          example: 109
        totalNetAmount:
          description: Net amount of the line item — before tax (excluding VAT).
          type: number
          example: 100
        totalTaxAmount:
          description: Tax (VAT) amount of the line item.
          type: number
          example: 19
        unitAmount:
          description: Price per unit, in the document currency.
          type: number
          example: 100
        unitDiscountAmount:
          description: Discount applied per unit, in the document currency.
          type: number
          example: 10
        unitDiscountPercentage:
          description: Discount applied per unit, as a percentage.
          type: number
          example: 10
        unitName:
          type: string
          example: PIECE
    MetaResponse:
      type: object
      properties:
        warnings:
          type: array
          items:
            type: string
            example: Field not used by target system
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
        partialErrors:
          type: array
          description: >-
            Secondary operations that failed after the main operation succeeded.
            See [Partial Errors](/guides/partial-errors).
          items:
            type: object
            properties:
              code:
                type: string
                example: FILE_UPLOAD_FAILED
              message:
                type: string
                example: >-
                  Attachment invoice.pdf could not be uploaded to the target
                  system.
    PaginationResponse:
      type: object
      properties:
        total:
          type: number
          example: 125
        perPage:
          type: number
          example: 50
        currentPage:
          type: number
          example: 1
        totalPages:
          type: number
          example: 3

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.