Skip to content

List rewards

GET
/rewards
curl --request GET \
--url 'https://api.poweredbyaura.com/v1/rewards?campaign_id=cmp_01JA9TQ4W2D8M5X4N6B1C0VEKA&customer_id=CUS-204871&status=waiting_for_customer&limit=25' \
--header 'Authorization: Bearer <token>'

Returns rewards, newest first. Each reward is one delivery of data earned by an action.

campaign_id
string

Example

cmp_01JA9TQ4W2D8M5X4N6B1C0VEKA
customer_id
string

Example

CUS-204871
status

waiting_for_customer: earned, waiting for the customer to accept the plan. flagged: waiting for review. waiting_for_balance: your balance doesn’t cover it; it waits up to 24 hours for a top-up, then fails. pending: its price is held and the delivery is on its way. delivered: the network confirmed it and your balance was charged. failed: not delivered, nothing charged. reversed: the network reversed a delivery and you were refunded. rejected: rejected in review, or lapsed because the customer didn’t accept the plan.

string
Allowed values: waiting_for_customer flagged waiting_for_balance pending delivered failed reversed rejected
created_from
string format: date-time
created_to
string format: date-time
limit
integer
default: 25 >= 1 <= 100

Items per page, from 1 to 100.

cursor
string

The next_cursor from the previous page.

A page of rewards.

Media typeapplication/json
object
object
required
string
Allowed value: list
data
required
Array<object>
object
id
required
string
object
required
string
Allowed value: reward
campaign_id
required
string
action_id
required

The action that earned it. null for the first week’s data of a plan started by offer, which accepting earns.

string | null
customer_id
required
string
kind
required

plan_delivery: a period’s data. first_action: a one-off reward for starting the plan. referral: a referral reward.

string
Allowed values: plan_delivery first_action referral
amount_gb
required

An amount of mobile data in gigabytes (GB), as set in the plan, to at most two decimal places.

number
multiple of 0.01
status
required

waiting_for_customer: earned, waiting for the customer to accept the plan. flagged: waiting for review. waiting_for_balance: your balance doesn’t cover it; it waits up to 24 hours for a top-up, then fails. pending: its price is held and the delivery is on its way. delivered: the network confirmed it and your balance was charged. failed: not delivered, nothing charged. reversed: the network reversed a delivery and you were refunded. rejected: rejected in review, or lapsed because the customer didn’t accept the plan.

string
Allowed values: waiting_for_customer flagged waiting_for_balance pending delivered failed reversed rejected
phone_number
required

The number the data goes to, chosen by the customer when they accepted the plan. null until they accept.

string | null
network_id
required

The number’s network, found by a number lookup before delivery.

string | null
period
required

The plan period this delivery is for. null for referral and first-action rewards.

object
starts_at
required
string format: date-time
ends_at
required
string format: date-time
price
required
One of:
object
amount
required

Amount in the currency’s minor unit (kobo for NGN).

integer
currency
required

ISO 4217 currency code.

string
/^[A-Z]{3}$/
created_at
required
string format: date-time
resolve_by
required

Set when delivery starts. The delivery is final by then, as for purchases.

string | null format: date-time
delivered_at
required
string | null format: date-time
failure
required
object
code
required

Why a delivery failed. The first five match the Data Reselling API. New codes may be added in v1.

string
Allowed values: network_rejected number_not_eligible bundle_unavailable network_timeout internal_error insufficient_balance
message
required
string
reversal
required
object
reversed_at
required
string format: date-time
reason
required
string
rejection

Present when the reward was rejected.

object
reason
required
string
Allowed values: rejected_in_review customer_not_accepted
note

The reviewer’s note, if any.

string | null
test
required
boolean
has_more
required
boolean
next_cursor
required
string | null

Example

{
"object": "list",
"data": [
{
"object": "reward",
"kind": "plan_delivery",
"status": "waiting_for_customer",
"failure": {
"code": "network_rejected"
},
"rejection": {
"reason": "rejected_in_review"
}
}
]
}
Aura-Request-Id
string
Example
req_7Kp2Vx9QmR4t

