v1

latestOpenAPI 3.1.02026-07-26141236.8 KB
Points Products

Purchase a points product

Exchanges a customer's points for a reward by purchasing a points product.

post/points_products/{id}/purchase

Path parameters

idinteger required

ID of the points product to purchase.

Example:132456921

ID of the points product to purchase.

Request body

customer_idinteger required

ID of the customer who is purchasing the points product.

points_to_spendinteger

The number of points that will be spent on behalf of the customer. Only applies when purchasing a points product whose exchange_type is variable, otherwise should be left blank.

Example request

{
  "customer_id": 304169228,
  "points_to_spend": 500
}

Response

The points product was successfully purchased.

Example response

{
  "points_purchase": {
    "id": 665523890,
    "customer_id": 304169228,
    "points_product_id": 132456921,
    "points_spent": 500,
    "reward_fulfillment": {
      "id": 625478984,
      "name": "$5 off coupon",
      "code": "5off-e26d02e39149",
      "customer_id": 304169228,
      "fulfillment_status": "issued",
      "image_url": "https://platform-images.smilecdn.co/9283449.png",
      "usage_instructions": "Use this discount code on your next order!",
      "terms_and_conditions": "Reward expires on June 7, 2025. Reward can only be used on purchase of $50 or more. Reward can only be used on select product collections.",
      "expires_at": "2025-06-07T23:59:59.999Z",
      "usage_status": "unused",
      "created_at": "2024-12-07T20:15:27.893Z",
      "updated_at": "2024-12-07T20:15:27.893Z"
    },
    "created_at": "2024-04-04T15:10:42.030Z",
    "updated_at": "2024-04-04T15:10:42.030Z"
  }
}