> ## 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 Carrier Invoice

> Update a carrier invoice by ID



## OpenAPI

````yaml /api-reference/openapi.json put /api/rest/carrier_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/carrier_invoices/{id}:
    put:
      tags:
        - Carrier Invoices
      summary: Update One Carrier Invoice
      description: Update a carrier 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:
                  $ref: '#/components/schemas/CarrierInvoicesSetInput'
              type: object
        description: >-
          Query parameters can also be provided in the request body as a JSON
          object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  updateCarrierInvoice:
                    description: >-
                      Invoices (payables) received from carriers (e.g. via
                      email)
                    nullable: true
                    properties:
                      balance:
                        nullable: false
                        title: Int
                        type: integer
                      billId:
                        nullable: true
                        title: String
                        type: string
                      carrierId:
                        nullable: true
                        title: String
                        type: string
                      carrierInvoiceLineItems:
                        items:
                          description: >-
                            columns and relationships of
                            "carrier_invoice_line_items"
                          nullable: false
                          properties:
                            description:
                              nullable: true
                              title: String
                              type: string
                            id:
                              nullable: false
                              title: String
                              type: string
                            item:
                              nullable: true
                              title: String
                              type: string
                            lineNumber:
                              nullable: true
                              title: String
                              type: string
                            quantity:
                              $ref: '#/components/schemas/numeric'
                            totalAmount:
                              nullable: true
                              title: Int
                              type: integer
                            unitPrice:
                              nullable: true
                              title: Int
                              type: integer
                          title: CarrierInvoiceLineItems
                          type: object
                        nullable: false
                        type: array
                      createdAt:
                        $ref: '#/components/schemas/timestamptz'
                      currency:
                        $ref: '#/components/schemas/CurrencyCodeEnum'
                      dueDate:
                        $ref: '#/components/schemas/date'
                      exceptions:
                        nullable: true
                        title: String
                        type: string
                      id:
                        nullable: false
                        title: String
                        type: string
                      invoiceNumber:
                        nullable: true
                        title: String
                        type: string
                      issueDate:
                        $ref: '#/components/schemas/date'
                      loadNumber:
                        nullable: true
                        title: String
                        type: string
                      metadata:
                        $ref: '#/components/schemas/jsonb'
                      receivedAt:
                        $ref: '#/components/schemas/timestamptz'
                      referenceNumbers:
                        $ref: '#/components/schemas/jsonb'
                      shipmentId:
                        nullable: true
                        title: String
                        type: string
                      status:
                        $ref: '#/components/schemas/CarrierInvoiceStatusEnum'
                      totalAmount:
                        nullable: true
                        title: Int
                        type: integer
                      totalTaxAmount:
                        nullable: true
                        title: Int
                        type: integer
                      updatedAt:
                        $ref: '#/components/schemas/timestamptz'
                    title: CarrierInvoices
                    type: object
          description: Responses for PUT /api/rest/carrier_invoices/{id}
