---
updatedAt: 2026-05-27T07:59:52.000Z
agentTools:
  siteIndex: https://developer.eagleeye.com/llms.txt
  projectIndex: https://developer.eagleeye.com/eagleeye-developer/llms.txt
---

# Create

This method allows the calling application to create a new Token within AIR platform.

# OpenAPI definition

```json
{
  "x-explorer-enabled": false,
  "openapi": "3.0.3",
  "servers": [
    {
      "url": "https://consumer.uk.eagleeye.com/2.0",
      "description": "UK Production"
    }
  ],
  "info": {
    "title": "Token API",
    "description": "Token API - set of AIR API endpoints to issue, update, defer, cancel, verify and redeem Tokens within the AIR platform",
    "version": "2.4.0"
  },
  "tags": [
    {
      "name": "Token",
      "description": "Set of API endpoints applicable to Tokens for `COUPON` and 'STORED_VALUE' account types."
    }
  ],
  "paths": {
    "/token/create": {
      "post": {
        "summary": "Create",
        "description": "This method allows the calling application to create a new Token within AIR platform.",
        "operationId": "createToken",
        "tags": [
          "Token"
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/tokenCreate"
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/tokenCreate201"
          },
          "400": {
            "$ref": "#/components/responses/error400Response"
          },
          "401": {
            "$ref": "#/components/responses/error401Response"
          },
          "403": {
            "$ref": "#/components/responses/error403Response"
          },
          "404": {
            "$ref": "#/components/responses/error404Response"
          },
          "415": {
            "$ref": "#/components/responses/error415Response"
          },
          "429": {
            "$ref": "#/components/responses/tooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/error500Response"
          }
        }
      }
    }
  },
  "security": [
    {
      "eesAuthenticationClientId": [],
      "eesAuthentictionHash": []
    }
  ],
  "components": {
    "schemas": {
      "tokenAccountEntity": {
        "type": "object",
        "required": [
          "accountId",
          "accountTypeId",
          "accountType",
          "accountSubType",
          "token",
          "tokenId",
          "issuerId",
          "accountStatus",
          "tokenStatus",
          "tokenDates",
          "resourceType",
          "resourceId",
          "balances"
        ],
        "properties": {
          "accountId": {
            "type": "integer",
            "format": "int64",
            "description": "Account ID (EES Reference)",
            "nullable": false
          },
          "accountTypeId": {
            "type": "integer",
            "format": "int32",
            "nullable": false,
            "description": "Account Type ID (EES Internal Type Reference)"
          },
          "accountType": {
            "type": "string",
            "description": "Account Type",
            "enum": [
              "Endpoints applicable to COUPON Account Type",
              "Endpoints applicable to STORED_VALUE Account Type"
            ],
            "nullable": false
          },
          "accountSubType": {
            "type": "string",
            "description": "Account Sub-type",
            "nullable": false,
            "enum": [
              "ECOUPON",
              "CONTINUITY",
              "PAPER",
              "VOUCHER",
              "DEBIT",
              "PLASTIC"
            ]
          },
          "token": {
            "type": "string",
            "format": "string",
            "nullable": false,
            "description": "Generated Token"
          },
          "tokenId": {
            "type": "integer",
            "format": "int64",
            "nullable": false,
            "description": "Token ID (EES Reference)"
          },
          "consumerId": {
            "type": "integer",
            "format": "int64",
            "nullable": false,
            "description": "Consumer ID (EES Reference)"
          },
          "issuerId": {
            "type": "integer",
            "format": "int64",
            "nullable": false,
            "description": "Issuer ID"
          },
          "barcodeImage": {
            "type": "string",
            "format": "string",
            "nullable": false,
            "description": "An base64-encoded Barcode Image of the generated Token. Please note currently 128C Barcode Type is supported only."
          },
          "accountStatus": {
            "type": "string",
            "description": "Account status",
            "nullable": false,
            "enum": [
              "ACTIVE",
              "BLOCKED",
              "CANCELLED",
              "DELETED",
              "EXPIRED",
              "INACTIVE",
              "INVALIDATED",
              "LOCKED",
              "STOLEN",
              "USED"
            ]
          },
          "tokenStatus": {
            "type": "string",
            "description": "Token status",
            "nullable": false,
            "enum": [
              "INACTIVE",
              "ACTIVE",
              "REDEEMED",
              "CANCELLED",
              "EXPIRED",
              "INVALIDATED"
            ]
          },
          "balances": {
            "$ref": "#/components/schemas/accountBalancesEntity"
          },
          "serialNumber": {
            "type": "string",
            "format": "string",
            "nullable": false,
            "description": "Token Serial Number. Please note this optional attribute is available for Stored Value Account only. This attribute will not show up in the Response unless appropriate Programme setting is turned on"
          },
          "tokenDates": {
            "type": "object",
            "required": [
              "start",
              "end"
            ],
            "properties": {
              "start": {
                "$ref": "#/components/schemas/transactionTokenStartDate"
              },
              "end": {
                "$ref": "#/components/schemas/transactionTokenEndDate"
              }
            }
          },
          "resourceType": {
            "type": "string",
            "description": "Resource Type",
            "nullable": false,
            "enum": [
              "CAMPAIGN",
              "PROGRAMME"
            ]
          },
          "resourceId": {
            "type": "integer",
            "format": "int64",
            "nullable": false,
            "description": "Programme Id, Campaign Id"
          },
          "pin": {
            "type": "string",
            "format": "string",
            "nullable": false,
            "description": "This JSON property would return randomly generated by the AIR PIN, if a referenced Resource (Campaign or Programme) is configured to support PINs. Because of security reasons AIR would return this PIN value only as part of Token Create Response\n"
          },
          "overrides": {
            "$ref": "#/components/schemas/tokenOverrideEntity"
          }
        }
      },
      "tokenAccountTransactionIdEntity": {
        "type": "object",
        "required": [
          "accountTransactionId"
        ],
        "properties": {
          "accountTransactionId": {
            "type": "string",
            "format": "string",
            "nullable": true,
            "description": "ID of the Account Transaction created as result of this API endpoint call (if applicable, as not all AIR operations would generate Account Transaction)"
          }
        }
      },
      "defaultErrorEntity": {
        "type": "object",
        "required": [
          "errorCode",
          "errorMessage"
        ],
        "properties": {
          "errorCode": {
            "type": "string",
            "nullable": false,
            "description": "EES AIR Error Code",
            "enum": [
              "NF",
              "IR",
              "U",
              "AF",
              "AT",
              "IFU",
              "CE",
              "IPR",
              "MNA",
              "MPA",
              "P",
              "ALR",
              "CX",
              "CI",
              "CP",
              "CR",
              "CU",
              "CORQ",
              "CTNR",
              "DSN",
              "IW",
              "RW",
              "VURC",
              "VURI",
              "FES",
              "IOC",
              "AA",
              "ILA",
              "IP",
              "LIR",
              "LNA",
              "LPR",
              "MAC",
              "MTLE",
              "MLV",
              "MAR",
              "OC",
              "RWI",
              "TEXP",
              "TULR",
              "UAS",
              "UV",
              "VA",
              "VC",
              "VXP",
              "VI",
              "VL",
              "VNL",
              "VPUF",
              "VSM",
              "VUA",
              "ITID",
              "VU",
              "IH",
              "RFL",
              "ISD"
            ],
            "example": "NF"
          },
          "errorMessage": {
            "type": "string",
            "format": "string",
            "nullable": false,
            "description": "Human Friendly EES AIR Error Message",
            "example": "Not Found"
          }
        },
        "x-enum-values": [
          {
            "errorCode": "NF",
            "errorMessage": "Not Found"
          },
          {
            "errorCode": "IR",
            "errorMessage": "Invalid Request"
          },
          {
            "errorCode": "U",
            "errorMessage": "Unknown Error"
          },
          {
            "errorCode": "AF",
            "errorMessage": "Authorisation Failed"
          },
          {
            "errorCode": "U",
            "errorMessage": "Unknown Error"
          },
          {
            "errorCode": "AF",
            "errorMessage": "Authorisation Failed"
          },
          {
            "errorCode": "AT",
            "errorMessage": "Account Type"
          },
          {
            "errorCode": "IFU",
            "errorMessage": "Insufficient Founds"
          },
          {
            "errorCode": "CE",
            "errorMessage": "Configuration Error"
          },
          {
            "errorCode": "IPR",
            "errorMessage": "IP Address Rejected"
          },
          {
            "errorCode": "MNA",
            "errorMessage": "Method Not Allowed"
          },
          {
            "errorCode": "MPA",
            "errorMessage": "Missing Parameter"
          },
          {
            "errorCode": "P",
            "errorMessage": "Privileges"
          },
          {
            "errorCode": "ALR",
            "errorMessage": "Account Limit Reached"
          },
          {
            "errorCode": "CX",
            "errorMessage": "Campaign Expired"
          },
          {
            "errorCode": "CI",
            "errorMessage": "Campaign Inactive"
          },
          {
            "errorCode": "CP",
            "errorMessage": "Campaign Pending"
          },
          {
            "errorCode": "CR",
            "errorMessage": "Campaign Removed"
          },
          {
            "errorCode": "CU",
            "errorMessage": "Campaign Unknown"
          },
          {
            "errorCode": "CORQ",
            "errorMessage": "Consumer Required"
          },
          {
            "errorCode": "CTNR",
            "errorMessage": "Consumer Type Not Recognized"
          },
          {
            "errorCode": "DSN",
            "errorMessage": "Duplicated Serial Number"
          },
          {
            "errorCode": "IW",
            "errorMessage": "Voucher Can Not Be Created"
          },
          {
            "errorCode": "RW",
            "errorMessage": "Voucher Can Not Be Redeemed"
          },
          {
            "errorCode": "VURC",
            "errorMessage": "No Voucher Available to Redeem for Campaign"
          },
          {
            "errorCode": "VURI",
            "errorMessage": "No Voucher Available to Redeem for this Identity"
          },
          {
            "errorCode": "FES",
            "errorMessage": "Scheduling Format Incorrect"
          },
          {
            "errorCode": "IOC",
            "errorMessage": "Improper Offer Configuration"
          },
          {
            "errorCode": "AA",
            "errorMessage": "Invalid Access to API Method"
          },
          {
            "errorCode": "ILA",
            "errorMessage": "Invalid Load Amount"
          },
          {
            "errorCode": "IP",
            "errorMessage": "Invalid Parameter"
          },
          {
            "errorCode": "LIR",
            "errorMessage": "Outlet Identifier Required"
          },
          {
            "errorCode": "LNA",
            "errorMessage": "Outlet Not Allowed"
          },
          {
            "errorCode": "LPR",
            "errorMessage": "Outlet Prohibited by Campaign Settings"
          },
          {
            "errorCode": "MAC",
            "errorMessage": "Maximum Number of Code Variations"
          },
          {
            "errorCode": "MTLE",
            "errorMessage": "Max Active Tokens Limit Exceeded"
          },
          {
            "errorCode": "MLV",
            "errorMessage": "Maximum Voucher Value Exceeded"
          },
          {
            "errorCode": "MAR",
            "errorMessage": "Minimum Amount Required"
          },
          {
            "errorCode": "OC",
            "errorMessage": "Campaign has no Offer"
          },
          {
            "errorCode": "RWI",
            "errorMessage": "Token can not be Redeemed at this time. Blocked by redemption windows."
          },
          {
            "errorCode": "TEXP",
            "errorMessage": "Token Expired"
          },
          {
            "errorCode": "TULR",
            "errorMessage": "Token Usage Limit Reached"
          },
          {
            "errorCode": "UAS",
            "errorMessage": "Transaction Not Allowed by current account status"
          },
          {
            "errorCode": "UV",
            "errorMessage": "Voucher Unknown"
          },
          {
            "errorCode": "VA",
            "errorMessage": "Voucher already been sent"
          },
          {
            "errorCode": "VC",
            "errorMessage": "Voucher Cancelled"
          },
          {
            "errorCode": "VXP",
            "errorMessage": "Voucher Expired"
          },
          {
            "errorCode": "VI",
            "errorMessage": "Voucher Invalid"
          },
          {
            "errorCode": "VL",
            "errorMessage": "Voucher Locked"
          },
          {
            "errorCode": "VNL",
            "errorMessage": "Voucher Not Locked"
          },
          {
            "errorCode": "VPUF",
            "errorMessage": "Voucher You don't have privileges to unlock this token"
          },
          {
            "errorCode": "VSM",
            "errorMessage": "Voucher Serial Mismatch"
          },
          {
            "errorCode": "VUA",
            "errorMessage": "No vouchers available for this campaign"
          },
          {
            "errorCode": "ITID",
            "errorMessage": "Invalid Transaction ID"
          },
          {
            "errorCode": "VU",
            "errorMessage": "Voucher already redeemed"
          },
          {
            "errorCode": "IH",
            "errorMessage": "Invalid Header set"
          },
          {
            "errorCode": "RFL",
            "errorMessage": "Redemption failed, Max redemption limit ... per period ... has been exceeded"
          },
          {
            "errorCode": "ISD",
            "errorMessage": "Invalid Start Date (Could not be outside Campaign Valid From - Campaign Valid To dates)"
          }
        ]
      },
      "transactionDetailsEntity": {
        "type": "object",
        "nullable": false,
        "description": "JSON Object without a fixed structure (EES AIR Meta-Data)",
        "example": {
          "key1": "Value1",
          "key2": "AnotherValue"
        }
      },
      "transactionTokenEndDate": {
        "type": "string",
        "format": "date-time",
        "description": "Token Valid-To date-time - If using 'useOldMysqlDateTimes' unit setting, use MySQL datetime format instead.",
        "nullable": false,
        "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$",
        "example": "2026-02-02T00:00:00+00:00"
      },
      "transactionTokenStartDate": {
        "type": "string",
        "format": "date-time",
        "description": "Token Valid-From date-time - If using 'useOldMysqlDateTimes' unit setting, use MySQL datetime format instead.",
        "nullable": false,
        "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$",
        "example": "2026-02-02T00:00:00+00:00"
      },
      "deliveryRequestEntity": {
        "description": "Optional section (key and value), if defined AIR will try to deliver EMAIL or SMS delivery notification to requested end-Client.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Requested Delivery Method",
            "enum": [
              "EMAIL",
              "SMS"
            ]
          },
          "scheduled": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time of delivery for the token code in the format YYYY-MM-DD HH:MM:SS"
          },
          "template": {
            "type": "object",
            "properties": {
              "templateId": {
                "type": "integer",
                "format": "int32",
                "nullable": false,
                "description": "Id of the template, from AIR, to be used to deliver the message. This parameter is mandatory if the templateId is not defined on the campaign."
              },
              "content": {
                "description": "Optional (additional) Template Variables & Values (key-values)",
                "type": "object",
                "nullable": false,
                "example": {
                  "key1": {
                    "type": "string",
                    "format": "string",
                    "description": "Additional Template Variable Name"
                  },
                  "key2": {
                    "type": "string",
                    "format": "string",
                    "description": "Additional Template Variable Value"
                  }
                }
              }
            }
          }
        }
      },
      "accountBalancesEntity": {
        "type": "object",
        "anyOf": [
          {
            "required": [
              "available"
            ]
          },
          {
            "required": [
              "refundable"
            ]
          },
          {
            "required": [
              "totalSpend"
            ]
          },
          {
            "required": [
              "transactionCount"
            ]
          },
          {
            "required": [
              "current"
            ]
          },
          {
            "required": [
              "usable"
            ]
          },
          {
            "required": [
              "locked"
            ]
          },
          {
            "required": [
              "lifetime"
            ]
          }
        ],
        "properties": {
          "available": {
            "type": "integer",
            "format": "int32",
            "nullable": false,
            "description": "The available balance. This is applicable for all account types, except CONTINUITY, which uses its own balance keys."
          },
          "refundable": {
            "type": "integer",
            "format": "int32",
            "nullable": false,
            "description": "The refundable balance. Applicable for all Account types, except ECOUPON and CONTINUITY"
          },
          "totalSpend": {
            "type": "integer",
            "format": "int32",
            "nullable": false,
            "description": "The Total Spend balance. Applicable only to Continuity Account types"
          },
          "transactionCount": {
            "type": "integer",
            "format": "int32",
            "nullable": false,
            "description": "The Transaction Counter. Applicable only to Continuity Account types"
          },
          "current": {
            "type": "integer",
            "format": "int32",
            "nullable": false,
            "description": "The Current Balance of the Account. Applicable only to Point Accounts"
          },
          "usable": {
            "type": "integer",
            "format": "int32",
            "nullable": false,
            "description": "The Usable Balance of the Account. Applicable only to Point Accounts"
          },
          "locked": {
            "type": "integer",
            "format": "int32",
            "nullable": false,
            "description": "The Locked Balance of the Account. Applicable only to Point Accounts"
          },
          "lifetime": {
            "type": "integer",
            "format": "int32",
            "nullable": false,
            "description": "The Lifetime balance of the Account. Applicable only to Point Accounts"
          }
        }
      },
      "tokenCreateResourceTypeAndResourceIdEntity": {
        "type": "object",
        "required": [
          "resourceType",
          "resourceId"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "description": "Type of Account Token to be created",
            "enum": [
              "CAMPAIGN",
              "PROGRAMME"
            ],
            "nullable": false
          },
          "resourceId": {
            "description": "Campaign ID or Programme ID (depending on `resourceType` value)",
            "type": "integer",
            "format": "int64",
            "nullable": false
          }
        }
      },
      "tokenLocationDeliveryMobileWalletEntity": {
        "type": "object",
        "minProperties": 0,
        "properties": {
          "location": {
            "type": "string",
            "format": "string",
            "description": "[Optional] Outlet incoming identifier to override where this Transaction has happened, if not provided AIR will use location arisen from used API Key"
          },
          "details": {
            "$ref": "#/components/schemas/transactionDetailsEntity"
          },
          "delivery": {
            "$ref": "#/components/schemas/deliveryRequestEntity"
          },
          "mobileWallet": {
            "type": "boolean",
            "nullable": false,
            "default": false,
            "description": "An optional boolean flag to instruct the API to include a link to Mobile Wallet in the Response. (Please note this feature requires App Manager service enabled for a Client)."
          }
        }
      },
      "tokenCreateOrReissueSharedEntity": {
        "type": "object",
        "minProperties": 0,
        "properties": {
          "barcodeImage": {
            "type": "boolean",
            "nullable": false,
            "description": "An optional boolean flag to instruct AIR to include into returned Response an additional attribute `barcodeImage` containing base64-encoded Barcode Image of the Token. Please note currently 128C Barcode Format is supported only.",
            "enum": [
              true
            ],
            "default": false
          },
          "tokenDates": {
            "type": "object",
            "nullable": false,
            "oneOf": [
              {
                "required": [
                  "start"
                ]
              },
              {
                "required": [
                  "end"
                ]
              }
            ],
            "description": "[Optional] This optional request structure allows to override Campaign or Programme settings for Token Valid-From and/or Valid-To dates;  newly created Token will have these dates as explicitly requested. Please note explicit date-times has to be within a referenced Campaign or Programme validity window.",
            "properties": {
              "start": {
                "$ref": "#/components/schemas/transactionTokenStartDate"
              },
              "end": {
                "$ref": "#/components/schemas/transactionTokenEndDate"
              }
            }
          },
          "consumerIdentifier": {
            "type": "object",
            "nullable": false,
            "minProperties": 1,
            "maxProperties": 1,
            "oneOf": [
              {
                "required": [
                  "email"
                ]
              },
              {
                "required": [
                  "mobile"
                ]
              },
              {
                "required": [
                  "consumerId"
                ]
              },
              {
                "required": [
                  "reference"
                ]
              }
            ],
            "description": "Only one of following keys could be provided to fulfil Consumer search (by email, by mobile number, by customerId, by external system Reference). If Consumer with provided email or mobile doesn't exist, AIR will create a new Consumer using provided email or mobile. Please note for Campaigns with a strict issuance per Consumer limit this field will be mandatory.",
            "properties": {
              "email": {
                "type": "string",
                "format": "string",
                "nullable": false,
                "description": "Consumer email"
              },
              "mobile": {
                "type": "string",
                "format": "string",
                "nullable": false,
                "description": "Consumer mobile number"
              },
              "consumerId": {
                "type": "string",
                "format": "string",
                "nullable": false,
                "description": "Id of the Consumer in EES AIR"
              },
              "reference": {
                "type": "string",
                "format": "string",
                "nullable": false,
                "description": "External system Consumer Reference, so EES AIR could search for provided value"
              }
            }
          },
          "value": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "integer",
                "format": "int32",
                "default": 0,
                "description": "This property is applicable to Stored Value Accounts, to provide initial Account Balance for a created Token, Please note Account Balance should be denominated to a smallest currency unit (for British Pound it should be in pence)"
              }
            }
          },
          "overrides": {
            "$ref": "#/components/schemas/tokenOverrideEntity"
          }
        }
      },
      "tokenOverrideEntity": {
        "type": "object",
        "nullable": false,
        "minProperties": 0,
        "maxProperties": 2,
        "description": "[Optional] Overrides for reward or continuityQualification of the Token. Both the Unit and Campaign must have overrides enabled to use this.",
        "properties": {
          "reward": {
            "type": "object",
            "nullable": false,
            "minProperties": 0,
            "description": "Reward overrides for the Token.",
            "properties": {
              "discountAmount": {
                "type": "integer",
                "minimum": 1,
                "description": "The amount that should be discounted."
              },
              "creditAmount": {
                "type": "integer",
                "minimum": 0,
                "description": "The number of points to credit a Points Account with."
              },
              "finalAmount": {
                "type": "integer",
                "minimum": 1,
                "description": "The final amount to override with."
              },
              "percentageAmount": {
                "type": "number",
                "minimum": 1,
                "description": "A percentage amount to be discounted. This must be an integer unless `allowDecimal` is enabled in the Unit."
              },
              "discountValue": {
                "type": "integer",
                "minimum": 1,
                "description": "The discount value to override with."
              }
            }
          },
          "continuityQualification": {
            "type": "object",
            "nullable": false,
            "minProperties": 0,
            "maxProperties": 3,
            "description": "Continuity qualification overrides for the Token.",
            "properties": {
              "totalTransactionUnits": {
                "type": "integer",
                "minimum": 1,
                "description": "The number of units that are needed in the transaction to qualify for the reward."
              },
              "totalTransactionSpend": {
                "type": "integer",
                "minimum": 1,
                "description": "The transaction spend amount needed to qualify for the reward."
              },
              "totalTransactionCount": {
                "type": "integer",
                "minimum": 1,
                "description": "The number of Account Transactions needed to qualify for the reward."
              }
            }
          }
        }
      },
      "deliveryResponseEntity": {
        "type": "object",
        "nullable": false,
        "properties": {
          "delivery": {
            "type": "object",
            "required": [
              "type",
              "status"
            ],
            "properties": {
              "type": {
                "type": "string",
                "format": "string",
                "description": "Delivery Type",
                "nullable": false,
                "enum": [
                  "EMAIL",
                  "SMS"
                ]
              },
              "status": {
                "type": "string",
                "description": "Delivery Status",
                "nullable": false,
                "enum": [
                  "QUEUED",
                  "SENT"
                ]
              }
            }
          }
        }
      },
      "mobileWalletUrlResponseEntity": {
        "type": "object",
        "required": [
          "mobileWalletUrl"
        ],
        "properties": {
          "mobileWalletUrl": {
            "type": "string",
            "format": "string",
            "nullable": false,
            "description": "Mobile Wallet URL, this attribute will be returned only if "
          }
        }
      }
    },
    "requestBodies": {
      "tokenCreate": {
        "description": "JSON Request Payload",
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/tokenCreateResourceTypeAndResourceIdEntity"
                },
                {
                  "$ref": "#/components/schemas/tokenCreateOrReissueSharedEntity"
                },
                {
                  "$ref": "#/components/schemas/tokenLocationDeliveryMobileWalletEntity"
                },
                {
                  "type": "object",
                  "properties": {
                    "tokenCode": {
                      "type": "string",
                      "description": "Used for the token, if campaign is configured to allow it"
                    },
                    "accountDetails": {
                      "type": "object",
                      "properties": {
                        "utm_source": {
                          "type": "string",
                          "format": "string",
                          "description": "Identifies which site sent the traffic"
                        },
                        "utm_medium": {
                          "type": "string",
                          "format": "string",
                          "description": "Identifies what type of link was used"
                        },
                        "utm_campaign": {
                          "type": "string",
                          "format": "string",
                          "description": "Identifies a specific product promotion or strategic campaign"
                        },
                        "utm_term": {
                          "type": "string",
                          "format": "string",
                          "description": "Identifies search terms"
                        },
                        "utm_content": {
                          "type": "string",
                          "format": "string",
                          "description": "Identifies what specifically was clicked to bring the user to the site"
                        }
                      }
                    }
                  }
                }
              ],
              "example": {
                "resourceType": "CAMPAIGN",
                "resourceId": 1178,
                "tokenDates": {
                  "start": "2026-02-02T00:00:00+00:00",
                  "end": "2027-02-02T00:00:00+00:00"
                }
              }
            },
            "examples": {
              "Create a COUPON": {
                "value": {
                  "resourceType": "CAMPAIGN",
                  "resourceId": 1178
                }
              },
              "Create a COUPON with a token code": {
                "value": {
                  "resourceType": "CAMPAIGN",
                  "resourceId": 1178,
                  "tokenCode": "23587254325"
                }
              },
              "Create a STORED VALUE": {
                "value": {
                  "resourceType": "PROGRAMME",
                  "resourceId": 2247
                }
              },
              "Create a STORED VALUE - Complex example": {
                "value": {
                  "resourceType": "PROGRAMME",
                  "resourceId": 2247,
                  "tokenDates": {
                    "start": "2026-02-02T00:00:00+00:00",
                    "end": "2027-02-02T00:00:00+00:00"
                  },
                  "consumerIdentifier": {
                    "email": "john.doe@domain.org"
                  },
                  "value": {
                    "amount": 1000
                  },
                  "location": "Guildford High Street",
                  "details": {
                    "foo": "bar",
                    "key1": "value1"
                  },
                  "delivery": {
                    "type": "EMAIL",
                    "template": {
                      "templateId": 664,
                      "content": {
                        "variable": "value",
                        "anotherVariable": "anotherValue"
                      }
                    }
                  }
                }
              },
              "Create a Coupon with tracking information": {
                "value": {
                  "resourceType": "CAMPAIGN",
                  "resourceId": 18,
                  "accountDetails": {
                    "utm_source": "twitter",
                    "utm_medium": "social",
                    "utm_campaign": "Big drink offer",
                    "utm_term": "beer",
                    "utm_content": "Get it now"
                  }
                }
              }
            }
          }
        }
      }
    },
    "responses": {
      "tokenCreate201": {
        "description": "EES AIR successfully processed this request",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/tokenAccountEntity"
                },
                {
                  "$ref": "#/components/schemas/tokenAccountTransactionIdEntity"
                },
                {
                  "$ref": "#/components/schemas/mobileWalletUrlResponseEntity"
                },
                {
                  "$ref": "#/components/schemas/deliveryResponseEntity"
                }
              ]
            },
            "example": {
              "accountId": 115950017,
              "accountStatus": "ACTIVE",
              "accountTypeId": 1,
              "accountTransactionId": "187730287",
              "accountType": "COUPON",
              "balances": {
                "available": 0,
                "refundable": 0
              },
              "issuerId": 10800,
              "resourceId": 111300,
              "resourceType": "CAMPAIGN",
              "token": "430ABCDEDD",
              "tokenDates": {
                "start": "2026-04-02T00:00:00+00:00",
                "end": "2027-04-02T00:00:00+00:00"
              },
              "tokenId": 116049300,
              "tokenStatus": "ACTIVE"
            },
            "x-fullExample": {
              "request": {
                "Content-Type": "application/json;charset=utf-8",
                "Accept": "application/json",
                "X-EES-AUTH-CLIENT-ID": "aaabbbccccdddeee357",
                "X-EES-AUTH-HASH": "9c359c7d5cdfb59d6a987913c5b42374163469e91161f423a7ddf930403dc1e7",
                "Connection": "keep-alive",
                "Accept-Encoding": "gzip,deflate",
                "clientSecret": 111111,
                "X-EES-TRANSACTION-ID": "external-system-unique-reference-1123",
                "X-CUSTOM-SUBSYSTEM-ID": "CRM",
                "body": {
                  "resourceType": "CAMPAIGN",
                  "resourceId": "111300"
                }
              },
              "response": {
                "HTTP Status": "HTTP/1.1 201 Created",
                "Content-Type": "application/json;charset=utf-8",
                "Content-Encoding": "gzip",
                "payload": {
                  "accountId": 115950017,
                  "accountStatus": "ACTIVE",
                  "accountTypeId": 1,
                  "accountTransactionId": "187730287",
                  "accountType": "COUPON",
                  "balances": {
                    "available": 0,
                    "refundable": 0
                  },
                  "issuerId": 10800,
                  "resourceId": 111300,
                  "resourceType": "CAMPAIGN",
                  "token": "430ABCDEDD",
                  "tokenDates": {
                    "start": "2026-04-02T00:00:00+00:00",
                    "end": "2027-04-02T00:00:00+00:00"
                  },
                  "tokenId": 116049300,
                  "tokenStatus": "ACTIVE"
                }
              }
            }
          }
        }
      },
      "error400Response": {
        "description": "EES AIR refuse to process that particular Request as there is something wrong with the Request (e.g. Request Payload is unprocessable, Mandatory Request Parameter value is not provided, etc.)",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/defaultErrorEntity"
                }
              ],
              "example": {
                "errorCode": "MPA",
                "errorMessage": "Missing Parameter 'parameter'"
              }
            }
          }
        }
      },
      "error401Response": {
        "description": "EES AIR refuse to process that particular Request due to Authentication error(s). This could be caused by missing one or more of mandatory AUTH headers, invalid Hash calculation, invalid or inactive API Key used, etc.",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/defaultErrorEntity"
                }
              ],
              "example": {
                "errorCode": "AF",
                "errorMessage": "Authentication Failure, Please check if required AUTH headers are present in your Request and if AUTH Hash is calculated correctly"
              }
            }
          }
        }
      },
      "error403Response": {
        "description": "EES AIR refuse to process that particular Request due to Authorisation error(s). Please note nothing is wrong with  Authentication nor hash Calculation, it is simply due to lack of permission to perform that particular action (e.g. Issuance Partner attempts to Redeem a Token or Redemption Partner attempts to Issue a Token, etc.)",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/defaultErrorEntity"
                }
              ],
              "example": {
                "errorCode": "AF",
                "errorMessage": "Authorisation Failure"
              }
            }
          }
        }
      },
      "error404Response": {
        "description": "EES AIR refuse to process that particular Request as requested Resource could not be found or referenced Resource is not active.",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/defaultErrorEntity"
                }
              ],
              "example": {
                "errorCode": "NF",
                "errorMessage": "Campaign 1178 not found"
              }
            }
          }
        }
      },
      "error415Response": {
        "description": "EES AIR refuse to process that particular Request as requested `Mime-Type` is not supported (Currently only `application/json` is supported",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/defaultErrorEntity"
                }
              ],
              "example": {
                "errorCode": "??",
                "errorMessage": "??"
              }
            }
          }
        }
      },
      "tooManyRequests": {
        "description": "Too Many Requests",
        "headers": {
          "Retry-after": {
            "description": "The number of seconds after which to retry the request",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "errorCode": {
                  "type": "string",
                  "description": "The error code",
                  "enum": [
                    "CE"
                  ]
                },
                "errorMessage": {
                  "type": "string",
                  "description": "The error message for this error",
                  "enum": [
                    "This request has been throttled. Please try again later."
                  ]
                }
              }
            }
          }
        }
      },
      "error500Response": {
        "description": "EES AIR is not able to process that particular Request due to Unexpected Server Error.",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/defaultErrorEntity"
                }
              ],
              "example": {
                "errorCode": "U",
                "errorMessage": "Unknown Server Error"
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "eesAuthenticationClientId": {
        "type": "apiKey",
        "in": "header",
        "description": "Client ID, This will be provided by EES and is unique to the company calling the API. Please note the authentication mechanic requires the receipt of the full payload so any headers that would chunk the request up, such as transfer-encoding chunked could potentially cause authentication failures.",
        "name": "X-EES-AUTH-CLIENT-ID"
      },
      "eesAuthentictionHash": {
        "type": "apiKey",
        "in": "header",
        "description": "Request Security Hash, calculated using SHA-256 function from concatenated full Request URI Path with Query String(s), Payload and Client Secret. Please note the authentication mechanic requires the receipt of the full payload so any headers that would chunk the request up, such as transfer-encoding chunked could potentially cause authentication failures.",
        "name": "X-EES-AUTH-HASH"
      }
    }
  }
}
```