> ## 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 Shipment By Source System Id

> Update a shipment by source system id



## OpenAPI

````yaml /api-reference/openapi.json put /api/rest/shipments
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/shipments:
    put:
      tags:
        - Shipments
      summary: Update One Shipment By Source System Id
      description: Update a shipment by source system 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: >-
            _"sourceSystem" is required (enter it either in parameters or
            request body)_
          in: query
          name: sourceSystem
          schema:
            type: string
        - description: >-
            _"sourceSystemId" is required (enter it either in parameters or
            request body)_
          in: query
          name: sourceSystemId
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                input:
                  $ref: '#/components/schemas/ShipmentsSetInput'
                sourceSystem:
                  nullable: false
                  title: String
                  type: string
                sourceSystemId:
                  nullable: false
                  title: String
                  type: string
              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:
                  updateShipment:
                    description: response of any mutation on the table "shipments"
                    nullable: true
                    properties:
                      affectedRows:
                        nullable: false
                        title: Int
                        type: integer
                      returning:
                        items:
                          description: columns and relationships of "shipments"
                          nullable: false
                          properties:
                            billOfLadingNumber:
                              nullable: true
                              title: String
                              type: string
                            billedDate:
                              $ref: '#/components/schemas/date'
                            carrierId:
                              nullable: true
                              title: String
                              type: string
                            carrierProNumber:
                              nullable: true
                              title: String
                              type: string
                            carrierTotalRate:
                              nullable: true
                              title: Int
                              type: integer
                            company:
                              description: >-
                                Companies table - stores all company entities
                                with their branding, contact info, and MC
                                numbers. Each tenant can have multiple companies
                                for different divisions or legal entities.
                              nullable: true
                              properties:
                                dunsNumber:
                                  nullable: true
                                  title: String
                                  type: string
                                id:
                                  nullable: false
                                  title: String
                                  type: string
                                logoUrl:
                                  nullable: true
                                  title: String
                                  type: string
                                mcNumber:
                                  nullable: true
                                  title: String
                                  type: string
                                name:
                                  nullable: false
                                  title: String
                                  type: string
                                primaryEmailAddress:
                                  nullable: true
                                  title: String
                                  type: string
                                primaryPhone:
                                  nullable: true
                                  title: String
                                  type: string
                                sourceSystem:
                                  nullable: true
                                  title: String
                                  type: string
                                sourceSystemId:
                                  nullable: true
                                  title: String
                                  type: string
                                termsOfService:
                                  nullable: true
                                  title: String
                                  type: string
                                website:
                                  nullable: true
                                  title: String
                                  type: string
                              title: Companies
                              type: object
                            companyId:
                              nullable: true
                              title: String
                              type: string
                            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
                                type:
                                  $ref: '#/components/schemas/AddressTypeEnum'
                                zipOrPostalCode:
                                  nullable: true
                                  title: String
                                  type: string
                              title: Addresses
                              type: object
                            coveredDate:
                              $ref: '#/components/schemas/date'
                            createdAt:
                              $ref: '#/components/schemas/timestamptz'
                            currency:
                              $ref: '#/components/schemas/CurrencyCodeEnum'
                            customerId:
                              nullable: true
                              title: String
                              type: string
                            customerPoNumber:
                              nullable: true
                              title: String
                              type: string
                            customerReferenceNumber:
                              nullable: true
                              title: String
                              type: string
                            customerTotalRate:
                              nullable: true
                              title: Int
                              type: integer
                            deliveredAt:
                              $ref: '#/components/schemas/timestamp'
                            dispatchedDate:
                              $ref: '#/components/schemas/date'
                            dispatcherEmail:
                              nullable: true
                              title: String
                              type: string
                            dispatcherName:
                              nullable: true
                              title: String
                              type: string
                            dispatcherPhone:
                              nullable: true
                              title: String
                              type: string
                            equipment:
                              nullable: true
                              title: String
                              type: string
                            id:
                              nullable: false
                              title: String
                              type: string
                            invoiceId:
                              nullable: true
                              title: String
                              type: string
                            loadDescription:
                              nullable: true
                              title: String
                              type: string
                            loadedDate:
                              $ref: '#/components/schemas/date'
                            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
                                type:
                                  $ref: '#/components/schemas/AddressTypeEnum'
                                zipOrPostalCode:
                                  nullable: true
                                  title: String
                                  type: string
                              title: Addresses
                              type: object
                            pickupAt:
                              $ref: '#/components/schemas/timestamp'
                            releaseDate:
                              $ref: '#/components/schemas/date'
                            serviceLevel:
                              nullable: true
                              title: String
                              type: string
                            shipmentId:
                              nullable: false
                              title: String
                              type: string
                            shipmentInvoices:
                              items:
                                description: >-
                                  columns and relationships of
                                  "invoice_shipments"
                                nullable: false
                                properties:
                                  invoice:
                                    description: columns and relationships of "invoices"
                                    nullable: false
                                    properties:
                                      id:
                                        nullable: false
                                        title: String
                                        type: string
                                      number:
                                        nullable: false
                                        title: String
                                        type: string
                                    title: Invoices
                                    type: object
                                  invoiceId:
                                    nullable: false
                                    title: String
                                    type: string
                                  shipmentId:
                                    nullable: false
                                    title: String
                                    type: string
                                title: InvoiceShipments
                                type: object
                              nullable: false
                              type: array
                            shipmentLineItems:
                              items:
                                description: Shipment Line Items
                                nullable: false
                                properties:
                                  commodityDescription:
                                    nullable: true
                                    title: String
                                    type: string
                                  createdAt:
                                    $ref: '#/components/schemas/timestamp'
                                  deliveryLocationName:
                                    nullable: true
                                    title: String
                                    type: string
                                  dimensionUnit:
                                    nullable: true
                                    title: String
                                    type: string
                                  freightClass:
                                    nullable: true
                                    title: String
                                    type: string
                                  handlingUnit:
                                    nullable: true
                                    title: String
                                    type: string
                                  handlingUnitQty:
                                    $ref: '#/components/schemas/numeric'
                                  handlingUnitType:
                                    $ref: >-
                                      #/components/schemas/EdiHandlingUnitTypeEnum
                                  hazmatFlag:
                                    nullable: true
                                    title: Boolean
                                    type: boolean
                                  height:
                                    $ref: '#/components/schemas/numeric'
                                  id:
                                    nullable: false
                                    title: String
                                    type: string
                                  length:
                                    $ref: '#/components/schemas/numeric'
                                  lineNumber:
                                    nullable: false
                                    title: Int
                                    type: integer
                                  nmfcClass:
                                    nullable: true
                                    title: String
                                    type: string
                                  nmfcNumber:
                                    nullable: true
                                    title: String
                                    type: string
                                  packageQty:
                                    $ref: '#/components/schemas/numeric'
                                  packageType:
                                    $ref: >-
                                      #/components/schemas/EdiHandlingUnitTypeEnum
                                  packageUnit:
                                    nullable: true
                                    title: String
                                    type: string
                                  pickupLocationName:
                                    nullable: true
                                    title: String
                                    type: string
                                  referenceNumber:
                                    nullable: true
                                    title: String
                                    type: string
                                  shipmentId:
                                    nullable: false
                                    title: String
                                    type: string
                                  sourceSystem:
                                    nullable: true
                                    title: String
                                    type: string
                                  sourceSystemId:
                                    nullable: true
                                    title: String
                                    type: string
                                  updatedAt:
                                    $ref: '#/components/schemas/timestamp'
                                  weight:
                                    $ref: '#/components/schemas/numeric'
                                  weightUnit:
                                    nullable: true
                                    title: String
                                    type: string
                                  weightUnitType:
                                    $ref: '#/components/schemas/EdiWeightUnitTypeEnum'
                                  width:
                                    $ref: '#/components/schemas/numeric'
                                title: ShipmentLineItems
                                type: object
                              nullable: false
                              type: array
                            sourceSystem:
                              nullable: true
                              title: String
                              type: string
                            sourceSystemId:
                              nullable: true
                              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
                                      type:
                                        $ref: '#/components/schemas/AddressTypeEnum'
                                      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
                            terminal:
                              nullable: true
                              title: String
                              type: string
                            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
                        nullable: false
                        type: array
                    title: ShipmentsMutationResponse
                    type: object
          description: Responses for PUT /api/rest/shipments
