Get the list of all rewards accessible by the current user. Can be paginated and/or filtered by reward state
Param name | Description |
---|---|
archived_after optional |
Return only rewards accounted on and after the supplied date. Date format: YYYYMMDD (example: 20180702) Validations:
|
page optional |
Return only one page of rewards. Default per-page is 10 Validations:
|
per_page optional |
Number of rewards returned per page. Works only in combination with “page” param. Default value is 10 Validations:
|
state optional |
Validations:
|
Creates new reward
Param name | Description |
---|---|
draft optional |
Whether created reward should be in draft state. If the value of this param is 1, reward will be saved as draft and will not be validated; otherwise, it will be either in reviewing or queue state (depending on whether its user has approvers or not). Validations:
|
user_id optional |
Reward’s user, optional, defaults to current user. Must be one of the current company users Validations:
|
reward required |
Reward hash Validations:
|
reward[description] required |
Reward description Validations:
|
reward[date] required |
Reward date Validations:
|
reward[cost_center_ids] optional , nil allowed |
Validations:
|
reward[reward_type_id] required |
Reward type ID, IDs can be fetched from GET /api/reward_types Validations:
|
reward[tax_card_id] optional , nil allowed |
User’s tax card ID Validations:
|
reward[cost] required |
Reward cost, can be either reward type cost or custom (for non-fixed price reward types) Validations:
|
reward[tax_percentage] required |
Tax percentage, should be less than 1, e.g. 0.35 for 35% Validations:
|