components:
  schemas:
    CarrierInvoicesSetInput:
      description: input type for updating data in table "carrier_invoices"
      nullable: false
      properties:
        additionalReferenceNumbers:
          $ref: '#/components/schemas/jsonb'
        approvedAt:
          $ref: '#/components/schemas/timestamptz'
        assignedAt:
          $ref: '#/components/schemas/timestamptz'
        assignedById:
          $ref: '#/components/schemas/uuid'
        assignedToId:
          $ref: '#/components/schemas/uuid'
        balance:
          nullable: true
          title: Int
          type: integer
          description: >-
            The balance of the invoice. This should be in cents. For example,
            $100.00 should be represented as 10000.
        billId:
          nullable: true
          title: String
          type: string
        billOfLadingNumber:
          nullable: true
          title: String
          type: string
        carrierBillingAddressId:
          nullable: true
          title: String
          type: string
        carrierId:
          nullable: true
          title: String
          type: string
        carrierName:
          nullable: true
          title: String
          type: string
        carrierProNumber:
          nullable: true
          title: String
          type: string
        createdAt:
          $ref: '#/components/schemas/timestamptz'
        createdFromEmailMessageId:
          nullable: true
          title: String
          type: string
        currency:
          $ref: '#/components/schemas/CurrencyCodeEnum'
        customerInvoiceId:
          nullable: true
          title: String
          type: string
        customerPoNumber:
          nullable: true
          title: String
          type: string
        customerReferenceNumber:
          nullable: true
          title: String
          type: string
        deletedAt:
          $ref: '#/components/schemas/timestamptz'
        documentsModifiedAt:
          $ref: '#/components/schemas/timestamp'
        documentsTypeOrCustomerVisibilityUpdatedAt:
          $ref: '#/components/schemas/timestamp'
        dueDate:
          $ref: '#/components/schemas/date'
        factorAddressId:
          nullable: true
          title: String
          type: string
        factorId:
          nullable: true
          title: String
          type: string
        id:
          nullable: true
          title: String
          type: string
        integrationId:
          nullable: true
          title: String
          type: string
        invoiceNumber:
          nullable: true
          title: String
          type: string
        issueDate:
          $ref: '#/components/schemas/date'
        loadNumber:
          nullable: true
          title: String
          type: string
        matchingDisabled:
          nullable: true
          title: Boolean
          type: boolean
        mergedIntoCarrierInvoiceId:
          nullable: true
          title: String
          type: string
        metadata:
          $ref: '#/components/schemas/jsonb'
        quickPayRequestReasoning:
          nullable: true
          title: String
          type: string
        quickPayRequestText:
          nullable: true
          title: String
          type: string
        quickPayRequested:
          nullable: true
          title: Boolean
          type: boolean
        receivedAt:
          $ref: '#/components/schemas/timestamptz'
        referenceNumbers:
          $ref: '#/components/schemas/jsonb'
        shipmentId:
          nullable: true
          title: String
          type: string
        sourceSystem:
          nullable: true
          title: String
          type: string
        sourceSystemId:
          nullable: true
          title: String
          type: string
        sourceSystemMeta:
          $ref: '#/components/schemas/jsonb'
        status:
          $ref: '#/components/schemas/CarrierInvoiceStatusEnum'
        tmsDocumentsUploadStatus:
          $ref: '#/components/schemas/UploadStatusEnum'
        totalAmount:
          nullable: true
          title: Int
          type: integer
          description: >-
            The total amount of the invoice. This should be in cents. For
            example, $100.00 should be represented as 10000.
        totalTaxAmount:
          nullable: true
          title: Int
          type: integer
          description: >-
            The total tax amount of the invoice. This should be in cents. For
            example, $100.00 should be represented as 10000.
        updatedAt:
          $ref: '#/components/schemas/timestamptz'
      title: CarrierInvoicesSetInput
      type: object
    numeric:
      nullable: false
      title: numeric
    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
    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
    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
    CarrierInvoiceStatusEnum:
      enum:
        - APPROVED
        - AWAITING_BILL
        - AWAITING_CARRIER_RESPONSE
        - AWAITING_INVOICE
        - CANCELLED
        - CARRIER_EXCEPTION
        - CARRIER_RESPONDED
        - DISPUTED
        - EXCEPTION
        - PAID
        - PART_PAID
        - PROCESSING
        - RECEIVED
        - REFUNDED
        - REJECTED
        - UNDER_REVIEW
      nullable: false
      title: CarrierInvoiceStatusEnum
    uuid:
      nullable: false
      pattern: '[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}'
      title: uuid
      type: string
    timestamp:
      nullable: false
      title: timestamp
    UploadStatusEnum:
      enum:
        - FAILURE
        - INITIATED
        - PARTIAL_SUCCESS
        - SUCCESS
      nullable: false
      title: UploadStatusEnum

````