# Get a presigned photo upload URL

Operation ID: `provider.getPhotoUploadUrl`

Return a presigned Wasabi S3 PUT URL for uploading a practitioner's photo directly to object storage. This is an alternative to provider.uploadPhoto's base64 body upload — neither call is a prerequisite for the other; they write to different storage (Wasabi object storage vs. a FHIR Binary resource) and provider.getPhoto only reads photos stored via the latter.

## Public method

`getPhotoUploadUrl`

Signature: `provider.getPhotoUploadUrl(fhirPractitionerId)`

Return type: `Promise<PractitionerPhotoUploadUrlResponse>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`GET /practitioners/{practitioner_id}/photo/upload-url`

## Path parameters

| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|---|---|---:|---|---|---|---:|---|
| `practitioner_id` | `string` | Yes |  |  |  | No |  |

## Query parameters

None.

## Body parameters

None.

Request model: None.

## Request example

None declared in canonical OpenAPI.

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`provider.GetPhotoUploadUrlResponse`](../models/provider.GetPhotoUploadUrlResponse.md) | application/json | Presigned upload URL and object key |

## Success response examples

### 200

```json
{
  "expires_in": 3600,
  "storage_key": "practitioners/practitioner-example-001/photos/00000000-0000-4000-8000-000000000000",
  "upload_url": "https://example.com/presigned-resource"
}
```

## Common errors

| Status | Shape | Content type | Description |
|---|---|---|---|
| `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
| `500` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Internal server error |

## Error examples

### 401 — Missing or invalid access token

```json
{
  "error": "Authorization required"
}
```

### 500 — Unexpected service failure (sanitized example)

```json
{
  "error": "Internal server error"
}
```

## NodeJS / TypeScript implementation

```ts
import { HCSDK } from "@healthcloudai/hc-sdk";
```

```ts
const fhirPractitionerId = "<FHIR_PRACTITIONER_ID>";

const result = await provider.getPhotoUploadUrl(fhirPractitionerId);
```

## cURL

```bash
curl -X GET \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  'https://dev-api-provider.health.cloud/practitioners/%3CPRACTITIONER_ID%3E/photo/upload-url'
```

## Notes

None.

## Prepared Test Console scenario

No canonical scenario is currently associated.

## Real response

No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
