Skip to content

Set a worker's profile image

PUT
/v1/workers/{workerId}/image
curl --request PUT \
--url https://api2.recruso.co.uk/v1/workers/1/image \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: multipart/form-data' \
--form workerId=4821 \
--form file=@file

Sets the profile photograph for a worker in your own agency, sent as multipart/form-data with the image in a part named file.

Accepted types are jpg, jpeg, png, gif, up to 3 MB. Anything else returns 400.

A worker has at most one profile image, so this replaces whatever is there rather than adding to it, and the image it replaces is deleted from storage. The record keeps no history and no audit of who changed it, so the previous image cannot be recovered.

Returns 204 with no body. Read the image back through GET on the same route.

A worker id belonging to another agency returns 404 rather than 403, so their existence is never disclosed.

Access. Requires a client-credentials access token. Tokens issued through the interactive user login are rejected.

workerId
required
integer format: int32

The workerId path parameter

Media typemultipart/form-data

The photograph to set as a worker’s profile image, sent as multipart/form-data.

object
workerId

The worker the image belongs to. Taken from the route.

integer format: int32
Example
4821
file

The image itself. Its name is not kept — a worker has only one profile image, so there is nothing to tell one upload from another by.

string format: binary
nullable

No Content

Bad Request

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Unauthorized

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Forbidden

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Not Found

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}