**Version: 202607**

# Earn points

**POST** `/openapi/2026-07/loyalty/members/points/earn`

Add points to one or more members

## Request

**application/json**

**Body | Example**

**Body (required)**

- `operate_type` string (required)

  Member locator type: member\_id or email
- `operate_values` string[] (required)

  Locator values to credit. Up to 200 per request
- `points` int64 (required)

  Points to add. Must be positive
- `reason` string

  Business reason stored with the points change record
- `idempotency_key` string

  Batch-level idempotency key. Same key within one hour replays the first response
- `point_expired_setting` object

  Points expiration override. When omitted, store global setting applies

  - `is_expired` boolean

    Whether points expire
  - `expired_method` string

    Expiry method: after\_x\_months / on\_specific\_date / ...
  - `day` int32

    Day component of the expiry rule
  - `month` int32

    Month component of the expiry rule
  - `protect_enabled` boolean

    Whether expiry protection is enabled
  - `protect_days` int32

    Protection days
  - `use_global_config` boolean

    Whether to use the store global config
- `send_email` boolean

  Whether to send a points-change notification email to the member

```json
{
  "operate_type": "string",
  "operate_values": [
    "string"
  ],
  "points": 0,
  "reason": "string",
  "idempotency_key": "string",
  "point_expired_setting": {
    "is_expired": true,
    "expired_method": "string",
    "day": 0,
    "month": 0,
    "protect_enabled": true,
    "protect_days": 0,
    "use_global_config": true
  },
  "send_email": true
}
```

## Responses

**200**

OK

**application/json**

**Schema | Example**

**Schema**

- `code` string

  error code
- `message` string

  error message
- `data` object

  - `success_count` int32

    Number of successful items
  - `failed_count` int32

    Number of failed items
  - `results` object[]

    Points change results

    *   Array \[

    - `member_id` string

      Resolved member ID
    - `transaction_id` string

      Points transaction ID
    - `change_value` int64

      Change amount. Positive for earn
    - `occurred_at` string

      Effective time, ISO-8601
    - `expiration_at` int64

      Final effective expiration time of the points earned in this operation, Unix seconds (serialized as a protojson string). 0 means permanent
    *   \]
  - `failed_values` string[]

    Locator values that failed

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "success_count": 0,
    "failed_count": 0,
    "results": [
      {
        "member_id": "string",
        "transaction_id": "string",
        "change_value": 0,
        "occurred_at": "string",
        "expiration_at": 0
      }
    ],
    "failed_values": [
      "string"
    ]
  }
}
```
