# Returns the allocation with the given identifier.

`GET /psa/allocations/{id}`

Group: PSA › Allocations · Operation ID: `getAllocation`

The memberId, employeeId, projectActivityId, projectPositionId and psaProjectId on an allocation are numeric package-layer keys, not the UUIDs the public GET endpoints take, so none of them can be followed over this API.

[Open in the interactive reference](https://docs.api.lensing.ai/?op=getAllocation)

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Api-Version` | header | `"v1"` | yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version `v1`. |
| `id` | path | string | yes | The unique identifier for the allocation to return. |

## Response

`200` Success

Under `data` (getAllocationOutput):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | The unique identifier for the allocation. |
| `startDate` | string (date) | yes | The first day of the allocation period, inclusive. Format YYYY-MM-DD. |
| `endDate` | string (date) | yes | The last day of the allocation period, inclusive. Format YYYY-MM-DD. |
| `totalHours` | string (decimal) | yes | The total planned hours for the allocation period. |
| `notes` | string | no | Free-form notes about the allocation. |
| `method` | string | yes | The distribution method for the planned hours. Possible values: 'totalHours', 'hoursPerDay', 'hoursPerWeek', 'hoursPerMonth'. |
| `memberId` | number | no | The id of the PSA team-member assignment the allocation is booked against. It is a numeric package-layer key, not the UUID that GET psa/team-members/:id takes. |
| `employeeId` | number | no | The id of the employee for the allocated team member. It is a numeric package-layer key, and there is no public endpoint for an employee. |
| `projectActivityId` | number | no | The id of the project activity the allocation is against. It is a numeric package-layer key, not the UUID that GET psa/activities/:id takes. |
| `projectPositionId` | number | no | The id of the project position the allocation is against. It is a numeric package-layer key, not the UUID that GET psa/positions/:id takes. |
| `psaProjectId` | number | yes | The id of the PSA project the allocation belongs to. It is a numeric package-layer key, not the UUID that GET psa/projects/:id takes. |
| `memberName` | string | no | The name of the allocated team member. |
| `memberPlaceholderName` | string | no | The name of the placeholder, when the allocation is to a placeholder rather than an employee. |
| `projectActivityName` | string | no | The name of the project activity. |
| `projectPositionName` | string | no | The name of the project position. |
| `lastModifiedDate` | string (date-time) | yes | The date and time the allocation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |

## Errors

| Code | Status |
| --- | --- |
| `NOT_FOUND` | 400 |

## Statuses

- `400` — Invalid request or business failure. Codes: NOT_FOUND
- `401` — Missing or invalid access token
- `403` — Not authorized
- `404` — Not found
- `429` — Too many requests
- `500` — Internal server error
