---
title: "Earn Cart Promotion"
method: POST
path: "/api_gateway/v1/promotions/{promotionId}/earn"
---

# Earn Cart Promotion

`POST /api_gateway/v1/promotions/{promotionId}/earn`

Description :With this API , we can get the details of all the cart promotions earned by a particular customer.

## Path parameters

- `promotionId` string, required

## Request body

- object
  - `id` string — Unique id assigned to the earn event
  - `customerId` string — Unique id assigned to the customer
  - `promotionId` string — Unique id assigned to the promotion
  - `earnedFromType` string — Type of customer activity for which promotion is earned . Enums: ACTIVITY,MILESTONE, REWARD
  - `earnedFromId` string — earn event id
  - `eventTime` string, date-time — The time stamp
  - `validTill` string, date — Validity of the earn

## Response `200`

200

- object
  - `data` object
    - `id` string
    - `customerId` integer
    - `promotionId` string
    - `earnedFromType` string
    - `earnedFromId` string
    - `eventTime` integer
    - `eventDetails` object
      - `id` string
      - `type` string
      - `eventPayload` object
        - `additionalProp1` object
        - `additionalProp2` object
        - `additionalProp3` object
    - `validTill` integer
    - `errorDetails` object
      - `errorCode` integer
      - `errorMessages` string
  - `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)
