---
title: "replace many dataPipelineMappings which exists or not"
method: PUT
path: "/api/serviceintegrations/dataPipelineMappings"
tags: ["dataPipelineMappings"]
---

# replace many dataPipelineMappings which exists or not

`PUT /api/serviceintegrations/dataPipelineMappings`

## Request

- Base URL: `https://services.fountain.com`
- URL: `https://services.fountain.com/api/serviceintegrations/dataPipelineMappings`
- Auth: HTTP bearer

Replace many dataPipelineMappings which exists or not

## Request body

- DataPipelineMapping[]
  - `uuid` string, uuid
  - `createdAt` string, date-time
  - `createdBy` string, uuid
  - `lastUpdatedAt` string, date-time
  - `lastUpdatedBy` string, uuid
  - `lastUpdatedByAudience` string
  - `lastUpdatedByAudienceUuid` string, uuid
  - `lastUpdatedByImpersonatedBy` string, uuid
  - `lastUpdatedByCompanyUuid` string, uuid
  - `lastUpdatedByEnterpriseUuid` string, uuid
  - `companyUuid` string, uuid, required
  - `dataPipelineUuid` string, uuid, required
  - `mappings` object[], required: Array of field mappings
    - `from` string, required: Source field name
    - `to` string, required: Destination field name
    - `dataType` 'string' | 'number' | 'date' | 'boolean', required: Data type for the mapping
    - `transform` object: Optional JS transform applied to this field between Map and Import. Runs in a per-pipeline AWS Lambda sandbox.
      - `script` string, required: User-supplied JS function body. Receives `{ row }` and returns the transformed value.
      - `onError` 'skip' | 'null', required: Row-level failure policy when the handler throws / times out / returns an invalid type.
  - `enrichments` object[]: Enrichment configs — each entry tells the system which entity to pre-fetch and how to look it up from the incoming rows.
    - `entity` string, required: Entity type to fetch (e.g. locations, workers, datasets).
    - `sourceColumn` string: Column in the incoming rows whose value is used for the lookup.
    - `lookupBy` string: Field on the entity to match against (exact DB field path).
    - `datasetUuids` string[]: For entity="datasets" only: UUIDs of the specific datasets to fetch. Fetches all company datasets when absent.
  - `transformFunctionArn` string: ARN of the per-pipeline parent-handler AWS Lambda that combines all per-field transform scripts. Managed by TransformLambdaManager.
  - `importAuthorization` object, nullable: Server-managed last employer editor, rechecked before keyed imports.
    - `userUuid` string, uuid
    - `roleUuid` string, uuid
    - `authorizedAt` string, date-time
  - `enrichmentAuthorization` object, nullable: Server-managed authorizer rechecked before scheduled tax-form exports.
    - `userUuid` string, uuid
    - `roleUuid` string, uuid
    - `authorizedAt` string, date-time

## Response `202`

dataPipelineMappings replaced. Wrapped in a JsonAPI root response.

- object
  - `data` DataPipelineMapping[]
    - `uuid` string, uuid
    - `createdAt` string, date-time
    - `createdBy` string, uuid
    - `lastUpdatedAt` string, date-time
    - `lastUpdatedBy` string, uuid
    - `lastUpdatedByAudience` string
    - `lastUpdatedByAudienceUuid` string, uuid
    - `lastUpdatedByImpersonatedBy` string, uuid
    - `lastUpdatedByCompanyUuid` string, uuid
    - `lastUpdatedByEnterpriseUuid` string, uuid
    - `companyUuid` string, uuid, required
    - `dataPipelineUuid` string, uuid, required
    - `mappings` object[], required: Array of field mappings
      - `from` string, required: Source field name
      - `to` string, required: Destination field name
      - `dataType` 'string' | 'number' | 'date' | 'boolean', required: Data type for the mapping
      - `transform` object: Optional JS transform applied to this field between Map and Import. Runs in a per-pipeline AWS Lambda sandbox.
        - `script` string, required: User-supplied JS function body. Receives `{ row }` and returns the transformed value.
        - `onError` 'skip' | 'null', required: Row-level failure policy when the handler throws / times out / returns an invalid type.
    - `enrichments` object[]: Enrichment configs — each entry tells the system which entity to pre-fetch and how to look it up from the incoming rows.
      - `entity` string, required: Entity type to fetch (e.g. locations, workers, datasets).
      - `sourceColumn` string: Column in the incoming rows whose value is used for the lookup.
      - `lookupBy` string: Field on the entity to match against (exact DB field path).
      - `datasetUuids` string[]: For entity="datasets" only: UUIDs of the specific datasets to fetch. Fetches all company datasets when absent.
    - `transformFunctionArn` string: ARN of the per-pipeline parent-handler AWS Lambda that combines all per-field transform scripts. Managed by TransformLambdaManager.
    - `importAuthorization` object, nullable: Server-managed last employer editor, rechecked before keyed imports.
      - `userUuid` string, uuid
      - `roleUuid` string, uuid
      - `authorizedAt` string, date-time
    - `enrichmentAuthorization` object, nullable: Server-managed authorizer rechecked before scheduled tax-form exports.
      - `userUuid` string, uuid
      - `roleUuid` string, uuid
      - `authorizedAt` string, date-time
  - `meta` ResponsesPartMeta
    - `timestamp` string, date-time, required
    - `verb` 'OPTION' | 'GET' | 'PUT' | 'POST' | 'PATCH' | 'DELETE'
    - `path` string
    - `jti` string
    - `rid` string
    - `count` number
    - `capped` boolean: The server lowered filter[limit] to its ceiling. Page with filter[skip] to read past it.
    - `status` string
    - `duration` number
    - `size` number

## Other responses

- `500`: default error response

---

[API](https://skmtc.dev/fountain/apis/worker-experience-public-api.md) - [All operations](https://skmtc.dev/fountain/apis/worker-experience-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fountain/apis/worker-experience-public-api/revisions/6b9a31f79e22?raw)
