Skip to main content
POST
/
v2
/
giftcards
/
programs
/
{programId}
/
fraud
/
rules
Create Fraud Rule
curl --request POST \
  --url https://api.loyalty.dog/v2/giftcards/programs/{programId}/fraud/rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "",
  "action": "block",
  "config": {},
  "expiresAt": "<string>"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

JWT access token obtained from POST /v2/token.

Headers

X-Eposn-Customer-Token
string | null
X-Eposn-Merchant-Token
string | null

Path Parameters

programId
string | null
required
Required string length: 24
Pattern: ^[0-9a-f]{24}$
Example:

"5eb7cf5a86d9755df3a6c593"

Query Parameters

cardId
string | null
Required string length: 24
Pattern: ^[0-9a-f]{24}$
Example:

"5eb7cf5a86d9755df3a6c593"

Body

application/json
name
string
required
ruleType
enum<string>
required
Available options:
VELOCITY_LIMIT,
GEOGRAPHIC_RESTRICTION,
IP_BLOCK,
USER_AGENT_BLOCK,
TRANSACTION_LIMIT,
TIME_RESTRICTION,
CUSTOM
description
string
default:""
action
enum<string>
default:block
Available options:
block,
flag,
require_review
config
Config · object
expiresAt
string | null

Response

Successful Response