---
title: "Adds an Employment Reference for a candidate in an agency group."
method: POST
path: "/agency-group/{agency_group_id}/candidate/{candidate_id}/employment-reference-historical"
tags: ["AgencyGroup"]
---

# Adds an Employment Reference for a candidate in an agency group.

`POST /agency-group/{agency_group_id}/candidate/{candidate_id}/employment-reference-historical`

## Request

- Base URL: `http://localhost:3010/v1`
- URL: `http://localhost:3010/v1/agency-group/{agency_group_id}/candidate/{candidate_id}/employment-reference-historical`
- Auth: HTTP basic and HTTP basic and HTTP basic

## Headers

- `Authorization` string, string, required
- `Context` string, string, required
- `Accept` 'application/json', required
- `X-Accept-Timezone` string

## Request body

- object
  - `reference` string, required
  - `duplicate_allowed` boolean: if true allow to create a duplicate employment reference
  - `effective_from` string, date-time, required: effective from time in string example: 2020-01-01T09:00:00Z

## Response `201`

Agency Group Candidate employment reference that was created

- object: employment reference
  - `reference` string, required
  - `effective_from` string, date-time, required
  - `candidate_id` string, required
  - `context` object, required
    - `type` 'agency' | 'agency-group', required
    - `id` string, required
  - `_id` string, required
  - `updated_at` string, date-time, required
  - `created_at` string, date-time, required
  - `__v` integer, required

## Other responses

- `400`: Validation errors caused by missing or invalid header / path or payloads
- `401`: Failed to authenticate the user making the request
- `403`: Permission denied error
- `409`: Failed when some conflicts occurred with the data
- `default`: Server error occurred

---

[API](https://skmtc.dev/staffshift/apis/staffshift-api-gateway.md) - [All operations](https://skmtc.dev/staffshift/apis/staffshift-api-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/staffshift/apis/staffshift-api-gateway/revisions/1f079f6b65f5?raw)
