Rewards

Our base domain URL is https://api.dotapparel.io.

Retrieves a list of reward program details

get

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.

Authorizations
AuthorizationstringRequired
Header parameters
X-DotApparel-NamestringRequired

An alias name that represents a particular brand that is using the API

shopstringRequired
Responses
get
/rewards/programs

Retrieves a single reward account details by reward account id

get

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.

Authorizations
AuthorizationstringRequired
Path parameters
reward_account_idnumberRequired

The Apparel21 reward account id

Header parameters
X-DotApparel-NamestringRequired

An alias name that represents a particular brand that is using the API

shopstringRequired
Responses
get
/rewards/accounts/{reward_account_id}

Updates a person's tier information

put

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.

Authorizations
AuthorizationstringRequired
Path parameters
reward_account_idnumberRequired

The Apparel21 Reward account ID

Header parameters
X-DotApparel-NamestringRequired

An alias name that represents a particular brand that is using the API

shopstringRequired
Body
tierIdnumberRequiredExample: 2
personIdnumberRequiredExample: 73152
tierLockedUntilDatestringOptionalExample: 2019-09-01
Responses
put
/rewards/accounts/{reward_account_id}

Retrieves a history of all points and reward accruals and redemptions

get

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.

Authorizations
AuthorizationstringRequired
Path parameters
reward_account_idnumberRequired

The Apparel21 reward account id

Query parameters
from_datestringOptional

(Optional) Earliest date to retrieve transaction from yyyy-MM-dd format

Header parameters
X-DotApparel-NamestringRequired

An alias name that represents a particular brand that is using the API

shopstringRequired
Responses
get
/rewards/accounts/{reward_account_id}/transactions

Creates a reward account for a person

post

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.

Authorizations
AuthorizationstringRequired
Header parameters
X-DotApparel-NamestringRequired

An alias name that represents a particular brand that is using the API

shopstringRequired
Body
programIdnumberRequiredExample: 1
tierIdnumberRequiredExample: 2
personIdnumberRequiredExample: 73152
Responses
post
/rewards/accounts

Creates a new reward to a person's reward account

post

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.

Authorizations
AuthorizationstringRequired
Path parameters
reward_account_idnumberRequired

The Apparel21 Reward account ID

Header parameters
X-DotApparel-NamestringRequired

An alias name that represents a particular brand that is using the API

shopstringRequired
Body
personIdnumberRequiredExample: 73152
descriptionstringRequiredExample: DotApparel Rewards TEST
amountnumberRequiredExample: 50
expiryDatestringRequiredExample: 2023-12-30
issueReasonIdnumberRequiredExample: 17666
referencestringRequiredExample: SM1
Responses
post
/rewards/accounts/{reward_account_id}/rewards

No content

Creates a new gift to a person's reward account

post

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.

Authorizations
AuthorizationstringRequired
Path parameters
reward_account_idnumberRequired

The Apparel21 Reward account ID

Header parameters
X-DotApparel-NamestringRequired

An alias name that represents a particular brand that is using the API

shopstringRequired
Body
personIdnumberRequiredExample: 73152
giftIdnumberRequiredExample: 2620
descriptionstringRequiredExample: Test gift
expiryDatestringRequiredExample: 2023-12-30
issueReasonIdnumberRequiredExample: 17666
referencestringRequiredExample: AUG123
Responses
post
/rewards/accounts/{reward_account_id}/gifts

No content

Add points to a person's reward account

post

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.

Authorizations
AuthorizationstringRequired
Path parameters
reward_account_idnumberRequired

The Apparel21 Reward account ID

Header parameters
X-DotApparel-NamestringRequired

An alias name that represents a particular brand that is using the API

shopstringRequired
Body
personIdnumberRequiredExample: 73152
pointsnumberRequiredExample: 100
descriptionstringRequiredExample: Test gift
expiryDatestringRequiredExample: 2023-12-30
referencestringRequiredExample: AUG123
Responses
post
/rewards/accounts/{reward_account_id}/points

No content

Redeems a reward from a person's reward account

post

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.

Authorizations
AuthorizationstringRequired
Path parameters
reward_account_idnumberRequired

The Apparel21 Reward account ID

Header parameters
X-DotApparel-NamestringRequired

An alias name that represents a particular brand that is using the API

shopstringRequired
Body
personIdnumberRequiredExample: 73152
descriptionstringRequiredExample: Redeem reward
spendAmountnumberRequiredExample: 50
amountnumberRequiredExample: 30
referencestringRequiredExample: RED123
autoConfirmbooleanRequiredExample: true
Responses
post
/rewards/accounts/{reward_account_id}/rewards/redemptions

Redeems a reward from a person's reward account

post

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.

Authorizations
AuthorizationstringRequired
Path parameters
reward_account_idnumberRequired

The Apparel21 Reward account ID

Header parameters
X-DotApparel-NamestringRequired

An alias name that represents a particular brand that is using the API

shopstringRequired
Body
personIdnumberRequiredExample: 73152
descriptionstringRequiredExample: Redeem reward
giftIdnumberRequiredExample: 2
redeemedSkuIdnumberRequiredExample: 6821
referencestringRequiredExample: RED123
autoConfirmbooleanRequiredExample: true
Responses
post
/rewards/accounts/{reward_account_id}/gifts/redemptions

Confirms reward redemption

post

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.

Authorizations
AuthorizationstringRequired
Query parameters
request_idstringRequired

Request id obtained from redeem reward or gift endpoint

Header parameters
X-DotApparel-NamestringRequired

An alias name that represents a particular brand that is using the API

shopstringRequired
Responses
post
/rewards/confirmation

No content

Reverses reward redemption

post

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.

Authorizations
AuthorizationstringRequired
Query parameters
request_idstringRequired

Request id obtained from redeem reward or gift endpoint

Header parameters
X-DotApparel-NamestringRequired

An alias name that represents a particular brand that is using the API

shopstringRequired
Responses
post
/rewards/reversal

No content

Last updated

Was this helpful?