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
uniqueIdstringRequiredThe user's unique id, as used when booking.
genderstringOptionalMALEFEMALEOTHERSAt least one of gender, dateOfBirth or age is required.
dateOfBirthstring · dateOptionalAt least one of gender, dateOfBirth or age is required. Cannot be in the future. Used instead of age when both are given.
ageintegerOptionalAt least one of gender, dateOfBirth or age is required. Whole years.
Responses
User details updated
statusstringuserobjectuniqueIdstringnamestringThe user's name as on record. This call does not change it.
genderstring | nullMALEFEMALEOTHERSdateOfBirthstring · date | nullageinteger | nullBad request — missing or invalid parameters
statusstringfailureerrorstringUnauthorized — API key missing, invalid, expired or revoked
statusstringfailureerrorstringNo user with this uniqueId on your account
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.
statusstringfailureerrorstring{
"status": "success",
"user": {
"uniqueId": "CUST-10442",
"name": "Priya Sharma",
"gender": "FEMALE",
"dateOfBirth": "1990-05-01",
"age": 36
}
}Request example
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"
}'