Sendcustomerotp
curl --request POST \
--url https://api.loyalty.dog/v2/giftcards/customers/otp/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({target: '<string>'})
};
fetch('https://api.loyalty.dog/v2/giftcards/customers/otp/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/giftcards/customers/otp/send"
payload = { "target": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "<string>",
"error": "<string>",
"otpType": "<string>",
"mockCode": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Gift Card Customers
Sendcustomerotp
Send OTP to Customer
Generate and send a one-time password to a customer’s email or phone number. The OTP is stored in Redis with a 5-minute expiry.
Rate Limiting:
- Maximum 5 requests per hour per target
- Maximum 10 requests per day per target
Security:
- OTP codes are 6 digits, cryptographically secure
- Codes expire after 5 minutes
- Maximum 3 verification attempts per code
- OTP codes are never returned in production (only in dev/test mode)
Request Body:
target: Email address or phone number
Status Codes:
- 200: OTP sent successfully
- 400: Invalid target format
- 429: Rate limit exceeded
POST
/
v2
/
giftcards
/
customers
/
otp
/
send
Sendcustomerotp
curl --request POST \
--url https://api.loyalty.dog/v2/giftcards/customers/otp/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({target: '<string>'})
};
fetch('https://api.loyalty.dog/v2/giftcards/customers/otp/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/giftcards/customers/otp/send"
payload = { "target": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "<string>",
"error": "<string>",
"otpType": "<string>",
"mockCode": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
JWT access token obtained from POST /v2/token.
Body
application/json
Request to send an OTP to an email or phone number.
Email address or phone number to send OTP to
Required string length:
1 - 255