v1

latestOpenAPI 3.0.22026-07-24800528.1 KB
Rewards

List all rewards

Returns a list of your rewards. The rewards are returned sorted by creation date by default, with the most recent rewards appearing first.

get/v2/rewards

Query parameters

company_keystring

Company key in which the results are filtered by.

payment_status'in_transit' | 'withdrawn' | 'available' | 'paid_externally' | 'expired' | 'failed' | 'merging'

The payment status of the rewards

max_createdinteger

Applies a maximum epoch timestamp (ms) filter to the response created_at.

min_createdinteger

Applies a minimum epoch timestamp (ms) filter to the response created_at.

order_by'-created_at' | 'created_at' | '-amount' | 'amount' | '-ready_at' | 'ready_at'

The field in which the results are ordered by. A - prefix denotes that the results are in descending order.

group_keystring

Group key in which the results are filtered by

customer_keystring

Customer key in which the results are filtered by

invoice_keystring

Invoice key in which the results are filtered by

statusstring

The status of the rewards

exclude_drip_rewardsstring

Flag if drip rewards should be included into the results

hide_archived_rewardsboolean

Flag to hide rewards that have been archived

empty_line_idboolean

Flag if drip rewards returned have a line_id (invoice) attached or not

keywordsstring

Free keywords that will filter on the followingReward key, Customer name, Partner first name, Partner last name, Partner email, Partner key

descriptionstring

Text that the description must contain

distinct_descriptionboolean

Flag the returned results should have distinct descriptions or not

distinct_decline_reasonboolean

Flag the returned results should have distinct decline reasons or not

decline_reasonstring

Text that the decline_reason must contain

invoiceableboolean

Flag if the returned results should have only pending and approved rewards which do not have an associated payment line.

currencystring

The currency of the rewards

limitinteger

A limit on the number of items to be returned. Limits can range between 1 and 250, and the default is 10.

starting_afterstring

A cursor for use in pagination, starting_after takes in an item key and the subsequent call will return the following items in the list. This is mutually exclusive with ending_before.

ending_beforestring

A cursor for use in pagination, ending_before takes in an item key and the subsequent call will return the prior items in the list. This is mutually exclusive with starting_after.

Response

Returns a list of your rewards. The rewards are returned sorted by creation date by default, with the most recent rewards appearing first.

messagestring required
statusinteger required

Example response

{
  "data": {
    "items": [
      {
        "created_at": 1574181282399,
        "key": "co_a80cb515fe",
        "updated_at": 1574181282399,
        "amount": 1000,
        "currency": "USD",
        "decline_reason": "Invalid reward",
        "description": "$30 earned for every transaction made by each customer",
        "reward_status": "pending",
        "company": {
          "id": 1234567,
          "key": "comp_1234567",
          "name": "Company"
        },
        "customer": {
          "created_at": 1592944078600,
          "email": "cust@examle.com",
          "key": "cus_1h1QBVUg03Ij69",
          "name": "Adrian",
          "sub_ids": [
            "youtube"
          ],
          "updated_at": 1592944078600
        },
        "partnership_key": "part_1234567",
        "payment_date": 1592944078600,
        "payment_status": "pending",
        "payout_id": 1234567,
        "source": {
          "key": "tran_b0qwaE3cCldjci",
          "type": "transaction"
        },
        "transaction": {
          "amount": 100,
          "amount_usd": 50,
          "category_key": "subscription",
          "created_at": 1592944078600,
          "currency": "USD",
          "product_key": "monthly_plan",
          "updated_at": 1592944078600
        }
      }
    ]
  }
}