> ## Documentation Index
> Fetch the complete documentation index at: https://developer.fabric.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Transactions

> Gets transactions based on the limit (default: 20) and offset (default: 0) values. This endpoint serves to populate the transaction listing page and as a search function based on the query parameters such as date range, transaction ID, etc.



## OpenAPI

````yaml member get /v2/earn/get-transaction
openapi: 3.0.1
info:
  title: Loyalty (Member)
  description: >-
    fabric **Loyalty** formerly **Member** is a Loyalty Management System (LMS)
    that enables marketers to create multiple loyalty strategies under a loyalty
    program to cater to various businesses and customer segments. <br />
    **Member overview**: <br /> During onboarding, you are given the necessary
    **credentials** (client_id and client_secret) to obtain an access token,
    which is required to run every call. Membership hierarchy is organized into
    Programs, Clubs, and Tiers. <br /> **Program** is the first hierarchy level
    and is where rewards and benefits are configured for the organization. <br
    /> **Club** is the second hierarchy level and is where Rules for the program
    are configured. <br />Each Club must have at least one **Tier**, which is
    used to define membership and to configure criteria and thresholds
    (including free vs paid). Additional hierarchy levels can be added to
    support the needs of your business.  <br /> Members are always enrolled into
    a **Default Tier** within a club. When members make purchases, they earn
    Points based on the rules set at the club level and/or based on promotions.
    When points in a member account reach a predefined **Threshold Value**,
    points are converted to **Rewards**. This conversion may be manual or
    automatic depending on the program configuration. Members can **Redeem**
    their rewards within the reward **Expiry Period**. Account point balances
    are updated after each point-impacting activity.
  version: 1.0.0
  contact:
    email: support@fabric.inc
  license:
    name: fabric Inc
    url: https://fabric.inc
servers:
  - url: https://vanilla-dev02-loyalty.fabric.zone/api
    description: For developers to work outside of the production environment.
  - url: https://vanilla-stg-loyalty.fabric.zone/api
    description: Replica of the production environment for testing.
  - url: https://loyalty-sbx.fabric.zone/api
    description: >-
      An isolated testing environment (UAT) to run programs without affecting
      the application, system or platform on which they run.
  - url: https://loyalty.fabric.zone/api
    description: Production environment.
security:
  - bearerAuth: []
