LabStack

Admins API

v1.0.0Sign in

Authentication

API key issued by LabStack. Pass this in every request header. Your store can hold two active keys at once, so you can move to a new key before the old one is revoked. A key may have an expiry date; a request made with an expired or revoked key is refused as unauthorized. Header: ls-api-key

API for managing your account — updating the details on record for a user you have booked. Every call must include a valid ls-api-key header.

User

Update a user's gender and date of birth

Updates the gender and/or date of birth on record for an existing user, identified by the uniqueId they were booked with. uniqueId is required, and so is at least one of gender, dateOfBirth or age; when both dateOfBirth and age are given, dateOfBirth is used. Only what you send is changed: a gender or date of birth you leave out stays as it is on record, and other user details are not changed. Bookings and orders already placed for the user are not updated: one still in progress keeps the gender and date of birth it was placed with. The response returns the user's name, gender, date of birth and age as now on record; a gender, date of birth or age with nothing on record is null.

Request bodyRequired

{
uniqueIdstringRequired

The user's unique id, as used when booking.

genderstringOptional
Enum:MALEFEMALEOTHERS

At least one of gender, dateOfBirth or age is required.

dateOfBirthstring · dateOptional

At least one of gender, dateOfBirth or age is required. Cannot be in the future. Used instead of age when both are given.

ageintegerOptional

At least one of gender, dateOfBirth or age is required. Whole years.

}

Responses

200

User details updated

{
statusstring
userobject
{
uniqueIdstring
namestring

The user's name as on record. This call does not change it.

genderstring | null
Enum:MALEFEMALEOTHERS
dateOfBirthstring · date | null
ageinteger | null
}
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
404

No user with this uniqueId on your account

429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "user": {
    "uniqueId": "CUST-10442",
    "name": "Priya Sharma",
    "gender": "FEMALE",
    "dateOfBirth": "1990-05-01",
    "age": 36
  }
}

Request example

Request example (cURL)
curl -X POST 'https://integration.labstack.in/api/admin/v1.0/user/updateUserDetails' \
  -H 'ls-api-key: <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "uniqueId": "CUST-10442",
    "gender": "FEMALE",
    "dateOfBirth": "1990-05-01"
  }'