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

# List Purchase Orders By Document

> Get the parsed purchase order(s) created from an uploaded document. Returns an empty list until parsing completes — poll after uploading to the presigned URL.



## OpenAPI

````yaml /api-reference/openapi.json get /api/rest/documents/{documentId}/purchase-orders
openapi: 3.1.0
info:
  description: >-
    Upwell is Accounts Receivable automation software for the logistics
    industry. We serve freight brokers, carriers, factors, and anyone who needs
    to get transportation invoices paid.


    Learn more at:


    - [Upwell.com](https://upwell.com)
  title: Upwell REST API
  version: 3.30.2
  termsOfService: https://upwell.com/legal
  contact:
    name: Upwell
    url: https://upwell.com
    email: contact@upwell.com
servers:
  - url: https://api.upwell.com
    description: Production server
  - url: https://staging.api.upwell.com
    description: Staging server
security: []
tags:
  - name: Invoice Approval
    description: Endpoints for managing customer invoice approval workflow
paths:
  /api/rest/documents/{documentId}/purchase-orders:
    get:
      tags:
        - Purchase Orders
      summary: List Purchase Orders By Document
      description: >-
        Get the parsed purchase order(s) created from an uploaded document.
        Returns an empty list until parsing completes — poll after uploading to
        the presigned URL.
      parameters:
        - description: >-
            Your API key will be used for authentication of the request.
            `Authorization: YOUR_API_KEY`
          in: header
          name: authorization
          schema:
            type: string
        - description: >-
            _"documentId" is required (enter it either in parameters or request
            body)_
          in: path
          name: documentId
          schema:
            type: string
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  purchaseOrders:
                    items:
                      description: >-
                        Purchase Order supporting document - parsed data from
                        PURCHASE_ORDER documents (inbound POs from the tenant's
                        customers), modeled for EDI 850-series generation
                      nullable: false
                      properties:
                        annotations:
                          items:
                            description: Document Annotations
                            nullable: false
                            properties:
                              confidence:
                                nullable: false
                                title: Int
                                type: integer
                              fieldLabel:
                                nullable: true
                                title: String
                                type: string
                              id:
                                nullable: false
                                title: String
                                type: string
                              markType:
                                $ref: >-
                                  #/components/schemas/SupportingDocsMarkTypeEnum
                              pageNumber:
                                nullable: true
                                title: Int
                                type: integer
                              reasoning:
                                nullable: true
                                title: String
                                type: string
                              stampTitle:
                                nullable: true
                                title: String
                                type: string
                              text:
                                nullable: true
                                title: String
                                type: string
                              type:
                                $ref: >-
                                  #/components/schemas/SupportingDocsAnnotationTypeEnum
                              valueDate:
                                $ref: '#/components/schemas/date'
                              valueNumber:
                                nullable: true
                                title: String
                                type: string
                            title: SupportingDocsDocumentAnnotations
                            type: object
                          nullable: false
                          type: array
                        billTo:
                          description: Supporting Document Party
                          nullable: true
                          properties:
                            address:
                              description: columns and relationships of "addresses"
                              nullable: true
                              properties:
                                city:
                                  nullable: true
                                  title: String
                                  type: string
                                country:
                                  $ref: '#/components/schemas/CountryCodeEnum'
                                stateOrProvince:
                                  nullable: true
                                  title: String
                                  type: string
                                streetLine1:
                                  nullable: true
                                  title: String
                                  type: string
                                streetLine2:
                                  nullable: true
                                  title: String
                                  type: string
                                streetLine3:
                                  nullable: true
                                  title: String
                                  type: string
                                zipOrPostalCode:
                                  nullable: true
                                  title: String
                                  type: string
                              title: Addresses
                              type: object
                            email:
                              nullable: true
                              title: String
                              type: string
                            name:
                              nullable: true
                              title: String
                              type: string
                            phone:
                              nullable: true
                              title: String
                              type: string
                          title: SupportingDocsSupportingDocParty
                          type: object
                        buyerContactName:
                          nullable: true
                          title: String
                          type: string
                        buyerEmail:
                          nullable: true
                          title: String
                          type: string
                        buyerName:
                          nullable: true
                          title: String
                          type: string
                        buyerPhone:
                          nullable: true
                          title: String
                          type: string
                        cancelAfterDate:
                          $ref: '#/components/schemas/date'
                        confirmToEmail:
                          nullable: true
                          title: String
                          type: string
                        contractNumber:
                          nullable: true
                          title: String
                          type: string
                        createdAt:
                          $ref: '#/components/schemas/timestamp'
                        currency:
                          $ref: '#/components/schemas/CurrencyCodeEnum'
                        customerAccountNumber:
                          nullable: true
                          title: String
                          type: string
                        department:
                          nullable: true
                          title: String
                          type: string
                        documentId:
                          nullable: true
                          title: String
                          type: string
                        fobPoint:
                          nullable: true
                          title: String
                          type: string
                        freightTerms:
                          nullable: true
                          title: String
                          type: string
                        id:
                          nullable: false
                          title: String
                          type: string
                        incoterms:
                          nullable: true
                          title: String
                          type: string
                        legibilityScore:
                          $ref: '#/components/schemas/numeric'
                        miscChargeAmount:
                          nullable: true
                          title: Int
                          type: integer
                        notes:
                          nullable: true
                          title: String
                          type: string
                        paymentTermsDescription:
                          nullable: true
                          title: String
                          type: string
                        paymentTermsDiscountDays:
                          nullable: true
                          title: Int
                          type: integer
                        paymentTermsDiscountPercent:
                          $ref: '#/components/schemas/numeric'
                        paymentTermsNetDays:
                          nullable: true
                          title: Int
                          type: integer
                        pickupDate:
                          $ref: '#/components/schemas/date'
                        poDate:
                          $ref: '#/components/schemas/date'
                        poNumber:
                          nullable: true
                          title: String
                          type: string
                        poType:
                          nullable: true
                          title: String
                          type: string
                        projectNumber:
                          nullable: true
                          title: String
                          type: string
                        purchaseOrderLineItems:
                          items:
                            description: >-
                              Purchase Order line items (EDI 850
                              PO1-loop-shaped)
                            nullable: false
                            properties:
                              brand:
                                nullable: true
                                title: String
                                type: string
                              buyerPartNumber:
                                nullable: true
                                title: String
                                type: string
                              description:
                                nullable: true
                                title: String
                                type: string
                              extendedAmount:
                                nullable: true
                                title: Int
                                type: integer
                              id:
                                nullable: false
                                title: String
                                type: string
                              lineNumber:
                                nullable: true
                                title: Int
                                type: integer
                              manufacturerName:
                                nullable: true
                                title: String
                                type: string
                              manufacturerPartNumber:
                                nullable: true
                                title: String
                                type: string
                              notes:
                                nullable: true
                                title: String
                                type: string
                              packSize:
                                nullable: true
                                title: String
                                type: string
                              promisedDeliveryDate:
                                $ref: '#/components/schemas/date'
                              quantity:
                                $ref: '#/components/schemas/numeric'
                              requestedDeliveryDate:
                                $ref: '#/components/schemas/date'
                              revision:
                                nullable: true
                                title: String
                                type: string
                              schedules:
                                $ref: '#/components/schemas/jsonb'
                              unitOfMeasure:
                                nullable: true
                                title: String
                                type: string
                              unitPriceAmount:
                                nullable: true
                                title: Int
                                type: integer
                              unitPriceBasis:
                                $ref: '#/components/schemas/numeric'
                              upc:
                                nullable: true
                                title: String
                                type: string
                              vendorPartNumber:
                                nullable: true
                                title: String
                                type: string
                            title: SupportingDocsPurchaseOrderLineItems
                            type: object
                          nullable: false
                          type: array
                        referenceNumbers:
                          $ref: '#/components/schemas/jsonb'
                        releaseNumber:
                          nullable: true
                          title: String
                          type: string
                        remitTo:
                          description: Supporting Document Party
                          nullable: true
                          properties:
                            address:
                              description: columns and relationships of "addresses"
                              nullable: true
                              properties:
                                city:
                                  nullable: true
                                  title: String
                                  type: string
                                country:
                                  $ref: '#/components/schemas/CountryCodeEnum'
                                stateOrProvince:
                                  nullable: true
                                  title: String
                                  type: string
                                streetLine1:
                                  nullable: true
                                  title: String
                                  type: string
                                streetLine2:
                                  nullable: true
                                  title: String
                                  type: string
                                streetLine3:
                                  nullable: true
                                  title: String
                                  type: string
                                zipOrPostalCode:
                                  nullable: true
                                  title: String
                                  type: string
                              title: Addresses
                              type: object
                            email:
                              nullable: true
                              title: String
                              type: string
                            name:
                              nullable: true
                              title: String
                              type: string
                            phone:
                              nullable: true
                              title: String
                              type: string
                          title: SupportingDocsSupportingDocParty
                          type: object
                        requestedDeliveryDate:
                          $ref: '#/components/schemas/date'
                        requestedShipDate:
                          $ref: '#/components/schemas/date'
                        requesterName:
                          nullable: true
                          title: String
                          type: string
                        requisitionNumber:
                          nullable: true
                          title: String
                          type: string
                        revisionDate:
                          $ref: '#/components/schemas/date'
                        revisionNumber:
                          nullable: true
                          title: String
                          type: string
                        shipTo:
                          description: Supporting Document Party
                          nullable: true
                          properties:
                            address:
                              description: columns and relationships of "addresses"
                              nullable: true
                              properties:
                                city:
                                  nullable: true
                                  title: String
                                  type: string
                                country:
                                  $ref: '#/components/schemas/CountryCodeEnum'
                                stateOrProvince:
                                  nullable: true
                                  title: String
                                  type: string
                                streetLine1:
                                  nullable: true
                                  title: String
                                  type: string
                                streetLine2:
                                  nullable: true
                                  title: String
                                  type: string
                                streetLine3:
                                  nullable: true
                                  title: String
                                  type: string
                                zipOrPostalCode:
                                  nullable: true
                                  title: String
                                  type: string
                              title: Addresses
                              type: object
                            email:
                              nullable: true
                              title: String
                              type: string
                            name:
                              nullable: true
                              title: String
                              type: string
                            phone:
                              nullable: true
                              title: String
                              type: string
                          title: SupportingDocsSupportingDocParty
                          type: object
                        shipToCode:
                          nullable: true
                          title: String
                          type: string
                        shipVia:
                          nullable: true
                          title: String
                          type: string
                        specialInstructions:
                          nullable: true
                          title: String
                          type: string
                        subtotalAmount:
                          nullable: true
                          title: Int
                          type: integer
                        supplier:
                          description: Supporting Document Party
                          nullable: true
                          properties:
                            address:
                              description: columns and relationships of "addresses"
                              nullable: true
                              properties:
                                city:
                                  nullable: true
                                  title: String
                                  type: string
                                country:
                                  $ref: '#/components/schemas/CountryCodeEnum'
                                stateOrProvince:
                                  nullable: true
                                  title: String
                                  type: string
                                streetLine1:
                                  nullable: true
                                  title: String
                                  type: string
                                streetLine2:
                                  nullable: true
                                  title: String
                                  type: string
                                streetLine3:
                                  nullable: true
                                  title: String
                                  type: string
                                zipOrPostalCode:
                                  nullable: true
                                  title: String
                                  type: string
                              title: Addresses
                              type: object
                            email:
                              nullable: true
                              title: String
                              type: string
                            name:
                              nullable: true
                              title: String
                              type: string
                            phone:
                              nullable: true
                              title: String
                              type: string
                          title: SupportingDocsSupportingDocParty
                          type: object
                        taxAmount:
                          nullable: true
                          title: Int
                          type: integer
                        totalAmount:
                          nullable: true
                          title: Int
                          type: integer
                        totalQuantity:
                          $ref: '#/components/schemas/numeric'
                        totalVolume:
                          $ref: '#/components/schemas/numeric'
                        totalWeight:
                          $ref: '#/components/schemas/numeric'
                        vendorInstructions:
                          nullable: true
                          title: String
                          type: string
                        vendorNumber:
                          nullable: true
                          title: String
                          type: string
                        weightUnit:
                          nullable: true
                          title: String
                          type: string
                      title: SupportingDocsPurchaseOrders
                      type: object
                    nullable: false
                    type: array
          description: Responses for GET /api/rest/documents/{documentId}/purchase-orders
components:
  schemas:
    SupportingDocsMarkTypeEnum:
      enum:
        - MARK
        - SIGNATURE
      nullable: false
      title: SupportingDocsMarkTypeEnum
    SupportingDocsAnnotationTypeEnum:
      enum:
        - DIGITAL
        - HANDWRITTEN
        - STAMP
        - TYPED
      nullable: false
      title: SupportingDocsAnnotationTypeEnum
    date:
      nullable: false
      title: date
      type: string
      format: date
      description: A date string, such as 2024-02-03 (YYYY-MM-DD)
    CountryCodeEnum:
      enum:
        - AD
        - AE
        - AF
        - AG
        - AL
        - AM
        - AO
        - AR
        - AT
        - AU
        - AZ
        - BA
        - BB
        - BD
        - BE
        - BF
        - BG
        - BH
        - BI
        - BJ
        - BN
        - BO
        - BR
        - BS
        - BT
        - BW
        - BY
        - BZ
        - CA
        - CD
        - CF
        - CG
        - CH
        - CI
        - CL
        - CM
        - CN
        - CO
        - CR
        - CU
        - CV
        - CY
        - CZ
        - DE
        - DJ
        - DK
        - DM
        - DO
        - DZ
        - EC
        - EE
        - EG
        - ER
        - ES
        - ET
        - FI
        - FJ
        - FM
        - FR
        - GA
        - GB
        - GD
        - GE
        - GH
        - GM
        - GN
        - GQ
        - GR
        - GT
        - GW
        - GY
        - HK
        - HN
        - HR
        - HT
        - HU
        - ID
        - IE
        - IL
        - IN
        - IQ
        - IR
        - IS
        - IT
        - JM
        - JO
        - JP
        - KE
        - KG
        - KH
        - KI
        - KM
        - KN
        - KP
        - KR
        - KW
        - KZ
        - LA
        - LB
        - LC
        - LI
        - LK
        - LR
        - LS
        - LT
        - LU
        - LV
        - LY
        - MA
        - MC
        - MD
        - ME
        - MG
        - MH
        - MK
        - ML
        - MM
        - MN
        - MO
        - MR
        - MT
        - MU
        - MV
        - MW
        - MX
        - MY
        - MZ
        - NA
        - NE
        - NG
        - NI
        - NL
        - 'NO'
        - NP
        - NR
        - NZ
        - OM
        - PA
        - PE
        - PG
        - PH
        - PK
        - PL
        - PR
        - PS
        - PT
        - PW
        - PY
        - QA
        - RO
        - RS
        - RU
        - RW
        - SA
        - SB
        - SC
        - SD
        - SE
        - SG
        - SI
        - SK
        - SL
        - SM
        - SN
        - SO
        - SR
        - SS
        - ST
        - SV
        - SY
        - SZ
        - TD
        - TG
        - TH
        - TJ
        - TL
        - TM
        - TN
        - TO
        - TR
        - TT
        - TV
        - TW
        - TZ
        - UA
        - UG
        - US
        - UY
        - UZ
        - VA
        - VC
        - VE
        - VN
        - VU
        - WS
        - YE
        - ZA
        - ZM
        - ZW
      nullable: false
      title: CountryCodeEnum
    timestamp:
      nullable: false
      title: timestamp
    CurrencyCodeEnum:
      enum:
        - AED
        - AUD
        - BRL
        - CAD
        - CHF
        - CNY
        - EGP
        - EUR
        - GBP
        - HKD
        - IDR
        - INR
        - JPY
        - KRW
        - MXN
        - MYR
        - NZD
        - QAR
        - SAR
        - SGD
        - THB
        - TRY
        - TWD
        - USD
        - VND
        - ZAR
      nullable: false
      title: CurrencyCodeEnum
    numeric:
      nullable: false
      title: numeric
    jsonb:
      nullable: false
      title: jsonb

````