paths:
  /v2/earn/get-transaction:
    get:
      tags:
        - Earn
      summary: Get Transactions
      description: >-
        Gets transactions based on the limit (default: 20) and offset (default:
        0) values. This endpoint serves to populate the transaction listing page
        and as a search function based on the query parameters such as date
        range, transaction ID, etc.
      operationId: earn_get-transaction_list
      parameters:
        - name: profileId
          in: query
          description: >-
            Profile ID of the member. In an ecosystem, it acts as a primary ID
            to keep the various systems (apps, websites, etc.) in sync.
            `profileId` is generated as part of the `Enroll Member` endpoint -
            POST /members.
          example: 67460e74-02e3-11e8-b443-00163e990bd2
          schema:
            type: string
        - name: startTimestampUTC
          in: query
          description: Start date of the selected date range (UTC format)
          example: '2020-03-20T01:30:08.180856'
          schema:
            type: string
            format: date-time
        - name: endTimestampUTC
          in: query
          description: End date of the selected date range (UTC format)
          example: '2020-03-20T01:30:08.180856'
          schema:
            type: string
            format: date-time
        - name: transactionExternalReference
          in: query
          description: >-
            External reference (name or ID) of the transaction like POS Order Id
            or Ecommerce Order Id.
          example: 2883-7273-61186
          schema:
            type: string
        - name: transactionType
          in: query
          description: >-
            Refers to the different type of transaction activities on a member
            account such as `Earn Transaction`, `Burn Transaction`, `Earn
            Reverse Transaction` and so on
          example: EARN
          schema:
            type: string
            enum:
              - EARN
              - BURN
              - EXPIRY
              - EARN_REVERSE
              - BURN_REVERSE
              - ADJUSTMENT
              - DEDUCT
              - TRANSFER
              - MERGE
              - FORFEITED
              - CONVERT
              - UNMERGE
        - name: transactionCode
          in: query
          description: Transaction Code
          example: 62660e74-02e3-11e8-b443-00163e990abc
          schema:
            type: string
            format: uuid
        - name: offset
          in: query
          description: >-
            Indicates the starting record number (within the total number of
            records) in the response. When no value is provided, the default
            value is 0.
          schema:
            type: integer
        - name: limit
          in: query
          description: >-
            Indicates the final record number (from the offset number) in the
            response. When no value is provided, the default value is 20.
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponseClass1'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponseClass2'
components:
  schemas:
    TransactionsResponse:
      type: object
      description: Details of member transactions
      properties:
        status:
          title: Status
          type: integer
          description: Status code of the call
          example: 200
          format: int32
        message:
          title: Message
          minLength: 1
          type: string
          description: Message corresponding to the call
          example: ''
        errors:
          title: Errors
          type: object
          properties: {}
          description: Dictionary of lists with different number of errors or exceptions
          example: {}
        data:
          type: array
          items:
            $ref: '#/components/schemas/TransactionResponseData'
    GenericResponseClass1:
      type: object
      description: Bad request
      properties:
        message:
          title: Message
          minLength: 1
          type: string
          description: Message corresponding to the call.
          example: Error message string
        errors:
          title: Errors
          type: object
          properties: {}
          description: A dictionary of lists with different number of errors or exceptions.
          example:
            ExceptionString:
              - Invalid Field
        data:
          title: Data
          type: object
          properties: {}
          description: Returns data in the form of a list of dictionaries or null
          example: null
        status:
          title: Status
          type: integer
          description: Status code of the call
          example: 400
          format: int32
    GenericResponseClass2:
      type: object
      description: Unauthorized
      properties:
        detail:
          title: Detail
          type: string
          description: Message corresponding to the response
          example: Authentication Failed
    TransactionResponseData:
      type: object
      description: Details of each transaction
      properties:
        profileId:
          title: Profile ID
          type: string
          description: >-
            Profile ID of the member. In an ecosystem, it acts as a primary ID
            to keep the various systems (apps, websites, etc.) in sync.
          example: 67460e74-02e3-11e8-b443-00163e990bdb
          format: uuid
        transactionExternalReference:
          title: Transactionexternalreference
          type: string
          description: >-
            Order ID or receipt ID for a transaction (received from the store).
            This is needed to cancel or return an order.
          example: LOYALTY-8675309
        transactionEntityReference:
          title: Transactionentityreference
          minLength: 1
          type: string
          description: Transaction entity reference
          example: Liberty_center_store
        transactionCode:
          title: Transactioncode
          type: string
          description: Transaction Code of the transaction.
          example: 62660e74-02e3-11e8-b443-00163e990abc
          format: uuid
        transactionTypeExternalReference:
          title: Transactiontypeexternalreference
          type: string
          description: >-
            External reference for the transaction type such as purchase,
            return, or exchange. Supports any string value as configured by the
            store.
          example: PURCHASE
        transactionType:
          title: Transactiontype
          type: string
          description: >-
            Refers to the different types of transaction activities on a member
            account such as `Earn Transaction`, `Burn Transaction`, `Earn
            Reverse Transaction` and so on
          example: EARN
          enum:
            - EARN
            - BURN
            - EXPIRY
            - EARN_REVERSE
            - BURN_REVERSE
            - ADJUSTMENT
            - DEDUCT
            - TRANSFER
            - MERGE
            - FORFEITED
            - CONVERT
            - UNMERGE
        transactionActivityType:
          title: Transactionactivitytype
          type: string
          description: Configurable alias for the `transactionType`
          example: BASE_POINTS_EARNED
        transactionDateTime:
          title: Transactiondatetime
          type: string
          description: Transaction time (UTC format)
          example: '2020-03-20T14:28:23.382748'
          format: date-time
        totalAmountPaid:
          title: Totalamountpaid
          type: number
          format: float
          description: Total amound paid for transaction
          example: 180
        totalTax:
          title: Totaltax
          type: number
          format: float
          description: Total tax on transaction
          example: 20
        discounts:
          type: array
          items:
            $ref: '#/components/schemas/TransactionDiscount'
        discountValue:
          title: Discountvalue
          type: number
          format: float
          description: Discount amount on the transaction
          example: 20
        transactionNetAmount:
          title: Transactionnetamount
          type: number
          format: float
          description: Net amount for transaction, after discounts
          example: 160
        points:
          title: Points
          type: number
          format: integer
          description: Points earned in the transaction
          example: 160
        currentPointsBalance:
          title: Currentpointsbalance
          type: number
          format: integer
          description: Total points balance after the transaction
          example: 360
        basePoints:
          title: Basepoints
          type: number
          format: integer
          description: Base points balance after the transaction
          example: 260
        bonusPoints:
          title: Bonuspoints
          type: number
          format: integer
          description: Bonus points balance after the transaction
          example: 100
        promotionalPoints:
          title: Promotionalpoints
          type: number
          format: integer
          description: Promotional points balance after the transaction
          example: 0
        transactionItems:
          type: array
          items:
            $ref: '#/components/schemas/TransactionItemsSerializerEarn'
        activityTimestamp:
          title: Activitytimestamp
          type: string
          description: >-
            Activity timestamp (in UTC format). An activity could be enrolling a
            member, making a transaction, etc.
          example: '2020-02-08 09:30:26'
          format: date-time
        transactionNumber:
          title: Transactionnumber
          type: string
          description: >-
            Transaction number. It is same as the transactionExternalReference
            and indicates a unique order ID or receipt ID.
          example: LOYALTY-8675309
        reasonCode:
          title: Reasoncode
          type: string
          description: Reason-code for transaction, if provided
          example: '9393'
        reasonDescription:
          title: Reasondescription
          type: string
          description: Transaction reason, if provided
          example: earning item
        deviceId:
          title: Deviceid
          type: string
          description: Device ID used to capture the transaction
          example: D10626
        issueAuditUser:
          title: Issueaudituser
          type: string
          description: Representative who issued the transaction.
          example: Joe
          nullable: true
        cancelAuditUser:
          title: Cancelaudituser
          type: string
          description: Representative who cancelled the transaction.
          example: John
          nullable: true
        rewards:
          type: array
          description: Represents the variable rewards details
          items:
            $ref: '#/components/schemas/Reward'
    TransactionDiscount:
      type: object
      description: Discount details
      properties:
        id:
          title: Id
          type: integer
          description: Discount rule ID
          example: 101
          format: int32
        value:
          title: Value
          type: number
          format: float
          description: Discount amount applied on the transaction.
          example: 20
        type:
          title: Type
          minLength: 1
          type: string
          description: Type of discount availed.
          example: tier
    TransactionItemsSerializerEarn:
      required:
        - SKU
        - grossAmount
        - itemPrice
        - itemQuantity
        - lineNumber
        - netAmount
        - taxAmount
        - totalAmountPaid
      type: object
      description: Transaction details
      properties:
        grossAmount:
          title: Grossamount
          type: number
          format: float
          description: Gross amount of the item, before discount application
          example: 200
        totalAmountPaid:
          title: Totalamountpaid
          type: number
          format: float
          description: Amount paid for the item, including tax
          example: 200
        taxAmount:
          title: Taxamount
          type: number
          format: float
          description: Tax on the item
          example: 20
        netAmount:
          title: Netamount
          description: >-
            Total amount of the item without tax, and after item-discount
            application
          example: 180
          type: number
          format: float
        itemName:
          title: Itemname
          minLength: 1
          type: string
          description: Item name
          example: demo item
        itemPrice:
          title: Itemprice
          type: integer
          description: Item price
          example: 90
          format: int32
        itemQuantity:
          title: Itemquantity
          type: integer
          description: Item quantity
          example: 2
          format: int32
        SKU:
          title: Sku
          maxLength: 100
          minLength: 1
          type: string
          description: Stock Keeping Unit (SKU), a unique identifier of the item.
          example: '1123455'
        UOM:
          title: Uom
          minLength: 1
          type: string
          description: Unit of Measurement (UOM)
          example: unit
        lineNumber:
          title: Linenumber
          type: integer
          description: Line number of the item in the purchase order (PO)
          example: 0
          format: int32
        discounts:
          type: array
          description: Discounts detail of the item
          items:
            $ref: '#/components/schemas/earn-discount'
        couponCodes:
          type: array
          items:
            minLength: 1
            type: string
            description: Coupon Codes
            example: H4B-1000
    Reward:
      type: object
      description: Reward details
      properties:
        reward_id:
          title: Reward ID
          type: integer
          description: >-
            Variable reward IDs (also referred to as reward certificate).
            **Note**:Multiple rewards can be used a transaction.
          example: 111
          format: int32
        core_rule_id:
          title: Core rule ID
          type: integer
          description: ID of the core rule based on which the rewards are generated.
          example: 2
          format: int32
        reward_portion:
          title: Reward portion
          type: number
          format: float
          description: Total reward amount.
          example: 10
    earn-discount:
      required:
        - id
        - value
      type: object
      description: Discount details
      properties:
        type:
          title: type
          maxLength: 50
          minLength: 1
          type: string
          description: Type of discount (configurable)
          example: promotion
        description:
          title: Description
          type: string
          description: Description of the discount
          example: Black Friday discount
        id:
          title: Id
          type: integer
          description: Discount ID
          example: 2345
          format: int32
        value:
          title: Value
          type: integer
          description: Discount amount
          example: 0
          format: int32
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````