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

> Update a customer by source system id



## OpenAPI

````yaml /api-reference/openapi.json put /api/rest/customers
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/customers:
    put:
      tags:
        - Customers
      summary: Update One Customer By Source System Id
      description: Update a customer 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:
                customerRulesInput:
                  default: {}
                  description: input type for updating data in table "customer_rules"
                  nullable: true
                  properties:
                    autoSend:
                      nullable: true
                      title: Boolean
                      type: boolean
                    automationGoLiveDate:
                      $ref: '#/components/schemas/date'
                    createdAt:
                      $ref: '#/components/schemas/timestamptz'
                    customFilenameConfig:
                      $ref: '#/components/schemas/jsonb'
                    customerId:
                      nullable: true
                      title: String
                      type: string
                    deliveryRules:
                      nullable: true
                      title: String
                      type: string
                    documentRules:
                      $ref: '#/components/schemas/jsonb'
                    dueOption:
                      nullable: true
                      title: Int
                      type: integer
                    id:
                      nullable: true
                      title: String
                      type: string
                    invoiceCreationEnabled:
                      nullable: true
                      title: Boolean
                      type: boolean
                    invoiceCreationMode:
                      nullable: true
                      title: String
                      type: string
                    invoiceCreationTrigger:
                      nullable: true
                      title: String
                      type: string
                    invoiceOrganizationTemplateId:
                      nullable: true
                      title: String
                      type: string
                    listBillColumnTemplateId:
                      nullable: true
                      title: String
                      type: string
                    organizationEmailTemplatesId:
                      nullable: true
                      title: String
                      type: string
                    outreachDelay:
                      nullable: true
                      title: Int
                      type: integer
                    outreachEmail:
                      nullable: true
                      title: String
                      type: string
                    postDeliveryInvoiceBufferDays:
                      nullable: true
                      title: Int
                      type: integer
                    referenceRules:
                      $ref: '#/components/schemas/jsonb'
                    statementOrganizationEmailTemplatesId:
                      nullable: true
                      title: String
                      type: string
                    updatedAt:
                      $ref: '#/components/schemas/timestamptz'
                  title: CustomerRulesSetInput
                  type: object
                input:
                  default: {}
                  description: input type for updating data in table "customers"
                  nullable: true
                  properties:
                    addressesLastUpdatedAt:
                      $ref: '#/components/schemas/timestamptz'
                    billToCode:
                      nullable: true
                      title: String
                      type: string
                    billToCustomerId:
                      nullable: true
                      title: String
                      type: string
                    billToSource:
                      nullable: true
                      title: String
                      type: string
                    ccEmailAddresses:
                      items:
                        nullable: false
                        title: String
                        type: string
                      nullable: true
                      type: array
                    collectorId:
                      $ref: '#/components/schemas/uuid'
                    contactsLastUpdatedAt:
                      $ref: '#/components/schemas/timestamptz'
                    createdAt:
                      $ref: '#/components/schemas/timestamptz'
                    credit:
                      $ref: '#/components/schemas/jsonb'
                    deletedAt:
                      $ref: '#/components/schemas/timestamp'
                    emailAddress:
                      nullable: true
                      title: String
                      type: string
                    id:
                      nullable: true
                      title: String
                      type: string
                    isActive:
                      nullable: true
                      title: Boolean
                      type: boolean
                    mergedIntoCustomerId:
                      nullable: true
                      title: String
                      type: string
                    metadata:
                      $ref: '#/components/schemas/jsonb'
                    name:
                      nullable: true
                      title: String
                      type: string
                    notes:
                      nullable: true
                      title: String
                      type: string
                    paymentDiscountTerms:
                      $ref: '#/components/schemas/jsonb'
                    reminderSequenceId:
                      nullable: true
                      title: String
                      type: string
                    reminderSettings:
                      $ref: '#/components/schemas/jsonb'
                    remittanceSettings:
                      $ref: '#/components/schemas/jsonb'
                    sourceSystem:
                      nullable: true
                      title: String
                      type: string
                    sourceSystemId:
                      nullable: true
                      title: String
                      type: string
                    sourceSystemMeta:
                      $ref: '#/components/schemas/jsonb'
                    tmsBalanceCents:
                      $ref: '#/components/schemas/bigint'
                    tmsCustomerType:
                      nullable: true
                      title: String
                      type: string
                    updatedAt:
                      $ref: '#/components/schemas/timestamptz'
                  title: CustomersSetInput
                  type: object
                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: false
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  updateCustomer:
                    description: response of any mutation on the table "customers"
                    nullable: true
                    properties:
                      affectedRows:
                        nullable: false
                        title: Int
                        type: integer
                      returning:
                        items:
                          description: columns and relationships of "customers"
                          nullable: false
                          properties:
                            addresses:
                              items:
                                description: columns and relationships of "addresses"
                                nullable: false
                                properties:
                                  city:
                                    nullable: true
                                    title: String
                                    type: string
                                  country:
                                    $ref: '#/components/schemas/CountryCodeEnum'
                                  id:
                                    nullable: false
                                    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
                              nullable: false
                              type: array
                            balance:
                              $ref: '#/components/schemas/bigint'
                            billToCustomerId:
                              nullable: true
                              title: String
                              type: string
                            ccEmailAddresses:
                              items:
                                nullable: false
                                title: String
                                type: string
                              nullable: true
                              type: array
                            createdAt:
                              $ref: '#/components/schemas/timestamptz'
                            customerRule:
                              description: columns and relationships of "customer_rules"
                              nullable: true
                              properties:
                                dueOption:
                                  nullable: false
                                  title: Int
                                  type: integer
                                id:
                                  nullable: false
                                  title: String
                                  type: string
                              title: CustomerRules
                              type: object
                            emailAddress:
                              nullable: true
                              title: String
                              type: string
                            id:
                              nullable: false
                              title: String
                              type: string
                            metadata:
                              $ref: '#/components/schemas/jsonb'
                            name:
                              nullable: true
                              title: String
                              type: string
                            overdueBalance:
                              $ref: '#/components/schemas/bigint'
                            overdueInvoiceCount:
                              nullable: true
                              title: Int
                              type: integer
                            sourceSystem:
                              nullable: true
                              title: String
                              type: string
                            sourceSystemId:
                              nullable: true
                              title: String
                              type: string
                            updatedAt:
                              $ref: '#/components/schemas/timestamptz'
                          title: Customers
                          type: object
                        nullable: false
                        type: array
                    title: CustomersMutationResponse
                    type: object
                  updateCustomerRules:
                    description: response of any mutation on the table "customer_rules"
                    nullable: true
                    properties:
                      affectedRows:
                        nullable: false
                        title: Int
                        type: integer
                    title: CustomerRulesMutationResponse
                    type: object
          description: Responses for PUT /api/rest/customers
components:
  schemas:
    date:
      nullable: false
      title: date
      type: string
      format: date
      description: A date string, such as 2024-02-03 (YYYY-MM-DD)
    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
    jsonb:
      nullable: false
      title: jsonb
    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
    bigint:
      nullable: false
      title: bigint
    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

````