User-Item Interactions

List User Purchases

Lists all the purchases ever made by the given user.

get/{databaseId}/users/{userId}/purchases/

Path parameters

databaseIdstring required

ID of your database.

userIdstring required

ID of the user whose purchases are to be listed.

Response

Successful operation.

userIdstring required

User who purchased the item

itemIdstring required

Purchased item

cascadeCreateboolean

Sets whether the given user/item should be created if not present in the database.

amountnumber double

Amount (number) of purchased items. The default is 1. For example, if user-x purchases two item-y during a single order (session...), the amount should equal 2.

pricenumber double

Price paid by the user for the item. If amount is greater than 1, the sum of prices of all the items should be given.

profitnumber double

Your profit from the purchased item. The profit is natural in the e-commerce domain (for example, if user-x purchases item-y for $100 and the gross margin is 30 %, then the profit is $30) but is also applicable in other domains (for example, at a news company it may be income from a displayed advertisement on article page). If amount is greater than 1, the sum of profit of all the items should be given.

recommIdstring

If this purchase is based on a recommendation request, recommId is the id of the clicked recommendation.

additionalDataobject

A dictionary of additional data for the interaction.

Changes