---
title: "Update Source"
method: PATCH
path: "/companies/{company_id}/sources/{source_id}"
tags: ["sources"]
---

# Update Source

`PATCH /companies/{company_id}/sources/{source_id}`

## Request

- Base URL: `https://app.zalster.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.zalster.com/companies/{company_id}/sources/{source_id}`
- Auth: none declared

Partial update: name, schedule, missing-item policy, currency, language,
a fetched feed's address, a feed's XML item path, delimiter and encoding,
import scope; a Shopify source's ``include_unlisted`` and
``only_online_store``, a WooCommerce source's ``include_hidden``; a
catalog's filters (design 15.0 §5): Meta's ``only_approved`` and
``feed_id``, TikTok's ``only_available``, Snapchat's ``product_set_id``,
Google's ``data_source_id``, ``feed_label`` and ``content_language``.

A new address (decision 221) keeps the source's products and mapping: a
rotated token or a moved feed is the same products, and the next import
reads the new address in full (the address is part of what an import
compares, ``core.pipeline.runner.reading_of``).

## Path parameters

- `company_id` string, uuid, required: Company id
- `source_id` string, uuid, required: Source id

## Request body

- SourceUpdate
  - `name` string, nullable
  - `schedule_minutes` integer, nullable
  - `missing_item_policy` 'deactivate' | 'keep': What to do with products absent from the latest full import.
  - `url` string, nullable
  - `item_path` string, nullable
  - `delimiter` string, nullable
  - `encoding` string, nullable
  - `currency` string, nullable
  - `locale` string, nullable
  - `import_scope` ImportScopeIn: Which part of the feed an import brings in (decision 96). Every field is optional, and a scope that narrows nothing is the whole feed. The bounds, and the rule that ``filter`` and ``external_ids`` do not go together, are checked by ``core.pipeline.scope.normalize_import_scope``, which answers 400 ``invalid-import-scope`` naming each problem.
    - `filter` object, nullable
    - `external_ids` string[], nullable
    - `limit` integer, nullable
    - `pick` 'first' | 'spread'
  - `include_unlisted` boolean, nullable
  - `only_online_store` boolean, nullable
  - `include_hidden` boolean, nullable
  - `only_approved` boolean, nullable
  - `feed_id` string, nullable
  - `only_available` boolean, nullable
  - `product_set_id` string, nullable
  - `data_source_id` string, nullable
  - `feed_label` string, nullable
  - `content_language` string, nullable

## Response `200`

Successful Response

- SourceOut
  - `id` string, uuid, required
  - `name` string, required
  - `kind` string, required
  - `settings` object, required
  - `currency` string, required
  - `locale` string, required
  - `category_source` string, nullable
  - `missing_item_policy` string, required
  - `status` string, required
  - `active_mapping_version_id` string, uuid, nullable, required
  - `schedule_minutes` integer, nullable
  - `import_scope` object, nullable
  - `products` integer
  - `products_active` integer
  - `connection` ConnectionOut: A platform source's connection (design 15.0 §5): how the company's connection it reads through stands — a shop's, found by the source's address, or the company's login to a catalog's platform. Never its credentials.
    - `connector` string, required
    - `status` 'not_connected' | 'pending' | 'connected' | 'error' | 'disconnected', required
    - `status_reason` string, nullable
    - `shop_id` string, uuid, nullable
    - `address` string, nullable
    - `name` string, nullable
    - `method` 'oauth' | 'approval' | 'keys', nullable
    - `connected_at` string, date-time, nullable
    - `expires_at` string, date-time, nullable
    - `missing` string[]
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zalster/apis/zalster-feed-processor.md) - [All operations](https://skmtc.dev/zalster/apis/zalster-feed-processor/llms.txt) - [OpenAPI document](https://skmtc.dev/zalster/apis/zalster-feed-processor/revisions/d0b9dc66ad36?raw)
