---
title: "Searches Loyalty History by Customer id and other parameters"
url: "https://developer.retailexpress.com.au/apis/retail-express-api-21-v2/versions/210b509a-613e-44ac-a87b-ef6c22c23a2c/operations/get-customers-id-loyaltyhistory"
---

> Full API specification: https://developer.retailexpress.com.au/apis/retail-express-api-21-v2/versions/210b509a-613e-44ac-a87b-ef6c22c23a2c.md

# Searches Loyalty History by Customer id and other parameters

`GET` `/customers/{id}/loyaltyhistory`

Operation ID: `get-customers-id-loyaltyhistory`

Searches Loyalty History by Customer id and other parameters

## Path parameters

- `id` (integer, int32, required) - Customer id

## Query parameters

- `filter_by` (string, optional) - Filter by. Available field name values: created_on, order_id, order_number, product_id, supplier_sku, adjustment_reason_id, loyalty_points_delta, loyalty_points_available, ratio. In string values: '|' and ',' characters have to be escaped with slash, i.e. '\\,' '\\|' For operators that support multiple values (in, notin): multiple values are delimited using '|' character Available operators: eq - Equal neq - Not equals lt - Less lte - Less or equal gt - Greater gte - Greater or equal in - In notin - Not In contains - Contains isnull - Is Null isnullorempty - Is Null Or Empty isnotnull - Is Not Null startswith - Starts with endswith - Ends with doesnotcontain - Does not contain For non-nullable fields operators isnull and isnotnull are unavailable For strings operators: lt, lte, gt, gte are unavailable Example: order_id:eq:1, supplier_sku:eq:test
- `order_by` (string, optional) - Order by. Available field name values: id, created_on, order_id, product_id, adjustment_reason, loyalty_points_delta. Available direction values: asc, desc. Example: id asc, name desc
- `page_number` (integer, int32, optional)
- `page_size` (integer, int32, optional)

## Header parameters

- `x-api-key` (string, required) - Api subscription key
- `Cache-Control` (string, optional)
- `Authorization` (string, required) - Bearer token for authorization (e.g., Bearer <token>)

## Responses

- `200` - Returns Loyalty History data
- `400` - Bad request
- `401` - Unauthorized
- `403` - Forbidden

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Retail Express API
  version: v2.1
servers:
  - url: https://api.retailexpress.com.au/v2.1
