---
title: "Purchase a points product"
method: POST
path: "/points_products/{id}/purchase"
tags: ["Points Products"]
---

# Purchase a points product

`POST /points_products/{id}/purchase`

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

## Path parameters

- `id` integer, required — ID of the points product to purchase.

## Request body

- object
  - `customer_id` integer, required — ID of the customer who is purchasing the points product.
  - `points_to_spend` integer — 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.

## Response `201`

The points product was successfully purchased.

- object
  - `points_purchase` PointsPurchase
    - `id` integer — Unique identifier for the points purchase.
    - `customer_id` integer — The ID of the customer who performed the points purchase.
    - `points_product_id` integer — The ID of the points product that was purchased.
    - `points_spent` integer — The total points spent by the customer.
    - `reward_fulfillment` RewardFulfillment
      - `id` integer — Unique identifier for the reward fulfillment.
      - `name` string — The name of the reward fulfillment.
      - `code` string — A unique code for the customer to use or apply the reward fulfillment. This is commonly a discount code the customer applies at checkout on their next order, but it can be a unique code they use for other purposes like accessing an exclusive page on the merchant's website.
      - `customer_id` integer — The ID of the customer that the reward fulfillment belongs to.
      - `fulfillment_status` 'pending' | 'issued' | 'cancelled' | 'failed' — The fulfillment status of the reward fulfillment, indicating whether the reward is available to the customer.
      - `image_url` string — An image for the reward fulfillment.
      - `action_text` string, nullable — A short call-to-action style text, appropriate for use in buttons or links, guiding the customer on how to use the reward fulfillment. This field may be blank
      - `action_url` string, nullable — A URL destination guiding the customer on how to use the reward, often paired with the `action_text` for use in buttons or links. This field may be blank.
      - `usage_instructions` string, nullable — A description of how the customer can use or apply the reward fulfillment.
      - `terms_and_conditions` string, nullable — A description of the reward fulfillment's limitations or restrictions. When the reward is a discount code, this commonly includes expiry date, minimum order amounts, or applicability to specific product collections.
      - `expires_at` string, date-time, nullable — The date and time when the reward fulfillment expires. When the reward is a discount code, this refers to the expiry date of the discount, and a `null` value indicates that the discount code does not expire.
      - `usage_status` 'used' | 'unused' | 'untracked' — The usage status of the reward fulfillment, indicating whether the generated reward has been used by the customer.
      - `used_at` string, date-time, nullable — The date and time when the reward fulfillment was used by the customer. If the reward fulfillments does not support usage tracking, this field may be `null` even after the reward fulfillment has been used.
      - `created_at` string, date-time — The date and time when the reward fulfillment was created.
      - `updated_at` string, date-time — The date and time when the reward fulfillment was last updated.
    - `created_at` string, date-time — The date and time when the points purchase was created.
    - `updated_at` string, date-time — The date and time when the points purchase was last updated.

---

[API](https://skmtc.dev/smile/apis/smile-io-rest-api.md) · [All operations](https://skmtc.dev/smile/apis/smile-io-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/smile/smile-io-rest-api/revisions/081bc804c5df/schema)
