---
title: "Create Entitlement Coupons by Identity or WalletId"
method: POST
path: "/services/wallet/campaign/accounts/related"
tags: ["Services"]
---

# Create Entitlement Coupons by Identity or WalletId

`POST /services/wallet/campaign/accounts/related`

## Request

- Base URL: `https://wallet.uk.eagleeye.com/2.0`
- URL: `https://wallet.uk.eagleeye.com/2.0/services/wallet/campaign/accounts/related`
- Auth: API key in header `X-EES-AUTH-CLIENT-ID` and API key in header `X-EES-AUTH-HASH`

This API method allows the calling application to create one or many Entitlement Account (of type COUPON) and link it to existing Subscription Account by identity value or wallet id.  Either identity-value or walletId must be provided in query parameters. This API is considered a bulk action API so the user should consider  performance implications of calling this API.

## Query parameters

- `identity-value` string, string
- `walletId` string, string

## Request body

- WalletRelatedAccountCreationPayloadOptionalCampaignReference[]
  - `status` 'ACTIVE' | 'BLOCKED' | 'CANCELLED' | 'DELETED' | 'EXPIRED' | 'INACTIVE' | 'INVALIDATED' | 'LOCKED' | 'STOLEN' | 'USED' | 'SUSPENDED': Account Status
  - `state` string: Account state
  - `currency` string
  - `dates` DatesEntity
    - `start` string
    - `end` string
  - `meta` MetaEntity
    - `key1` string: Meta 1 property, up to 255 characters; up to 255 characters for Key 1 Value
    - `key2` string: Meta 2 property, up to 255 characters; up to 255 characters for Key 2 Value
  - `details` DetailsEntity
    - `key1` string: Details 1 property, up to 255 characters; up to 255 characters for Key 1 Value
    - `reasonDescription` string: Reason Code description
  - `location` LocationEntity
    - `storeId` string, string: Identifier of the store where this transaction has happened (Outlet Incoming Identifier).
    - `storeParentId` string, string: Identifier of the parent store where this transaction has happened (Outlet Parent Incoming Identifier). This can be used when the parent of the store is a child of the caller Unit.
  - `balances` AccountBalancesCreateEntity: The object of balances. Some balances only apply to certain types of accounts. See notes below on balances.
    - `available` integer: The available balance. This is applicable for all account types, except STAMP, POINTS and CONTINUITY, which uses its own balance keys, and ECOUPON, which has no concept of a balance.
    - `totalSpend` integer: The total spend balance. Applicable only to accounts of type Continuity. If totalSpend is not provided on creation, this will be set to 0.
    - `transactionCount` integer: The transaction counter. Applicable only to accounts of type Continuity. If transactionCount is not provided on creation, this will be set to 0.
    - `current` integer: The current balance. Applicable only to accounts of type Points and Stamp. If current is not provided on creation, this will be set to 0.
    - `usable` integer: The usable balance. Applicable only to accounts of type Points. If usable is not provided on creation, this will be set to 0.
    - `locked` integer: The locked balance. Applicable only to accounts of type Points. If locked is not provided on creation, this will be set to 0.
    - `lifetime` integer: The lifetime balance. Applicable only to accounts of type Points and Stamp. If lifetime is not provided on creation, this will be set to 0.
    - `objectivesMet` integer: The number of completed objectives. Applicable to only accounts of type QUEST.
  - `overrides` AccountOverridesEntity: The object of overrides. A campaign must allow overrides.
    - `continuity` object: Overrides affecting the offer
      - `qualification` object: Continuity qualification area of the offer
        - `totalTransactionUnits` integer: The number of units that are needed in the transaction to qualify for the reward.
        - `totalTransactionSpend` integer: The transaction spend amount needed to qualify for the reward
        - `totalTransactionCount` integer: The number of transactions needed to qualify for the reward
    - `offer` object: Overrides affecting the offer
      - `qualification` object: Qualification area of the offer
        - `minimumProductSpend` integer, nullable: The minimum amount that must be spent.
        - `minimumUnits` integer, nullable: The minimum number of units that must be in the basket to qualify.
        - `minimumBasketSpend` integer, nullable: The minimum amount that must be spent in the basket.
      - `reward` object: Reward area of the offer
        - `creditAmount` integer: The amount of points this account should earn when redeemed
        - `step` integer: The value of the interval when the discount amount should be stepped up.
        - `floor` integer: The interval value where the credit amount should start increasing from.
        - `ceiling` integer, nullable: The interval value where the credit amount should stop increasing.
        - `multiplierValue` integer: The multiplication value to apply to the base issuance of points that would normally be awarded for the transaction.
    - `campaign` object: Overrides affecting the offer
      - `rules` object: The campaigns rules
        - `couponLimit` integer: The amount of times a coupon can be redeemed, 0 is unlimited, 1 is default. If this is not set it will revert to what the campaigns couponLimit is set to
    - `reward` object: Overrides affecting the reward
      - `discountAmount` integer: The discount amount to apply to the basket total.
      - `finalAmount` integer: The final amount to set the basket total to.
      - `percentageAmount` number: A percentage amount to be discounted. This must be an integer unless `allowDecimal` is enabled in the Unit.
      - `discountValue` integer: The discount value to increase with every interval.