paths:
  /customers/{id}/loyaltyhistory:
    get:
      tags:
        - customers
      summary: Searches Loyalty History by Customer id and other parameters
      description: Searches Loyalty History by Customer id and other parameters
      operationId: get-customers-id-loyaltyhistory
      parameters:
        - name: id
          in: path
          description: Customer id
          required: true
          schema:
            type: integer
            description: Customer id
            format: int32
        - name: filter_by
          in: query
          description: "Filter by. \r

            Available field name values: created_on, order_id, order_number,
            product_id, supplier_sku, adjustment_reason_id,
            loyalty_points_delta, loyalty_points_available, ratio.\r

            \            \r

            In string values: '|' and ',' characters have to be escaped with
            slash, i.e. '\\\\,' '\\\\|'\r

            \            \r

            For operators that support multiple values (in, notin): multiple
            values are delimited using '|' character\r

            \r

            Available operators:\r

            \r

            eq -  Equal\r

            \r

            neq - Not equals\r

            \r

            lt  - Less\r

            \r

            lte - Less or equal\r

            \r

            gt -  Greater\r

            \r

            gte - Greater or equal\r

            \r

            in  - In\r

            \r

            notin - Not In\r

            \            \r

            contains - Contains\r

            \r

            isnull - Is Null\r

            \            \r

            isnullorempty - Is Null Or Empty\r

            \r

            isnotnull - Is Not Null\r

            \r

            startswith - Starts with\r

            \r

            endswith - Ends with\r

            \r

            doesnotcontain - Does not contain\r

            \            \r

            For non-nullable fields operators isnull and isnotnull are
            unavailable\r

            \r

            For strings operators: lt, lte, gt, gte are unavailable\r

            \            \r

            Example: order_id:eq:1, supplier_sku:eq:test"
          schema:
            type: string
            description: "Filter by. \r

              Available field name values: created_on, order_id, order_number,
              product_id, supplier_sku, adjustment_reason_id,
              loyalty_points_delta, loyalty_points_available, ratio.\r

              \            \r

              In string values: '|' and ',' characters have to be escaped with
              slash, i.e. '\\\\,' '\\\\|'\r

              \            \r

              For operators that support multiple values (in, notin): multiple
              values are delimited using '|' character\r

              \r

              Available operators:\r

              \r

              eq -  Equal\r

              \r

              neq - Not equals\r

              \r

              lt  - Less\r

              \r

              lte - Less or equal\r

              \r

              gt -  Greater\r

              \r

              gte - Greater or equal\r

              \r

              in  - In\r

              \r

              notin - Not In\r

              \            \r

              contains - Contains\r

              \r

              isnull - Is Null\r

              \            \r

              isnullorempty - Is Null Or Empty\r

              \r

              isnotnull - Is Not Null\r

              \r

              startswith - Starts with\r

              \r

              endswith - Ends with\r

              \r

              doesnotcontain - Does not contain\r

              \            \r

              For non-nullable fields operators isnull and isnotnull are
              unavailable\r

              \r

              For strings operators: lt, lte, gt, gte are unavailable\r

              \            \r

              Example: order_id:eq:1, supplier_sku:eq:test"
            nullable: true
        - name: order_by
          in: query
          description: "Order by. \r

            \r

            Available field name values: id, created_on, order_id, product_id,
            adjustment_reason, loyalty_points_delta.\r

            \r

            Available direction values: asc, desc. \r

            \r

            Example: id asc, name desc"
          schema:
            type: string
            description: "Order by. \r

              \r

              Available field name values: id, created_on, order_id, product_id,
              adjustment_reason, loyalty_points_delta.\r

              \r

              Available direction values: asc, desc. \r

              \r

              Example: id asc, name desc"
            nullable: true
        - name: page_number
          in: query
          schema:
            maximum: 100000
            minimum: 1
            type: integer
            format: int32
        - name: page_size
          in: query
          schema:
            maximum: 2147483647
            minimum: 1
            type: integer
            format: int32
        - name: x-api-key
          in: header
          description: Api subscription key
          required: true
          schema:
            type: string
        - name: Cache-Control
          in: header
          required: false
          schema:
            type: string
            default: no-cache
        - name: Authorization
          in: header
          required: true
          description: Bearer token for authorization (e.g., Bearer <token>)
          schema:
            type: string
      responses:
        "200":
          description: Returns Loyalty History data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomerLoyaltyHistory.PagingResponse"
              example:
                data:
                  - id: 0
                    created_on: string
                    order_item:
                      id: 0
                      external_id: string
                      order_item_type: string
                      product:
                        manufacturer_sku: string
                        product_type:
                          id: 0
                          name: string
                          modified_on: string
                        short_description: string
                        supplier_sku: string
                        supplier_sku2: string
                        sales_channels:
                          - id: 0
                            name: string
                            shopify_channel: true
                            source_group:
                              id: 0
                              name: string
                            enabled: true
                        export_to_web: true
                        package: true
                        has_package_products: true
                        last_sold_on: string
                        require_serial_number: 0
                        last_fulfiled_on: string
                        id: 0
                      original_price: 0
                      sell_price: 0
                      order_item_total: 0
                      order_item_discount_total: 0
                      taxable: true
                      tax_rate: 0
                      supplier_buy_ex: 0
                      direct_costs_ex: 0
                      cogs_ex: 0
                      fulfilment_method: string
                      due_date: string
                      delivery_driver:
                        id: 0
                        name: string
                      delivery_zone:
                        id: 0
                        name: string
                      delivery_time:
                        id: 0
                        name: string
                      quantity_ordered: 0
                      quantity_fulfiled: 0
                      notes: string
                      original_order_item_id: 0
                      return_reason:
                        id: 0
                        name: string
                      fulfil_outlet:
                        id: 0
                        name: string
                        modified_on: string
                      source_outlet:
                        id: 0
                        name: string
                        modified_on: string
                      applied_promotional_campaigns:
                        - id: 0
                          name: string
                      created_on: string
                      modified_on: string
                      linked_purchase_order:
                        id: 0
                        status:
                          id: 0
                          name: string
                        eta: string
                        supplier_invoice_number: string
                        created_on: string
                        modified_on: string
                        received_on: string
                        created_by:
                          id: 0
                          user_code: string
                          first_name: string
                          surname: string
                        modified_by:
                          id: 0
                          user_code: string
                          first_name: string
                          surname: string
                      serial_number: string
                      order_id: 0
                      order_number: string
                    adjustment_reason:
                      id: 0
                      name: string
                      is_system: true
                      is_deleted: true
                    loyalty_points_delta: 0
                    loyalty_points_available: 0
                    ratio: 0
                page_number: 0
                page_size: 0
                total_records: 0
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
              example:
                type: string
                title: string
                status: 0
                detail: string
                instance: string
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
              example:
                type: string
                title: string
                status: 0
                detail: string
                instance: string
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
              example:
                type: string
                title: string
                status: 0
                detail: string
                instance: string
