Skip to main content
POST
/
admin
/
top-up-user-points
Top up user points for specific users and raffle
curl --request POST \
  --url https://api.sprucecollective.co.uk/admin/top-up-user-points \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "emails": [
    "['user1@example.com'",
    "'user2@example.com']"
  ],
  "environment": "backfill",
  "grant_batch": "backfill-2025-08-26",
  "item_id": "6892077cecd2afd4b7b5c916",
  "quantity": 10,
  "raffle_name": "10 The Ultimate £10k Home Transformation Giveaway",
  "amount_cents": 0,
  "currency": "GBP",
  "gateway": "revolut",
  "payment_method": "revolut",
  "site_id": "68494fd1b54b34b53a911183"
}
EOF
{
  "errors": [
    "['user@example.com not found']"
  ],
  "message": "Successfully processed top-up for 8 users",
  "processed": 8,
  "status": "ok"
}

Authorizations

Authorization
string
header
required

Type "Bearer" followed by a space and JWT token.

Body

application/json

Top-up request parameters

emails
string[]
required
Minimum array length: 1
Example:
[
"['user1@example.com'",
"'user2@example.com']"
]
environment
string
required
Example:

"backfill"

grant_batch
string
required
Example:

"backfill-2025-08-26"

item_id
string
required
Example:

"6892077cecd2afd4b7b5c916"

quantity
integer
required
Example:

10

raffle_name
string
required
Example:

"10 The Ultimate £10k Home Transformation Giveaway"

amount_cents
integer
Example:

0

currency
string
Example:

"GBP"

gateway
string
Example:

"revolut"

payment_method
string
Example:

"revolut"

site_id
string
Example:

"68494fd1b54b34b53a911183"

Response

OK

errors
string[]
Example:
["['user@example.com not found']"]
message
string
Example:

"Successfully processed top-up for 8 users"

processed
integer
Example:

8

status
string
Example:

"ok"