components:
  schemas:
    ShipmentsSetInput:
      description: input type for updating data in table "shipments"
      nullable: false
      properties:
        billOfLadingNumber:
          nullable: true
          title: String
          type: string
        billedDate:
          $ref: '#/components/schemas/date'
        billedMiles:
          $ref: '#/components/schemas/numeric'
        carrierId:
          nullable: true
          title: String
          type: string
        carrierProNumber:
          nullable: true
          title: String
          type: string
        companyId:
          nullable: true
          title: String
          type: string
        coveredDate:
          $ref: '#/components/schemas/date'
        createdFromEmailMessageId:
          nullable: true
          title: String
          type: string
        currency:
          $ref: '#/components/schemas/CurrencyCodeEnum'
        customerId:
          nullable: true
          title: String
          type: string
        customerPoNumber:
          nullable: true
          title: String
          type: string
        customerReferenceNumber:
          nullable: true
          title: String
          type: string
        deliveredAt:
          $ref: '#/components/schemas/timestamp'
        dispatchedDate:
          $ref: '#/components/schemas/date'
        dispatcherEmail:
          nullable: true
          title: String
          type: string
        dispatcherName:
          nullable: true
          title: String
          type: string
        dispatcherPhone:
          nullable: true
          title: String
          type: string
        equipment:
          nullable: true
          title: String
          type: string
        freightChargeTerm:
          $ref: '#/components/schemas/FreightChargeTermEnum'
        holdReason:
          nullable: true
          title: String
          type: string
        invoiceId:
          nullable: true
          title: String
          type: string
        loadDescription:
          nullable: true
          title: String
          type: string
        loadedDate:
          $ref: '#/components/schemas/date'
        movementType:
          nullable: true
          title: String
          type: string
        onHold:
          nullable: true
          title: Boolean
          type: boolean
        pickupAt:
          $ref: '#/components/schemas/timestamp'
        releaseDate:
          $ref: '#/components/schemas/date'
        serviceLevel:
          nullable: true
          title: String
          type: string
        shipmentId:
          nullable: true
          title: String
          type: string
        signedBy:
          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:
          nullable: true
          title: String
          type: string
        terminal:
          nullable: true
          title: String
          type: string
        trailerNumber:
          nullable: true
          title: String
          type: string
        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: ShipmentsSetInput
      type: object
    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
    AddressTypeEnum:
      enum:
        - ADDRESS_BOOK
        - CARRIER
        - CARRIER_BILLING
        - COMPANY_ADDRESS
        - CONTACT
        - CUSTOMER_BILLING
        - DELIVERY_RECEIPT
        - LUMPER_RECEIPT
        - SHIPMENT_CONSIGNEE
        - SHIPMENT_PICKUP
        - STOP
        - SUPPORTING_DOC_PARTY
      nullable: false
      title: AddressTypeEnum
    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
    timestamp:
      nullable: false
      title: timestamp
    numeric:
      nullable: false
      title: numeric
    EdiHandlingUnitTypeEnum:
      enum:
        - BAG
        - BLK
        - BOB
        - BOT
        - BOX
        - BRG
        - BSK
        - BXI
        - BXT
        - CAB
        - CAG
        - CAN
        - CAR
        - CAS
        - CBC
        - CBY
        - CCS
        - CHE
        - CHS
        - CLD
        - CNA
        - CNB
        - CNC
        - CND
        - CNE
        - CNF
        - CNT
        - CNX
        - COL
        - CON
        - COR
        - CRD
        - CRT
        - CSK
        - CTN
        - CUB
        - CYL
        - DBK
        - DRK
        - DRM
        - DSK
        - DTB
        - DUF
        - ENV
        - FIR
        - FLO
        - FLX
        - FRM
        - FSK
        - FWR
        - GOH
        - HED
        - HGH
        - HPR
        - HPT
        - HRB
        - HRK
        - HTB
        - JAR
        - JUG
        - KEG
        - KIT
        - KRK
        - KTB
        - LBK
        - LIF
        - LOG
        - LSE
        - LUG
        - LVN
        - MLV
        - MRP
        - MSV
        - MXD
        - NOL
        - OVW
        - PAL
        - PCK
        - PCS
        - PIR
        - PKG
        - PLF
        - PLL
        - PLN
        - PLT
        - POV
        - PRK
        - QTR
        - RAL
        - RCK
        - REL
        - ROL
        - RVR
        - SAK
        - SBC
        - SCS
        - SHK
        - SHT
        - SID
        - SKD
        - SKE
        - SLP
        - SLV
        - SPI
        - SPL
        - SVN
        - TBE
        - TBN
        - TKR
        - TKT
        - TLD
        - TNK
        - TRC
        - TRI
        - TRK
        - TRU
        - TRY
        - TSS
        - TTC
        - UNT
      nullable: false
      title: EdiHandlingUnitTypeEnum
    EdiWeightUnitTypeEnum:
      enum:
        - CG
        - CT
        - CWT
        - DAG
        - DG
        - DTN
        - DWT
        - G
        - GR
        - HG
        - KG
        - KT
        - LB
        - LT
        - MG
        - MT
        - ONZ
        - OZ
        - Q
        - ST
        - T
        - UG
      nullable: false
      title: EdiWeightUnitTypeEnum
    float8:
      nullable: false
      title: float8
    FreightChargeTermEnum:
      enum:
        - AC
        - AP
        - BP
        - CA
        - CB
        - CC
        - CF
        - DE
        - DF
        - FO
        - HP
        - MX
        - NC
        - NR
        - OC
        - OP
        - PA
        - PB
        - PC
        - PE
        - PO
        - PP
        - PS
        - PU
        - RF
        - RS
        - SC
        - SP
        - TP
        - UC
        - WC
      nullable: false
      title: FreightChargeTermEnum
    jsonb:
      nullable: false
      title: jsonb

````