> ## 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.

# Get purchase order

## Field support per integration

<AccordionGroup>
  <Accordion title="Exact Online" icon={<div dangerouslySetInnerHTML={{__html: `<svg width="24" height="24" viewBox="0 0 842 179" transform="translate(-7,-4)" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="a" d="M.06.529h841.83V178.94H.06z"/></defs><g fill="none" fill-rule="evenodd"><mask id="b" fill="#fff"><use xlink:href="#a"/></mask><path fill="#D9252A" mask="url(https://mintlify.s3.us-west-1.amazonaws.com/maesn/api-reference/accounting-endpoints/purchaseorders#b)" d="M112.97 58.348H0v33.794h128.574V58.348H112.97M111.616 116.693H0v33.794h16.958v-.001h94.658v.001h16.958v-33.794h-16.958M566.017 146.261h-50.69c-8.447 0-13.465-4.492-13.465-12.677 0-8.181 5.018-12.668 13.465-12.668h50.69v25.345zM542.521 29.045h-46.878v-.001h-20.734v33.791h20.734v-.001h44.761c20.032 0 25.448 7.694 25.603 25.346H513.74c-30.887 0-47.784 15.84-47.784 45.404 0 29.31 16.897 45.414 47.784 45.414h82.11l.032-.002h6.566v-92.13c0-39.079-14.785-57.821-59.927-57.821zM732.45 145.204h-42.503c-22.97 0-31.424-11.086-31.424-41.181 0-30.094 8.454-41.185 31.424-41.185h41.973l.065-.003h6.556V29.044h-52.293c-46.724 0-64.681 23.233-64.681 74.979 0 51.742 17.957 74.973 64.681 74.973h52.796v-33.791h-6.562l-.032-.001M269.888 145.205h-39.992c-19.092 0-27.963-6.758-30.417-23.753h59.03v.022h20.732v-6.021c.014-.2.026-.401.026-.609V94.253c0-.207-.012-.409-.026-.609v-5.961h-5.827a8.685 8.685 0 0 0-.747-.033h-73.324c2.254-17.607 11.101-24.815 30.553-24.815h60.194V29.044h-18.099v.003h-45.789c-46.733 0-64.677 23.228-64.677 74.973 0 51.741 17.944 74.979 64.677 74.979h57.819c.022 0 .043-.002.065-.003h6.535v-33.791h-20.733M835.286 145.205H805.98c-7.125 0-11.358-5.012-11.358-13.99v-68.38h44.091V29.047h-44.091V.529h-36.426v133.323c0 30.894 14.521 45.147 44.616 45.147h32.474l.066-.003h6.538v-33.791h-6.604M456.904 172.136l-53.323-70.381 49.893-65.848v-.001l5.199-6.862h-42.787l-3.597 4.749-.001.001-30.095 39.725-30.1-39.725-.001-.002-3.598-4.748h-44.367l55.879 73.758-57.729 76.197 14.575-.003h28.211l3.598-4.747.002-.002 32.737-43.209 32.738 43.209v.001l3.598 4.748h44.367l-5.199-6.86"/></g></svg>`,}}/>}>
    <Note>
      If you're not using the [Interactive Authentication Flow](/authentication#interactive-authentication-flow), make sure the query parameter `companyId` is correctly populated.
      You can obtain this value by using the `GET Companies` endpoint available under the Authentication section.
    </Note>

    <Note>
      To retrieve purchase orders from Exact Online, your account must have one of the following package subscriptions enabled:

      * **Manufacturing** (any tier)
      * **Professional Services** (Plus, Professional, or Premium)
      * **Wholesale & Distribution** (any tier)
    </Note>

    Support rawData: `true`

    <br />

    Supported Response Fields:

    <ResponseField name="id" type="string" />

    <ResponseField name="addresses" type="Address[]">
      <Expandable title="properties">
        <ResponseField name="addressLine1" type="string" />

        <ResponseField name="addressLine2" type="string" />

        <ResponseField name="city" type="string" />

        <ResponseField name="postalCode" type="string" />

        <ResponseField name="countryCode" type="enum">
          Available options (ISO 3166-1 alpha-2):
          `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`
        </ResponseField>

        <ResponseField name="type" type="enum">
          Available options: `DELIVERY`
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="approvalDate" type="string">
      ISO-8601 date format, e.g., 2024-01-01T00:00:00Z
    </ResponseField>

    <ResponseField name="comment" type="string" />

    <ResponseField name="createdDate" type="string">
      ISO-8601 date format, e.g., 2024-01-01T00:00:00Z
    </ResponseField>

    <ResponseField name="currency" type="enum">
      Available options (3-letter ISO 4217):
      `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`
    </ResponseField>

    <ResponseField name="description" type="string" />

    <ResponseField name="lineItems" type="LineItem[]">
      <Expandable title="properties">
        <ResponseField name="id" type="string" />

        <ResponseField name="itemId" type="string" />

        <ResponseField name="createdDate" type="string">
          ISO-8601 date format, e.g., 2024-01-01T00:00:00Z
        </ResponseField>

        <ResponseField name="description" type="string" />

        <ResponseField name="itemName" type="string" />

        <ResponseField name="quantity" type="number" />

        <ResponseField name="taxCode" type="string" />

        <ResponseField name="taxRatePercentage" type="number" />

        <ResponseField name="totalNetAmount" type="number" />

        <ResponseField name="totalTaxAmount" type="number" />

        <ResponseField name="unitAmount" type="number" />

        <ResponseField name="unitName" type="string" />

        <ResponseField name="updatedDate" type="string">
          ISO-8601 date format, e.g., 2024-01-01T00:00:00Z
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="orderDate" type="string">
      ISO-8601 date format, e.g., 2024-01-01T00:00:00Z
    </ResponseField>

    <ResponseField name="paymentTermId" type="string" />

    <ResponseField name="reference" type="number" />

    <ResponseField name="status" type="enum">
      Available options: `OPEN`, `PARTIALLY_FULFILLED`, `CLOSED`, `CANCELED`
    </ResponseField>

    <ResponseField name="supplierId" type="string" />

    <ResponseField name="totalNetAmount" type="number" />

    <ResponseField name="totalTaxAmount" type="number" />

    <ResponseField name="updatedDate" type="string">
      ISO-8601 date format, e.g., 2024-01-01T00:00:00Z
    </ResponseField>
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml GET /accounting/purchaseOrders/{purchaseOrderId}
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/purchaseOrders/{purchaseOrderId}:
    get:
      tags:
        - accounting
      operationId: getPurchaseOrder
      parameters:
        - name: purchaseOrderId
          required: true
          in: path
          schema:
            type: string
        - name: companyId
          required: false
          in: query
          schema:
            type: string
        - name: environmentName
          in: query
          schema:
            type: string
          required: false
        - name: rawData
          required: false
          in: query
          schema:
            type: boolean
        - 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
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/PurchaseOrderResponseDto'
                        type: object
