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

# Update One Invoice

> Update an invoice by ID



## OpenAPI

````yaml /api-reference/openapi.json put /api/rest/invoices/{id}
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/invoices/{id}:
    put:
      tags:
        - Invoices
      summary: Update One Invoice
      description: Update an invoice by ID
      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: _"id" is required (enter it either in parameters or request body)_
          in: path
          name: id
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              properties:
                id:
                  nullable: false
                  title: String
                  type: string
                input:
                  default: {}
                  description: input type for updating data in table "invoices"
                  nullable: true
                  properties:
                    approvedToSend:
                      nullable: true
                      title: Boolean
                      type: boolean
                    balance:
                      $ref: '#/components/schemas/bigint'
                    billOfLadingNumber:
                      nullable: true
                      title: String
                      type: string
                    billToCustomerId:
                      nullable: true
                      title: String
                      type: string
                    carrierProNumber:
                      nullable: true
                      title: String
                      type: string
                    checkOrAchNumber:
                      nullable: true
                      title: String
                      type: string
                    companyDivision:
                      nullable: true
                      title: String
                      type: string
                    createdFromEmailMessageId:
                      nullable: true
                      title: String
                      type: string
                    customerId:
                      nullable: true
                      title: String
                      type: string
                    customerPoNumber:
                      nullable: true
                      title: String
                      type: string
                    customerReferenceNumber:
                      nullable: true
                      title: String
                      type: string
                    debitsUpdatedAt:
                      $ref: '#/components/schemas/timestamp'
                    deliveryDate:
                      $ref: '#/components/schemas/date'
                    documentExceptions:
                      $ref: '#/components/schemas/jsonb'
                    dueDate:
                      $ref: '#/components/schemas/date'
                    externallyManaged:
                      nullable: true
                      title: Boolean
                      type: boolean
                    fileAssociationsUpdatedAt:
                      $ref: '#/components/schemas/timestamp'
                    finalCheckPassedAt:
                      $ref: '#/components/schemas/timestamptz'
                    issueDate:
                      $ref: '#/components/schemas/date'
                    lastUpdatedByEmailMessageId:
                      nullable: true
                      title: String
                      type: string
                    lineItemsLastUpdatedAt:
                      $ref: '#/components/schemas/timestamptz'
                    metadata:
                      $ref: '#/components/schemas/jsonb'
                    number:
                      nullable: true
                      title: String
                      type: string
                    paidDate:
                      $ref: '#/components/schemas/timestamptz'
                    portalException:
                      nullable: true
                      title: String
                      type: string
                    portalSlug:
                      nullable: true
                      title: String
                      type: string
                    receivedAt:
                      $ref: '#/components/schemas/timestamp'
                    receivedFromPortalSlug:
                      nullable: true
                      title: String
                      type: string
                    referenceNumbers:
                      $ref: '#/components/schemas/jsonb'
                    scacCode:
                      nullable: true
                      title: String
                      type: string
                    scheduledPaymentDate:
                      $ref: '#/components/schemas/date'
                    sentAt:
                      $ref: '#/components/schemas/timestamp'
                    sentToPortalSlug:
                      nullable: true
                      title: String
                      type: string
                    shipDate:
                      $ref: '#/components/schemas/date'
                    sourceSystem:
                      nullable: true
                      title: String
                      type: string
                    sourceSystemId:
                      nullable: true
                      title: String
                      type: string
                    status:
                      $ref: '#/components/schemas/InvoiceStatusEnum'
                      enum:
                        - created
                        - open
                        - sent
                        - viewed
                        - paid
                        - part-paid
                        - disputed
                        - overdue
                        - cancelled
                        - write-off
                        - refunded
                        - send-error
                    supportingDocPacketBuiltAgainstAt:
                      $ref: '#/components/schemas/timestamp'
                    totalAmount:
                      $ref: '#/components/schemas/bigint'
                    totalTaxAmount:
                      $ref: '#/components/schemas/bigint'
                  title: InvoicesSetInput
                  type: object
              type: object
        description: >-
          Query parameters can also be provided in the request body as a JSON
          object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  updateInvoice:
                    description: columns and relationships of "invoices"
                    nullable: true
                    properties:
                      balance:
                        $ref: '#/components/schemas/bigint'
                      companyDivision:
                        nullable: true
                        title: String
                        type: string
                      createdAt:
                        $ref: '#/components/schemas/timestamptz'
                      customerId:
                        nullable: true
                        title: String
                        type: string
                      customerReferenceNumber:
                        nullable: true
                        title: String
                        type: string
                      dueDate:
                        $ref: '#/components/schemas/date'
                      id:
                        nullable: false
                        title: String
                        type: string
                      invoiceLineItems:
                        items:
                          description: columns and relationships of "invoice_line_items"
                          nullable: false
                          properties:
                            createdAt:
                              $ref: '#/components/schemas/timestamptz'
                            id:
                              nullable: false
                              title: String
                              type: string
                            item:
                              nullable: true
                              title: String
                              type: string
                            remoteId:
                              nullable: true
                              title: String
                              type: string
                            sourceSystem:
                              nullable: true
                              title: String
                              type: string
                            sourceSystemId:
                              nullable: true
                              title: String
                              type: string
                            totalAmount:
                              nullable: true
                              title: Int
                              type: integer
                            updatedAt:
                              $ref: '#/components/schemas/timestamptz'
                          title: InvoiceLineItems
                          type: object
                        nullable: false
                        type: array
                      invoiceShipments:
                        items:
                          description: columns and relationships of "invoice_shipments"
                          nullable: false
                          properties:
                            shipment:
                              description: columns and relationships of "shipments"
                              nullable: false
                              properties:
                                consigneeAddress:
                                  description: columns and relationships of "addresses"
                                  nullable: true
                                  properties:
                                    city:
                                      nullable: true
                                      title: String
                                      type: string
                                    companyName:
                                      nullable: true
                                      title: String
                                      type: string
                                    country:
                                      $ref: '#/components/schemas/CountryCodeEnum'
                                    id:
                                      nullable: false
                                      title: String
                                      type: string
                                    name:
                                      nullable: true
                                      title: String
                                      type: string
                                    phoneNumber:
                                      nullable: true
                                      title: String
                                      type: string
                                    stateOrProvince:
                                      nullable: true
                                      title: String
                                      type: string
                                    streetLine1:
                                      nullable: true
                                      title: String
                                      type: string
                                    streetLine2:
                                      nullable: true
                                      title: String
                                      type: string
                                    zipOrPostalCode:
                                      nullable: true
                                      title: String
                                      type: string
                                  title: Addresses
                                  type: object
                                createdAt:
                                  $ref: '#/components/schemas/timestamptz'
                                customerId:
                                  nullable: true
                                  title: String
                                  type: string
                                deliveredAt:
                                  $ref: '#/components/schemas/timestamp'
                                id:
                                  nullable: false
                                  title: String
                                  type: string
                                invoiceId:
                                  nullable: true
                                  title: String
                                  type: string
                                loadDescription:
                                  nullable: true
                                  title: String
                                  type: string
                                pickupAddress:
                                  description: columns and relationships of "addresses"
                                  nullable: true
                                  properties:
                                    city:
                                      nullable: true
                                      title: String
                                      type: string
                                    companyName:
                                      nullable: true
                                      title: String
                                      type: string
                                    country:
                                      $ref: '#/components/schemas/CountryCodeEnum'
                                    id:
                                      nullable: false
                                      title: String
                                      type: string
                                    name:
                                      nullable: true
                                      title: String
                                      type: string
                                    phoneNumber:
                                      nullable: true
                                      title: String
                                      type: string
                                    stateOrProvince:
                                      nullable: true
                                      title: String
                                      type: string
                                    streetLine1:
                                      nullable: true
                                      title: String
                                      type: string
                                    streetLine2:
                                      nullable: true
                                      title: String
                                      type: string
                                    zipOrPostalCode:
                                      nullable: true
                                      title: String
                                      type: string
                                  title: Addresses
                                  type: object
                                pickupAt:
                                  $ref: '#/components/schemas/timestamp'
                                shipmentId:
                                  nullable: false
                                  title: String
                                  type: string
                                status:
                                  nullable: true
                                  title: String
                                  type: string
                                stops:
                                  items:
                                    description: columns and relationships of "stops"
                                    nullable: false
                                    properties:
                                      address:
                                        description: columns and relationships of "addresses"
                                        nullable: true
                                        properties:
                                          city:
                                            nullable: true
                                            title: String
                                            type: string
                                          companyName:
                                            nullable: true
                                            title: String
                                            type: string
                                          country:
                                            $ref: '#/components/schemas/CountryCodeEnum'
                                          id:
                                            nullable: false
                                            title: String
                                            type: string
                                          name:
                                            nullable: true
                                            title: String
                                            type: string
                                          phoneNumber:
                                            nullable: true
                                            title: String
                                            type: string
                                          stateOrProvince:
                                            nullable: true
                                            title: String
                                            type: string
                                          streetLine1:
                                            nullable: true
                                            title: String
                                            type: string
                                          streetLine2:
                                            nullable: true
                                            title: String
                                            type: string
                                          zipOrPostalCode:
                                            nullable: true
                                            title: String
                                            type: string
                                        title: Addresses
                                        type: object
                                      id:
                                        nullable: false
                                        title: String
                                        type: string
                                      metadata:
                                        nullable: true
                                        title: String
                                        type: string
                                      pieceCount:
                                        nullable: true
                                        title: Int
                                        type: integer
                                      sequenceNumber:
                                        nullable: true
                                        title: Int
                                        type: integer
                                      stopType:
                                        nullable: true
                                        title: String
                                        type: string
                                      weightAmount:
                                        $ref: '#/components/schemas/float8'
                                      weightUnit:
                                        nullable: true
                                        title: String
                                        type: string
                                    title: Stops
                                    type: object
                                  nullable: false
                                  type: array
                                trailerNumber:
                                  nullable: true
                                  title: String
                                  type: string
                                updatedAt:
                                  $ref: '#/components/schemas/timestamptz'
                                volume:
                                  $ref: '#/components/schemas/float8'
                                volumeUnit:
                                  nullable: true
                                  title: String
                                  type: string
                                weight:
                                  $ref: '#/components/schemas/float8'
                                weightUnit:
                                  nullable: true
                                  title: String
                                  type: string
                              title: Shipments
                              type: object
                          title: InvoiceShipments
                          type: object
                        nullable: false
                        type: array
                      issueDate:
                        $ref: '#/components/schemas/date'
                      metadata:
                        $ref: '#/components/schemas/jsonb'
                      missingDocuments:
                        nullable: true
                        title: String
                        type: string
                      number:
                        nullable: false
                        title: String
                        type: string
                      portalSlug:
                        nullable: true
                        title: String
                        type: string
                      referenceNumbers:
                        $ref: '#/components/schemas/jsonb'
                      sourceSystem:
                        nullable: true
                        title: String
                        type: string
                      sourceSystemId:
                        nullable: true
                        title: String
                        type: string
                      status:
                        $ref: '#/components/schemas/InvoiceStatusEnum'
                      totalAmount:
                        $ref: '#/components/schemas/bigint'
                      totalTaxAmount:
                        $ref: '#/components/schemas/bigint'
                      updatedAt:
                        $ref: '#/components/schemas/timestamptz'
                    title: Invoices
                    type: object
          description: Responses for PUT /api/rest/invoices/{id}
components:
  schemas:
    bigint:
      nullable: false
      title: bigint
    timestamp:
      nullable: false
      title: timestamp
    date:
      nullable: false
      title: date
      type: string
      format: date
      description: A date string, such as 2024-02-03 (YYYY-MM-DD)
    jsonb:
      nullable: false
      title: jsonb
    timestamptz:
      nullable: false
      title: timestamptz
      type: string
      format: date-time
      description: >-
        A timestamp with timezone in ISO 8601 format, such as
        2024-12-16T21:57:14.525733+00:00
    InvoiceStatusEnum:
      enum:
        - APPROVED
        - CANCELLED
        - CREATED
        - DELIVERED
        - DISPUTED
        - DRAFT
        - OPEN
        - OVERDUE
        - PAID
        - PART_PAID
        - PORTAL_EXCEPTION
        - PORTAL_RESOLVED
        - PROCESSING
        - REFUNDED
        - REJECTED
        - SEND_ERROR
        - SENT
        - VIEWED
        - WRITE_OFF
      nullable: false
      title: InvoiceStatusEnum
    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
    float8:
      nullable: false
      title: float8

````