security: []
components:
  schemas:
    CustomerLoyaltyHistory.PagingResponse:
      title: ""
      type: object
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/CustomerLoyaltyHistory"
          nullable: true
        page_number:
          type: integer
          format: int32
        page_size:
          type: integer
          format: int32
        total_records:
          type: integer
          format: int32
      additionalProperties: false
    ProblemDetails:
      title: ""
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    CustomerLoyaltyHistory:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Id
          format: int32
        created_on:
          type: string
          description: Created On
          format: date-time
        order_item:
          $ref: "#/components/schemas/ExtendedOrderItem"
        adjustment_reason:
          $ref: "#/components/schemas/LoyaltyAdjustmentReason"
        loyalty_points_delta:
          type: number
          description: Loyalty Points Delta
          format: double
        loyalty_points_available:
          type: number
          description: Loyalty Points Available
          format: double
        ratio:
          type: number
          description: Ratio
          format: double
          nullable: true
      additionalProperties: false
      description: Customer Loyalty History model
    ExtendedOrderItem:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Order item id.
          format: int32
          nullable: true
        external_id:
          type: string
          description: External unique id
          nullable: true
        order_item_type:
          type: string
          description: Order item type
          nullable: true
        product:
          $ref: "#/components/schemas/ProductLimited"
        original_price:
          type: number
          description: Original price
          format: double
          nullable: true
        sell_price:
          type: number
          description: Sell price
          format: double
        order_item_total:
          type: number
          description: Order item total
          format: double
          readOnly: true
        order_item_discount_total:
          type: number
          description: Order item discount total
          format: double
          nullable: true
        taxable:
          type: boolean
          description: Is taxable
          nullable: true
        tax_rate:
          type: number
          description: Tax rate
          format: double
          nullable: true
        supplier_buy_ex:
          type: number
          description: Supplier Buy Ex
          format: double
          nullable: true
        direct_costs_ex:
          type: number
          description: Direct Costs Ex
          format: double
          nullable: true
        cogs_ex:
          type: number
          description: COGS Ex
          format: double
          nullable: true
          readOnly: true
        fulfilment_method:
          type: string
          description: Fulfilment Method
          nullable: true
        due_date:
          type: string
          description: Due date
          format: date-time
          nullable: true
        delivery_driver:
          $ref: "#/components/schemas/DeliveryDriver"
        delivery_zone:
          $ref: "#/components/schemas/DeliveryZone"
        delivery_time:
          $ref: "#/components/schemas/DeliveryTime"
        quantity_ordered:
          type: integer
          description: Quantity Ordered
          format: int32
        quantity_fulfiled:
          type: integer
          description: Quantity Fulfiled
          format: int32
        notes:
          type: string
          description: Notes
          nullable: true
        original_order_item_id:
          type: integer
          description: Original Order Item Id
          format: int32
          nullable: true
        return_reason:
          $ref: "#/components/schemas/ReturnReasonLimited"
        fulfil_outlet:
          $ref: "#/components/schemas/OutletExtended"
        source_outlet:
          $ref: "#/components/schemas/OutletExtended"
        applied_promotional_campaigns:
          type: array
          items:
            $ref: "#/components/schemas/Campaign"
          description: Promotional campaigns
          nullable: true
        created_on:
          type: string
          description: Created on
          format: date-time
        modified_on:
          type: string
          description: Modified on
          format: date-time
          nullable: true
        linked_purchase_order:
          $ref: "#/components/schemas/PurchaseOrderLimited"
        serial_number:
          type: string
          description: Serial Number
          nullable: true
        order_id:
          type: integer
          description: Order Id .
          format: int32
        order_number:
          type: string
          description: Order Number.
          nullable: true
      additionalProperties: false
      description: Order Item Model
    LoyaltyAdjustmentReason:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Loyalty Adjustment Reason Id.
          format: int32
        name:
          type: string
          description: Loyalty Adjustment Reason name
          nullable: true
        is_system:
          type: boolean
          description: Loyalty Adjustment Reason IsSystem flag
        is_deleted:
          type: boolean
          description: Loyalty Adjustment Reason IsDeleted flag
          nullable: true
      additionalProperties: false
      description: Loyalty Adjustment Reason Model
    ProductLimited:
      title: ""
      type: object
      properties:
        manufacturer_sku:
          type: string
          description: Manufacture SKU
          nullable: true
        product_type:
          $ref: "#/components/schemas/ProductType"
        short_description:
          type: string
          description: Product description.
          nullable: true
        supplier_sku:
          type: string
          description: Supplier SKU.
          nullable: true
        supplier_sku2:
          type: string
          description: Supplier SKU2.
          nullable: true
        sales_channels:
          type: array
          items:
            $ref: "#/components/schemas/ProductSalesChannelVM"
          description: Product Sales Chanels
          nullable: true
        export_to_web:
          type: boolean
          description: Export To Web
          nullable: true
        package:
          type: boolean
          description: Package
        has_package_products:
          type: boolean
          description: Has Package Products
        last_sold_on:
          type: string
          description: Last Processed Sold
          format: date-time
          nullable: true
        require_serial_number:
          type: integer
          description: Require SerialNumber
          format: int32
        last_fulfiled_on:
          type: string
          description: Last Fulfiled
          format: date-time
          nullable: true
        id:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    DeliveryDriver:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Id.
          format: int32
        name:
          type: string
          description: Name.
          nullable: true
      additionalProperties: false
    DeliveryZone:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Id.
          format: int32
        name:
          type: string
          description: Name.
          nullable: true
      additionalProperties: false
    DeliveryTime:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Id.
          format: int32
        name:
          type: string
          description: Name.
          nullable: true
      additionalProperties: false
    ReturnReasonLimited:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Return Reason Id.
          format: int32
        name:
          type: string
          description: Return Reason name
          nullable: true
      additionalProperties: false
      description: Return Reason Limited Model
    OutletExtended:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Outlet id
          format: int32
          nullable: true
        name:
          maxLength: 255
          minLength: 0
          type: string
          description: Outlet name
          nullable: true
        modified_on:
          type: string
          description: Modified on
          format: date-time
      additionalProperties: false
    Campaign:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Campaign id
          format: int32
          nullable: true
        name:
          maxLength: 100
          minLength: 0
          type: string
          description: Campaign name
          nullable: true
      additionalProperties: false
      description: Campaign Model
    PurchaseOrderLimited:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Purchase order id
          format: int32
          nullable: true
        status:
          $ref: "#/components/schemas/PurchaseOrderStatus"
        eta:
          type: string
          description: Eta
          format: date-time
          nullable: true
        supplier_invoice_number:
          type: string
          description: Supplier Invoice Number
          nullable: true
        created_on:
          type: string
          description: Created on
          format: date-time
          nullable: true
        modified_on:
          type: string
          description: Modified on
          format: date-time
        received_on:
          type: string
          description: Received on
          format: date-time
          nullable: true
        created_by:
          $ref: "#/components/schemas/UserExtended"
        modified_by:
          $ref: "#/components/schemas/UserExtended"
      additionalProperties: false
      description: Purchase order model
    ProductType:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Product type Id.
          format: int32
          nullable: true
        name:
          maxLength: 50
          minLength: 0
          pattern: ^[a-zA-Z0-9\s./;:\-_+()*&^%$#@]+$
          type: string
          description: Product type description (Name)
          nullable: true
        modified_on:
          type: string
          description: Modified on
          format: date-time
      additionalProperties: false
      description: Product Type Model
    ProductSalesChannelVM:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Channel Id.
          format: int32
        name:
          type: string
          description: Channel Name.
          nullable: true
        shopify_channel:
          type: boolean
          description: Shopify Channel.
        source_group:
          $ref: "#/components/schemas/SourceGroupVM"
        enabled:
          type: boolean
          description: Enabled.
      additionalProperties: false
    PurchaseOrderStatus:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Status identifier
          format: int32
          nullable: true
        name:
          type: string
          description: Status name
          nullable: true
      additionalProperties: false
      description: Purchase order status model
    UserExtended:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Id.
          format: int32
          nullable: true
        user_code:
          type: string
          description: User code.
          nullable: true
        first_name:
          type: string
          description: First name.
          nullable: true
        surname:
          type: string
          description: Surname.
          nullable: true
      additionalProperties: false
    SourceGroupVM:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Source Group Id.
          format: int32
          nullable: true
        name:
          type: string
          description: Source Group Name.
          nullable: true
      additionalProperties: false
```
