Activities

Point activities and transactions

Get point transactions with pagination

get
/rest_api/v2/transactions

Retrieve paginated list of point transactions/activities

Query parameters
shopifyCustomerIdstringOptional

Filter by Shopify customer ID. Note: At least one of shopifyCustomerId or customerId is required.

customerIdstringOptional

Filter by internal customer ID. Note: At least one of shopifyCustomerId or customerId is required.

beforestringOptional

Cursor for pagination (before) - Firestore document ID of activity to paginate before

afterstringOptional

Cursor for pagination (after) - Firestore document ID of activity to paginate after

limitinteger · min: 1 · max: 1000Optional

Number of transactions per page

Default: 10
typestring · enumOptional

Filter by activity type

Possible values:
eventstringOptional

Filter by specific event

sourcestring · enumOptional

Filter by activity source

Possible values:
created_at_minstring · date-timeOptional

Filter activities created after this date

created_at_maxstring · date-timeOptional

Filter activities created before this date

orderstring · enumOptional

Sort order for results

Default: createdAt_descPossible values:
hasCountbooleanOptional

Include total count in response (may increase response time)

Default: false
Responses
get
/rest_api/v2/transactions
200

Paginated list of transactions

Get transaction by ID

get
/rest_api/v2/transactions/{transactionId}

Retrieve details of a specific point transaction

Path parameters
transactionIdstringRequired

Transaction ID

Responses
get
/rest_api/v2/transactions/{transactionId}
200

Transaction details

Award points to customer

post
/rest_api/v2/transactions/points/award

Add points to a customer's account

Header parameters
X-Joy-Loyalty-App-KeystringRequired

App ID of your shop which retrieved from the Settings page

Example: {{appKey}}
X-Joy-Loyalty-Secret-KeystringRequired

Secret Key of your shop which retrieved from the Settings page

Example: {{secretKey}}
Body
shopifyCustomerIdstringRequired

Shopify customer ID

Example: 8720295559390
pointintegerRequired

Points to award

Example: 100
adminNotestringOptional

Internal note for admin reference

Example: Bonus points for customer loyalty
userNotestringOptional

Note visible to customer

Example: Loyalty bonus - thank you for being a valued customer!
reasonstringOptional

Reason for awarding points

Example: manual_adjustment
Responses
post
/rest_api/v2/transactions/points/award
200

Points awarded successfully

Deduct points from customer

post
/rest_api/v2/transactions/points/deduct

Remove points from a customer's account

Header parameters
X-Joy-Loyalty-App-KeystringRequired

App ID of your shop which retrieved from the Settings page

Example: {{appKey}}
X-Joy-Loyalty-Secret-KeystringRequired

Secret Key of your shop which retrieved from the Settings page

Example: {{secretKey}}
Body
shopifyCustomerIdstringRequired

Shopify customer ID

Example: 8720295559390
pointintegerRequired

Points to deduct

Example: 50
adminNotestringOptional

Internal note for admin reference

Example: Points deduction for policy violation
userNotestringOptional

Note visible to customer

Example: Points adjusted due to return policy
reasonstringOptional

Reason for deducting points

Example: policy_adjustment
Responses
post
/rest_api/v2/transactions/points/deduct
200

Points deducted successfully

Adjust customer points

post
/rest_api/v2/transactions/points/adjust

Adjust customer points (positive or negative adjustment)

Body
shopifyCustomerIdstringRequired

Shopify customer ID

Example: 8720295559390
pointintegerRequired

Points adjustment (positive or negative)

Example: -25
adminNotestringOptional

Internal note for admin reference

Example: Correcting points balance discrepancy
userNotestringOptional

Note visible to customer

Example: Points balance correction
reasonstringOptional

Reason for adjusting points

Example: balance_correction
Responses
post
/rest_api/v2/transactions/points/adjust
200

Points adjusted successfully

Reset customer points

post
/rest_api/v2/transactions/points/reset

Set customer points to a specific value

Body
shopifyCustomerIdstringRequired

Shopify customer ID

Example: 8720295559390
pointintegerRequired

New points balance to set

Example: 0
adminNotestringOptional

Internal note for admin reference

Example: Resetting points balance for new program
userNotestringOptional

Note visible to customer

Example: Points reset for new loyalty program launch
reasonstringOptional

Reason for resetting points

Example: program_migration
Responses
post
/rest_api/v2/transactions/points/reset
200

Points reset successfully