Link Existing Entities
Link source-system ids to EXISTING PaymentKit entities (“map, don’t create”).
For a migration into an account that already holds the relevant catalogue or
customers (e.g. a shared processor account), record source_id -> existing pk_id mappings so a later subscription load resolves to those entities instead
of creating duplicates. Linkable types: product, price, customer,
payment_method.
Each link is validated independently — the target must exist and belong to this
account, and its type must match. A source id already mapped to the SAME id is a
no-op; one mapped to a DIFFERENT id is rejected unless overwrite=true, and even
then a mapping a real load wrote is never re-pointed (only a prior link is).
Returns 200 with per-link results (in request order, 1:1) whenever the request is
well-formed — INSPECT results for rejected links; the HTTP status is not the
outcome. Only a malformed body (empty/oversized links, bad shape) is a 4xx.
Idempotent and safe to retry: re-sending the same links yields noop for the
ones already recorded. Valid links commit together; rejected links write nothing.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
Migration ID (e.g., mig_dev_abc123)
Headers
Request
Links to record; 1–500 per call.
When true, a source id already mapped to a DIFFERENT PaymentKit id is re-pointed instead of rejected — but ONLY when the existing mapping was itself a link; a mapping written by a real load is never overwritten, with or without this flag.
Response
One result per input link, in request order (1:1 positional).
Count of newly written or re-pointed mappings
Count rejected (see each result’s reason)