Richemont.Booster2.PublicApi

<back to all web services

GetCustomerKpi

Requires Authentication
The following routes are available for this service:
GET/customer/{boosterCustomerId}/kpiGet customer KPI details
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class GetCustomerKpi
    {
        /**
        * Booster Customer ID
        */
        @ApiMember(Description="Booster Customer ID", IsRequired=true)
        public Integer boosterCustomerId = null;

        /**
        * Transaction Date From e.g. '2022-01-01'
        */
        @ApiMember(Description="Transaction Date From e.g. '2022-01-01'")
        public Date transactionDateFrom = null;

        /**
        * Transaction Date To e.g. '2023-11-01'
        */
        @ApiMember(Description="Transaction Date To e.g. '2023-11-01'")
        public Date transactionDateTo = null;
        
        public Integer getBoosterCustomerId() { return boosterCustomerId; }
        public GetCustomerKpi setBoosterCustomerId(Integer value) { this.boosterCustomerId = value; return this; }
        public Date getTransactionDateFrom() { return transactionDateFrom; }
        public GetCustomerKpi setTransactionDateFrom(Date value) { this.transactionDateFrom = value; return this; }
        public Date getTransactionDateTo() { return transactionDateTo; }
        public GetCustomerKpi setTransactionDateTo(Date value) { this.transactionDateTo = value; return this; }
    }

    public static class GetCustomerKpiResponse
    {
        /**
        * Booster Customer ID
        */
        @ApiMember(Description="Booster Customer ID", IsRequired=true)
        public Integer boosterCustomerId = null;

        /**
        * Total Transaction
        */
        @ApiMember(Description="Total Transaction", IsRequired=true)
        public Integer totalTransaction = null;

        /**
        * Total Sales
        */
        @ApiMember(Description="Total Sales", IsRequired=true)
        public Integer totalSales = null;

        /**
        * Total Return
        */
        @ApiMember(Description="Total Return", IsRequired=true)
        public Integer totalReturn = null;

        /**
        * Total Items
        */
        @ApiMember(Description="Total Items", IsRequired=true)
        public Integer totalItems = null;

        /**
        * Average Basket Amount
        */
        @ApiMember(Description="Average Basket Amount", IsRequired=true)
        public BigDecimal averageBasketAmount = null;

        /**
        * Total Spending Amount
        */
        @ApiMember(Description="Total Spending Amount", IsRequired=true)
        public Double totalSpendingAmount = null;

        /**
        * Currency code e.g. 'EUR', 'CHF'
        */
        @ApiMember(Description="Currency code e.g. 'EUR', 'CHF'", IsRequired=true)
        public String currencyCode = null;
        
        public Integer getBoosterCustomerId() { return boosterCustomerId; }
        public GetCustomerKpiResponse setBoosterCustomerId(Integer value) { this.boosterCustomerId = value; return this; }
        public Integer getTotalTransaction() { return totalTransaction; }
        public GetCustomerKpiResponse setTotalTransaction(Integer value) { this.totalTransaction = value; return this; }
        public Integer getTotalSales() { return totalSales; }
        public GetCustomerKpiResponse setTotalSales(Integer value) { this.totalSales = value; return this; }
        public Integer getTotalReturn() { return totalReturn; }
        public GetCustomerKpiResponse setTotalReturn(Integer value) { this.totalReturn = value; return this; }
        public Integer getTotalItems() { return totalItems; }
        public GetCustomerKpiResponse setTotalItems(Integer value) { this.totalItems = value; return this; }
        public BigDecimal getAverageBasketAmount() { return averageBasketAmount; }
        public GetCustomerKpiResponse setAverageBasketAmount(BigDecimal value) { this.averageBasketAmount = value; return this; }
        public Double getTotalSpendingAmount() { return totalSpendingAmount; }
        public GetCustomerKpiResponse setTotalSpendingAmount(Double value) { this.totalSpendingAmount = value; return this; }
        public String getCurrencyCode() { return currencyCode; }
        public GetCustomerKpiResponse setCurrencyCode(String value) { this.currencyCode = value; return this; }
    }

}

Java GetCustomerKpi DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /customer/{boosterCustomerId}/kpi HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"boosterCustomerId":0,"totalTransaction":0,"totalSales":0,"totalReturn":0,"totalItems":0,"averageBasketAmount":0,"totalSpendingAmount":0,"currencyCode":"String"}