Events - Reward

Report reward to allocate to the top ranked action for the specified event.

POST {Endpoint}/personalizer/v1.0/events/{eventId}/reward

URI Parameters

Name In Required Type Description
Endpoint
path True

string

Supported Cognitive Services endpoint.

eventId
path True

string

The event id this reward applies to.

Request Header

Name Required Type Description
Ocp-Apim-Subscription-Key True

string

Request Body

Name Required Type Description
value True

number

Reward to be assigned to an action. Value should be between -1 and 1 inclusive.

Responses

Name Type Description
204 No Content

Success

Other Status Codes

ErrorResponse

Invalid reward request.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful Events_Reward request

Sample request

POST {Endpoint}/personalizer/v1.0/events/id/reward


{
  "value": 1
}

Sample response

Definitions

Name Description
ErrorCode

High level error code.

ErrorResponse

Used to return an error to the client

InternalError

An object containing more specific information than the parent object about the error.

PersonalizerError

The error object.

RewardRequest

Reward given to a rank response.

ErrorCode

High level error code.

Name Type Description
BadRequest

string

Request could not be understood by the server.

InternalServerError

string

A generic error has occurred on the server.

ResourceNotFound

string

Requested resource does not exist on the server.

ErrorResponse

Used to return an error to the client

Name Type Description
error

PersonalizerError

The error object.

InternalError

An object containing more specific information than the parent object about the error.

Name Type Description
code

string

Detailed error code.

innererror

InternalError

The error object.

PersonalizerError

The error object.

Name Type Description
code

ErrorCode

High level error code.

details

PersonalizerError[]

An array of details about specific errors that led to this reported error.

innerError

InternalError

Finer error details.

message

string

A message explaining the error reported by the service.

target

string

Error source element.

RewardRequest

Reward given to a rank response.

Name Type Description
value

number

Reward to be assigned to an action. Value should be between -1 and 1 inclusive.