GetCredits

Retrieves a list of store credits applied to customer accounts, according any filter and sort criteria specified in the request.

Request

HTTP Request

GET
 api/commerce/customer/credits/%3fstartIndex%3d%7bstartIndex%7d%26pageSize%3d%7bpageSize%7d%26sortBy%3d%7bsortBy%7d%26filter%3d%7bfilter%7d%26responseFields%3d%7bresponseFields%7d

Parameters

Parameter NameDescription
Parameters
startIndextype: int 

When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50.

pageSizetype: int 

When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50.

sortBytype: string 

The element to sort the results by and the channel in which the results appear. Either ascending (a-z) or descending (z-a) channel. Optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for more information.

filtertype: string 

A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for a list of supported filters.

responseFieldstype: string 

Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.

Required Behaviors

  • Credit Read

Request Properties

No request body content

Response Properties

Paged list of store credits and gift cards defined for a customer account.

PropertyDescription
items

type: list of credit

A list of requested items. All returned data is provided in an items array.

For a failed request, the returned response may be success with an empty item array.

credit.activationDate

type: DateTime

The date and time the store credit or gift card was activated by the shopper. Credits cannot be used until activated. After the credit is activated, this property value is read-only.

credit.code

type: string

The unique identifier of the object.

credit.creditType

type: string

Properties for available credit types.

credit.currencyCode

type: string

The localized currency code for the monetary amount.

credit.currentBalance

type: decimal

The current remaining balance of the credit applied to the customer account.

credit.customCreditType

type: string

Indicates a custom reward type.

credit.customerId

type: int

Unique identifier of the customer in Kibo eCommerce, used to associate customers with data, orders, returns, and in-store credit.

credit.expirationDate

type: DateTime

Date and time in UTC format when a discount, credit, wish list, or cart expires. An expired discount no longer can be redeemed. An expired wish list is no longer available. An expired credit can no longer be redeemed for a purchase. Acart becomes inactive and expired based on a system-calculated interval. For example, if an anonymous shopper has 14 days of inactivity, the cart is considered abandoned after that period of inactivity. System-supplied and read-only.

credit.initialBalance

type: decimal

The initial balance of the credit applied to the customer account. This value cannot be changed after it is set.

pageCount

type: int

The total number of pages of the results divided per the `pageSize`.

pageSize

type: int

The number of results to display on each page when creating paged results from a query. The amount is divided and displayed on the `pageCount `amount of pages. The default is 20 and maximum value is 200 per page.

startIndex

type: int

When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with a `pageSize `of 25, to get the 51st through the 75th items, use `startIndex=50`.

totalCount

type: int

The total number of items in the list.

Response Body