## Response `201`

The request was successful and a number of related accounts created

- MultiStatus207AccountEntity: EES AIR was able to process partially this Request, due to some errors.
  - `successful` object: Successfully process accounts
    - `total` integer, required: Successfully processed Entities count
    - `results` WalletAccountEntity[], required
      - `accountId` string, required: EES AIR Wallet Account ID
      - `walletId` string, required: EES AIR Wallet ID
      - `campaignId` string, required: The Campaign ID this account belongs to.
      - `type` 'ECOUPON' | 'VOUCHER' | 'STAMP_CARD' | 'PAPER' | 'DEBIT' | 'PLASTIC' | 'POINTS' | 'CONTINUITY' | 'STANDARD_SUBSCRIPTION' | 'QUEST', required: EES AIR Account Type.
      - `clientType` string, required: Account client type.
      - `status` 'ACTIVE' | 'BLOCKED' | 'CANCELLED' | 'DELETED' | 'EXPIRED' | 'INACTIVE' | 'INVALIDATED' | 'LOCKED' | 'STOLEN' | 'USED' | 'SUSPENDED', required: Account Status
      - `state` string, required: Account state, managed per retailer base, list of possible enum values could be set-up as part of the Onboarding process.
      - `dates` DatesEntity, required
        - `start` string
        - `end` string
      - `meta` MetaEntity
        - `key1` string: Meta 1 property, up to 255 characters; up to 255 characters for Key 1 Value
        - `key2` string: Meta 2 property, up to 255 characters; up to 255 characters for Key 2 Value
      - `balances` AccountBalancesEntity, required: The object of balances. Some balances only apply to certain types of accounts. See notes below on balances.
        - `available` integer: The available balance. This is applicable for all account types, except POINTS and CONTINUITY, which uses its own balance keys. For ECOUPON account type this property will be returned and will be equal to zero.
        - `refundable` integer: The refundable balance. This is applicable for all account types except POINTS and CONTINUITY, but is not used during account creation. For an Account Entity, the amount displayed here is the total refundable balance available. Please note for ECOUPON account type this property will be returned and equal to zero.
        - `totalSpend` integer: The total spend balance. Applicable only to CONTINUITY type Accounts. If totalSpend is not provided on creation, this will be set to 0.
        - `totalUnits` integer: The total units balance. Applicable only to CONTINUITY type Accounts. If totalUnits is not provided on creation, this will be set to 0.
        - `transactionCount` integer: The transaction counter. Applicable only to CONTINUITY type Accounts. If transactionCount is not provided on creation, this will be set to 0.
        - `current` integer: The current balance. Applicable only to accounts of type POINTS and STAMP. If not provided on creation, this will be set to 0.
        - `usable` integer: The usable balance. Applicable only to accounts of type POINTS. If not provided on creation, this will be set to 0.
        - `locked` integer: The locked balance. Applicable only to accounts of type POINTS. If not provided on creation, this will be set to 0.
        - `lifetime` integer: The lifetime balance. Applicable only to accounts of type POINTS and STAMP. If not provided on creation, this will be set to 0.
        - `objectivesMet` integer: The number of completed objectives. Applicable to only accounts of type QUEST.
      - `relationships` object: Wallet Accounts Relations
        - `ENTITLEMENT` object
          - `accountType` object[]
            - `accountId` string, int64, required: Account ID
            - `dateCreated` string, required: Relation creation date-time
        - `ENTITLEMENT_OF` object
          - `accountType` object[]
            - `accountId` string, int64, required: Account ID
            - `dateCreated` string, required: Relation creation date-time
        - `OBJECTIVE` object
          - `accountType` object[]
            - `accountId` string, int64, required: Account ID
            - `dateCreated` string, required: Relation creation date-time
        - `OBJECTIVE_OF` object
          - `accountType` object[]
            - `accountId` string, int64, required: Account ID
            - `dateCreated` string, required: Relation creation date-time
        - `PROMOTION` object
          - `accountType` object[]
            - `accountId` string, int64, required: Account ID
            - `dateCreated` string, required: Relation creation date-time
        - `PROMOTION_OF` object
          - `accountType` object[]
            - `accountId` string, int64, required: Account ID
            - `dateCreated` string, required: Relation creation date-time
        - `BOUNCE_BACK_REWARD` object
          - `accountType` object[]
            - `accountId` string, int64, required: Account ID
            - `dateCreated` string, required: Relation creation date-time
        - `BOUNCE_BACK_REWARD_OF` object
          - `accountType` object[]
            - `accountId` string, int64, required: Account ID
            - `dateCreated` string, required: Relation creation date-time
        - `COUPON_STAMP_REWARD` object
          - `accountType` object[]
            - `accountId` string, int64, required: Account ID
            - `dateCreated` string, required: Relation creation date-time
        - `COUPON_STAMP_REWARD_OF` object
          - `accountType` object[]
            - `accountId` string, int64, required: Account ID
            - `dateCreated` string, required: Relation creation date-time
        - `LOYALTY_POINTS_REWARD_OF` object
          - `accountType` object[]
            - `accountId` string, int64, required: Account ID
            - `dateCreated` string, required: Relation creation date-time
      - `overrides` AccountOverridesEntity: The object of overrides. A campaign must allow overrides.
        - `continuity` object: Overrides affecting the offer
          - `qualification` object: Continuity qualification area of the offer
            - `totalTransactionUnits` integer: The number of units that are needed in the transaction to qualify for the reward.
            - `totalTransactionSpend` integer: The transaction spend amount needed to qualify for the reward
            - `totalTransactionCount` integer: The number of transactions needed to qualify for the reward
        - `offer` object: Overrides affecting the offer
          - `qualification` object: Qualification area of the offer
            - `minimumProductSpend` integer, nullable: The minimum amount that must be spent.
            - `minimumUnits` integer, nullable: The minimum number of units that must be in the basket to qualify.
            - `minimumBasketSpend` integer, nullable: The minimum amount that must be spent in the basket.
          - `reward` object: Reward area of the offer
            - `creditAmount` integer: The amount of points this account should earn when redeemed
            - `step` integer: The value of the interval when the discount amount should be stepped up.
            - `floor` integer: The interval value where the credit amount should start increasing from.
            - `ceiling` integer, nullable: The interval value where the credit amount should stop increasing.
            - `multiplierValue` integer: The multiplication value to apply to the base issuance of points that would normally be awarded for the transaction.
        - `campaign` object: Overrides affecting the offer
          - `rules` object: The campaigns rules
            - `couponLimit` integer: The amount of times a coupon can be redeemed, 0 is unlimited, 1 is default. If this is not set it will revert to what the campaigns couponLimit is set to
        - `reward` object: Overrides affecting the reward
          - `discountAmount` integer: The discount amount to apply to the basket total.
          - `finalAmount` integer: The final amount to set the basket total to.
          - `percentageAmount` number: A percentage amount to be discounted. This must be an integer unless `allowDecimal` is enabled in the Unit.
          - `discountValue` integer: The discount value to increase with every interval.
      - `dateCreated` string, required: Date this Account was created
      - `lastUpdated` string, required: Date this Account was last updated
      - `mobileWallet` string, required: The URL that returns a digital platform wallet.
  - `failed` object: List of failures
    - `total` integer: Failures item count
    - `results` DefaultErrorEntity[]
      - `errorCode` 'AA' | 'AF' | 'ALR' | 'AALR' | 'AT' | 'CE' | 'CI' | 'CLPPR' | 'CILR' | 'CORQ' | 'CP' | 'CR' | 'CTNR' | 'CU' | 'CX' | 'DSN' | 'ELE' | 'FES' | 'IFU' | 'IH' | 'ILA' | 'IOC' | 'IP' | 'IPR' | 'IR' | 'ITID' | 'IW' | 'LIR' | 'LNA' | 'LPR' | 'MAC' | 'MAR' | 'MLV' | 'MNA' | 'MPA' | 'MTLE' | 'NF' | 'OC' | 'P' | 'RF' | 'RFL' | 'RW' | 'RWI' | 'TBR' | 'TBS' | 'TEXP' | 'TULR' | 'U' | 'UAS' | 'UV' | 'VA' | 'VC' | 'VI' | 'VL' | 'VNL' | 'VPUF' | 'VSM' | 'VU' | 'VUA' | 'VURC' | 'VURI' | 'VXP' | 'WLNF' | 'WTF' | 'WTNF', required: Internal Error Code
      - `errorMessage` string, required: Human Friendly Error Message
  - `results` object
    - `total` integer: Combined `successful` and `failed` sections with operation order preserved
    - `results` object[]

