POST
/
v2
/
earn
curl --request POST \
  --url https://vanilla-dev02-loyalty.fabric.zone/api/v2/earn \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "profileId": "67460e74-02e3-11e8-b443-00163e990bdb",
  "entityReference": "Company LIBERTY CENTER",
  "transactionTypeExternalReference": "Supplements",
  "activityTimestamp": "2020-02-08 09:30:26",
  "transactionExternalReference": "123321abc",
  "transactionGrossAmount": 200,
  "checkForDuplicateTransaction": 1,
  "fetchUpdatedMemberPointTotals": 0,
  "totalAmountPaid": 180,
  "discountValue": 20,
  "totalTax": 20,
  "netAmount": 160,
  "issueAuditUser": "Joe",
  "cancelAuditUser": "John",
  "redemptionCode": [
    "67460e74-02e3-11e8-b443-00163e990bdb"
  ],
  "reasonCode": "9393",
  "reasonDescription": "earning item",
  "discounts": [
    {
      "type": "promotion",
      "description": "Black Friday discount",
      "value": 20,
      "id": 23
    }
  ],
  "transactionItems": [
    {
      "grossAmount": 200,
      "totalAmountPaid": 200,
      "taxAmount": 20,
      "netAmount": 180,
      "itemName": "demo item",
      "itemPrice": 90,
      "itemQuantity": 2,
      "SKU": "1123455",
      "UOM": "unit",
      "lineNumber": 0,
      "discounts": [
        {
          "type": "promotion",
          "description": "Black Friday discount",
          "id": 2345,
          "value": 0
        }
      ],
      "couponCodes": [
        "H4B-1000"
      ]
    }
  ],
  "setToPending": false
}'
{
  "status": 201,
  "message": "earned",
  "errors": {},
  "data": {
    "transactionCode": "78660e74-02e3-11e8-b443-00163e911bd2",
    "profileId": "67460e74-02e3-11e8-b443-00163e990bdb",
    "transactionNumber": "LOYALTY-54321",
    "transactionDateTime": "2020-03-20T14:28:23.382748",
    "activityTimestamp": "2020-03-20T14:28:23.382748",
    "totalAmountPaid": 180,
    "totalTax": 20,
    "transactionNetAmount": 160,
    "points": 16,
    "basePoints": 16,
    "bonusPoints": 0,
    "promotionalPoints": 0,
    "currentPointsBalance": 26,
    "reasonCode": "9393",
    "reasonDescription": "earning item",
    "discounts": [
      {
        "type": "promotion",
        "description": "Black Friday discount",
        "id": 2345,
        "value": 20
      }
    ],
    "discountValue": 20,
    "transactionItems": [
      {
        "grossAmount": 200,
        "totalAmountPaid": 200,
        "taxAmount": 20,
        "netAmount": 180,
        "itemName": "demo item",
        "itemPrice": 90,
        "itemQuantity": 2,
        "SKU": "1123455",
        "UOM": "unit",
        "lineNumber": 0,
        "discounts": [
          {
            "type": "promotion",
            "description": "Black Friday discount",
            "id": 2345,
            "value": 0
          }
        ],
        "couponCodes": [
          "H4B-1000"
        ]
      }
    ],
    "rewards": [
      {
        "reward_id": 111,
        "core_rule_id": 2,
        "reward_portion": 10
      }
    ],
    "issueAuditUser": "Joe",
    "cancelAuditUser": "John",
    "deviceId": "D10626",
    "transactionType": "EARN",
    "transactionActivityType": "BASE_POINTS_EARNED",
    "transactionTypeExternalReference": "PURCHASE",
    "transactionExternalReference": "SHOP-7654321",
    "transactionEntityReference": "Liberty_center_store"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Details required to earn points

Response

200
application/json
OK

Metadata for the Earn points response