API Documentation
App Store
Rewards Actions
Claim Actions
Rewards Actions
Withdraw Credits
Withdraws credits from a user.
POST
/
users
/
{app_user_id}
/
rewards
/
withdraw
curl --request POST \
--url https://api-v1.winwinkit.com/users/{app_user_id}/rewards/withdraw \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{
"key": "credit-reward",
"amount": 100
}'
{
"data": {
"withdraw_result": {
"credits_available_at_start": 100,
"credits_available_at_end": 90,
"credits_requested_to_withdraw": 10,
"credits_withdrawn": 10
},
"user": {
"app_user_id": "821fae4b5-1a2d-4c1e-9152-5297086a161c",
"code": "XYZ123",
"preview_link": "https://appname.wwk.link/XYZ123",
"is_premium": false,
"first_seen_at": "2024-11-10T10:28:18.104Z",
"last_seen_at": "2024-11-10T10:28:18.104Z",
"metadata": {},
"claim_code_eligibility": {
"eligible": true,
"eligible_until": "2024-11-10T10:28:18.104Z"
},
"stats": {
"claims": 0,
"conversions": 0,
"churns": 0
},
"rewards": {
"active": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"credits": 100,
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"value": {
"value": "ABCDEFGHIJKLMNOPQR",
"link": "https://apps.apple.com/redeem?ctx=offercodes&id=1234567890&code=ABCDEFGHIJKLMNOPQR",
"expires_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
]
},
"expired": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
]
}
},
"program": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Referral Program #1",
"description": "This is a referral program",
"metadata": {},
"distribution_percentage": 100,
"limit": 0,
"rewards": {
"sender": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1
},
"deactivation": {
"variant": "never"
}
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1,
"limit": 1
},
"deactivation": {
"variant": "never"
}
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1,
"limit": 1
},
"deactivation": {
"variant": "never"
}
}
]
},
"receiver": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
]
}
},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
}
}
}
Headers
The API key to authenticate with.
Path Parameters
The app user id of the user to withdraw credits from.
Body
application/json
Response
200
application/json
The result of the withdrawal of credits
The response is of type object
.
curl --request POST \
--url https://api-v1.winwinkit.com/users/{app_user_id}/rewards/withdraw \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{
"key": "credit-reward",
"amount": 100
}'
{
"data": {
"withdraw_result": {
"credits_available_at_start": 100,
"credits_available_at_end": 90,
"credits_requested_to_withdraw": 10,
"credits_withdrawn": 10
},
"user": {
"app_user_id": "821fae4b5-1a2d-4c1e-9152-5297086a161c",
"code": "XYZ123",
"preview_link": "https://appname.wwk.link/XYZ123",
"is_premium": false,
"first_seen_at": "2024-11-10T10:28:18.104Z",
"last_seen_at": "2024-11-10T10:28:18.104Z",
"metadata": {},
"claim_code_eligibility": {
"eligible": true,
"eligible_until": "2024-11-10T10:28:18.104Z"
},
"stats": {
"claims": 0,
"conversions": 0,
"churns": 0
},
"rewards": {
"active": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"credits": 100,
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"value": {
"value": "ABCDEFGHIJKLMNOPQR",
"link": "https://apps.apple.com/redeem?ctx=offercodes&id=1234567890&code=ABCDEFGHIJKLMNOPQR",
"expires_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
]
},
"expired": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
]
}
},
"program": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Referral Program #1",
"description": "This is a referral program",
"metadata": {},
"distribution_percentage": 100,
"limit": 0,
"rewards": {
"sender": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1
},
"deactivation": {
"variant": "never"
}
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1,
"limit": 1
},
"deactivation": {
"variant": "never"
}
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1,
"limit": 1
},
"deactivation": {
"variant": "never"
}
}
]
},
"receiver": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
]
}
},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
}
}
}