Rewards
Scope: visitor
and above
This endpoint retrieves information about reward programs in the Apparel21.
The endpoint returns a list of object that includes information such as reward program id, name, tiers, and gifts.
An alias name that represents a particular brand that is using the API
GET /rewards/programs HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Accept: */*
{
"data": [
{
"id": 1,
"name": "Retail Rewards",
"description": "cs16200",
"tiers": [
{
"id": 1,
"name": "Cotton",
"description": "Annual Spend $0 - $599",
"sequence": 1,
"accrualSpend": "1",
"accrualPoints": 1,
"autoRewardPointThreshold": 300,
"autoRewardValue": 30,
"autoRewardGiftId": null,
"tierPointsBonus": 0,
"tierRewardsBonus": 0,
"tierGiftBonusId": null,
"defaultPointsExpiry": {
"months": 12,
"days": 0
},
"defaultRewardExpiry": {
"months": 0,
"days": 60
},
"qualifySpend": "600",
"qualifyPeriod": {
"months": 12,
"days": 0
}
}
],
"gifts": [
{
"id": 1,
"name": "Birthday Gift Cashmere",
"description": "",
"giftStyles": [
{
"id": 6821,
"code": "CSC1016",
"name": "Block Colour Scarf"
},
{
"id": 6821,
"code": "CSC1016",
"name": "Empire Beanie"
},
{
"id": 8085,
"code": "PL21104",
"name": "Flinders Touch Gloves"
}
]
}
]
}
]
}
Scope: visitor
and above
This endpoint retrieves information about a single reward account in the Apparel21 system by accepting a required reward account id parameter.
The endpoint returns an object that includes information such as the associated program id, tier, rewards list, gift list and etc.
The Apparel21 reward account id
An alias name that represents a particular brand that is using the API
GET /rewards/accounts/{reward_account_id} HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Accept: */*
{
"data": {
"id": 22672,
"programId": 1,
"programName": "Retail Rewards",
"tierId": 2,
"tierName": "Merino",
"personId": 73152,
"tierLockedUntilDate": "2023-09-01",
"availablePoints": 0,
"availableRewards": 200,
"joinDate": "2021-05-03",
"tierJoinDate": "2021-05-03",
"pointsToNextReward": 300,
"spendToNextReward": 300,
"nextTierId": 3,
"spendToNextTier": 1800,
"pointsList": [
{
"createdDateTime": "2018-01-15",
"description": "Social Media post",
"total": 100,
"redeemed": 20,
"pendingRedemption": 10,
"available": 70,
"expiryDate": "2018-01-15"
}
],
"rewards": [
{
"total": 50,
"expiryDate": "2023-12-30",
"description": "DotApparel Rewards TEST",
"redeemed": 0,
"rewardId": 43923,
"available": 50,
"createdDateTime": "2023-04-13T13:19:36",
"pendingRedemption": 0
},
{
"total": 150,
"expiryDate": "2023-12-30",
"description": "DotApparel Rewards TEST",
"redeemed": 0,
"rewardId": 43924,
"available": 150,
"createdDateTime": "2023-04-13T13:19:45",
"pendingRedemption": 0
}
],
"gifts": [
{
"giftName": "Welcome To Merino",
"expiryDate": "2023-06-12",
"description": "Merino Tier Bonus",
"giftId": 4,
"issueId": 38559,
"createdDateTime": "2023-04-13T13:23:16"
},
{
"giftName": "Birthday Gift Merino",
"expiryDate": "2023-12-31",
"description": "Test Gift 1",
"giftId": 2,
"issueId": 38560,
"createdDateTime": "2023-04-13T13:24:35"
}
]
}
}
Scope: maintainer
and above
This endpoint updates a person's tier information.
The endpoint returns an object that includes information such as the reward account id, program id, program name, tier details that the person is associated with.
The Apparel21 Reward account ID
An alias name that represents a particular brand that is using the API
2
73152
2019-09-01
PUT /rewards/accounts/{reward_account_id} HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Content-Type: application/json
Accept: */*
Content-Length: 64
{
"tierId": 2,
"personId": 73152,
"tierLockedUntilDate": "2019-09-01"
}
{
"data": {
"id": 22672,
"programId": 1,
"programName": "Retail Rewards",
"tierId": 2,
"tierName": "Merino",
"personId": 73152,
"tierLockedUntilDate": "2023-09-01"
}
}
Scope: visitor
and above
This endpoint retrieves transaction history of a single reward account in Apparel21.
The endpoint returns an object that includes information such as the associated program id, tier, rewards list, gift list and etc.
The Apparel21 reward account id
(Optional) Earliest date to retrieve transaction from yyyy-MM-dd format
An alias name that represents a particular brand that is using the API
GET /rewards/accounts/{reward_account_id}/transactions HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Accept: */*
{
"data": [
{
"transactionDateTime": "2021-05-03T12:38:42",
"description": "Birthday Reward",
"source": "Retail API",
"reference": "D0123455",
"spend": 100,
"points": 50,
"rewardAmount": 10,
"giftId": 4,
"giftName": "Welcome To Merino",
"newGift": true,
"redeemedGiftSkuId": 1541,
"confirmed": true
}
]
}
Scope: maintainer
and above
This endpoint adds a person to a rewards program.
This creates a reward account for the person and marks the new account as active'
The endpoint returns an object that includes information such as the reward account id, program id, program name, tier details that the person is associated with.
An alias name that represents a particular brand that is using the API
1
2
73152
POST /rewards/accounts HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Content-Type: application/json
Accept: */*
Content-Length: 43
{
"programId": 1,
"tierId": 2,
"personId": 73152
}
{
"id": 22672,
"programId": 1,
"programName": "Retail Rewards",
"tierId": 2,
"tierName": "Merino",
"personId": 73152,
"tierLockedUntilDate": "2023-09-01"
}
Scope: maintainer
and above
This endpoint creates a reward for a reward account.
This endpoint must accept personId, description, and amount in the request body. The rest are optional.
The endpoint returns 201 status code if request is successful.
The Apparel21 Reward account ID
An alias name that represents a particular brand that is using the API
73152
DotApparel Rewards TEST
50
2023-12-30
17666
SM1
POST /rewards/accounts/{reward_account_id}/rewards HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Content-Type: application/json
Accept: */*
Content-Length: 136
{
"personId": 73152,
"description": "DotApparel Rewards TEST",
"amount": 50,
"expiryDate": "2023-12-30",
"issueReasonId": 17666,
"reference": "SM1"
}
No content
Scope: maintainer
and above
This endpoint creates a gift for a reward account.
This endpoint must accept personId, description, and gift id in the request body. The rest are optional.
The endpoint returns 201 status code if request is successful.
The Apparel21 Reward account ID
An alias name that represents a particular brand that is using the API
73152
2620
Test gift
2023-12-30
17666
AUG123
POST /rewards/accounts/{reward_account_id}/gifts HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Content-Type: application/json
Accept: */*
Content-Length: 127
{
"personId": 73152,
"giftId": 2620,
"description": "Test gift",
"expiryDate": "2023-12-30",
"issueReasonId": 17666,
"reference": "AUG123"
}
No content
Scope: maintainer
and above
This endpoint adds points to a person's reward account.
This endpoint must accept personId, points, and description id in the request body. The rest are optional.
The endpoint returns 201 status code if request is successful.
The Apparel21 Reward account ID
An alias name that represents a particular brand that is using the API
73152
100
Test gift
2023-12-30
AUG123
POST /rewards/accounts/{reward_account_id}/points HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Content-Type: application/json
Accept: */*
Content-Length: 104
{
"personId": 73152,
"points": 100,
"description": "Test gift",
"expiryDate": "2023-12-30",
"reference": "AUG123"
}
No content
Scope: maintainer
and above
This endpoint redeems a reward from a person's reward account.
This endpoint must accept personId, description, spend amount, amount, reference and auto confirm as part of the request body.
The endpoint returns a request id that can be used on confirm or reversed unconfirmed request endpoint.
The Apparel21 Reward account ID
An alias name that represents a particular brand that is using the API
73152
Redeem reward
50
30
RED123
true
POST /rewards/accounts/{reward_account_id}/rewards/redemptions HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Content-Type: application/json
Accept: */*
Content-Length: 117
{
"personId": 73152,
"description": "Redeem reward",
"spendAmount": 50,
"amount": 30,
"reference": "RED123",
"autoConfirm": true
}
{
"data": {
"requestId": "6b42837e-eee3-4d81-abb5-d4b26d202a40"
}
}
Scope: maintainer
and above
This endpoint redeems a reward from a person's reward account.
This endpoint must accept personId, description, spend amount, amount, reference and auto confirm as part of the request body.
The endpoint returns a request id that can be used on confirm or reversed unconfirmed request endpoint.
The Apparel21 Reward account ID
An alias name that represents a particular brand that is using the API
73152
Redeem reward
2
6821
RED123
true
POST /rewards/accounts/{reward_account_id}/gifts/redemptions HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Content-Type: application/json
Accept: */*
Content-Length: 120
{
"personId": 73152,
"description": "Redeem reward",
"giftId": 2,
"redeemedSkuId": 6821,
"reference": "RED123",
"autoConfirm": true
}
{
"data": {
"requestId": "6b42837e-eee3-4d81-abb5-d4b26d202a40"
}
}
Scope: maintainer
and above
This endpoint confirms an unconfirmed request and commit the pending redemption of points or rewards.
This endpoint must accept a request id which is obtained from redeem reward or gift endpoint.
The endpoint returns 201 code if successful.
Request id obtained from redeem reward or gift endpoint
An alias name that represents a particular brand that is using the API
POST /rewards/confirmation?request_id=text HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Accept: */*
No content
Scope: maintainer
and above
This endpoint reverses an unconfirmed request. This can only be done within 24 hours of a redemption request
This endpoint must accept a request id which is obtained from redeem reward or redeem gift endpoint.
The endpoint returns 201 code if successful.
Request id obtained from redeem reward or gift endpoint
An alias name that represents a particular brand that is using the API
POST /rewards/reversal?request_id=text HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Accept: */*
No content
Last updated
Was this helpful?