# Vault API — Custom Mappings

> Canonical URL: https://developers.apideck.com/apis/vault/reference#tag/Custom-Mappings

This document contains every operation on the `Custom Mappings` resource.

---

# Get custom mapping

> **Vault API** · `GET /vault/custom-mappings/{unified_api}/{service_id}/{target_field_id}`
> Canonical URL: https://developers.apideck.com/apis/vault/reference#tag/Custom-Mappings/operation/customMappingsOne

Get a custom mapping

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `x-apideck-consumer-id` | header | `string` | Yes | ID of the consumer which you want to get or push data from |
| `x-apideck-app-id` | header | `string` | Yes | The ID of your Unify application |
| `unified_api` | path | `string` | Yes | Unified API |
| `service_id` | path | `string` | Yes | Service ID of the resource to return |
| `target_field_id` | path | `string` | Yes | ID of the target field to return as a custom mapping. |

### Responses

#### 200 — Custom mapping

- `status_code` `integer` **required** — HTTP Response Status Code — example: `200`
- `status` `string` **required** — HTTP Response Status — example: `OK`
- `data` `object` **required**
  - `id` `string` — Target Field ID — example: `hris+employees+first_aid_training`
  - `label` `string` — Target Field name to use as a label — example: `First Aid Training`
  - `description` `string` — Target Field description — example: `First Aid Training completed after 2019-01-01`
  - `value` `string` — Target Field Mapping value — example: `$.root.training.first_aid`
  - `key` `string` — Target Field Key — example: `first_aid_training`
  - `required` `boolean` — Target Field Mapping is required — example: `false`
  - `custom_field` `boolean` — This mapping represents a finder for a custom field — example: `true`
  - `consumer_id` `string` — Consumer ID — example: `test_user_id`
  - `example` `string` — Target Field Mapping example value from downstream — example: `Some value`
- `_raw` `object` — Raw response from the integration when raw=true query param is provided

#### 400 — Bad Request

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 401 — Unauthorized

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 402 — Payment Required

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 404 — The specified resource was not found

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 422 — Unprocessable

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### default — Unexpected error

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

---

# Create custom mapping

> **Vault API** · `POST /vault/custom-mappings/{unified_api}/{service_id}/{target_field_id}`
> Canonical URL: https://developers.apideck.com/apis/vault/reference#tag/Custom-Mappings/operation/customMappingsAdd

Create a custom mapping

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `x-apideck-consumer-id` | header | `string` | Yes | ID of the consumer which you want to get or push data from |
| `x-apideck-app-id` | header | `string` | Yes | The ID of your Unify application |
| `unified_api` | path | `string` | Yes | Unified API |
| `service_id` | path | `string` | Yes | Service ID of the resource to return |
| `target_field_id` | path | `string` | Yes | ID of the target field to return as a custom mapping. |

### Request Body

Fields that need to be updated on the resource

_Required._

- `value` `string` **required** — Target Field Mapping value — example: `$.root.training.first_aid`

### Responses

#### 200 — Custom mapping created

- `status_code` `integer` **required** — HTTP Response Status Code — example: `200`
- `status` `string` **required** — HTTP Response Status — example: `OK`
- `data` `object` **required**
  - `id` `string` — Target Field ID — example: `hris+employees+first_aid_training`
  - `label` `string` — Target Field name to use as a label — example: `First Aid Training`
  - `description` `string` — Target Field description — example: `First Aid Training completed after 2019-01-01`
  - `value` `string` — Target Field Mapping value — example: `$.root.training.first_aid`
  - `key` `string` — Target Field Key — example: `first_aid_training`
  - `required` `boolean` — Target Field Mapping is required — example: `false`
  - `custom_field` `boolean` — This mapping represents a finder for a custom field — example: `true`
  - `consumer_id` `string` — Consumer ID — example: `test_user_id`
  - `example` `string` — Target Field Mapping example value from downstream — example: `Some value`
- `_raw` `object` — Raw response from the integration when raw=true query param is provided

#### 400 — Bad Request

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 401 — Unauthorized

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 402 — Payment Required

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 404 — The specified resource was not found

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 422 — Unprocessable

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### default — Unexpected error

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

---

# Deletes a custom mapping

> **Vault API** · `DELETE /vault/custom-mappings/{unified_api}/{service_id}/{target_field_id}`
> Canonical URL: https://developers.apideck.com/apis/vault/reference#tag/Custom-Mappings/operation/customMappingsDelete

