Use this endpoint to register donor details. Then include the same identifier in an order so the anonymised donor details can appear on results.

This endpoint is specialised for drug testing. If you want to use it, discuss it with the Customer Experience team.

Testing: POST https://cat-api.hill-laboratories.com/client/api/v3/donors

Production: POST https://api.hill-laboratories.com/client/api/v3/donors

Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN

Testing: CreateDonorRequestSchema.json

Production: CreateDonorRequestSchema.json

When you create a donor record with an identifier, name, date of birth and gender, the API returns a donorId. Include the same identifier in your sample payload so Hill Labs can associate the anonymised donor details with that sample on results.

FieldValue typeValidationDescription
identifierstringRequired. MaxLength = 32Client-supplied lookup key for the donor (e.g. DO123456). Treat as your unique, case-sensitive lookup key. Cannot be null or blank.
firstNamestring Required. MaxLength = 64Donor given name. Cannot be null or blank.
lastNamestring Required. MaxLength = 64Donor family name / surname. Cannot be null or blank.
dateOfBirthdate Required (yyyy-mm-dd format). MaxLength = 64Donor’s date of birth in ISO date format yyyy-mm-dd (date only, no time). e.g. 1987-12-01.
genderEnumerated value – allowed values:
UNKNOWN
MALE
FEMALE
AMBIGUOUS
NOT_APPLICABLE
OTHER
RequiredDonor gender. Use one of the enumerated values exactly (case-sensitive).
Create Donor Request  
{
  "identifier": "DO6543212",
  "firstName": "John",
  "lastName": "Smith",
  "dateOfBirth": "1987-01-01",
  "gender": "MALE"
}

Example Response

Response
{
  "donorId": "123e4567-e89b-12d3-a456-426614174000"
}

Possible Responses

CodeDescriptionWhen
201201 CreatedDonor data created ok and donorId returned.
400400 Bad RequestIncorrect request. Includes a description of the problem
401401 UnauthorizedAn invalid/expired authentication token was supplied
500500 Internal Server ErrorAn error occurred on the server while registering a donor