This endpoint is used to add a guest to the service.
Guests are added to the database corresponding to the same sub_user defined in the authorization header. Any recognition calls should be done in mind that the recognition compares the given image only to guests registered under the same sub_user.
Request format
{
"AcceptTermsAndConditions": true,
"DataFields": {
"GuestImageType": "base64",
"GuestImage": "...",
"GuestSurname": "...",
"GuestName": "..."
},
"Settings": {
}
}
AcceptTermsAndConditions is required and it needs to be set to true, if the field
is not set to true, or is missing, the request will be rejected.
DataFields should contain the image of a guest, its encoding, the guests name
and surname and the guests UUID. Image data should be encoded with the
encoding as given in the GuestImageType field. Currently the service supports
only BASE64 encoding.
Settings field, as of now, has no function but it probably will be expanded in the
future. Settings field can be omitted.
Alternatively, GuestUUID key can be provided to the DataFields subdictionary. If the key is provided and if the guest is already present in the database, the guest will be overwritten with the newly supplied information.
Response format
If a request was valid and properly processed the return status code is 201.
TransactionID field is used to identify the request. UploadedAt field contains a
request timestamp in the following format: YYYY-MM-DD HH:MM:SS.6MS
Where Y represents year digits, M month, D day, H hour, M minute, S second and
6MS represents 6 digits reserved for microseconds. The timestamp is generated
at the beginning of the request processing.
Data contains two fields which are GuestUUID and GuestEncoding,
GuestUUID represents the guest and GuestEncoding is a string containing a
list of floating point numbers which encode the guests image.
Errors and Warnings fields contain any error and warning messages
respectively in the case of any errors/warnings occurring during processing.
Status field is the return status code of the request. Method is the name of
the requested method. In this case its always "ADD_CUSTOMER".
UserId and SubClientId describe the user that made the request - used for logging and guest segmentation when recognizing them. Only the guests from the same UserId/SubClientId pair are compared when using POST /recognition/ method.