---
title: "Post Cart Promotions Code link API"
method: POST
path: "/api_gateway/v1/promotions/{code}/link"
---

# Post Cart Promotions Code link API

`POST /api_gateway/v1/promotions/{code}/link`

This API is used to link the code of the cart promotion earned by the customer to the customer id.

## Path parameters

- `code` string, required

## Request body

- object
  - `customerId` integer — Unique id assigned to the customer
  - `code` string — Code assigned to the promotion which can be used for redemption
  - `mode` string — The mode of promotion

## Response `200`

200

- object
  - `data` object
    - `id` string
    - `orgId` integer
    - `promotionId` string
    - `promotionName` string
    - `code` string
    - `customerId` integer
    - `active` boolean
    - `createdOn` integer
    - `validTill` integer
    - `mode` string
    - `apiError` object
      - `code` integer
      - `message` string
    - `redeemableFrom` integer
    - `restrictions` object
      - `additionalProp1` object[]
        - `kpi` string
        - `maxLimit` integer
        - `remainingRedemption` integer
        - `tempRedemption` integer
        - `periodStart` integer
        - `periodEnd` integer
      - `additionalProp2` object[]
        - `kpi` string
        - `maxLimit` integer
        - `remainingRedemption` integer
        - `tempRedemption` integer
        - `periodStart` integer
        - `periodEnd` integer
      - `additionalProp3` object[]
        - `kpi` string
        - `maxLimit` integer
        - `remainingRedemption` integer
        - `tempRedemption` integer
        - `periodStart` integer
        - `periodEnd` integer
  - `errors` object[]
    - `code` integer
    - `message` string

## 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)