components:
  schemas:
    BaseResponseDto:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/MetaResponse'
        data:
          oneOf:
            - type: object
            - type: array
    PurchaseOrderResponseDto:
      type: object
      properties:
        id:
          type: string
          example: f302303e-4365-4779-8685-872b713aeab1
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        approvalDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        comment:
          type: string
          example: due today
        createdDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        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
        description:
          type: string
          example: Red chair order
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/PurchaseOrderLineItemResponseDto'
        orderDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        paymentTermId:
          type: string
          example: '21'
        reference:
          type: string
          example: RCXF197253F
        status:
          type: string
          enum:
            - OPEN
            - PARTIALLY_FULFILLED
            - CLOSED
            - CANCELED
          example: OPEN
        supplierId:
          type: string
          example: 8346e541-0a0c-4b45-a2d4-8fba44a99f6c
        totalDiscountAmount:
          type: string
          example: 10
        totalDiscountPercentage:
          type: string
          example: 10
        totalGrossAmount:
          type: string
          example: 109
        totalNetAmount:
          type: string
          example: 100
        totalTaxAmount:
          type: string
          example: 19
        updatedDate:
          type: string
          example: '2021-01-01T00:00:00Z'
    MetaResponse:
      type: object
      properties:
        warnings:
          type: array
          items:
            type: string
            example: Field not used by target system
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
    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
    PurchaseOrderLineItemResponseDto:
      type: object
      properties:
        id:
          type: string
          example: 9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b
        itemId:
          type: string
          example: efa82f42-fd85-11e1-a21f-0800200c9a33
        createdDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        description:
          type: string
          example: SEOUL Guest Chair, red
        itemName:
          type: string
          example: RED CHAIR
        quantity:
          type: number
          example: 1
        taxCode:
          type: string
          example: CODE.19
        taxRatePercentage:
          type: number
          example: 19
        totalDiscountAmount:
          type: number
          example: 10
        totalDiscountPercentage:
          type: number
          example: 10
        totalGrossAmount:
          type: number
          example: 109
        totalNetAmount:
          type: number
          example: 100
        totalTaxAmount:
          type: number
          example: 19
        unitAmount:
          type: number
          example: 100
        unitDiscountAmount:
          type: number
          example: 10
        unitDiscountPercentage:
          type: number
          example: 10
        unitName:
          type: string
          example: PIECE
        updatedDate:
          type: string
          example: '2021-01-01T00:00:00Z'
    PaginationResponse:
      type: object
      properties:
        total:
          type: number
          example: 125
        perPage:
          type: number
          example: 50
        currentPage:
          type: number
          example: 1
        totalPages:
          type: number
          example: 3

````