Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...


Tip

Available from CRM.COM R10.1.0


Excerpt

This method calculates the total awarded amount that was provided to a specific rewards participant and the amount that was awarded by each scheme that the rewards participant participated to. A single rewards participant can be specified in each call.

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

rewards_participant_identifier

(mandatory)

Rewards Participant Identifier

The rewards participant for which the awarded amount will be calculated for. The allowed rewards participant identifier fields are the following:

Include Page
V4:rewards_participants_identifier_post
V4:rewards_participants_identifier_post

reward_scheme_identifier

(optional)
Reward Scheme Identifier

 The reward scheme that awarded the calculated amount. If specified then the calculation will include only awards provided by the specified reward scheme. The allowed reward scheme identifier fields are the following:

Include Page
V4:reward_scheme_identifier
V4:reward_scheme_identifier

from_date

(optional)

DateIf specified then the calculation will include only awards that were provided on that date or on a date after that date will be

to_date

(optional)

DateIf specified then the calculation will include only awards that were provided on that date or on a date before that date will be

fields_set

(optional)

List of Strings, comma separated 
 

A list of fields that should be included in the results. If not specified then all the available fields will be returned

Tip

Available from CRM.COM R10.0.0


Restrictions

  • It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.

...

Expand
titleExample 1

HTTP Method: POST 


Request:

Body:

Code Block
language
languagejavascript
themeConfluence
javascriptlinenumberstrue
  {
  "token":"{{token}}",
  "rewards_participant":{"number":"1"},
  "from_date":"2016-03-23T12:00:40",
  "to_date":"2016-03-29T09:00:00"
  }
 


Response:

Code Block
 {
  "data": {
    "from_date": "2016-03-23T13:43:34",
    "to_date": "2016-03-29T08:57:34",
    "currency": {
      "suffix_symbol": null,
      "prefix_symbol": "£",
      "decimal_part_name": null,
      "code": "GBP",
      "integer_part_name": null,
      "id": "9"
    },
    "reward_scheme_awards_set": [
      {
        "scheme": {
          "alternative_code": "SSS",
          "name": "Sales Scheme",
          "description": "desc",
          "id": "3592610A4F01454E97AF71C9E47646FB",
          "life_cycle_state": "EFFECTIVE"
        },
        "total_awarded_amount": 6
      },
      {
        "scheme": {
          "alternative_code": "MS",
          "name": "Marketing Scheme",
          "description": null,
          "id": "6CAAD517743C4C179251282A5B2B58A6",
          "life_cycle_state": "EFFECTIVE"
        },
        "total_awarded_amount": 27
      }
    ],
    "total_awarded_amount": 33
  },
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}


...