GET /api/export/rewards
Get a list of rewards

Examples

{
  "total_amount": "991.00",
  "total_tax_amount": "594.60",
  "total_records": "8",
  "collection": [
    {
      "id": 210,
      "description": "some reward",
      "user_name": "John Smith",
      "state": "reviewing",
      "date": "2023-09-01",
      "cost_center_names": "",
      "approved_by": "819",
      "user_id": 188,
      "cost_center_ids": [],
      "cost_center_external_ids": [],
      "sent_at": null,
      "created_by": null,
      "updated_at": "2023-09-02",
      "paid_at": null,
      "batch_reference_number": null,
      "reward_type": "Some taxable reward",
      "total_cost": "100.00",
      "debit_account_code": "5252",
      "tax": 60.0
    }
  ]
}

Params

Param name Description
page
optional

Page number.

Validations:

  • Must be a Integer

per_page
optional

Number of records per page. Default: 25.

Validations:

  • Must be a Integer

q
optional

Query to filter rewards by description or amount, e.g.: “Helsinki”, “12.40”.

Validations:

  • Must be a String

date_range
optional

Date range to filter rewards by. Format: “DD/MM/YYYY - DD/MM/YYYY”, e.g. “01/09/2023 - 04/09/2023”.

Validations:

  • Must be a String

user_id
optional

User ID to filter rewards by.

Validations:

  • Must be a Integer

cost_center_id
optional

Cost center ID to filter rewards by.

Validations:

  • Must be a Integer

state
optional

State to filter rewards by.

Validations:

  • Must be one of: draft, reviewing, unapproved, queue, accounted, failed.

updated_at_range
optional

Date range when rewards were last updated to filter by. Format: “DD/MM/YYYY - DD/MM/YYYY”, e.g. “01/09/2023 - 04/09/2023”.

Validations:

  • Must be a String

sort
optional

Parameter to sort rewards by. Sorted by updated date in descending order by default.

Validations:

  • Must be one of: description, end_time, paid_at, sent_at, start_time, state, total_cost, updated_at, user_name.

order
optional

Sort rewards by sort param in ascending or descending order. Default: asc.

Validations:

  • Must be one of: asc, desc.

Returns

Code: 200

Description:

OK

Param name Description
total_amount
required

Total amount (incl. tax) for rewards matching filtering criteria, e.g. “220.67”.

Validations:

  • Must be a String

total_tax_amount
required

Total tax amount for rewards matching filtering criteria, e.g. “60.00”.

Validations:

  • Must be a String

total_records
required

Total number of rewards matching filtering criteria, e.g. “2”.

Validations:

  • Must be a String

collection
required

List of rewards.

Validations:

  • Must be an array of any type