GET reward_offers/performance

Available from CRM.COM R12.2.0

This method returns information related with the performance of a rewards participant against a specific reward offer. A single reward offer performance is returned by each call

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

reward_offer_identifier

(mandatory)

Rewards Offer identifier  

The identifier of the reward offer that should be returned as a result. The allowed reward offer identifier fields are the following:

Name

Type

Description

id

(semi-optional)

String

The ID of the reward offer

number

(semi-optional)

String

The number of the reward offer

name

(semi-optional)

String

The name of the reward offer

accounts_receivable_identifier

(semi-optional)

Accounts Receivable Identifier
The identifier of the accounts receivable for which the performance should be returned. The allowed identifier fields are the following

Name

Type

Description

id

(semi-optional)

String

The ID of the accounts receivable

number

(semi-optional)

String

The number of the accounts receivable

name

(semi-optional)

String

The name of the accounts receivable

Available from CRM.COM R17.0.0

rewards_participant_identifier

(semi-optional)

Rewards Participant Identifier
The identifier of the rewards participant for which the performance should be returned. The allowed rewards participant identifier fields are the following:

Name

Type

Description

id

(semi-optional)

String

The ID of the rewards participant

number

(semi-optional)

String

The number of the rewards participant

Deprecated from CRM.COM R17.0.0

For releases, prior CRM.COM R17.0.0 this field was mandatory

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

Restrictions

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

Response Data

Name

Type

Description

total_number_of_awardsNumberThe number of awards the rewards participant received from the specified offer during the last 12 months.
average_weekly_awarded_amountNumberThe average amount of money per week awarded from this offer during the last 12 months
targeted_number_of_purchasesNumber

The number of purchases that should be done in order for the offer to be awarded. This information comes from the reward offer, if the offer is of classification REWARD_LOYALTY_TRANSACTION_NUMBER_BASED or REWARD_LOYALTY_TRANSACTION_QUANTITY_ITEM_BASED

From R14.7.0, the Rewards Offer setting "Apply Only If No Spend Requests Were Submitted" is also taken into consideration, so that if enabled, only the purchases which are not related with spend requests are calculated


current_number_of_purchasesNumber

The number of purchases that were done so far if the offer is of classification REWARD_LOYALTY_TRANSACTION_NUMBER_BASED or REWARD_LOYALTY_TRANSACTION_QUANTITY_ITEM_BASED. The counted purchases must fulfill all the offer's award conditions, should have not been processed for being awarded yet and the purchases are performed within the offer's transaction period range condition.

From R14.7.0, the Rewards Offer setting "Apply Only If No Spend Requests Were Submitted" is also taken into consideration, so that if enabled, only the purchases which are not related with spend requests are calculated

targeted_purchased_amountNumber

The total amount of purchases that should be done in order for the offer to be awarded. This information comes from the reward offer, if the offer is of classification REWARD_LOYALTY_TRANSACTION_AMOUNT_BASED

From R14.7.0, the Rewards Offer setting "Apply Only If No Spend Requests Were Submitted" is also taken into consideration, so that if enabled, only the purchases which are not related with spend requests are calculated


current_purchased_amountNumber

The amount of money that was purchased so far if the offer is of classification REWARD_LOYALTY_TRANSACTION_AMOUNT_BASED. The purchased amount must fulfill all the offer's award conditions, should have not been processed for being awarded yet and the purchases are performed within the offer's transaction period range condition.

From R14.7.0, the Rewards Offer setting "Apply Only If No Spend Requests Were Submitted" is also taken into consideration, so that if enabled, only the purchases which are not related with spend requests are calculated


targeted_dateDate

The date up to which that amount of money should be purchased from the first date of the transaction, if the offer is of classification REWARD_LOYALTY_TRANSACTION_AMOUNT_BASED or REWARD_LOYALTY_TRANSACTION_NUMBER_BASED or REWARD_LOYALTY_TRANSACTION_QUANTITY_ITEM_BASED

expiration_dateDateThe date the reward offer will expire. If the date is during birthday or nameday then the date is calculated dynamically based on participant's birthday or nameday respectively.
latest_awarded_dateDateThe latest date that the reward offer was awarded
marketing_informationReward Offer Marketing Information Object

The reward offer's marketing information

Referred Objects Response Data

 reward offer marketing information object response data

Name

Type

Description

long_descriptionStringThe offer's long description
short_descriptionStringThe offer's short description
no_awards_status_textString

The text that should appear to inform the participant that he has not been awarded yet.

Deprecated from CRM.COM R17.0.0

times_awarded_status_textString

The text that should appear to inform the participant that the number displayed is the times he has been awarded.

Deprecated from CRM.COM R17.0.0

average_weekly_awarded_amount_textString

The text that should appear to inform the participant that the amount displayed is the average weekly awarded amount.

Deprecated from CRM.COM R17.0.0

offer_imageReward Offer Image ObjectThe reward large (standard) offer image
offer_small_imageReward Offer Image ObjectThe reward small offer image
offer_backgroundReward Offer Background Object

The reward offer background which can be an image or a color

Deprecated from CRM.COM R17.0.0

offer_stamp_imageReward Offer Stamp Image Object

The reward offer stamp image

Available from CRM.COM R15.0.0

Deprecated from CRM.COM R17.0.0

Referred Objects Response Data

 Reward offer Marketing Information Image Object

Name

Type

Description

file_nameStringThe name of the file.
file_content_urlStringThe url that can be used to access the actual content of the file.
file_mime_typeStringThe mime type of the attached file
file_alt_textStringThe alternative text of the attached file, if the file is an image

 Reward scheme Marketing Information Background Object

Name

Type

Description

file_nameStringThe name of the file.
file_content_urlStringThe url that can be used to access the actual content of the file.
file_mime_typeStringThe mime type of the attached file
file_alt_textStringThe alternative text of the attached file, if the file is an image
colorStringThe hexadecimal value of the color that will be used as a background

 Reward offer Marketing Information Stamp Image Object

Name

Type

Description

file_nameStringThe name of the file.
file_content_urlStringThe url that can be used to access the actual content of the file.
file_mime_typeStringThe mime type of the attached file
file_alt_textStringThe alternative text of the attached file, if the file is an image

Examples

 Example 1

HTTP Method: GET

Request: 


{{server}}/crmapi/rest/v2/reward_offers/performance?token={{token}}&reward_offer_identifier=number=254&rewards_participant_identifier=number=RP0000000364

Response:

{
    "data": {
        "total_number_of_awards": 1,
        "average_weekly_awarded_amount": 5,
        "targeted_date": "2017-07-19T11:44:59",
        "latest_awarded_date": "2017-06-08T14:29:43",
        "expiration_date": "Always Valid",
        "targeted_number_of_purchases": 3,
        "marketing_information": {
            "short_description": null,
            "times_awarded_status_text": null,
            "average_weekly_awarded_amount_text": null,
            "long_description": null,
            "no_awards_status_text": null,
            "offer_image": {
                "file_alt_text": null,
                "file_content_url": null
            },
            "offer_background": {
                "color": null,
                "file_alt_text": null,
                "file_mime_type": null
            }
        },
        "current_number_of_purchases": 1
    },
    "status": {
        "code": "OK",
        "description": "",
        "message": ""
    }
}