A unique ID for this request. Quote it when you contact Aura.

The request is malformed or a field is invalid. Fix it before retrying.

Media typeapplication/json
object
error
required
object
code
required

A stable, machine-readable code. New codes may be added in v1, so treat an unknown code by its HTTP status and retryable flag. The first block is shared with the Data Reselling API.

string
Allowed values: invalid_request invalid_phone_number invalid_api_key ip_not_allowed not_found reference_conflict rate_limited internal_error unknown_campaign unknown_action campaign_not_live campaign_required plan_not_offered already_accepted already_offered campaign_starts_with_action number_change_too_soon number_on_another_plan
message
required

A human-readable explanation. Do not parse it; use code.

string
param

The request field the error is about, when there is one.

string
retryable
required

Whether the same request can succeed if you retry it later.

boolean
request_id
required
string
details

Extra facts about the error, such as the existing action.

object
key
additional properties
any

Examples

ExampleinvalidPhoneNumber
{
"error": {
"code": "invalid_phone_number",
"message": "phone_number must be in E.164 format, such as +2348000000001.",
"param": "phone_number",
"retryable": false,
"request_id": "req_9Qd4Hs1XvB7n"
}
}
Aura-Request-Id
string
Example
req_7Kp2Vx9QmR4t

A unique ID for this request. Quote it when you contact Aura.

The API key is missing, wrong or revoked.

Media typeapplication/json
object
error
required
object
code
required

A stable, machine-readable code. New codes may be added in v1, so treat an unknown code by its HTTP status and retryable flag. The first block is shared with the Data Reselling API.

string
Allowed values: invalid_request invalid_phone_number invalid_api_key ip_not_allowed not_found reference_conflict rate_limited internal_error unknown_campaign unknown_action campaign_not_live campaign_required plan_not_offered already_accepted already_offered campaign_starts_with_action number_change_too_soon number_on_another_plan
message
required

A human-readable explanation. Do not parse it; use code.

string
param

The request field the error is about, when there is one.

string
retryable
required

Whether the same request can succeed if you retry it later.

boolean
request_id
required
string
details

Extra facts about the error, such as the existing action.

object
key
additional properties
any

Examples

ExampleinvalidKey
{
"error": {
"code": "invalid_api_key",
"message": "The API key is missing, wrong or revoked.",
"retryable": false,
"request_id": "req_4Lm8Tc2VqZ7k"
}
}
Aura-Request-Id
string
Example
req_7Kp2Vx9QmR4t

A unique ID for this request. Quote it when you contact Aura.

Too many requests. Wait for Retry-After seconds, then retry.

Media typeapplication/json
object
error
required
object
code
required

A stable, machine-readable code. New codes may be added in v1, so treat an unknown code by its HTTP status and retryable flag. The first block is shared with the Data Reselling API.

string
Allowed values: invalid_request invalid_phone_number invalid_api_key ip_not_allowed not_found reference_conflict rate_limited internal_error unknown_campaign unknown_action campaign_not_live campaign_required plan_not_offered already_accepted already_offered campaign_starts_with_action number_change_too_soon number_on_another_plan
message
required

A human-readable explanation. Do not parse it; use code.

string
param

The request field the error is about, when there is one.

string
retryable
required

Whether the same request can succeed if you retry it later.

boolean
request_id
required
string
details

Extra facts about the error, such as the existing action.

object
key
additional properties
any

Examples

ExamplerateLimited
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Retry after 2 seconds.",
"retryable": true,
"request_id": "req_2Vb7Nx4KtJ9q"
}
}
Aura-Request-Id
string
Example
req_7Kp2Vx9QmR4t

A unique ID for this request. Quote it when you contact Aura.

RateLimit-Limit
integer

Requests allowed in the current window.

RateLimit-Remaining
integer

Requests left in the current window.

RateLimit-Reset
integer

Seconds until the current window resets.

Retry-After
integer

Seconds to wait before retrying.