Deletes a custom mapping

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `x-apideck-consumer-id` | header | `string` | Yes | ID of the consumer which you want to get or push data from |
| `x-apideck-app-id` | header | `string` | Yes | The ID of your Unify application |
| `unified_api` | path | `string` | Yes | Unified API |
| `service_id` | path | `string` | Yes | Service ID of the resource to return |
| `target_field_id` | path | `string` | Yes | ID of the target field to return as a custom mapping. |

### Responses

#### 204 — Resource deleted

#### 400 — Bad Request

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 401 — Unauthorized

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 402 — Payment Required

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 404 — The specified resource was not found

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 422 — Unprocessable

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### default — Unexpected error

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

---

# Update custom mapping

> **Vault API** · `PATCH /vault/custom-mappings/{unified_api}/{service_id}/{target_field_id}`
> Canonical URL: https://developers.apideck.com/apis/vault/reference#tag/Custom-Mappings/operation/customMappingsUpdate

Update a custom mapping

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `x-apideck-consumer-id` | header | `string` | Yes | ID of the consumer which you want to get or push data from |
| `x-apideck-app-id` | header | `string` | Yes | The ID of your Unify application |
| `unified_api` | path | `string` | Yes | Unified API |
| `service_id` | path | `string` | Yes | Service ID of the resource to return |
| `target_field_id` | path | `string` | Yes | ID of the target field to return as a custom mapping. |

### Request Body

Fields that need to be updated on the resource

_Required._

- `value` `string` **required** — Target Field Mapping value — example: `$.root.training.first_aid`

### Responses

#### 200 — Custom mapping updated

- `status_code` `integer` **required** — HTTP Response Status Code — example: `200`
- `status` `string` **required** — HTTP Response Status — example: `OK`
- `data` `object` **required**
  - `id` `string` — Target Field ID — example: `hris+employees+first_aid_training`
  - `label` `string` — Target Field name to use as a label — example: `First Aid Training`
  - `description` `string` — Target Field description — example: `First Aid Training completed after 2019-01-01`
  - `value` `string` — Target Field Mapping value — example: `$.root.training.first_aid`
  - `key` `string` — Target Field Key — example: `first_aid_training`
  - `required` `boolean` — Target Field Mapping is required — example: `false`
  - `custom_field` `boolean` — This mapping represents a finder for a custom field — example: `true`
  - `consumer_id` `string` — Consumer ID — example: `test_user_id`
  - `example` `string` — Target Field Mapping example value from downstream — example: `Some value`
- `_raw` `object` — Raw response from the integration when raw=true query param is provided

#### 400 — Bad Request

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 401 — Unauthorized

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 402 — Payment Required

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 404 — The specified resource was not found

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 422 — Unprocessable

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### default — Unexpected error

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

---

# List custom mappings

> **Vault API** · `GET /vault/custom-mappings/{unified_api}/{service_id}`
> Canonical URL: https://developers.apideck.com/apis/vault/reference#tag/Custom-Mappings/operation/customMappingsAll

This endpoint returns a list of custom mappings.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `x-apideck-consumer-id` | header | `string` | Yes | ID of the consumer which you want to get or push data from |
| `x-apideck-app-id` | header | `string` | Yes | The ID of your Unify application |
| `unified_api` | path | `string` | Yes | Unified API |
| `service_id` | path | `string` | Yes | Service ID of the resource to return |

### Responses

#### 200 — Custom mapping

- `status_code` `integer` **required** — HTTP Response Status Code — example: `200`
- `status` `string` **required** — HTTP Response Status — example: `OK`
- `data` `array of object` **required**
  - `id` `string` — Target Field ID — example: `hris+employees+first_aid_training`
  - `label` `string` — Target Field name to use as a label — example: `First Aid Training`
  - `description` `string` — Target Field description — example: `First Aid Training completed after 2019-01-01`
  - `value` `string` — Target Field Mapping value — example: `$.root.training.first_aid`
  - `key` `string` — Target Field Key — example: `first_aid_training`
  - `required` `boolean` — Target Field Mapping is required — example: `false`
  - `custom_field` `boolean` — This mapping represents a finder for a custom field — example: `true`
  - `consumer_id` `string` — Consumer ID — example: `test_user_id`
  - `example` `string` — Target Field Mapping example value from downstream — example: `Some value`
- `_raw` `object` — Raw response from the integration when raw=true query param is provided

#### 400 — Bad Request

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 401 — Unauthorized

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 402 — Payment Required

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 404 — The specified resource was not found

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### 422 — Unprocessable

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

#### default — Unexpected error

> Standard error response — see [Error Responses](https://developers.apideck.com/errors)

---
