Code Batch Assign
Description
This service assign a code to the party in session from code batch name
Request
Restrictions
This service requires an authenticated user and can only be called after a successful login.
Endpoint
POST https://<server-url>/api/v4/mileage/{{activitycode}}/assignCode?touchpoint={{touchpoint}}&token={{token}}Path Parameters
activitycode
String
The unique code for the mileage activity (e.g., "activityMileagePoints").
Parameters
touchpoint
Query / Header
The identifier for the touchpoint. Use Thalamus-Touchpoint for the header.
token
Query / Header
The authentication token for the API session. Use Thalamus-Token for the header.
Request Body
The request body contains the updated information for the consumer's profile, consumer data, and opt-in settings.
codebatchName
String
code batch name
{
"codebatchName": "code-batch-1"
}Response
✅ Successful Response: 200 OK
200 OKA JSON object is returned containing an array of pointsToExpireElements. Each element represents a batch of points and its corresponding expiration date.
usedboolean
state of the code assigned
codeValueString
code
expireDateEpoc
Expiration Date
assignedToInteger
Party id who has the code assigned
JSON
{
"codeElement": {
"used": false,
"codeValue": "14779475",
"expireDate": 1762228799000,
"assignedTo": 1
}
}❌ Unsuccessful Response: 400
400Returned if the specified codebatch_name does not exist.
JSON
{
"errors": {
"custom.error": "code not available",
"execution.custom.error": "Error en ejecución: code not available"
}
}Last updated
Was this helpful?
