> ## 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 One Customer By Source System Id. Existing native customer fields, nested create inputs, filters and role permissions remain validated by Hasura. Recipient arrays use the existing delivery settings; entries are normalized, deduplicated and validated. Do not combine a convenience array with its native deliveryMethods, statementSchedules or reminderSettings representation. Unsupported, malformed, absent/ambiguous/foreign statement targets reject before customer or customer-rule writes. Runtime transport/database failures across mutation stages may follow committed changes: GET the customer, then retry the remaining changes with PUT. A post-insert invoice-recipient error identifies the stored customer ID; do not retry POST blindly. Validation failures return HTTP 400.

> [!NOTE]
>
> Updates by **external key**: send `sourceSystem` + `sourceSystemId` inside `input` to update without the Upwell id. See [Idempotency & retries](https://docs.upwell.com/conventions/idempotency-and-retries.md).


## 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.46.3
  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:
  - ApiKeyAuth: []
tags:
  - name: Addresses
    description: >-
      **Core.** A typed physical address owned by one parent record — a
      customer, carrier, company, contact, or a shipment's pickup/consignee
      slot. Addresses are **not** shared master data: they are never
      deduplicated by content, and they carry no
      `sourceSystem`/`sourceSystemId`, so store the returned `addr_` id
      yourself. Embed an address when you create its parent; update it in a
      separate call. See [Working with addresses](/conventions/addresses).
  - name: Bill Line Items
    description: >-
      **Accounts payable.** Priced rows on a bill. Create, update, and delete
      only — there is no list endpoint, so read them through the parent bill.
  - name: Bill Payments
    description: >-
      **Accounts payable.** A payment that settles what you owe a carrier. A
      bill payment has no direct link to a bill — the relationship runs through
      its line items. See [Recording carrier
      payments](/api-guides/carrier-invoice-submission#recording-carrier-payments).
  - name: Bills
    description: >-
      **Accounts payable.** The expected payable synced from your TMS — what
      Upwell audits an incoming carrier invoice against. A bill is owed to
      *either* a carrier *or* a vendor, never both. See [Syncing foundation
      entities](/api-guides/syncing-foundation-entities).
  - name: Carrier Invoice Approval Requests
    description: >-
      **Accounts payable.** A pending approval decision Upwell hands to your
      system to resolve. See [Responding to an approval
      request](/api-guides/carrier-invoice-approval).
  - name: Carrier Invoice Documents
    description: >-
      **Accounts payable.** Documents attached to a carrier invoice — the
      invoice scan, BOL, POD, notice of assignment. Listed separately from
      **Carrier Invoices** because these operate on the document list rather
      than the invoice record itself.
  - name: Carrier Invoices
    description: >-
      **Accounts payable.** What a carrier actually billed you — the received
      payable, as opposed to the expected **Bill**. Create is de-duplicated
      **asynchronously**, not on the request, so a retry can briefly create a
      live duplicate: read
      [Re-submitting](/api-guides/carrier-invoice-submission#re-submitting)
      before you build retry logic.
  - name: Carrier Payment Line Items
    description: >-
      **Accounts payable.** How a bill payment splits across the bills it
      settles — the payables counterpart to **Customer Payment Line Items**.
      Build against `billId`. `billPaymentId` is **not** writable over the API
      by any role — the column exists on the table but is granted to none of
      them, so it is not part of the public insert input.
  - name: Carriers
    description: >-
      **Core.** Who hauls the freight and gets paid. Unlike customers,
      re-posting an existing `(sourceSystem, sourceSystemId)` pair **silently
      succeeds without updating any other field** — use `PUT` to change an
      existing carrier. See [Syncing foundation
      entities](/api-guides/syncing-foundation-entities).
  - name: Companies
    description: >-
      **Core.** **Your own** legal-entity or division record — *not* a customer.
      If you are looking for the party you bill and collect from, use
      **Customers** instead. Most integrations need only one company and rarely
      touch this endpoint.
  - name: Customer Payment Line Items
    description: >-
      **Accounts receivable.** How one customer payment splits across the
      invoices it pays — the unit that makes cash application work when a single
      check covers many invoices.
  - name: Customer Payments
    description: >-
      **Accounts receivable.** An incoming remittance from a customer, applied
      to invoices through its line items. Line-item amounts need not sum to the
      payment total — a remittance can be partially applied and reconciled
      later. See [Recording customer payments](/api-guides/customer-payments).
  - name: Customers
    description: >-
      **Core.** Who you bill and collect from (the shipper). Re-posting an
      existing `(sourceSystem, sourceSystemId)` pair returns `400 Uniqueness
      violation` — use `PUT` to update. **Deleting a customer also deletes their
      invoices**, so deactivate rather than delete.
  - name: Document Reference Specifications
    description: >-
      **Core.** Per-customer (or tenant-wide) rules describing what a reference
      number should look like, used to validate a reference's label and format.
      A niche configuration object that most integrations never need to touch.
  - name: Documents
    description: >-
      **Core.** A file — BOL, POD, rate confirmation, invoice scan. Usually
      attached to a shipment, invoice, or carrier invoice, though purchase
      orders and vendor invoices are uploaded standalone. Use the [two-step
      presigned-URL
      flow](/conventions/documents#document-upload-two-step-presigned-url) for
      anything large or unclassified.
  - name: Invoice Approval
    description: >-
      **Accounts receivable.** Queue and approval endpoints for customer
      invoices awaiting sign-off before they are delivered.
  - name: Invoice Documents
    description: >-
      **Accounts receivable.** Documents attached to a customer invoice.
      Documents already on a linked shipment appear on the invoice
      automatically, so you usually do not need to upload them twice.
  - name: Invoice Line Items
    description: >-
      **Accounts receivable.** Priced rows on a customer invoice — line haul,
      fuel surcharge, accessorials. They sum to the invoice total.
  - name: Invoice Shipments
    description: >-
      **Accounts receivable.** The link between a customer invoice and the
      shipments it bills. Use these endpoints to add or remove a shipment
      **after** the invoice already exists; linking or unlinking triggers a
      background re-sync of that shipment's documents onto the invoice.
  - name: Invoices
    description: >-
      **Accounts receivable.** What you bill your customer. An unqualified
      "invoice" always means this one — the customer/AR invoice, never the
      carrier's. See [Managing customer
      invoices](/api-guides/customer-invoices).
  - name: Purchase Orders
    description: >-
      **Accounts payable.** Inbound customer purchase orders parsed from a
      standalone PDF upload, including combined PDFs that Upwell splits into one
      record per document. See [Purchase orders and vendor
      invoices](/api-guides/purchase-orders-and-vendor-invoices).
  - name: Rules
    description: >-
      **Core.** Configurable if-this-then-that policies Upwell evaluates during
      processing — require a document, raise an exception, route by SCAC. Which
      fields you populate depends on the rule's `type`; see [Rules: three
      shapes](/conventions/rules).
  - name: Shipment Documents
    description: >-
      **Core.** Documents attached to a shipment. These propagate to invoices
      linked to that shipment, so uploading once is usually enough. See [Working
      with shipment documents](/api-guides/shipment-documents).
  - name: Shipment Line Items
    description: >-
      **Core.** Cargo and freight metadata on a shipment — commodity
      description, NMFC class, handling units, package counts, weight, hazmat
      flag. **Not** priced rows: unlike invoice, bill, and payment line items,
      these carry no rate or amount field at all.
  - name: Shipments
    description: >-
      **Core.** The freight movement (load) — the hub that invoices, bills, and
      documents hang off. `shipmentId` is required and has no server default.
      Pickup and consignee addresses can be embedded on create or attached later
      via `pickupAddressId`/`consigneeAddressId` on update — both are accepted
      even though this reference currently under-reports the update input. See
      [Working with addresses](/conventions/addresses).
  - name: Stops
    description: >-
      **Core.** Ordered points on a shipment's route — pickup, delivery,
      terminal, cross-dock. Populate `stopType`; the separate constrained `type`
      field is only partially adopted in practice. Deleting a shipment deletes
      its stops.
  - name: Vendor Invoices
    description: >-
      **Accounts payable.** Generic, non-freight vendor AP invoices parsed from
      a standalone PDF upload, matched to a **Purchase Order** when one exists.
      See [Purchase orders and vendor
      invoices](/api-guides/purchase-orders-and-vendor-invoices).
  - name: Vendors
    description: >-
      **Accounts payable.** A payable party that isn't a hauling carrier — a
      lumper service, a factor, a non-freight supplier. Both `sourceSystem` and
      `sourceSystemId` are required. Delete is **permanent** (there is no soft
      delete) and fails while any bill still references the vendor.
paths:
  /api/rest/customers:
    put:
      tags:
        - Customers
      summary: Update One Customer By Source System Id
      description: >-
        Update One Customer By Source System Id. Existing native customer
        fields, nested create inputs, filters and role permissions remain
        validated by Hasura. Recipient arrays use the existing delivery
        settings; entries are normalized, deduplicated and validated. Do not
        combine a convenience array with its native deliveryMethods,
        statementSchedules or reminderSettings representation. Unsupported,
        malformed, absent/ambiguous/foreign statement targets reject before
        customer or customer-rule writes. Runtime transport/database failures
        across mutation stages may follow committed changes: GET the customer,
        then retry the remaining changes with PUT. A post-insert
        invoice-recipient error identifies the stored customer ID; do not retry
        POST blindly. Validation failures return HTTP 400.
      parameters:
        - 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:
                  $ref: '#/components/schemas/CustomerApiRulesInput'
                  default: {}
                  nullable: true
                  title: jsonb
                  description: >-
                    Customer rules input. See the schema for its JSON type and
                    allowed values.
                input:
                  $ref: '#/components/schemas/CustomerApiSetInput'
                  default: {}
                  nullable: true
                  title: jsonb
                  description: >-
                    Object containing the fields to create or update. Only the
                    fields in this endpoint schema are accepted.
                sourceSystem:
                  nullable: false
                  title: String
                  type: string
                  description: >-
                    Name of the originating system. Together with
                    sourceSystemId, identifies the external record within your
                    organization.
                sourceSystemId:
                  nullable: false
                  title: String
                  type: string
                  description: >-
                    Record identifier in the originating system. Preserve
                    leading zeros; use it with sourceSystem for lookup/update.
              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:
                    type: object
                    title: CustomerApiMutationResponse
                    description: >-
                      Related-record query object. Keys are selectable fields or
                      logical operators (_and, _or, _not); scalar fields contain
                      comparison objects such as { "_eq": "value" }.
                      Relationships contain another query object. Only fields
                      accessible to your API key are accepted. Aggregate filters
                      use their aggregate function envelope. See [Query
                      filters](/conventions/field-shapes#query-filters).
                    additionalProperties:
                      $ref: '#/components/schemas/jsonb'
                    example: {}
                  updateCustomerRules:
                    $ref: '#/components/schemas/CustomerApiRulesResponse'
                    nullable: true
                    description: >-
                      Update customer rules. See the schema for its JSON type
                      and allowed values.
                type: object
          description: Responses for PUT /api/rest/customers
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
components:
  schemas:
    CustomerApiRulesInput:
      default: {}
      description: input type for updating data in table "customer_rules"
      nullable: true
      properties:
        autoSend:
          nullable: true
          title: Boolean
          type: boolean
          description: >-
            Whether eligible invoices can be sent automatically under this
            customer rule.
        automaticInvoiceHoldDateBasis:
          nullable: true
          title: String
          type: string
          description: >-
            Start of the automatic invoice hold: invoice_date uses midnight on
            the invoice date in the tenant invoice-hold timezone; created_at
            uses the exact invoice creation timestamp. Defaults to invoice_date.
        automaticInvoiceHoldEnabled:
          nullable: true
          title: Boolean
          type: boolean
          description: >-
            Whether automatic customer invoice holds are enabled. Changes apply
            to eligible unsent invoices; manually released invoices stay
            released. Defaults to false.
        automaticInvoiceHoldHours:
          nullable: true
          title: Int
          type: integer
          description: >-
            Positive whole hours from the selected date basis before the
            automatic hold can expire. Null means no expiration while automatic
            holds are enabled. Created-date hours are elapsed time, without
            midnight rounding.
        automationGoLiveDate:
          $ref: '#/components/schemas/date'
          description: >-
            Configured go-live date for customer automation. It is an automation
            setting, not an invoice issue date or shipment event. See
            [automationGoLiveDate
            definition](/conventions/dates-and-times#automation-go-live-date).
        customFilenameConfig:
          $ref: '#/components/schemas/CustomFilenameConfig'
          description: >-
            Custom filename config. See the schema for its JSON type and allowed
            values.
        customerId:
          nullable: true
          title: String
          type: string
          description: >-
            Upwell identifier of the associated customer. Use an ID returned by
            the API.
        deliveryRules:
          nullable: true
          title: String
          type: string
          description: Delivery rules. See the schema for its JSON type and allowed values.
        documentRules:
          $ref: '#/components/schemas/RuleConfiguration'
          description: Document rules. See the schema for its JSON type and allowed values.
        dueOption:
          nullable: true
          title: Int
          type: integer
          description: Configured rule for determining the invoice payment due date.
        invoiceCreationEnabled:
          nullable: true
          title: Boolean
          type: boolean
          description: >-
            Whether automated invoice creation is enabled under this customer
            rule.
        invoiceCreationMode:
          nullable: true
          title: String
          type: string
          description: Configured mode governing automated invoice creation.
        invoiceCreationTrigger:
          nullable: true
          title: String
          type: string
          description: Shipment event used to trigger automated invoice creation.
        invoiceOrganizationTemplateId:
          nullable: true
          title: String
          type: string
          description: >-
            Upwell identifier of the associated invoice organization template.
            Use an ID returned by the API.
        listBillColumnTemplateId:
          nullable: true
          title: String
          type: string
          description: >-
            Upwell identifier of the associated list bill column template. Use
            an ID returned by the API.
        organizationEmailTemplatesId:
          nullable: true
          title: String
          type: string
          description: >-
            Upwell identifier of the associated organization email templates.
            Use an ID returned by the API.
        outreachDelay:
          nullable: true
          title: Int
          type: integer
          description: >-
            Delay configured for the outreach workflow; use the unit documented
            by that workflow.
        outreachEmail:
          nullable: true
          title: String
          type: string
          description: Outreach email. See the schema for its JSON type and allowed values.
        postDeliveryInvoiceBufferDays:
          nullable: true
          title: Int
          type: integer
          description: >-
            Number of days after the recorded shipment delivery timestamp before
            eligible automated invoice creation.
        referenceRules:
          $ref: '#/components/schemas/RuleConfiguration'
          description: >-
            Reference rules. See the schema for its JSON type and allowed
            values.
        statementOrganizationEmailTemplatesId:
          nullable: true
          title: String
          type: string
          description: >-
            Upwell identifier of the associated statement organization email
            templates. Use an ID returned by the API.
      title: CustomerRulesSetInput
      type: object
    CustomerApiSetInput:
      allOf:
        - default: {}
          description: input type for updating data in table "customers"
          properties:
            billToCustomerId:
              nullable: true
              title: String
              type: string
              description: >-
                Upwell identifier of the associated bill to customer. Use an ID
                returned by the API.
            collectorId:
              $ref: '#/components/schemas/uuid'
              description: >-
                Upwell identifier of the associated collector. Use an ID
                returned by the API.
            credit:
              $ref: '#/components/schemas/CustomerCredit'
              description: Credit. See the schema for its JSON type and allowed values.
            deletedAt:
              $ref: '#/components/schemas/timestamp'
              description: >-
                Timestamp recorded when the object was marked deleted. A
                deletion marker is separate from invoice cancellation status.
                See [deletedAt
                definition](/conventions/dates-and-times#deleted-at).
            emailAddress:
              nullable: true
              title: String
              type: string
              description: >-
                Email address. See the schema for its JSON type and allowed
                values.
            isActive:
              nullable: true
              title: Boolean
              type: boolean
              description: Whether the record is marked active.
            name:
              nullable: true
              title: String
              type: string
              description: Human-readable name or label.
            notes:
              nullable: true
              title: String
              type: string
              description: >-
                Notes associated with this record; create inputs use the nested
                data wrapper.
            payorAliases:
              $ref: '#/components/schemas/PayorAliases'
              description: >-
                Payor aliases. See the schema for its JSON type and allowed
                values.
            tmsCustomerType:
              nullable: true
              title: String
              type: string
              description: >-
                Tms customer type. See the schema for its JSON type and allowed
                values.
          title: CustomersSetInput
          type:
            - object
            - 'null'
      properties:
        customer_invoice_emails:
          type: array
          items:
            type: string
          maxItems: 100
          description: >-
            Replace index-0 invoice email recipients using the existing
            delivery-method/default-routing writer. Omit to preserve. An empty
            list requires forceClearRecipients=true and an existing email
            method; it leaves routing targets unchanged.
        customer_statement_emails:
          type: array
          items:
            type: string
          maxItems: 100
          description: >-
            Replace recipients on one existing statement schedule. Supply
            statementScheduleId when multiple schedules exist; otherwise the
            sole existing schedule is used. Rejected when creating a customer or
            when no saved schedule exists. Omit to preserve. An explicit empty
            array rejects, matching the existing requirement for at least one
            saved statement recipient. Never creates/enables a schedule or
            changes recurrence or invoice filters.
          minItems: 1
        customer_reminder_emails:
          type: array
          items:
            type: string
          maxItems: 100
          description: >-
            Replace reminder_settings.emailAddresses while preserving
            enableReminders, deliveryMode and sibling settings. Omit to
            preserve; [] explicitly clears the reminder list.
        statementScheduleId:
          type: string
          minLength: 1
          description: >-
            Existing schedule belonging to this customer. Only valid with
            customer_statement_emails. Required to select among multiple
            schedules.
        forceClearRecipients:
          type: boolean
          description: >-
            Explicit invoice-recipient clear guard, valid only with
            customer_invoice_emails. Does not clear routing rules or targets.
      type:
        - object
        - 'null'
      nullable: true
      default: {}
    jsonb:
      description: >-
        Choose a JSON type to see its example. An object contains keys you
        choose and JSON values, for example { "number": "BK-789", "source":
        "TMS" }; it has no required keys unless this field lists them. Arrays
        contain JSON values too. Send JSON directly. See [Custom JSON
        values](/conventions/field-shapes#custom-json-values).
      anyOf:
        - type: string
          title: Text
          description: >-
            A text value. Keep reference identifiers as strings to preserve
            leading zeros.
          example: BK-789
        - type: object
          title: Object with custom keys
          description: >-
            An object containing your own keys and JSON values. No keys are
            required. Values may themselves be objects or arrays; custom keys
            have no automatic matching or workflow meaning.
          additionalProperties:
            $ref: '#/components/schemas/jsonb'
          example:
            number: BK-789
            source: TMS
        - type: array
          title: List of JSON values
          description: >-
            A list of JSON values. Each item may be text, an object, another
            list, a number, a boolean, or null.
          items:
            $ref: '#/components/schemas/jsonb'
          example:
            - BK-789
            - BK-790
        - type: number
          title: Number
          description: A JSON number. Use text instead for identifiers with leading zeros.
          example: 3
        - type: boolean
          title: True or false
          description: A JSON boolean, without quotes.
          example: true
        - type: 'null'
          title: 'Null'
          description: An explicit empty value, written as null without quotes.
          example: null
    CustomerApiRulesResponse:
      description: response of any mutation on the table "customer_rules"
      nullable: true
      properties:
        affectedRows:
          nullable: false
          title: Int
          type: integer
          description: Number of records affected by this operation.
      title: CustomerRulesMutationResponse
      type: object
    date:
      nullable: false
      title: date
      type: string
      format: date
      description: A date string, such as 2024-02-03 (YYYY-MM-DD)
    CustomFilenameConfig:
      type:
        - object
        - 'null'
      properties:
        customFilenames:
          type: object
          additionalProperties:
            type: string
            description: Filename template for this document type.
          description: Map from document type to filename template.
      description: >-
        Document filename templates. Preserve source-specific keys returned by
        the API.
      additionalProperties:
        $ref: '#/components/schemas/jsonb'
      example:
        customFilenames:
          CUSTOMER_INVOICE: invoice-{{invoiceNumber}}.pdf
    RuleConfiguration:
      allOf:
        - $ref: '#/components/schemas/jsonb'
      description: >-
        Configuration keyed by rule name or document type. Values are JSON rule
        settings; these are workflow-specific rather than invoice reference
        numbers.
      example: {}
    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
    CustomerCredit:
      type:
        - object
        - 'null'
      properties:
        score:
          type: number
          description: >-
            Credit score supplied by the source system; its scale is
            source-specific.
        limit:
          type: number
          description: >-
            Credit limit supplied by the source system; preserve that
            integration's configured units.
        label:
          type: string
          description: Credit handling category.
          enum:
            - Good
            - WatchClosely
            - PrepayOnly
            - Suspended
      description: Customer credit information.
      example:
        score: 80
        limit: 10000
        label: Good
    timestamp:
      nullable: false
      title: timestamp
      type: string
      example: '2026-10-16T14:30:00'
      description: >-
        Timestamp stored without timezone. Use YYYY-MM-DDTHH:mm:ss[.fraction];
        an offset does not survive storage. Do not infer UTC from a
        timezone-free value. See [Timestamp
        formats](/conventions/dates-and-times#formats-and-timezones).
    PayorAliases:
      type:
        - array
        - 'null'
      items:
        type: string
        description: Alternate name used by this payer.
      description: >-
        Alternative payer names used to match incoming remittances/bank
        payments.
      example:
        - ACME INC
        - ACME ACCOUNTS PAYABLE
  responses:
    BadRequestError:
      description: >-
        Malformed or invalid request — missing required field, duplicate
        external key, wrong payload wrapper, or non-integer money. The body is a
        flat error object.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                description: Human-readable error message naming the problem.
              code:
                type: string
                description: >-
                  Machine-readable category when present (e.g.
                  `constraint-violation`, `bad-request`).
          example:
            error: >-
              Not-NULL violation. null value in column "shipment_id" of relation
              "shipments" violates not-null constraint
            code: constraint-violation
    UnauthorizedError:
      description: >-
        Missing, invalid, or revoked API key. The body is a flat authentication
        error object.
      content:
        application/json:
          schema:
            type: object
            required:
              - error
              - path
              - code
            properties:
              error:
                type: string
                description: Human-readable authentication error message.
              path:
                type: string
                description: Hasura error path (normally `$` for authentication failures).
              code:
                type: string
                description: Machine-readable category (`access-denied`).
          example:
            error: Authentication hook unauthorized this request
            path: $
            code: access-denied
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your API key, sent in the `Authorization` header: `Authorization:
        YOUR_API_KEY`. A `Bearer ` prefix is also accepted (`Authorization:
        Bearer YOUR_API_KEY`). Keys are created in the Upwell dashboard (Account
        → API keys) and are scoped to one organization.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.