## Other responses

- `207`: Multi-Status meaning not all the accounts could be created, there will be elements in the "failed" part of the response object
- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `415`: Unsupported Media Type
- `423`: Locked
- `429`: Too Many Requests
- `500`: Server Error

## Changes

- **2026-11-03** `7bc73e06813c`: 28 breaking, 82 warning, 68 info
  - removed `#/components/schemas/couponAccountOverridesEntity, #/components/schemas/continuityAccountOverridesEntity` from the `items/allOf[#/components/schemas/walletCouponAccountCreationPayloadOptionalCampaignReference]/allOf[#/components/schemas/walletCouponAccountCreationPayload]/allOf[#/components/schemas/walletAccountBaseCreationPayload]/overrides` request property `oneOf` list
  - added the pattern `/\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/` to the request property `items/allOf[#/components/schemas/walletCouponAccountCreationPayloadOptionalCampaignReference]/allOf[#/components/schemas/walletCouponAccountCreationPayload]/allOf[#/components/schemas/walletAccountBaseCreationPayload]/dates/end`
  - added the pattern `/\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/` to the request property `items/allOf[#/components/schemas/walletCouponAccountCreationPayloadOptionalCampaignReference]/allOf[#/components/schemas/walletCouponAccountCreationPayload]/allOf[#/components/schemas/walletAccountBaseCreationPayload]/dates/start`
  - the `items/allOf[#/components/schemas/walletCouponAccountCreationPayloadOptionalCampaignReference]/allOf[#/components/schemas/walletCouponAccountCreationPayload]/allOf[#/components/schemas/walletAccountBaseCreationPayload]/overrides` request property type changed from no type to `object`
  - …174 more
  - …this revision’s changelog is incomplete

[Operation history](https://skmtc.dev/eagleeye/apis/wallet-api/changes/services/wallet/campaign/accounts/related/post.md)

---

[API](https://skmtc.dev/eagleeye/apis/wallet-api.md) - [All operations](https://skmtc.dev/eagleeye/apis/wallet-api/llms.txt) - [OpenAPI document](https://skmtc.dev/eagleeye/apis/wallet-api/revisions/7bc73e06813c?raw)
