# GP Practices

> Manage the organisation's GP practice directory with the Jump EHR GP Practices API. List, create, and update practices and resolve one to a UUID.

Source: https://docs.usejump.co.uk/api-reference/gp-practices

The GP Practices API manages the organisation's directory of GP practices (surgeries). Use it to resolve a practice to its UUID — which you then pass as `gp_practice_id` when registering a patient's GP.

  GP practices are **org-scoped**: each organisation maintains its own directory. This is not a shared national dataset.
## List GP practices

`GET /gp-practices`

API-key scope: `read_gp_practices`

Returns a paginated list of the organisation's GP practices. Filter by `name` (case-insensitive partial match) or `ods_code` (exact) to resolve a practice to its UUID.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no | Maximum number of records to return (1–100, default 20) |
| `offset` | query | integer | no | Number of records to skip (default 0) |
| `name` | query | string | no | Case-insensitive partial match on the practice name |
| `ods_code` | query | string | no | Exact match on the practice ODS code |
| `is_active` | query | boolean | no |  |

### Responses

- `200` Paginated list of GP practices
- `401` Missing or invalid API key
- `500` Unexpected server error

## Create a GP practice

`POST /gp-practices`

API-key scope: `write_gp_practices`

Creates a GP practice for the authenticated organisation. The `organization_id` is set from the API key and `source` is always recorded as `api` — neither can be overridden in the request body.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string (uuid) | no | Optional UUID for request deduplication. Same key + same body returns the cached response. Same key + different body returns 409 CONFLICT. Keys are scoped to your organisation and endpoint, and expire after 24 hours. |

### Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes |  |
| `ods_code` | string | no | NHS Organisation Data Service code |
| `email` | string (email) | no |  |
| `phone` | string | no |  |
| `address_json` | object | no | Structured address (freeform JSON object) |
| `is_active` | boolean | no |  |

### Responses

- `201` GP practice created
- `401` Missing or invalid API key
- `409` Idempotency key reused with a different request body
- `422` Request body failed validation
- `500` Unexpected server error

## Retrieve a GP practice

`GET /gp-practices/{id}`

API-key scope: `read_gp_practices`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes |  |

### Responses

- `200` GP practice detail
- `401` Missing or invalid API key
- `404` Resource not found (or belongs to a different organisation)

## Update a GP practice

`PATCH /gp-practices/{id}`

API-key scope: `write_gp_practices`

Partially updates a GP practice. Only supplied fields are changed.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes |  |

### Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | no |  |
| `ods_code` | string | null | no |  |
| `email` | string | null (email) | no |  |
| `phone` | string | null | no |  |
| `address_json` | object | null | no |  |
| `is_active` | boolean | no |  |

### Responses

- `200` GP practice updated
- `401` Missing or invalid API key
- `404` Resource not found (or belongs to a different organisation)
- `422` Request body failed validation
- `500` Unexpected server error
