---
title: "/people/{vanId}/codes"
method: POST
path: "/people/{vanId}/codes"
---

# /people/{vanId}/codes

`POST /people/{vanId}/codes`

## Request

- Base URL: `https://api.securevan.com/v4`
- URL: `https://api.securevan.com/v4/people/{vanId}/codes`
- Auth: HTTP basic

Use this endpoint to apply a single [Code](ref:codes) to a Person.

If the specified Person does not exist, this endpoint will return an error with HTTP Status Code `404 Not Found.`

If the specified Person does exist but the Code does not or cannot be applied to People, this endpoint will return an error with HTTP Status Code `400 Bad Request`.

In some contexts it is possible to apply both Tags and Source Codes to People. In these contexts, any number of Tags and Source Codes may be accepted. However:

* If any Source Codes are applied to a Person within 24 hours of the creation of a Person record, then the first such Source Code will be marked as the Origin Source Code for the Person. Otherwise, the Person will have no Origin Source Code.
* If an Origin Source Code exists for a Person, it will be displayed in the user interface; otherwise, no Source Codes for a Person will be displayed in the user interface.
* All Tags for a Person will be displayed in the user interface.

If successful, the endpoint responds with HTTP Status Code `204 No Content` and an empty response body.

## Path parameters

- `vanId` string, required

## Request body

- object
  - `codeId` string: Required; Unique identifier for an existing [Code](ref:codes) that is applicable to a Person.

## Response `204`

204

## Other responses

- `400`: 400
- `404`: 404

## Changes

- **2026-11-03** `4f2049fba5af`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ngpvan/apis/van-crm/changes/people/:vanId/codes/post.md)

---

[API](https://skmtc.dev/ngpvan/apis/van-crm.md) - [All operations](https://skmtc.dev/ngpvan/apis/van-crm/llms.txt) - [OpenAPI document](https://skmtc.dev/ngpvan/apis/van-crm/revisions/4f2049fba5af?raw)
