---
title: "Link/Delink Card"
method: POST
path: "/customers/{userId}/changeIdentifier"
---

# Link/Delink Card

`POST /customers/{userId}/changeIdentifier`

Lets you issue card to a loyalty customer or delink a card of a customer.

* To issue an external or manually generated card, you need to first add the card using `/v2/card` API. 
* To issue auto-generated card, you first need to issue the card using the `card/generate` API.

## Path parameters

- `userId` integer, required

## Query parameters

- `source` 'INSTORE' | 'FACEBOOK' | 'WEB_ENGAGE' | 'WECHAT' | 'MARTJACK' | 'TMALL' | 'TAOBAO' | 'JD' | 'ECOMMERCE' | 'WEBSITE' | 'LINE' | 'MOBILE_APP', required
- `accountId` string

## Request body

- object
  - `add` object — Details of card to link to the customer.
    - `type` 'cardnumber', required — Type of the card identifier used.
    - `value` string, required — Card number to link.
    - `statusLabel` 'ACTIVE' | 'NOT_ISSUED', required — New status of the card. Pass ACTIVE.
  - `remove` object — Card details to delink.
    - `type` 'cardnumber', required — Type of the card identifier used.
    - `value` string, required — Card number to remove.
    - `statusLabel` 'ACTIVE' | 'NOT_ISSUED', required — New status of the card. Pass `NOT_ISSUED` to delink.

## Response `200`

200

- object
  - `createdId` integer
  - `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/versions/de241f2ed9b3/schema)
