Skip to main content
POST
/
points_products
/
{id}
/
purchase
Purchase a points product
curl --request POST \
  --url https://api.smile.io/v1/points_products/{id}/purchase \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_id": 304169228,
  "points_to_spend": 500
}
'
{
  "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",
      "action_text": "<string>",
      "action_url": "<string>",
      "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",
      "used_at": "2023-11-07T05:31:56Z",
      "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"
  }
}
This endpoint requires the scope.

Authorizations

Authorization
string
header
required

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

Path Parameters

id
integer
required

ID of the points product to purchase.

Example:

132456921

Body

application/json
customer_id
integer
required

ID of the customer who is purchasing the points product.

Example:

304169228

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.

Example:

500

Response

201 - application/json

The points product was successfully purchased.

points_purchase
object