---
title: "POST /api/v4.0/integrations/coupons/automatic"
method: POST
path: "/api/v4.0/integrations/coupons/automatic"
---

# POST /api/v4.0/integrations/coupons/automatic

`POST /api/v4.0/integrations/coupons/automatic`

Apply predefined automatic coupons based on specific promotional criteria.

## Request body

- object
  - `customerId` string, required
  - `email` string
  - `mobile` string
  - `cartId` string, required
  - `totalPrice` number
  - `totalShipping` number
  - `lineItems` object[]
    - `productId` string
    - `quantity` number
    - `price` number
    - `sku` string
    - `tags` string[]
    - `category` string[]
    - `weight` number
    - `vendor` string
    - `collection` string[]
    - `title` string
    - `taxes` number
    - `discount` number
    - `extra` object
  - `merchant` object
    - `uniqueId` string
    - `name` string
    - `branch` object
      - `uniqueId` string, required
      - `name` string

## Response `200`

Automatic coupon applied successfully

- object
  - `isApplied` boolean
  - `couponName` string
  - `discountAmount` number
  - `discountType` 'shipping' | 'fixed' | 'percentage' | 'product' | 'buyXgetY'
  - `discountedItems` object[]
    - `productId` string
    - `quantity` number
    - `discount` number
    - `price` number

## Changes

- **2025-09-30** `788718651767` — 1 info
  - removed the non-success response with the status `400`
- **2025-09-10** `95e7f65e5afd` — 1 info
  - endpoint added
- **2025-09-02** `919eb7a392aa` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/gameballers/apis/gameball-api/changes/api/v4.0/integrations/coupons/automatic/post.md)

---

[API](https://skmtc.dev/gameballers/apis/gameball-api.md) · [All operations](https://skmtc.dev/gameballers/apis/gameball-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gameballers/gameball-api/revisions/747ba4697269/schema)
