---
title: "Get OTP"
method: GET
path: "/otp"
---

# Get OTP

`GET /otp`

Allows fetching recent OTP issued to a customer. For now, OTP is issued for redeeming points/coupons and customer registration. If there is more than one valid OTP available for the customer, this API fetches the recently issued OTP.

## Query parameters

- `identifierName` 'mobile' | 'email' | 'wechat' | 'externalId' | 'cardnumber' | 'cardExternalId', required
- `identifierValue` string, required
- `source` 'INSTORE' | 'WECHAT' | 'MARTJACK' | 'WEB_ENGAGE' | 'ECOMMERCE' | 'JD' | 'TAOBAO' | 'TMALL' | 'FACEBOOK' | 'WEBSITE' | 'OTHERS', required
- `accountId` string
- `threshold` integer
- `scope` 'COUPON' | 'POINTS' | 'REGISTRATION' | 'USERGROUP' | 'SUBSCRIPTION', required

## Response `200`

200

- object
  - `orgId` integer
  - `userId` integer
  - `code` string
  - `validUpto` string
  - `warnings` unknown[]
    - unknown

## Other responses

- `400` — 400

---

[API](https://skmtc.net/capillarytech/apis/sample-api.md) · [All operations](https://skmtc.net/capillarytech/apis/sample-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/capillarytech/sample-api/revisions/de241f2ed9b3/schema)
