1. Overview

The OMP provides comprehensive APIs for managing offers, merchants, data lists, and user authentication.

1.1. Key Features

  • JWT-based authentication with token refresh

  • Complete offer lifecycle management (CRUD, search, filters, history)

  • Merchant management with store location handling

  • Dynamic data lists for locations, categories, and configuration

  • Bulk operations for offers

  • CSV export capabilities

  • AI-powered content assistance

1.2. Authentication

All APIs (except auth endpoints) require a Bearer token:

Authorization: Bearer <token>

Authentication APIs

2. Login

Endpoint: POST /api/v1/auth/login

Purpose: Authenticate user and generate JWT tokens.

2.1. Request

POST /api/v1/auth/login HTTP/1.1
Content-Type: application/json
Content-Length: 68
Host: localhost:8080

{
  "email" : "john.doe@crayondata.com",
  "password" : "john@123"
}
Table 1. Request Fields
Path Type Description

email

String

User email address

password

String

User password

2.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 100

{
  "token" : "jwt-token",
  "userId" : 31,
  "role" : "Admin",
  "refreshToken" : "refresh-token"
}
Table 2. Response Fields
Path Type Description

token

String

JWT access token

userId

Number

Authenticated user ID

role

String

User role

refreshToken

String

Refresh token


3. Forgot Password

Endpoint: POST /api/v1/auth/forgotPassword

Purpose: Send password reset link to registered email.

3.1. Request

POST /api/v1/auth/forgotPassword HTTP/1.1
Content-Type: application/json
Content-Length: 41
Host: localhost:8080

{
  "email" : "john.doe@crayondata.com"
}
Table 3. Request Fields
Path Type Description

email

String

Registered email address

3.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 100

{
  "message" : "Password link successfully sent to the registered mail id",
  "statusCode" : "OK"
}
Table 4. Response Fields
Path Type Description

message

String

Password reset operation status

statusCode

String

HTTP status of the operation


4. Sign Up

Endpoint: POST /api/v1/auth/signUp

Purpose: Register a new user account.

4.1. Request

POST /api/v1/auth/signUp HTTP/1.1
Content-Type: application/json
Content-Length: 161
Host: localhost:8080

{
  "userName" : "John Doe",
  "email" : "john.doe@crayondata.com",
  "country" : "India",
  "designation" : "Software Engineer",
  "password" : "Password@123"
}
Table 5. Request Fields
Path Type Description

userName

String

User’s full name

email

String

User email address

country

String

User country

designation

String

User designation

password

String

User password

4.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 133

{
  "message" : "User registered successfully",
  "userId" : "31",
  "userName" : "John Doe",
  "email" : "john.doe@crayondata.com"
}
Table 6. Response Fields
Path Type Description

message

String

Registration status message

userId

String

Generated user ID

userName

String

Registered user name

email

String

Registered user email


Endpoint: POST /api/v1/auth/verifyLink

Purpose: Verify user account using token.

5.1. Request

POST /api/v1/auth/verifyLink HTTP/1.1
Content-Type: application/json
Content-Length: 75
Host: localhost:8080

{
  "email" : "john.doe@crayondata.com",
  "token" : "verification-token"
}
Table 7. Request Fields
Path Type Description

email

String

User email address

token

String

Verification token

5.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 66

{
  "message" : "Verification Successful",
  "status" : "active"
}
Table 8. Response Fields
Path Type Description

status

String

Verification status

message

String

Verification result message


Endpoint: POST /api/v1/auth/resendVerifyLink

Purpose: Resend email verification link.

6.1. Request

POST /api/v1/auth/resendVerifyLink HTTP/1.1
Content-Type: application/json
Content-Length: 41
Host: localhost:8080

{
  "email" : "john.doe@crayondata.com"
}
Table 9. Request Fields
Path Type Description

email

String

User email address

6.2. Response

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 83

{
  "message" : "Verification link sent successfully",
  "statusCode" : "CREATED"
}
Table 10. Response Fields
Path Type Description

message

String

Verification link status message

statusCode

String

HTTP status of the operation


7. Verify Email

Endpoint: POST /api/v1/auth/verifyEmail

Purpose: Verify user email address.

7.1. Request

POST /api/v1/auth/verifyEmail HTTP/1.1
Content-Type: application/json
Content-Length: 66
Host: localhost:8080

{
  "email" : "john.doe@crayondata.com",
  "token" : "token-123"
}
Table 11. Request Fields
Path Type Description

email

String

User email address

token

String

Verification token

7.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 71

{
  "message" : "Email verified successfully",
  "status" : "SUCCESS"
}
Table 12. Response Fields
Path Type Description

message

String

Success message

status

String

Status value


8. Update Password

Endpoint: PUT /api/v1/auth/updatePassword

Purpose: Reset user password using token.

8.1. Request

PUT /api/v1/auth/updatePassword HTTP/1.1
Content-Type: application/json
Content-Length: 97
Host: localhost:8080

{
  "token" : "token-123",
  "email" : "john.doe@crayondata.com",
  "password" : "Password@123"
}
Table 13. Request Fields
Path Type Description

token

String

Password reset token

email

String

User email address

password

String

New password

8.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 72

{
  "message" : "Password updated successfully",
  "statusCode" : "OK"
}
Table 14. Response Fields
Path Type Description

message

String

Password update status message

statusCode

String

HTTP status of the operation


9. Refresh Token

Endpoint: PUT /api/v1/auth/refresh-token

Purpose: Generate new access token using refresh token.

9.1. Request

PUT /api/v1/auth/refresh-token?refreshToken=refresh-token-123 HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: localhost:8080
Table 15. Query Parameters
Parameter Description

refreshToken

Valid refresh token

9.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 80

{
  "accessToken" : "new-access-token",
  "refreshToken" : "new-refresh-token"
}
Table 16. Response Fields
Path Type Description

accessToken

String

Newly generated access token

refreshToken

String

Newly generated refresh token


10. Logout

Endpoint: DELETE /api/v1/auth/logout

Purpose: Invalidate user session and logout.

10.1. Request

DELETE /api/v1/auth/logout?accessToken=access-token-123 HTTP/1.1
Content-Type: application/json
Host: localhost:8080
Table 17. Query Parameters
Parameter Description

accessToken

Valid access token to logout

10.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 60

{
  "message" : "Logout successful",
  "statusCode" : "OK"
}
Table 18. Response Fields
Path Type Description

message

String

Logout status message

statusCode

String

HTTP status of logout operation


11. Generate Token for Third Party

Endpoint: POST /api/v1/auth/generate-token-TP

Purpose: Generate token for third-party integration.

11.1. Request

POST /api/v1/auth/generate-token-TP HTTP/1.1
Content-Type: application/json
Content-Length: 48
Host: localhost:8080

{
  "clientSecret" : "encrypted-client-secret"
}
Table 19. Request Fields
Path Type Description

clientSecret

String

Encrypted client secret

11.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 99

{
  "token" : "jwt-token",
  "userId" : 1,
  "role" : "Admin",
  "refreshToken" : "refresh-token"
}
Table 20. Response Fields
Path Type Description

token

String

JWT access token

userId

Number

User ID

role

String

User role

refreshToken

String

Refresh token

User Management APIs

12. Get All Users

Endpoint: POST /api/v1/users

Purpose: Retrieve paginated list of users with filters.

12.1. Request

POST /api/v1/users HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 179
Host: localhost:8080

{
  "offset" : 0,
  "limit" : 10,
  "filters" : {
    "userPermission" : [ "Admin" ],
    "status" : [ "Inactive" ]
  },
  "sortBy" : "",
  "sortOrder" : "",
  "searchWord" : ""
}
Table 21. Request Fields
Path Type Description

offset

Number

Pagination offset

limit

Number

Number of users per page

filters

Object

Filter map (status, userPermission)

sortBy

String

Field used for sorting

sortOrder

String

Sorting order (ASC/DESC)

searchWord

String

Search keyword

12.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 295

{
  "totalCount" : 1,
  "usersListResponses" : [ {
    "id" : 4,
    "userName" : "ABCDEFGHIJ",
    "email" : "testoffmgmtfg@yopmail.com",
    "designation" : "Tester ",
    "userPermission" : "Admin",
    "country" : "India",
    "lastActive" : "937 days ago",
    "status" : "Inactive"
  } ]
}
Table 22. Response Fields
Path Type Description

totalCount

Number

Total number of users

usersListResponses[].id

Number

User ID

usersListResponses[].userName

String

User name

usersListResponses[].email

String

Email address

usersListResponses[].designation

String

User designation

usersListResponses[].userPermission

String

Assigned user role

usersListResponses[].country

String

User country

usersListResponses[].lastActive

String

Last active timestamp

usersListResponses[].status

String

Current user status


13. Update User

Endpoint: PUT /api/v1/users

Purpose: Update user details.

13.1. Request

PUT /api/v1/users HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 122
Host: localhost:8080

{
  "userId" : 4,
  "country" : "India",
  "designation" : "Tester",
  "roleName" : "Admin",
  "userStatus" : "INACTIVE"
}
Table 23. Request Fields
Path Type Description

userId

Number

User ID

country

String

User country

designation

String

User designation

roleName

String

User role

userStatus

String

User status

13.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 164

{
  "messages" : [ "Changed ABCDEFGHIJ Designation from Tester  to Tester" ],
  "userId" : 4,
  "userName" : "ABCDEFGHIJ",
  "email" : "testoffmgmtfg@yopmail.com"
}
Table 24. Response Fields
Path Type Description

messages

Array

List of response messages

userId

Number

Updated user ID

userName

String

Updated user name

email

String

Updated user email


14. Get User By ID

Endpoint: GET /api/v1/users/{id}

Purpose: Retrieve user details by ID.

14.1. Request

GET /api/v1/users/31 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 25. /api/v1/users/{id}
Parameter Description

id

User ID

14.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 261

{
  "userId" : 31,
  "userName" : "Vishnupriya J",
  "email" : "vishnupriyaj@crayondata.com",
  "country" : "India",
  "designation" : "ASE",
  "userStatus" : "ACTIVE",
  "lastActive" : "1 hour ago",
  "role" : {
    "roleId" : 1,
    "roleName" : "Admin"
  }
}
Table 26. Response Fields
Path Type Description

userId

Number

User ID

userName

String

User name

email

String

User email address

country

String

User country

designation

String

User designation

userStatus

String

Current user status

lastActive

String

Last active timestamp

role.roleId

Number

Role ID

role.roleName

String

Role name


15. Activate User

Endpoint: PATCH /api/v1/users/activate/{id}

Purpose: Activate a user account.

15.1. Request

PATCH /api/v1/users/activate/4 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 27. /api/v1/users/activate/{id}
Parameter Description

id

User ID

15.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 99

{
  "message" : "User activated successfully",
  "email" : "john.doe@example.com",
  "userId" : 4
}
Table 28. Response Fields
Path Type Description

userId

Number

User ID

email

String

User Email ID

message

String

Activation status message


16. Deactivate User

Endpoint: PATCH /api/v1/users/deactivate/{id}

Purpose: Deactivate a user account.

16.1. Request

PATCH /api/v1/users/deactivate/4 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 29. /api/v1/users/deactivate/{id}
Parameter Description

id

User ID

16.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 101

{
  "message" : "User deactivated successfully",
  "email" : "john.doe@example.com",
  "userId" : 4
}
Table 30. Response Fields
Path Type Description

userId

Number

User ID

email

String

User Email ID

message

String

Deactivation status message


17. Check Email Availability

Endpoint: GET /api/v1/users/checkEmailAvailability/{email}

Purpose: Check if email is already registered.

17.1. Request

GET /api/v1/users/checkEmailAvailability/john.doe@crayondata.com HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 31. /api/v1/users/checkEmailAvailability/{email}
Parameter Description

email

Email address to check availability

17.2. Response

HTTP/1.1 200 OK
Content-Disposition: inline;filename=f.txt
Content-Type: application/json
Content-Length: 25

{
  "available" : false
}
Table 32. Response Fields
Path Type Description

available

Boolean

Indicates whether the email already exists


Endpoint: GET /api/v1/users/appLogo

Purpose: Retrieve application logo URL.

18.1. Request

GET /api/v1/users/appLogo HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080

18.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 25

{
  "logo" : "https://"
}
Table 33. Response Fields
Path Type Description

logo

String

Application logo URL for the authenticated user’s client


19. Get User Filters

Endpoint: GET /api/v1/users/filters

Purpose: Retrieve available user filter options.

19.1. Request

GET /api/v1/users/filters HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080

19.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 101

{
  "userPermission" : [ "All", "Admin", "Approver" ],
  "status" : [ "All", "Active", "Inactive" ]
}
Table 34. Response Fields
Path Type Description

status

Array

Available user status filters

userPermission

Array

Available user permission filters


20. Auto Suggest Users

Endpoint: POST /api/v1/users/search

Purpose: Search and suggest users by keyword.

20.1. Request

POST /api/v1/users/search HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 48
Host: localhost:8080

{
  "searchWord" : "test",
  "searchLimit" : 5
}
Table 35. Request Fields
Path Type Description

searchWord

String

Search keyword for user suggestions

searchLimit

Number

Maximum number of suggestions to return

20.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 106

{
  "searchResults" : [ "testoffmgmtfg@yopmail.com", "Alpha Testing test", "offermgmttest@yopmail.com" ]
}
Table 36. Response Fields
Path Type Description

searchResults

Array

List of suggested user names

Data List APIs

21. Get States

Endpoint: GET /api/v1/list/states

Purpose: Retrieve list of states by country.

21.1. Request

GET /api/v1/list/states?country=India&searchWord= HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 37. Query Parameters
Parameter Description

searchWord

Search keyword (optional)

country

Country name

21.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 87

{
  "states" : [ "Andaman & Nicobar Islands", "Andhra Pradesh", "Arunachal Pradesh" ]
}
Table 38. Response Fields
Path Type Description

states[]

Array

List of states


22. Get Categories

Endpoint: GET /api/v1/list/categories

Purpose: Retrieve list of all categories.

22.1. Request

GET /api/v1/list/categories HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080

22.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 190

[ {
  "label" : "Apparel And Accessories",
  "value" : "apparel and accessories"
}, {
  "label" : "Dining",
  "value" : "dining"
}, {
  "label" : "Electronics",
  "value" : "electronics"
} ]
Table 39. Response Fields
Path Type Description

[].label

String

Category display label

[].value

String

Category value


23. Get Countries

Endpoint: GET /api/v1/list/countries

Purpose: Retrieve list of countries.

23.1. Request

GET /api/v1/list/countries?searchWord= HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 40. Query Parameters
Parameter Description

searchWord

Search keyword for filtering countries (optional)

23.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 55

{
  "countries" : [ "Albania", "Algeria", "Andorra" ]
}
Table 41. Response Fields
Path Type Description

countries[]

Array

List of countries


24. Get Zipcodes

Endpoint: GET /api/v1/list/zipcodes

Purpose: Retrieve list of zipcodes for a specific city.

24.1. Request

GET /api/v1/list/zipcodes?searchWord=&country=India&state=Tamil+Nadu&city=Chennai HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 42. Query Parameters
Parameter Description

searchWord

Search keyword for filtering zip codes (optional)

country

Country name

state

State name

city

City name

24.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 51

{
  "zipCodes" : [ "600001", "600002", "600004" ]
}
Table 43. Response Fields
Path Type Description

zipCodes[]

Array

List of zip codes


25. Get Offer Types

Endpoint: GET /api/v1/list/offerTypes

Purpose: Retrieve list of available offer types.

25.1. Request

GET /api/v1/list/offerTypes HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080

25.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 215

{
  "offerTypes" : [ {
    "Label" : "Card Linked",
    "Value" : "card linked"
  }, {
    "Label" : "Cashback",
    "Value" : "cashback"
  }, {
    "Label" : "Offline Coupon",
    "Value" : "offline coupon"
  } ]
}
Table 44. Response Fields
Path Type Description

offerTypes

Array

List of available offer types

offerTypes[].Label

String

Offer type label

offerTypes[].Value

String

Offer type value


26. Get Cities

Endpoint: GET /api/v1/list/cities

Purpose: Retrieve list of cities by country and state.

26.1. Request

GET /api/v1/list/cities?searchWord=&country=India&state=Tamil+Nadu HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 45. Query Parameters
Parameter Description

searchWord

Search keyword for filtering cities (optional)

country

Country name

state

State name

26.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 65

{
  "cities" : [ "Agasteeswaram", "Agastheeswaram", "Alandur" ]
}
Table 46. Response Fields
Path Type Description

cities[]

Array

List of cities


27. Get Roles

Endpoint: GET /api/v1/list/roles

Purpose: Retrieve list of available user roles.

27.1. Request

GET /api/v1/list/roles HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080

27.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 139

[ {
  "roleId" : 1,
  "roleName" : "Admin"
}, {
  "roleId" : 2,
  "roleName" : "Approver"
}, {
  "roleId" : 4,
  "roleName" : "Manager"
} ]
Table 47. Response Fields
Path Type Description

[].roleId

Number

Role ID

[].roleName

String

Role name


28. Get Header Pages

Endpoint: GET /api/v1/list/headerPages

Purpose: Retrieve list of header pages for UI navigation.

28.1. Request

GET /api/v1/list/headerPages HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080

28.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 571

{
  "Dining" : "dining",
  "Electronics" : "electronics",
  "Apparel And Accessories" : "apparel and accessories",
  "Travel" : "travel",
  "Jewellery" : "jewellery",
  "Home And Decor" : "home and decor",
  "Personal Service Providers" : "personal service providers",
  "Retail Stores" : "retail stores",
  "Entertainment" : "entertainment",
  "Miscellaneous Stores" : "miscellaneous stores",
  "Exclusive Offers For You" : "exclusive offers for you",
  "Visa" : "Visa",
  "All Offers" : "All Offers",
  "Expiring Soon" : "EXPIRING_SOON",
  "Hyperlocal" : "Hyperlocal"
}
Table 48. Response Fields
Path Type Description

Dining

String

Dining header page

Electronics

String

Electronics header page

Apparel And Accessories

String

Apparel and Accessories header page

Travel

String

Travel header page

Jewellery

String

Jewellery header page

Home And Decor

String

Home and Decor header page

Personal Service Providers

String

Personal Service Providers header page

Retail Stores

String

Retail Stores header page

Entertainment

String

Entertainment header page

Miscellaneous Stores

String

Miscellaneous Stores header page

Exclusive Offers For You

String

Exclusive Offers For You header page

Visa

String

Visa header page

All Offers

String

All Offers header page

Expiring Soon

String

Expiring Soon header page

Hyperlocal

String

Hyperlocal header page


29. Get Sub-categories

Endpoint: GET /api/v1/list/subCategories

Purpose: Retrieve the list of all sub-categories for a merchant.

29.1. Request

GET /api/v1/list/subCategories?merchantId=HDFC106772 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 49. Query Parameters
Parameter Description

merchantId

Merchant ID used to retrieve the sub-categories

29.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 55

[ "restaurants", "cafés & coffee shops", "fast food" ]
Table 50. Response Fields
Path Type Description

[]

Array

Sub-category

Offer APIs

30. Get All Offers

Endpoint: POST /api/v1/offers

Purpose: Retrieve paginated list of offers with filtering and sorting capabilities.

30.1. Request

POST /api/v1/offers HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 259
Host: localhost:8080

{
  "offset" : 0,
  "limit" : 2,
  "myOfferToggle" : false,
  "filters" : {
    "offerType" : [ ],
    "offerSource" : [ ],
    "offerChannel" : [ ],
    "merchantNames" : [ ],
    "status" : [ ]
  },
  "sortBy" : "",
  "sortOrder" : "",
  "searchWord" : ""
}
Table 51. Request Fields
Path Type Description

offset

Number

Pagination offset (optional)

limit

Number

Number of records per page (optional)

myOfferToggle

Boolean

Flag to fetch only user offers

filters

Object

Offer filters map (optional)

filters.offerChannel

Array

Filter by offer channel (optional)

filters.status

Array

Filter by status (optional)

filters.offerSource

Array

Filter by offer source (optional)

filters.offerType

Array

Filter by offer type (optional)

filters.merchantNames

Array

Filter by merchant names (optional)

sortBy

String

Field used for sorting (optional)

sortOrder

String

Sorting order (ASC/DESC) (optional)

searchWord

String

Search keyword (optional)

30.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3851

{
  "totalCount" : 47771,
  "offerListResponse" : [ {
    "offerId" : 416767,
    "offerDescription" : "The Tata Neu Infinity HDFC Bank Credit card holder (other than Infinia, Diners, Regalia, Tata Neu) would earn 6% Cashback, on booking on Myntra via HDFC Bank SmartBuy portal. _x000D_\nSmartBuy lists Shop section that allows user to make booking on Myntra site. The user benefit is 6% Cashback in the form of NeuCoins. _x000D_\n_x000D_\n<p><strong>How do I calculate the exact benefit on Shopping using SmartBuy offers?</strong></p>_x000D_\nWe have a Savings Calculator that will assist you with the above calculations. Pls access it on this link: https://offers.reward360.in/v1/savings_calculator_x000D_\n<p><strong>SmartBuy benefits have upper capping and other terms which you can refer on this link:</strong></p>: https://offers.smartbuy.hdfcbank.com/offer_details/tata-neu-hdfc-bank-credit-card/21138/Z2Sklms%3D_x000D_\n_x000D_\n<p><strong>When can I make use of SmartBuy offers?</strong></p>_x000D_\nSmartBuy offers are available 24*7, and are long term offers stretching weeks/months. This gives you the peace of mind and freedom of building a repeat habit of making travel transactions using HDFC Bank payment instruments, knowing that the offer would be available. _x000D_\n_x000D_\nIf you have more questions around SmartBuy benefits, you may read them on FAQ section and program T&C_x000D_\nFAQ section link - https://offers.reward360.in/faqs_x000D_\nT&C link - https://offers.reward360.in/terms_conditions",
    "offerStatus" : "Live",
    "offerType" : "card linked",
    "merchantName" : "t nagat location",
    "offerSource" : "CARDS & EASYEMI",
    "validFrom" : "2026-11-13 00:00:00",
    "validTo" : "2026-12-31 00:00:00",
    "channel" : "In-Store",
    "lastUpdated" : "2026-11-13 07:56:24.386364",
    "offerTitle" : "near by list test",
    "rejectionReason" : "",
    "nextActions" : "Pause, View"
  }, {
    "offerId" : 416766,
    "offerDescription" : "The Tata Neu Infinity HDFC Bank Credit card holder (other than Infinia, Diners, Regalia, Tata Neu) would earn 6% Cashback, on booking on Myntra via HDFC Bank SmartBuy portal. _x000D_\nSmartBuy lists Shop section that allows user to make booking on Myntra site. The user benefit is 6% Cashback in the form of NeuCoins. _x000D_\n_x000D_\n<p><strong>How do I calculate the exact benefit on Shopping using SmartBuy offers?</strong></p>_x000D_\nWe have a Savings Calculator that will assist you with the above calculations. Pls access it on this link: https://offers.reward360.in/v1/savings_calculator_x000D_\n<p><strong>SmartBuy benefits have upper capping and other terms which you can refer on this link:</strong></p>: https://offers.smartbuy.hdfcbank.com/offer_details/tata-neu-hdfc-bank-credit-card/21138/Z2Sklms%3D_x000D_\n_x000D_\n<p><strong>When can I make use of SmartBuy offers?</strong></p>_x000D_\nSmartBuy offers are available 24*7, and are long term offers stretching weeks/months. This gives you the peace of mind and freedom of building a repeat habit of making travel transactions using HDFC Bank payment instruments, knowing that the offer would be available. _x000D_\n_x000D_\nIf you have more questions around SmartBuy benefits, you may read them on FAQ section and program T&C_x000D_\nFAQ section link - https://offers.reward360.in/faqs_x000D_\nT&C link - https://offers.reward360.in/terms_conditions",
    "offerStatus" : "Live",
    "offerType" : "card linked",
    "merchantName" : "perungudi location",
    "offerSource" : "CARDS & EASYEMI",
    "validFrom" : "2026-11-13 00:00:00",
    "validTo" : "2026-12-31 00:00:00",
    "channel" : "In-Store",
    "lastUpdated" : "2026-11-13 07:56:24.386364",
    "offerTitle" : "near by list test",
    "rejectionReason" : "",
    "nextActions" : "Pause, View"
  } ],
  "paginationDropdown" : [ 5, 25, 100 ]
}
Table 52. Response Fields
Path Type Description

totalCount

Number

Total number of offers

offerListResponse

Array

List of offers

offerListResponse[].offerId

Number

Offer ID

offerListResponse[].offerDescription

String

Offer description

offerListResponse[].offerStatus

String

Offer status

offerListResponse[].offerType

String

Offer type

offerListResponse[].merchantName

String

Merchant name

offerListResponse[].offerSource

String

Offer source

offerListResponse[].validFrom

String

Offer valid from date

offerListResponse[].validTo

String

Offer valid to date

offerListResponse[].channel

String

Offer channel

offerListResponse[].lastUpdated

String

Last updated timestamp

offerListResponse[].offerTitle

String

Offer title

offerListResponse[].rejectionReason

String

Reason for rejection

offerListResponse[].nextActions

String

Available next actions

paginationDropdown

Array

Pagination dropdown values


31. Get Offer By ID

Endpoint: GET /api/v1/offers/{offerId}

Purpose: Retrieve detailed information of a specific offer by its ID.

31.1. Request

GET /api/v1/offers/2102 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 53. /api/v1/offers/{offerId}
Parameter Description

offerId

Unique identifier of the offer

31.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2793

{
  "offerId" : 2102,
  "channel" : "Online",
  "merchantId" : "DC48",
  "merchantName" : "Rosemary Perfumes",
  "category" : "retail stores",
  "validFrom" : "2021-05-01 00:00:00",
  "validTo" : "2022-02-03 00:00:00",
  "offerType" : "offline coupon",
  "offerValue" : 16.0,
  "offerValueCurrency" : "SAR",
  "offerValueType" : "cpa_percentage",
  "applicableCountry" : "United Arab emirates",
  "offerTitle" : "Get upto 10% discount on Rosemary Perfumes",
  "offerSource" : "arabclicks",
  "offerVariant" : "",
  "offerDescription" : "Get upto 10% discount on Rosemary Perfumes\n1. The offer is valid upto 2022-02-03\n2. The offer is valid for Perfumes, Gifts only\n3. The offer is applicable for Desktop/Web, Mobile\n4. The offer is valid on all users only\n5. Coupons are applicable for $BANKNAME$ card users only\n6. Coupon is applicable at online\n7. Accidental Loss of coupon shall not be covered \n8. Coupons are not transferable \n9. Coupons cannot be replaced if emails are deleted by the claimant\n10. Customer is redirected to third party website – Terms of third party website will be applicable on the shopping experience\n11. The offer is applicable on select categories/products ONLY",
  "storeLocation" : [ {
    "cdfLocationId" : 1132,
    "address" : "",
    "city" : "all",
    "country" : "all",
    "countryCode" : "",
    "state" : "all",
    "latitude" : null,
    "longitude" : null,
    "storeName" : "Store 1",
    "zipCode" : "",
    "mapLink" : "",
    "associatedWithLiveOffers" : false
  } ],
  "couponCode" : "AC114",
  "multipleConversions" : 1,
  "offerImages" : "https://dpimages.crayondata.com/high-res-image/adib/rosemary_offer1.jpeg",
  "howToRedeem" : "1. Click on 'Claim' at the bottom of the Offer Page.\n2. Click on 'Redeem Now' to get redirected to the merchant website.\n3. Make sure the product you purchase is valid under offer T&C\n4. At checkout on the merchant website, make sure to paste the coupon code.",
  "offerUrl" : "https://www.rosemaryperfumes.com/",
  "termsConditions" : "1. The offer is valid upto 2022-02-03\n2. The offer is valid for Perfumes, Gifts only\n3. The offer is applicable for Desktop/Web, Mobile\n4. The offer is valid on all users only\n5. Coupons are applicable for $BANKNAME$ card users only\n6. Coupon is applicable at online\n7. Accidental Loss of coupon shall not be covered \n8. Coupons are not transferable \n9. Coupons cannot be replaced if emails are deleted by the claimant\n10. Customer is redirected to third party website – Terms of third party website will be applicable on the shopping experience\n11. The offer is applicable on select categories/products ONLY",
  "merchantChannel" : "Online",
  "categoryType" : "",
  "applicableCards" : "",
  "applicableProducts" : null,
  "subCategory" : null
}
Table 54. Response Fields
Path Type Description

offerId

Number

Offer ID

channel

String

Offer channel

merchantId

String

Merchant identifier

merchantName

String

Merchant name

category

String

Offer category

validFrom

String

Offer valid from date

validTo

String

Offer valid to date

offerType

String

Type of offer

offerValue

Number

Offer value

offerValueCurrency

String

Currency of offer value

offerValueType

String

Type of offer value

applicableCountry

String

Applicable country

offerTitle

String

Offer title

offerSource

String

Source of the offer

offerVariant

String

Variant of the offer

offerDescription

String

Detailed description of the offer

storeLocation

Array

List of store locations

storeLocation[].cdfLocationId

Number

CDF location ID

storeLocation[].address

String

Store address

storeLocation[].city

String

City

storeLocation[].country

String

Country

storeLocation[].countryCode

String

Country code

storeLocation[].state

String

State

storeLocation[].latitude

Null

Latitude

storeLocation[].longitude

Null

Longitude

storeLocation[].storeName

String

Store name

storeLocation[].zipCode

String

Zip code

storeLocation[].mapLink

String

Map link

storeLocation[].associatedWithLiveOffers

Boolean

Whether store is linked to live offers

couponCode

String

Coupon code for the offer

multipleConversions

Number

Multiple conversions flag

offerImages

String

Offer image URLs

howToRedeem

String

Instructions to redeem the offer

offerUrl

String

Offer landing page URL

termsConditions

String

Terms and conditions

merchantChannel

String

Merchant channel

categoryType

String

Category type

applicableCards

String

Applicable cards

applicableProducts

Null

Applicable products(optional)

subCategory

Null

Sub-category


32. Add Online Offer

Endpoint: POST /api/v1/offers/create

Purpose: Create a new online offer.

32.1. Request

POST /api/v1/offers/create HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 1567
Host: localhost:8080

{
  "channel" : "Online",
  "merchantId" : "HDFC5130",
  "validFrom" : "2027-05-27 00:00:00.000",
  "validTo" : "2027-05-29 23:59:59.000",
  "offerType" : "card linked",
  "offerValue" : 10.0,
  "offerValueCurrency" : "",
  "offerValueType" : "cpa_percentage",
  "applicableCountry" : "India",
  "offerTitle" : "API doc automation 1",
  "offerSource" : "123",
  "offerVariant" : "",
  "offerDescription" : "<p>--</p>",
  "categoryType" : "Category",
  "storeLocation" : [ ],
  "couponCode" : "",
  "multipleConversions" : 0,
  "offerImages" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABTIAAAL5CAYAAACD2NutAAAgAElEQVR4nOzdfXhU9b33+88IhhYbNi3GHGOoINQEuqUNJDUbfJ6qGHaSKoi9JdvU0HoHOCqtGs8mgd2DwX1MdRfxImRbDTfuwS0CegglRuyIjzQ2gXSnLSRtEJUYm0Z2K+M+kxXHptY43dfCZJ3S374Iq6z16xD/fA/gG2fBv/70Fc+HptBXKflhmCwsLmp+f19zcnB4",
  "curatedImages" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABTIAAAL5CAYAAACD2NutAAAgAElEQVR4nOzdfXhU9b33+88IhhYbNi3GHGOoINQEuqUNJDUbfJ6qGHaSKoi9JdvU0HoHOCqtGs8mgd2DwX1MdRfxImRbDTfuwS0CegglRuyIjzQ2gXSnLSRtEJUYm0Z2K+M+kxXHptY43dfCZJ3S374Iq6z16xD/fA/gG2fBv/70Fc+HptBXKflhmCwsLmp+f19zcnB4",
  "howToRedeem" : "<p>--</p>",
  "offerUrl" : "https://www.google.com",
  "termsConditions" : "<p>--</p>",
  "createdBy" : "User email id",
  "applicableCards" : "ALL CREDIT CARDS (EXCEPT CO-BRANDED),ALL CREDIT/DEBIT CARDS (EXCEPT CO-BRANDED),ALL DEBIT CARDS,CONSUMER LOANS,DINERS BLACK,INFINIA,OTHER CREDIT CARDS,REGALIA,TATA NEU INFINITY,TATA NEU PLUS",
  "applicableProducts" : [ "Product" ],
  "subCategory" : "Sub-category",
  "offerUrlValid" : true
}
Table 55. Request Fields
Path Type Description

channel

String

Offer channel (In-Store / Online / Both)

merchantId

String

Merchant ID

validFrom

String

Offer start date

validTo

String

Offer end date

offerType

String

Type of offer

offerValue

Number

Offer value

offerValueCurrency

String

Currency of offer value (optional)

offerValueType

String

Payout type (cpa_flat / cpa_percentage / cpa_reward_points)

applicableCountry

String

Applicable country

offerTitle

String

Offer title

offerSource

String

Offer source

offerVariant

String

Offer variant (optional)

offerDescription

String

Offer description

storeLocation

Array

Store locations list (optional) [If provided, city, state, country, zipcode, latitude, longitude are required]

couponCode

String

Coupon code (optional)

multipleConversions

Number

0 or 1 for multiple conversions

offerImages

String

Offer image base64 (optional)

howToRedeem

String

Redeem instructions

offerUrl

String

Required for Online/Both

termsConditions

String

Terms and conditions

applicableCards

String

Applicable cards

categoryType

String

Category type (optional)

curatedImages

String

Curated images base64 (optional)

createdBy

String

Created by (optional)

offerUrlValid

Boolean

Offer URL validation flag (optional)

applicableProducts

Array

Applicable products(optional)

subCategory

String

Sub-category

32.2. Response

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 79

{
  "offerId" : 416798,
  "sessionId" : "1",
  "status" : "Inserted into GMR"
}
Table 56. Response Fields
Path Type Description

offerId

Number

Offer ID

sessionId

String

Offer creation session ID

status

String

Creation status

33. Add Offline Offer

Endpoint: POST /api/v1/offers/create

Purpose: Create a new offline offer with store location details.

33.1. Request

POST /api/v1/offers/create HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 2454
Host: localhost:8080

{
  "channel" : "In-Store",
  "merchantId" : "HDFC5130",
  "validFrom" : "2027-05-27 00:00:00.000",
  "validTo" : "2027-05-29 23:59:59.000",
  "offerType" : "card linked",
  "offerValue" : 10.0,
  "offerValueCurrency" : "",
  "offerValueType" : "cpa_percentage",
  "applicableCountry" : "India",
  "offerTitle" : "API doc automation 1",
  "offerSource" : "123",
  "offerVariant" : "",
  "offerDescription" : "<p>--</p>",
  "categoryType" : "Category",
  "storeLocation" : [ {
    "cdfLocationId" : null,
    "address" : "Block 1, DivyaSree Omega Survey No 13, Kothaguda",
    "city" : "Kothaguda",
    "country" : "India",
    "countryCode" : "",
    "state" : "Telangana",
    "latitude" : 17.458414,
    "longitude" : 78.37256,
    "storeName" : "Store 1",
    "zipCode" : "500084",
    "mapLink" : "https://www.google.com/maps/?q=17.4584134,78.3725586",
    "associatedWithLiveOffers" : false
  }, {
    "cdfLocationId" : null,
    "address" : "Rio Business Park, Mahadevapura Village, Krishnarajapuram, Hobli, Bengaluru East",
    "city" : "Bengaluru",
    "country" : "India",
    "countryCode" : "",
    "state" : "Karnataka",
    "latitude" : 12.982804,
    "longitude" : 77.69169,
    "storeName" : "Store 2",
    "zipCode" : "560037",
    "mapLink" : "https://www.google.com/maps/?q=12.9828045,77.6916908",
    "associatedWithLiveOffers" : false
  } ],
  "couponCode" : "",
  "multipleConversions" : 0,
  "offerImages" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABTIAAAL5CAYAAACD2NutAAAgAElEQVR4nOzdfXhU9b33+88IhhYbNi3GHGOoINQEuqUNJDUbfJ6qGHaSKoi9JdvU0HoHOCqtGs8mgd2DwX1MdRfxImRbDTfuwS0CegglRuyIjzQ2gXSnLSRtEJUYm0Z2K+M+kxXHptY43dfCZJ3S374Iq6z16xD/fA/gG2fBv/70Fc+HptBXKflhmCwsLmp+f19zcnB4",
  "curatedImages" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABTIAAAL5CAYAAACD2NutAAAgAElEQVR4nOzdfXhU9b33+88IhhYbNi3GHGOoINQEuqUNJDUbfJ6qGHaSKoi9JdvU0HoHOCqtGs8mgd2DwX1MdRfxImRbDTfuwS0CegglRuyIjzQ2gXSnLSRtEJUYm0Z2K+M+kxXHptY43dfCZJ3S374Iq6z16xD/fA/gG2fBv/70Fc+HptBXKflhmCwsLmp+f19zcnB4",
  "howToRedeem" : "<p>--</p>",
  "offerUrl" : "https://www.google.com",
  "termsConditions" : "<p>--</p>",
  "createdBy" : "User email id",
  "applicableCards" : "ALL CREDIT CARDS (EXCEPT CO-BRANDED),ALL CREDIT/DEBIT CARDS (EXCEPT CO-BRANDED),ALL DEBIT CARDS,CONSUMER LOANS,DINERS BLACK,INFINIA,OTHER CREDIT CARDS,REGALIA,TATA NEU INFINITY,TATA NEU PLUS",
  "applicableProducts" : [ "Product" ],
  "subCategory" : "Sub-category",
  "offerUrlValid" : true
}
Table 57. Request Fields
Path Type Description

channel

String

Offer channel (In-Store / Online / Both)

merchantId

String

Merchant ID

validFrom

String

Offer start date

validTo

String

Offer end date

offerType

String

Type of offer

offerValue

Number

Offer value

offerValueCurrency

String

Currency of offer value (optional)

offerValueType

String

Payout type (cpa_flat / cpa_percentage / cpa_reward_points)

applicableCountry

String

Applicable country

offerTitle

String

Offer title

offerSource

String

Offer source

offerVariant

String

Offer variant (optional)

offerDescription

String

Offer description

storeLocation

Array

Store locations list (required for Offline offers)

storeLocation[].cdfLocationId

Null

Store location ID (not required - auto generated)

storeLocation[].address

String

Store address (Optional for Both and Online channels)

storeLocation[].city

String

Store city

storeLocation[].country

String

Store country

storeLocation[].countryCode

String

Store country code (Optional)

storeLocation[].state

String

Store state

storeLocation[].latitude

Number

Store latitude

storeLocation[].longitude

Number

Store longitude

storeLocation[].storeName

String

Store name (Optional)

storeLocation[].zipCode

String

Store zip code

storeLocation[].mapLink

String

Google map location link (Optional)

storeLocation[].associatedWithLiveOffers

Boolean

Indicates whether the store is associated with live offers (Optional)

couponCode

String

Coupon code (optional)

multipleConversions

Number

0 or 1 for multiple conversions

offerImages

String

Offer image base64 (optional)

howToRedeem

String

Redeem instructions

offerUrl

String

Required for Online/Both

termsConditions

String

Terms and conditions

applicableCards

String

Applicable cards

categoryType

String

Category type (optional)

curatedImages

String

Curated images base64 (optional)

createdBy

String

Created by (optional)

offerUrlValid

Boolean

Offer URL validation flag (optional)

applicableProducts

Array

Applicable products(optional)

subCategory

String

Sub-category

33.2. Response

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 79

{
  "offerId" : 416800,
  "sessionId" : "1",
  "status" : "Inserted into GMR"
}
Table 58. Response Fields
Path Type Description

offerId

Number

Offer ID

sessionId

String

Offer creation session ID

status

String

Creation status


34. Update Offer

Endpoint: PUT /api/v1/offers/{offerId}?updateType=OFFER_UPDATE

Purpose: Update an existing offer’s details (updateType = OFFER_UPDATE).

34.1. Request

PUT /api/v1/offers/415265?updateType=OFFER_UPDATE HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 1551
Host: localhost:8080

{
  "channel" : "Online",
  "merchantId" : "HDFC5130",
  "validFrom" : "2027-05-27 00:00:00.000",
  "validTo" : "2027-05-29 23:59:59.000",
  "offerType" : "card linked",
  "offerValue" : 10.0,
  "offerValueCurrency" : "",
  "offerValueType" : "cpa_percentage",
  "applicableCountry" : "India",
  "offerTitle" : "API doc automation 1 test",
  "offerSource" : "123",
  "offerVariant" : "",
  "offerDescription" : "<p>--</p>",
  "categoryType" : "",
  "storeLocation" : [ {
    "cdfLocationId" : null,
    "address" : "Block 1, DivyaSree Omega Survey No 13, Kothaguda",
    "city" : "Kothaguda",
    "country" : "India",
    "countryCode" : "",
    "state" : "Telangana",
    "latitude" : 17.458414,
    "longitude" : 78.37256,
    "storeName" : "Store 1",
    "zipCode" : "500084",
    "mapLink" : "https://www.google.com/maps/?q=17.4584134,78.3725586",
    "associatedWithLiveOffers" : false
  } ],
  "couponCode" : "",
  "multipleConversions" : 0,
  "offerImages" : "https://dpimages.crayondata.com/high-res-image/dev/HDFC5130off1779685722155.jpeg",
  "curatedImages" : "https://dpimages.crayondata.com/high-res-image/dev/HDFC5130off1779685722155.jpeg",
  "howToRedeem" : "<p>--</p>",
  "offerUrl" : "https://www.google.com",
  "termsConditions" : "<p>--</p>",
  "applicableCards" : "ALL CREDIT CARDS (EXCEPT CO-BRANDED),ALL CREDIT/DEBIT CARDS (EXCEPT CO-BRANDED),ALL DEBIT CARDS,CONSUMER LOANS,DINERS BLACK,INFINIA,OTHER CREDIT CARDS,REGALIA,TATA NEU INFINITY,TATA NEU PLUS",
  "applicableProducts" : [ "Product" ],
  "subCategory" : "Sub-category"
}
Table 59. /api/v1/offers/{offerId}
Parameter Description

offerId

ID of the offer to update

Table 60. Query Parameters
Parameter Description

updateType

Type of update (OFFER_UPDATE or DUPLICATE)

Table 61. Request Fields
Path Type Description

channel

String

Offer channel

merchantId

String

Merchant ID

validFrom

String

Valid from datetime

validTo

String

Valid to datetime

offerType

String

Offer type

offerValue

Number

Offer value

offerValueCurrency

String

Currency (optional)

offerValueType

String

Payout type

applicableCountry

String

Applicable country

offerTitle

String

Offer title

offerSource

String

Offer source

offerVariant

String

Offer variant (optional)

offerDescription

String

Offer description

categoryType

String

Category type (optional)

storeLocation

Array

Store locations

storeLocation[].cdfLocationId

Null

Store location ID (not required - auto generated)

storeLocation[].address

String

Store address

storeLocation[].city

String

City

storeLocation[].country

String

Country

storeLocation[].countryCode

String

Country code (optional)

storeLocation[].state

String

State

storeLocation[].latitude

Number

Latitude

storeLocation[].longitude

Number

Longitude

storeLocation[].storeName

String

Store name (optional)

storeLocation[].zipCode

String

Zip code

storeLocation[].mapLink

String

Map link (optional)

storeLocation[].associatedWithLiveOffers

Boolean

Whether store is linked to live offers

couponCode

String

Coupon code (optional)

multipleConversions

Number

Multiple conversions flag

offerImages

String

Offer images URL/base64 (optional)

curatedImages

String

Curated images URL/base64 (optional)

howToRedeem

String

How to redeem

offerUrl

String

Offer URL

termsConditions

String

Terms and conditions

applicableCards

String

Applicable cards

applicableProducts

Array

Applicable products(optional)

subCategory

String

Sub-category

34.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 68

{
  "offerId" : 415265,
  "message" : "Offer Updated Successfully"
}
Table 62. Response Fields
Path Type Description

offerId

Number

Updated offer ID

message

String

Update status message


35. Duplicate Offer

Endpoint: PUT /api/v1/offers/{offerId}?updateType=OFFER_DUPLICATE

Purpose: Create a duplicate copy of an existing offer (updateType = OFFER_DUPLICATE).

35.1. Request

PUT /api/v1/offers/415257?updateType=OFFER_DUPLICATE HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 1551
Host: localhost:8080

{
  "channel" : "Online",
  "merchantId" : "HDFC5130",
  "validFrom" : "2027-05-27 00:00:00.000",
  "validTo" : "2027-05-29 23:59:59.000",
  "offerType" : "card linked",
  "offerValue" : 10.0,
  "offerValueCurrency" : "",
  "offerValueType" : "cpa_percentage",
  "applicableCountry" : "India",
  "offerTitle" : "API doc automation 1 test",
  "offerSource" : "123",
  "offerVariant" : "",
  "offerDescription" : "<p>--</p>",
  "categoryType" : "",
  "storeLocation" : [ {
    "cdfLocationId" : null,
    "address" : "Block 1, DivyaSree Omega Survey No 13, Kothaguda",
    "city" : "Kothaguda",
    "country" : "India",
    "countryCode" : "",
    "state" : "Telangana",
    "latitude" : 17.458414,
    "longitude" : 78.37256,
    "storeName" : "Store 1",
    "zipCode" : "500084",
    "mapLink" : "https://www.google.com/maps/?q=17.4584134,78.3725586",
    "associatedWithLiveOffers" : false
  } ],
  "couponCode" : "",
  "multipleConversions" : 0,
  "offerImages" : "https://dpimages.crayondata.com/high-res-image/dev/HDFC5130off1779685722155.jpeg",
  "curatedImages" : "https://dpimages.crayondata.com/high-res-image/dev/HDFC5130off1779685722155.jpeg",
  "howToRedeem" : "<p>--</p>",
  "offerUrl" : "https://www.google.com",
  "termsConditions" : "<p>--</p>",
  "applicableCards" : "ALL CREDIT CARDS (EXCEPT CO-BRANDED),ALL CREDIT/DEBIT CARDS (EXCEPT CO-BRANDED),ALL DEBIT CARDS,CONSUMER LOANS,DINERS BLACK,INFINIA,OTHER CREDIT CARDS,REGALIA,TATA NEU INFINITY,TATA NEU PLUS",
  "applicableProducts" : [ "Product" ],
  "subCategory" : "Sub-category"
}
Table 63. /api/v1/offers/{offerId}
Parameter Description

offerId

ID of the offer to update

Table 64. Query Parameters
Parameter Description

updateType

Type of update (OFFER_UPDATE or DUPLICATE)

Table 65. Request Fields
Path Type Description

channel

String

Offer channel

merchantId

String

Merchant ID

validFrom

String

Valid from datetime

validTo

String

Valid to datetime

offerType

String

Offer type

offerValue

Number

Offer value

offerValueCurrency

String

Currency (optional)

offerValueType

String

Payout type

applicableCountry

String

Applicable country

offerTitle

String

Offer title

offerSource

String

Offer source

offerVariant

String

Offer variant (optional)

offerDescription

String

Offer description

categoryType

String

Category type (optional)

storeLocation

Array

Store locations

storeLocation[].cdfLocationId

Null

Store location ID (not required - auto generated)

storeLocation[].address

String

Store address

storeLocation[].city

String

City

storeLocation[].country

String

Country

storeLocation[].countryCode

String

Country code (optional)

storeLocation[].state

String

State

storeLocation[].latitude

Number

Latitude

storeLocation[].longitude

Number

Longitude

storeLocation[].storeName

String

Store name (optional)

storeLocation[].zipCode

String

Zip code

storeLocation[].mapLink

String

Map link (optional)

storeLocation[].associatedWithLiveOffers

Boolean

Whether store is linked to live offers

couponCode

String

Coupon code (optional)

multipleConversions

Number

Multiple conversions flag

offerImages

String

Offer images URL/base64 (optional)

curatedImages

String

Curated images URL/base64 (optional)

howToRedeem

String

How to redeem

offerUrl

String

Offer URL

termsConditions

String

Terms and conditions

applicableCards

String

Applicable cards

applicableProducts

Array

Applicable products(optional)

subCategory

String

Sub-category

35.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 71

{
  "offerId" : 416799,
  "message" : "Offer Duplicated Successfully"
}
Table 66. Response Fields
Path Type Description

offerId

Number

Updated offer ID

message

String

Update status message


36. Get Live Offers By Merchant

Endpoint: GET /api/v1/offers/merchant/{merchantId}?offerType=LIVE_OFFERS

Purpose: Retrieve only live/published offers for a specific merchant (offerType = LIVE_OFFERS).

36.1. Request

GET /api/v1/offers/merchant/HDFC12116?offerType=LIVE_OFFERS HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 67. /api/v1/offers/merchant/{merchantId}
Parameter Description

merchantId

Unique merchant identifier

Table 68. Query Parameters
Parameter Description

offerType

Type of merchant offers (ALL_OFFERS / LIVE_OFFERS) (optional)

36.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 301

{
  "offerListResponse" : [ {
    "offerId" : 415752,
    "offerDetails" : "<p>--</p>",
    "offerType" : "card linked",
    "validFrom" : "2026-07-06 00:00:00",
    "validTo" : "2030-07-10 23:59:59",
    "channel" : "Online",
    "offerStatus" : "Live",
    "offerTitle" : "API doc test live"
  } ]
}
Table 69. Response Fields
Path Type Description

offerListResponse

Array

List of offers for merchant

offerListResponse[].offerId

Number

Offer ID

offerListResponse[].offerDetails

String

Offer details

offerListResponse[].offerType

String

Offer type

offerListResponse[].validFrom

String

Offer start date

offerListResponse[].validTo

String

Offer end date

offerListResponse[].channel

String

Offer channel

offerListResponse[].offerStatus

String

Offer status

offerListResponse[].offerTitle

String

Offer title


37. Get All Offers By Merchant

Endpoint: GET /api/v1/offers/merchant/{merchantId}?offerType=ALL_OFFERS

Purpose: Retrieve all offers for a specific merchant (offerType = ALL_OFFERS).

37.1. Request

GET /api/v1/offers/merchant/HDFC106772?offerType=ALL_OFFERS HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 70. /api/v1/offers/merchant/{merchantId}
Parameter Description

merchantId

Unique merchant identifier

Table 71. Query Parameters
Parameter Description

offerType

Type of merchant offers (ALL_OFFERS / LIVE_OFFERS) (optional)

37.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 896

{
  "offerListResponse" : [ {
    "offerId" : 415222,
    "offerDetails" : "<p>25% off on food</p>",
    "offerType" : "Ofline coupon",
    "validFrom" : "2026-05-19 00:00:00",
    "validTo" : "2026-05-26 23:59:59",
    "channel" : "In-Store",
    "offerStatus" : "Expired",
    "offerTitle" : "50%off on all 990"
  }, {
    "offerId" : 415221,
    "offerDetails" : "<p>25% off on food</p>",
    "offerType" : "Ofline coupon",
    "validFrom" : "2026-05-14 00:00:00",
    "validTo" : "2026-05-16 23:59:59",
    "channel" : "In-Store",
    "offerStatus" : "Expired",
    "offerTitle" : "50%off on all 990"
  }, {
    "offerId" : 415160,
    "offerDetails" : "25% off on food",
    "offerType" : "Ofline coupon",
    "validFrom" : "2026-03-30 00:00:00",
    "validTo" : "2026-03-30 00:00:00",
    "channel" : "In-Store",
    "offerStatus" : "Expired",
    "offerTitle" : "50%off on all 990"
  } ]
}
Table 72. Response Fields
Path Type Description

offerListResponse

Array

List of offers for merchant

offerListResponse[].offerId

Number

Offer ID

offerListResponse[].offerDetails

String

Offer details

offerListResponse[].offerType

String

Offer type

offerListResponse[].validFrom

String

Offer start date

offerListResponse[].validTo

String

Offer end date

offerListResponse[].channel

String

Offer channel

offerListResponse[].offerStatus

String

Offer status

offerListResponse[].offerTitle

String

Offer title


38. Search Offer

Endpoint: POST /api/v1/offers/search

Purpose: Search offers by keyword for auto-suggest functionality.

38.1. Request

POST /api/v1/offers/search HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 27
Host: localhost:8080

{
  "searchWord" : "test"
}
Table 73. Request Fields
Path Type Description

searchWord

String

Search keyword used for auto-suggest or offer search

38.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 91

[ "Test Offline Payzapp Offer pPnHM3", "testnearby", "test bu es new fields test payzapp" ]
Table 74. Response Fields
Path Type Description

[]

Array

List of matched offer search results


39. Get Dynamic Offer Filters

Endpoint: GET /api/v1/offers/filters

Purpose: Retrieve available dynamic filter options for offers.

39.1. Request

GET /api/v1/offers/filters HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080

39.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 202

{
  "offerType" : [ "All", "card linked", "Card Linked" ],
  "offerSource" : [ "All", "11Dec2024", "123" ],
  "offerChannel" : [ "All", "Both", "In-Store" ],
  "status" : [ "All", "Draft", "Expired" ]
}
Table 75. Response Fields
Path Type Description

offerChannel

Array

Available offer channels

status

Array

Available offer statuses

offerSource

Array

Available offer sources

offerType

Array

Available offer types


40. Offer Actions

Endpoint: POST /api/v1/offers/status

Purpose: Perform bulk actions on offers (Submit, Pause, Resume, Withdraw).

40.1. Request

POST /api/v1/offers/status HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 62
Host: localhost:8080

{
  "actionType" : "OFFER_SUBMIT",
  "offerIds" : [ 415265 ]
}
Table 76. Request Fields
Path Type Description

actionType

String

Action to perform on the offers. Supported values: OFFER_PAUSE, OFFER_RESUME, OFFER_WITHDRAW, OFFER_SUBMIT

offerIds

Array

List of offer IDs

offerIds[]

Array

Offer ID

40.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 122

{
  "sessionIds" : [ "1" ],
  "status" : "Pending",
  "error" : null,
  "invalidOfferIds" : [ ],
  "errorMessages" : [ ]
}
Table 77. Response Fields
Path Type Description

sessionIds

Array

List of session IDs

status

String

Status of the action response

error

Null

Error message if any

invalidOfferIds

Array

List of invalid offer IDs

errorMessages

Array

Detailed error messages


41. Approve or Reject Offer

Endpoint: POST /api/v1/offers/review

Purpose: Approve or reject offers.

41.1. Request

POST /api/v1/offers/review HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 149
Host: localhost:8080

{
  "actionType" : "OFFER_APPROVE",
  "offerIds" : [ {
    "offerId" : 415712,
    "rejectionReason" : null
  } ],
  "commonRejectionReason" : null
}
Table 78. Request Fields
Path Type Description

actionType

String

Action to perform (OFFER_APPROVE or OFFER_REJECT)

offerIds

Array

List of offers to process

offerIds[].offerId

Number

Offer ID

offerIds[].rejectionReason

Null

Reason for rejection

commonRejectionReason

Null

Common rejection reason for all offers

41.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 122

{
  "sessionIds" : [ "1" ],
  "status" : "Pending",
  "error" : null,
  "invalidOfferIds" : [ ],
  "errorMessages" : [ ]
}
Table 79. Response Fields
Path Type Description

sessionIds

Array

Processing session IDs

status

String

Status of the approval/rejection request

error

Null

Error message if the operation failed

invalidOfferIds

Array

List of invalid offer IDs

errorMessages

Array

Detailed error messages for invalid offers


42. Get Applicable Cards

Endpoint: GET /api/v1/offers/applicableCards

Purpose: Retrieve list of all applicable card types for offers.

42.1. Request

GET /api/v1/offers/applicableCards HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080

42.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 133

{
  "applicableCards" : [ "ALL CREDIT CARDS (EXCEPT CO-BRANDED)", "ALL CREDIT/DEBIT CARDS (EXCEPT CO-BRANDED)", "ALL DEBIT CARDS" ]
}
Table 80. Response Fields
Path Type Description

applicableCards

Array

List of applicable cards


43. Get Credit Limit

Endpoint: GET /api/v1/offers/ai/credit-limit

Purpose: Retrieve AI-generated credit limit suggestions for offer fields.

43.1. Request

GET /api/v1/offers/ai/credit-limit?offerId=415265 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 81. Query Parameters
Parameter Description

offerId

Offer ID (optional)

43.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 126

{
  "HOW_TO_REDEEM" : 0,
  "TOTAL_RETRY_LIMIT" : 5,
  "OFFER_TITLE" : 0,
  "TERMS_CONDITIONS" : 0,
  "OFFER_DESCRIPTION" : 0
}
Table 82. Response Fields
Path Type Description

OFFER_TITLE

Number

Credit limit for offer title

OFFER_DESCRIPTION

Number

Credit limit for offer description

TERMS_CONDITIONS

Number

Credit limit for terms and conditions

HOW_TO_REDEEM

Number

Credit limit for how to redeem

TOTAL_RETRY_LIMIT

Number

Credit limit for retry


44. Get Offer Source

Endpoint: GET /api/v1/offers/offerSource

Purpose: Retrieve available offer sources and their variants.

44.1. Request

GET /api/v1/offers/offerSource HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080

44.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 178

{
  "offerSources" : [ {
    "source" : "",
    "variants" : [ ]
  }, {
    "source" : "11Dec2024",
    "variants" : [ ]
  }, {
    "source" : "123",
    "variants" : [ ]
  } ]
}
Table 83. Response Fields
Path Type Description

offerSources

Array

List of offer sources

offerSources[].source

String

Offer source name

offerSources[].variants

Array

List of variants for the source

offerSources[].variants[]

Array

Variant value


45. Get Offer History

Endpoint: POST /api/v1/offers/history/{offerId}

Purpose: Retrieve offer history with filters.

45.1. Request

POST /api/v1/offers/history/415264 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 148
Host: localhost:8080

{
  "timeZone" : "Asia/Kolkata",
  "filters" : {
    "field" : [ "All", "status" ],
    "toDate" : "2026-05-28",
    "fromDate" : "2026-05-25"
  }
}
Table 84. /api/v1/offers/history/{offerId}
Parameter Description

offerId

ID of the offer

Table 85. Request Fields
Path Type Description

timeZone

String

Timezone used for displaying history timestamps (optional)

filters

Object

Filters for offer history (optional)

filters.field

Array

Filter by modified field and action type (optional)

filters.fromDate

String

Filter from a date (optional)

filters.toDate

String

Filter till a date (optional)

45.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 941

{
  "offerId" : 415264,
  "merchantName" : "test brand name ed",
  "offerTitle" : "test data ",
  "offerStatus" : "EXPIRED",
  "offerHistoryList" : [ {
    "offerHistoryId" : 194789,
    "actionDateTime" : "2026-05-25 16:19:07",
    "userName" : "System",
    "field" : "Status",
    "action" : "Status Change",
    "previousValue" : "Scheduled",
    "newValue" : "Live",
    "comments" : ""
  }, {
    "offerHistoryId" : 194788,
    "actionDateTime" : "2026-05-25 16:03:31",
    "userName" : "Vignesh Mohanraj",
    "field" : "Status",
    "action" : "Status Change",
    "previousValue" : "Pending for Approval",
    "newValue" : "Scheduled",
    "comments" : ""
  }, {
    "offerHistoryId" : 194786,
    "actionDateTime" : "2026-05-25 15:58:23",
    "userName" : "Vignesh Mohanraj",
    "field" : "Status",
    "action" : "Status Change",
    "previousValue" : "Draft",
    "newValue" : "Pending for Approval",
    "comments" : ""
  } ]
}
Table 86. Response Fields
Path Type Description

offerId

Number

Offer ID

merchantName

String

Merchant name

offerTitle

String

Offer title

offerStatus

String

Current offer status

offerHistoryList

Array

Offer history entries

offerHistoryList[].offerHistoryId

Number

Offer History ID

offerHistoryList[].actionDateTime

String

Date and time of action

offerHistoryList[].userName

String

User who performed the action

offerHistoryList[].field

String

Field that was modified

offerHistoryList[].action

String

Action performed

offerHistoryList[].previousValue

String

Previous value before update

offerHistoryList[].newValue

String

New value after update

offerHistoryList[].comments

String

Additional comments


46. Get Dynamic Offer History Filters

Endpoint: GET /api/v1/offers/history/filters/{offerId}

Purpose: Retrieve available filter options for offer history.

46.1. Request

GET /api/v1/offers/history/filters/415264 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 87. /api/v1/offers/history/filters/{offerId}
Parameter Description

offerId

Offer ID

46.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 35

{
  "field" : [ "All", "status" ]
}
Table 88. Response Fields
Path Type Description

field

Array

List of modified fields and Actions performed


47. Download Offer History CSV

Endpoint: POST /api/v1/offers/history/download/{offerId}

Purpose: Download offer history as CSV file.

47.1. Request

POST /api/v1/offers/history/download/415264 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 190
Host: localhost:8080

{
  "timeZone" : "Asia/Kolkata",
  "filters" : {
    "field" : [ "All", "status" ],
    "toDate" : "2026-05-28",
    "fromDate" : "2026-05-25"
  },
  "offerHistoryIds" : [ 194788, 194789 ]
}
Table 89. /api/v1/offers/history/download/{offerId}
Parameter Description

offerId

Offer ID

Table 90. Request Fields
Path Type Description

timeZone

String

Timezone used for displaying history timestamps (optional)

filters

Object

Filters for offer history (optional)

filters.field

Array

Filter by modified field and action type (optional)

filters.fromDate

String

Filter from a date (optional)

filters.toDate

String

Filter till a date (optional)

offerHistoryIds

Array

Offer History IDs


48. Download Offers CSV

Endpoint: POST /api/v1/offers/download

Purpose: Download offers as CSV with filters.

48.1. Request

POST /api/v1/offers/download HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 485
Host: localhost:8080

{
  "offset" : 0,
  "filters" : {
    "fromDate" : {
      "dateStart" : "2026-04-05",
      "dateEnd" : "2026-05-30"
    },
    "offerType" : [ "online coupon" ],
    "offerSource" : [ "SMARTBUY" ],
    "offerChannel" : [ "Both" ],
    "merchantNames" : [ "Test vayapar new user" ],
    "toDate" : {
      "dateStart" : "2026-05-28",
      "dateEnd" : "2026-05-31"
    },
    "status" : [ "Expired" ]
  },
  "offerIds" : [ ],
  "searchWord" : "",
  "sortBy" : "",
  "sortOrder" : ""
}
Table 91. Request Fields
Path Type Description

offset

Number

Pagination offset

filters

Object

Offer filters

filters.offerChannel

Array

Offer channel filter

filters.status

Array

Offer status filter

filters.offerSource

Array

Offer source filter

filters.offerType

Array

Offer type filter

filters.merchantNames

Array

Merchant name filter

filters.fromDate

Object

From date filter

filters.fromDate.dateStart

String

From start date

filters.fromDate.dateEnd

String

From end date

filters.toDate

Object

To date filter

filters.toDate.dateStart

String

To start date

filters.toDate.dateEnd

String

To end date

offerIds

Array

List of offer IDs

searchWord

String

Search keyword

sortBy

String

Sort field

sortOrder

String

Sort order (ASC/DESC)

Merchant APIs

49. Get All Merchants

Endpoint: POST /api/v1/merchants

Purpose: Retrieve paginated list of merchants with filters.

49.1. Request

POST /api/v1/merchants HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 204
Host: localhost:8080

{
  "offset" : 0,
  "limit" : 2,
  "filters" : {
    "country" : [ ],
    "channel" : [ ],
    "offerCountRange" : [ ],
    "category" : [ ]
  },
  "sortBy" : "",
  "sortOrder" : "",
  "searchWord" : ""
}
Table 92. Request Fields
Path Type Description

offset

Number

Pagination offset

limit

Number

Number of records per page

filters

Object

Merchant filters map (optional)

filters.channel

Array

Filter by channel (optional)

filters.category

Array

Filter by category (optional)

filters.offerCountRange

Array

Filter by offer count range (optional)

filters.country

Array

Filter by country (optional)

sortBy

String

Sorting field (optional)

sortOrder

String

Sorting order ASC/DESC (optional)

searchWord

String

Search keyword (optional)

49.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 653

{
  "merchantListResponses" : [ {
    "merchantId" : "HDFC107122",
    "merchantName" : "guindy location",
    "merchantDescription" : "",
    "category" : "apparel and accessories",
    "offerCount" : 1,
    "channel" : "In-Store",
    "country" : "",
    "lastUpdated" : "2026-11-13T07:56:24.318149"
  }, {
    "merchantId" : "HDFC107119",
    "merchantName" : "anna nagar location",
    "merchantDescription" : "",
    "category" : "apparel and accessories",
    "offerCount" : 1,
    "channel" : "In-Store",
    "country" : "",
    "lastUpdated" : "2026-11-13T07:56:24.318149"
  } ],
  "totalCount" : 25905,
  "paginationDropdown" : [ 10, 25, 50 ]
}
Table 93. Response Fields
Path Type Description

merchantListResponses

Array

List of merchants

merchantListResponses[].merchantId

String

Merchant ID

merchantListResponses[].merchantName

String

Merchant name

merchantListResponses[].merchantDescription

String

Merchant description

merchantListResponses[].category

String

Merchant category

merchantListResponses[].offerCount

Number

Offer count

merchantListResponses[].channel

String

Channel

merchantListResponses[].country

String

Country

merchantListResponses[].lastUpdated

String

Last updated timestamp

totalCount

Number

Total merchant count

paginationDropdown

Array

Pagination dropdown values


50. Get Merchant By ID

Endpoint: GET /api/v1/merchants/{merchantId}

Purpose: Retrieve merchant details by ID.

50.1. Request

GET /api/v1/merchants/HDFC106772 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 94. /api/v1/merchants/{merchantId}
Parameter Description

merchantId

ID of the Merchant

50.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 769

{
  "merchantId" : "HDFC106772",
  "merchantName" : "new spring 570",
  "registeredCompanyName" : "",
  "brandLogos" : "https://dpimages.crayondata.com/high-res-image/resized/500X500/The_Raymond_Shop.webp",
  "merchantDescription" : "",
  "category" : "dining",
  "applicableMarketPlaces" : "",
  "channel" : "In-Store",
  "merchantUrl" : "https://amazon1.com",
  "country" : "",
  "state" : "",
  "city" : "",
  "postalZipcode" : "",
  "merchantBannerImage" : "https://dpimages.crayondata.com/high-res-image/hdfc/genric_updated/1280x800/3469.webp",
  "merchantImage" : "https://dpimages.crayondata.com/high-res-image/hdfc/genric_updated/1280x800/3469.webp",
  "clientName" : "HDFC",
  "phoneNumber" : "nan",
  "isHyperLocal" : 1,
  "tradeLicenseNumber" : "LIC123459"
}
Table 95. Response Fields
Path Type Description

merchantId

String

Merchant ID

merchantName

String

Merchant name

registeredCompanyName

String

Registered company name

brandLogos

String

Brand logos

merchantDescription

String

Merchant description

category

String

Merchant category

applicableMarketPlaces

String

Applicable marketplaces

channel

String

Channel

merchantUrl

String

Merchant URL

country

String

Country

state

String

State

city

String

City

postalZipcode

String

Postal/Zip code

merchantBannerImage

String

Merchant banner image

merchantImage

String

Merchant image

clientName

String

Client name

phoneNumber

String

Phone number

isHyperLocal

Number

Hyperlocal flag

tradeLicenseNumber

String

Trade license number


51. Search Merchant Names

Endpoint: POST /api/v1/merchants/search?searchType=MERCHANTS

Purpose: Search merchants by keyword.

51.1. Request

POST /api/v1/merchants/search?searchType=MERCHANTS HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 40
Host: localhost:8080

{
  "searchWord" : "unittest merchant"
}
Table 96. Query Parameters
Parameter Description

searchType

Merchant search type (MERCHANTS or CAMPAIGN_MERCHANTS)

Table 97. Request Fields
Path Type Description

searchWord

String

Merchant search keyword

51.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 156

[ {
  "merchantName" : "unittest merchant 4 update",
  "merchantId" : "HDFC25205",
  "category" : "personal service providers",
  "channel" : "In-Store"
} ]
Table 98. Response Fields
Path Type Description

[].merchantName

String

Merchant name

[].merchantId

String

Merchant ID

[].category

String

Merchant category

[].channel

String

Merchant channel


52. Search Campaign Merchant Names

Endpoint: POST /api/v1/merchants/search?searchType=CAMPAIGN_MERCHANTS

Purpose: Search merchants for campaign selection.

52.1. Request

POST /api/v1/merchants/search?searchType=CAMPAIGN_MERCHANTS HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 27
Host: localhost:8080

{
  "searchWord" : "test"
}
Table 99. Query Parameters
Parameter Description

searchType

Merchant search type (MERCHANTS or CAMPAIGN_MERCHANTS)

Table 100. Request Fields
Path Type Description

searchWord

String

Merchant search keyword

52.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 418

[ {
  "merchantName" : "testbulkuploadeditadd18thfeb",
  "merchantId" : "HDFC105009",
  "category" : "personal service providers",
  "channel" : "Online"
}, {
  "merchantName" : "soft drinks test xls",
  "merchantId" : "HDFC105690",
  "category" : "entertainment",
  "channel" : "Both"
}, {
  "merchantName" : "test sanity new raw",
  "merchantId" : "HDFC106775",
  "category" : "electronics",
  "channel" : "Both"
} ]
Table 101. Response Fields
Path Type Description

[].merchantName

String

Merchant name

[].merchantId

String

Merchant ID

[].category

String

Merchant category

[].channel

String

Merchant channel


53. Create Merchant

Endpoint: POST /api/v1/merchants/create

Purpose: Create a new merchant.

53.1. Request

POST /api/v1/merchants/create HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 1278
Host: localhost:8080

{
  "merchantName" : "Nike Store",
  "businessName" : "Nike Inc.",
  "phoneNumber" : "+91-7777777777",
  "isHyperLocal" : 0,
  "tradeLicenseNumber" : "LIC-003",
  "merchantDescription" : "Test merchant",
  "category" : "entertainment",
  "operatingCountries" : "",
  "channel" : "Online",
  "websiteUrl" : "https://nike.com",
  "country" : "",
  "state" : "",
  "city" : "",
  "postalCode" : "",
  "merchantLogo" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABTIAAAL5CAYAAACD2NutAAAgAElEQVR4nOzdfXhU9b33+88IhhYbNi3GHGOoINQEuqUNJDUbfJ6qGHaSKoi9JdvU0HoHOCqtGs8mgd2DwX1MdRfxImRbDTfuwS0CegglRuyIjzQ2gXSnLSRtEJUYm0Z2K+M+kxXHptY43dfCZJ3S374Iq6z16xD/fA/gG2fBv/70Fc+HptBXKflhmCwsLmp+f19zcnB4",
  "merchantImage" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABTIAAAL5CAYAAACD2NutAAAgAElEQVR4nOzdfXhU9b33+88IhhYbNi3GHGOoINQEuqUNJDUbfJ6qGHaSKoi9JdvU0HoHOCqtGs8mgd2DwX1MdRfxImRbDTfuwS0CegglRuyIjzQ2gXSnLSRtEJUYm0Z2K+M+kxXHptY43dfCZJ3S374Iq6z16xD/fA/gG2fBv/70Fc+HptBXKflhmCwsLmp+f19zcnB4",
  "merchantBanner" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABTIAAAL5CAYAAACD2NutAAAgAElEQVR4nOzdfXhU9b33+88IhhYbNi3GHGOoINQEuqUNJDUbfJ6qGHaSKoi9JdvU0HoHOCqtGs8mgd2DwX1MdRfxImRbDTfuwS0CegglRuyIjzQ2gXSnLSRtEJUYm0Z2K+M+kxXHptY43dfCZJ3S374Iq6z16xD/fA/gG2fBv/70Fc+HptBXKflhmCwsLmp+f19zcnB4"
}
Table 102. Request Fields
Path Type Description

merchantName

String

Merchant name

businessName

String

Business name (optional)

phoneNumber

String

Phone number (optional)

isHyperLocal

Number

Hyperlocal flag (optional)

tradeLicenseNumber

String

Trade license number (optional)

merchantDescription

String

Merchant description (optional)

category

String

Merchant category

operatingCountries

String

Operating countries (optional)

channel

String

Channel (In-Store/Online/Both)

websiteUrl

String

Website URL

country

String

Country (optional)

state

String

State (optional)

city

String

City (optional)

postalCode

String

Postal code (optional)

merchantLogo

String

Merchant logo (base64) (optional)

merchantImage

String

Merchant image (base64) (optional)

merchantBanner

String

Merchant banner (base64) (optional)

53.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 47

{
  "sessionId" : "1",
  "status" : "Pending"
}
Table 103. Response Fields
Path Type Description

sessionId

String

Upload session ID

status

String

Merchant creation status


54. Update Merchant

Endpoint: PUT /api/v1/merchants/{merchantId}

Purpose: Update existing merchant details.

54.1. Request

PUT /api/v1/merchants/HDFC106789 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 813
Host: localhost:8080

{
  "merchantName" : "test data third party intergration",
  "businessName" : "test data third party intergration003",
  "merchantDescription" : "",
  "category" : "entertainment",
  "phoneNumber" : "+91-9876545676",
  "isHyperLocal" : 0,
  "tradeLicenseNumber" : "6543wb",
  "operatingCountries" : "India",
  "channel" : "Both",
  "websiteUrl" : "https://www.amazon.in",
  "country" : "",
  "state" : "",
  "city" : "",
  "postalCode" : "",
  "merchantLogo" : "https://dpimages.crayondata.com/high-res-image/dev/testdatathirdpartyintergration0031779430882296.jpeg",
  "merchantImage" : "https://dpimages.crayondata.com/high-res-image/dev/TestMerchantmeHj9XJxrxboth1784019389810.jpeg",
  "merchantBanner" : "https://dpimages.crayondata.com/high-res-image/dev/testdatathirdpartyintergration0031779430880268.jpeg"
}
Table 104. /api/v1/merchants/{merchantId}
Parameter Description

merchantId

Merchant ID

Table 105. Request Fields
Path Type Description

merchantName

String

Merchant name (optional)

businessName

String

Business name (optional)

merchantDescription

String

Merchant description (optional)

category

String

Merchant category (optional)

phoneNumber

String

Phone number (optional)

isHyperLocal

Number

Hyperlocal flag

tradeLicenseNumber

String

Trade license number (optional)

operatingCountries

String

Operating countries (optional)

channel

String

Merchant channel

websiteUrl

String

Website URL (optional)

country

String

Country (optional)

state

String

State (optional)

city

String

City (optional)

postalCode

String

Postal code (optional)

merchantLogo

String

Merchant logo URL/base64 (optional)

merchantImage

String

Merchant image URL/base64 (optional)

merchantBanner

String

Merchant banner URL/base64 (optional)

54.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 47

{
  "sessionId" : "1",
  "status" : "Success"
}
Table 106. Response Fields
Path Type Description

sessionId

String

Upload session ID

status

String

Merchant update status


55. Type Ahead Merchants

Endpoint: POST /api/v1/merchants/typeAhead

Purpose: Auto-suggest merchants by keyword.

55.1. Request

POST /api/v1/merchants/typeAhead HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 27
Host: localhost:8080

{
  "searchWord" : "test"
}
Table 107. Request Fields
Path Type Description

searchWord

String

Merchant search keyword with minimum 3 characters

55.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 29

[ "TEST001", "test", "Test" ]
Table 108. Response Fields
Path Type Description

[]

Array

List of merchant names


56. Get Merchant Filters

Endpoint: GET /api/v1/merchants/filters

Purpose: Retrieve available merchant filter options.

56.1. Request

GET /api/v1/merchants/filters HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080

56.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 157

{
  "category" : [ "All", "apparel and accessories", "dining" ],
  "channel" : [ "All", "Both", "In-Store" ],
  "country" : [ "All", "Albania", "Algeria" ]
}
Table 109. Response Fields
Path Type Description

channel

Array

Available merchant channels (optional)

category

Array

Available merchant categories (optional)

country

Array

Available merchant countries (optional)


57. Get Merchant Stores

Endpoint: POST /api/v1/merchants/stores/{merchantId}

Purpose: Retrieve store locations for a merchant.

57.1. Request

POST /api/v1/merchants/stores/HDFC26409 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 187
Host: localhost:8080

{
  "filters" : {
    "country" : [ "all", "India" ],
    "city" : [ "all", "Chennai", "Mumbai", "Pune" ],
    "state" : [ "all", "Maharashtra", "Tamil Nadu" ]
  },
  "offerId" : 415265
}
Table 110. /api/v1/merchants/stores/{merchantId}
Parameter Description

merchantId

Merchant ID

Table 111. Request Fields
Path Type Description

filters

Object

Dynamic filter map for country/state/city (optional)

filters.country

Array

Country filter list (optional)

filters.state

Array

State filter list (optional)

filters.city

Array

City filter list (optional)

offerId

Number

Offer ID for filtering store locations (optional)

57.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 668

{
  "storeLocations" : [ {
    "cdfLocationId" : 927493,
    "address" : "tbm",
    "city" : "Chennai",
    "country" : "India",
    "countryCode" : "",
    "state" : "Tamil Nadu",
    "latitude" : null,
    "longitude" : null,
    "storeName" : "Store 3",
    "zipCode" : "0000",
    "mapLink" : "",
    "associatedWithLiveOffers" : false
  }, {
    "cdfLocationId" : 927494,
    "address" : "karadi",
    "city" : "Pune",
    "country" : "India",
    "countryCode" : "",
    "state" : "Maharashtra",
    "latitude" : null,
    "longitude" : null,
    "storeName" : "Store 4",
    "zipCode" : "0000",
    "mapLink" : "",
    "associatedWithLiveOffers" : false
  } ]
}
Table 112. Response Fields
Path Type Description

storeLocations[]

Array

List of merchant store locations

storeLocations[].cdfLocationId

Number

CDF location ID

storeLocations[].address

String

Store address

storeLocations[].city

String

City

storeLocations[].country

String

Country

storeLocations[].countryCode

String

Country code

storeLocations[].state

String

State

storeLocations[].latitude

Null

Latitude

storeLocations[].longitude

Null

Longitude

storeLocations[].storeName

String

Store name

storeLocations[].zipCode

String

Zip code

storeLocations[].mapLink

String

Map link

storeLocations[].associatedWithLiveOffers

Boolean

Whether store is linked to live offers


58. Get Merchant Store Filters

Endpoint: GET /api/v1/merchants/stores/filters/{merchantId}

Purpose: Retrieve store filter options for a merchant.

58.1. Request

GET /api/v1/merchants/stores/filters/HDFC26409 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 113. /api/v1/merchants/stores/filters/{merchantId}
Parameter Description

merchantId

Merchant ID

58.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 129

{
  "country" : [ "All", "India" ],
  "state" : [ "All", "Maharashtra", "Tamil Nadu" ],
  "city" : [ "All", "Chennai", "Pune" ]
}
Table 114. Response Fields
Path Type Description

country[]

Array

Country filter values

state[]

Array

State filter values

city[]

Array

City filter values


59. Delete Merchant Stores

Endpoint: DELETE /api/v1/merchants/stores/{merchantId}

Purpose: Delete store locations for a merchant.

59.1. Request

DELETE /api/v1/merchants/stores/HDFC105861 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 190
Host: localhost:8080

{
  "city" : "all",
  "country" : "all",
  "state" : "all",
  "address" : "VISIT_NEAREST_STORE-Visit / Contact the nearest merchant store.",
  "zipCode" : "0000",
  "storeName" : "Store 1"
}
Table 115. /api/v1/merchants/stores/{merchantId}
Parameter Description

merchantId

Merchant ID

Table 116. Request Fields
Path Type Description

city

String

City

country

String

Country

state

String

State

address

String

Address

zipCode

String

Zip code

storeName

String

Store name

59.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 65

{
  "message" : "Store Location deleted",
  "statusCode" : "OK"
}
Table 117. Response Fields
Path Type Description

message

String

Response message

statusCode

String

HTTP status


60. Get All Merchant View Card

Endpoint: POST /api/v1/merchants/merchant-viewcard/

Purpose: Retrieve merchant view card details.

60.1. Request

POST /api/v1/merchants/merchant-viewcard/ HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 37
Host: localhost:8080

{
  "merchantIds" : [ "HDFC12116" ]
}
Table 118. Request Fields
Path Type Description

merchantIds[]

Array

List of merchant IDs

60.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 356

[ {
  "cdfMerchantId" : "HDFC12116",
  "merchantName" : "Akasaki DD Mobile",
  "merchantImage" : "https://dpimages.crayondata.com/high-res-image/hdfc/genric_updated/1280x800/3459.webp",
  "category" : "retail stores",
  "cdfOfferId" : "415752",
  "offerTitle" : "API doc test live",
  "validTo" : "2030-07-10T23:59:59",
  "applicableChannel" : "Online"
} ]
Table 119. Response Fields
Path Type Description

[].cdfMerchantId

String

Merchant ID

[].merchantName

String

Merchant name

[].merchantImage

String

Merchant image URL

[].category

String

Merchant category

[].cdfOfferId

String

Offer ID

[].offerTitle

String

Offer title

[].validTo

String

Offer valid till date

[].applicableChannel

String

Applicable channel (Online/In-Store/Both)


61. Get Merchant Id

Endpoint: GET /api/v1/merchants?sessionId={sessionId}

Purpose: Retrieve the merchant ID generated using the sessionId.

61.1. Request

GET /api/v1/merchants?sessionId=8309 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 120. Query Parameters
Parameter Description

sessionId

Uploaded session ID

61.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 33

{
  "merchantId" : "HDFC106961"
}
Table 121. Response Fields
Path Type Description

merchantId

String

Merchant ID generated after merchant creation

Campaign APIs

62. Get Campaign By ID

Endpoint: GET /api/v1/campaigns/{campaignId}

Purpose: Retrieve campaign details by ID.

62.1. Request

GET /api/v1/campaigns/900182 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 122. /api/v1/campaigns/{campaignId}
Parameter Description

campaignId

ID of the Campaign

62.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 952

{
  "campaignId" : 900182,
  "campaignName" : "Banner Campaign Test",
  "campaignDescription" : "<p>--</p>",
  "campaignStatus" : "active",
  "campaignType" : "MANUALLY_CURATED",
  "campaignCategory" : "OFFER_MERCHANTS",
  "campaignMerchants" : [ {
    "merchantId" : "HDFC105787",
    "merchantName" : "Havmor exc",
    "rank" : 0,
    "offerRankDetails" : null
  } ],
  "images" : {
    "default" : "https://dpimages.crayondata.com/high-res-image/dev/camp_Default1782190574054.jpeg",
    "thumbnail" : "https://dpimages.crayondata.com/high-res-image/dev/camp_Thumbnail1782190576974.jpeg"
  },
  "validFrom" : "2026-06-23 00:00:00",
  "validTo" : "2026-07-26 23:59:59",
  "heroCampaign" : false,
  "bannerCampaign" : false,
  "pageName" : null,
  "hideOnHomePage" : true,
  "allUsers" : false,
  "clientAssetIds" : [ "WEB_APP", "OBOP" ],
  "cities" : [ "all" ],
  "applicableForClient" : "LIFESTYLE",
  "howToAvail" : "",
  "termsAndConditions" : ""
}
Table 123. Response Fields
Path Type Description

campaignId

Number

Campaign ID

campaignName

String

Campaign name

campaignDescription

String

Campaign description

campaignStatus

String

Campaign status

campaignType

String

Campaign type

campaignCategory

String

Campaign category

campaignMerchants

Array

List of merchants associated with the campaign

campaignMerchants[].merchantId

String

Merchant ID

campaignMerchants[].merchantName

String

Merchant name

campaignMerchants[].rank

Number

Merchant rank within the campaign

campaignMerchants[].offerRankDetails

Null

Offer rank details (can be null)

images

Object

Campaign images

images.default

String

Default image URL

images.thumbnail

String

Thumbnail image URL

validFrom

String

Campaign start date

validTo

String

Campaign end date

heroCampaign

Boolean

Whether the campaign is a hero campaign

bannerCampaign

Boolean

Whether the campaign is a banner campaign

pageName

Null

Page where the campaign is displayed

hideOnHomePage

Boolean

Whether the campaign is hidden on the home page

allUsers

Boolean

Whether the campaign is applicable to all users

clientAssetIds

Array

List of client asset IDs

cities

Array

Applicable cities

applicableForClient

String

Applicable client

howToAvail

String

Instructions to avail the campaign

termsAndConditions

String

Campaign terms and conditions


63. Get All Campaigns

Endpoint: POST /api/v1/campaigns

Purpose: Retrieve paginated list of campaigns with filters.

63.1. Request

POST /api/v1/campaigns HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 311
Host: localhost:8080

{
  "offset" : 0,
  "limit" : 10,
  "filters" : {
    "fromDate" : {
      "dateStart" : "2026-06-22",
      "dateEnd" : "2027-06-27"
    },
    "campaignType" : [ "MANUALLY_CURATED" ],
    "campaignSource" : [ "HDFC" ],
    "status" : [ "Draft" ]
  },
  "sortBy" : "",
  "sortOrder" : "",
  "searchWord" : ""
}
Table 124. Request Fields
Path Type Description

offset

Number

Pagination offset

limit

Number

Number of records per page

filters

Object

Campaign filters object

filters.status

Array

Campaign status filter list

filters.campaignSource

Array

Campaign source filter list

filters.campaignType

Array

Campaign type filter list

filters.fromDate

Object

Date range filter object

filters.fromDate.dateStart

String

Start date (yyyy-MM-dd)

filters.fromDate.dateEnd

String

End date (yyyy-MM-dd)

sortBy

String

Sorting field

sortOrder

String

Sorting order

searchWord

String

Search keyword

63.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 531

{
  "totalCount" : 1,
  "campaignListResponse" : [ {
    "campaignId" : 900248,
    "campaignName" : "API Doc test",
    "campaignDescription" : "",
    "campaignStatus" : "Draft",
    "validFrom" : "2027-04-20 00:00:00",
    "validTo" : "2027-04-30 23:59:59",
    "createdDate" : "2026-10-12 11:11:29.633715",
    "lastUpdated" : "2026-10-12 11:11:29.63372",
    "rejectionReason" : "",
    "nextActions" : "Submit for Approval, Edit, View",
    "campaignType" : "MANUALLY_CURATED"
  } ],
  "paginationDropdown" : [ 10, 25, 50 ]
}
Table 125. Response Fields
Path Type Description

totalCount

Number

Total number of campaigns

campaignListResponse

Array

List of campaigns

campaignListResponse[].campaignId

Number

Campaign ID

campaignListResponse[].campaignName

String

Campaign name

campaignListResponse[].campaignDescription

String

Campaign description

campaignListResponse[].campaignStatus

String

Campaign status

campaignListResponse[].validFrom

String

Campaign start date

campaignListResponse[].validTo

String

Campaign end date

campaignListResponse[].createdDate

String

Campaign creation timestamp

campaignListResponse[].lastUpdated

String

Campaign last updated timestamp

campaignListResponse[].rejectionReason

String

Rejection reason if any

campaignListResponse[].nextActions

String

Available actions

campaignListResponse[].campaignType

String

Campaign type

paginationDropdown

Array

Pagination options


64. Create Campaign

Endpoint: POST /api/v1/campaigns/create

Purpose: Create a new campaign.

64.1. Request

POST /api/v1/campaigns/create HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 945
Host: localhost:8080

{
  "name" : "Campaign doc new ",
  "description" : "<p>--</p>",
  "campaignCategory" : "OFFER_MERCHANTS",
  "nameAr" : "NA",
  "descriptionAr" : "NA",
  "images" : {
    "default" : "https://dpimages.crayondata.com/high-res-image/dev/camp_default.jpeg",
    "thumbnail" : "https://dpimages.crayondata.com/high-res-image/dev/camp_thumb.jpeg"
  },
  "startDateTime" : "2027-06-30T00:00:00+05:30",
  "endDateTime" : "2027-07-04T23:59:59+05:30",
  "allUsers" : false,
  "campaignMerchants" : [ {
    "merchantId" : "HDFC106831",
    "merchantName" : "Test jun 24 EIP jewellery",
    "rank" : 0,
    "offerRankDetails" : null
  } ],
  "heroCampaign" : false,
  "bannerCampaign" : false,
  "pageName" : null,
  "hideOnHomePage" : true,
  "applicableForClient" : "LIFESTYLE",
  "cities" : [ "all" ],
  "campaignType" : "MANUALLY_CURATED",
  "clientAssetIds" : [ "WEB_APP", "OBOP" ],
  "howToAvail" : "<p>--</p>",
  "termsAndConditions" : "<p>--</p>"
}
Table 126. Request Fields
Path Type Description

name

String

Campaign name

description

String

Campaign description

campaignCategory

String

Campaign category

nameAr

String

Arabic name

descriptionAr

String

Arabic description

images

Object

Campaign images

images.default

String

Default image

images.thumbnail

String

Thumbnail image

startDateTime

String

Campaign start datetime

endDateTime

String

Campaign end datetime

allUsers

Boolean

Applicable for all users

campaignMerchants

Array

Merchant list

campaignMerchants[].merchantId

String

Merchant ID

campaignMerchants[].merchantName

String

Merchant name

campaignMerchants[].rank

Number

Merchant rank

campaignMerchants[].offerRankDetails

Null

Merchant offer rank details

heroCampaign

Boolean

Hero campaign flag

bannerCampaign

Boolean

Banner campaign flag

pageName

Null

Page name

hideOnHomePage

Boolean

Hide on home page flag

applicableForClient

String

Applicable client type

cities

Array

List of cities

campaignType

String

Campaign type

clientAssetIds

Array

Client asset IDs

howToAvail

String

How to avail

termsAndConditions

String

Terms and conditions

64.2. Response

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 57

{
  "sessionId" : "1",
  "status" : "Inserted into GMR"
}
Table 127. Response Fields
Path Type Description

sessionId

String

Upload session ID

status

String

Campaign creation status


65. Update Campaign

Endpoint: PUT /api/v1/campaigns/{campaignId}?updateType=CAMPAIGN_UPDATE

Purpose: Update existing campaign.

65.1. Request

PUT /api/v1/campaigns/900184?updateType=CAMPAIGN_UPDATE HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 882
Host: localhost:8080

{
  "name" : "Campaign doc 1",
  "description" : "<p>--</p>",
  "nameAr" : "NA",
  "descriptionAr" : "NA",
  "images" : {
    "thumbnail" : "https://dpimages.crayondata.com/high-res-image/dev/camp_thumb.jpeg",
    "default" : "https://dpimages.crayondata.com/high-res-image/dev/camp_default.jpeg"
  },
  "startDateTime" : "2027-06-30T00:00:00+05:30",
  "endDateTime" : "2027-07-04T23:59:59+05:30",
  "allUsers" : false,
  "campaignMerchants" : [ {
    "merchantId" : "HDFC105786",
    "merchantName" : "Chocolate new exc",
    "rank" : 0,
    "offerRankDetails" : null
  } ],
  "heroCampaign" : false,
  "bannerCampaign" : false,
  "pageName" : null,
  "hideOnHomePage" : true,
  "applicableForClient" : "LIFESTYLE",
  "campaignType" : "MANUALLY_CURATED",
  "clientAssetIds" : [ "WEB_APP", "OBOP" ],
  "howToAvail" : "how to avail",
  "termsAndConditions" : "terms and conditions"
}
Table 128. /api/v1/campaigns/{campaignId}
Parameter Description

campaignId

Campaign ID

Table 129. Query Parameters
Parameter Description

updateType

CAMPAIGN_UPDATE or CAMPAIGN_DUPLICATE

Table 130. Request Fields
Path Type Description

name

String

Campaign name

description

String

Campaign description

nameAr

String

Arabic name

descriptionAr

String

Arabic description

images

Object

Campaign images map

images.default

String

Default image URL

images.thumbnail

String

Thumbnail image URL

startDateTime

String

Start datetime

endDateTime

String

End datetime

allUsers

Boolean

All users flag

campaignMerchants

Array

Merchant list

campaignMerchants[].merchantId

String

Merchant ID

campaignMerchants[].merchantName

String

Merchant name

campaignMerchants[].rank

Number

Rank

campaignMerchants[].offerRankDetails

Null

Offer rank details

heroCampaign

Boolean

Hero campaign flag

bannerCampaign

Boolean

Banner campaign flag

pageName

Null

Page name

hideOnHomePage

Boolean

Hide on home page

applicableForClient

String

Applicable client

campaignType

String

Campaign type (either MANUALLY_CURATED or MERCHANT_CAMPAIGN)

clientAssetIds

Array

Client assets

howToAvail

String

How to avail

termsAndConditions

String

T&C

65.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 74

{
  "campaignId" : 900184,
  "message" : "Campaign Updated Successfully"
}
Table 131. Response Fields
Path Type Description

campaignId

Number

Campaign ID

message

String

Status message


66. Campaign Actions

Endpoint: POST /api/v1/campaigns/status

Purpose: Perform bulk actions on campaigns.

66.1. Request

POST /api/v1/campaigns/status HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 68
Host: localhost:8080

{
  "actionType" : "CAMPAIGN_SUBMIT",
  "campaignIds" : [ 900184 ]
}
Table 132. Request Fields
Path Type Description

actionType

String

Action type: CAMPAIGN_PAUSE | CAMPAIGN_RESUME | CAMPAIGN_WITHDRAW | CAMPAIGN_SUBMIT

campaignIds

Array

List of campaign IDs to perform action on

66.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 125

{
  "sessionIds" : [ "1" ],
  "status" : "Pending",
  "error" : null,
  "invalidCampaignIds" : [ ],
  "errorMessages" : [ ]
}
Table 133. Response Fields
Path Type Description

sessionIds

Array

List of upload session IDs generated for the action

status

String

Overall processing status (e.g., Pending, Success)

error

Null

Error message if any global failure occurs

invalidCampaignIds

Array

List of campaign IDs that failed processing

errorMessages

Array

Detailed per-campaign error information


67. Approve or Reject Campaign

Endpoint: POST /api/v1/campaigns/review

Purpose: Approve or reject campaigns.

67.1. Request

POST /api/v1/campaigns/review HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 158
Host: localhost:8080

{
  "actionType" : "CAMPAIGN_APPROVE",
  "campaignIds" : [ {
    "campaignId" : 900208,
    "rejectionReason" : null
  } ],
  "commonRejectionReason" : null
}
Table 134. Request Fields
Path Type Description

actionType

String

CAMPAIGN_APPROVE or CAMPAIGN_REJECT

campaignIds

Array

List of campaigns to process

campaignIds[].campaignId

Number

Campaign ID

campaignIds[].rejectionReason

Null

Rejection reason (required for reject flow)

commonRejectionReason

Null

Common rejection reason for all campaigns

67.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 125

{
  "sessionIds" : [ "1" ],
  "status" : "Pending",
  "error" : null,
  "invalidCampaignIds" : [ ],
  "errorMessages" : [ ]
}
Table 135. Response Fields
Path Type Description

sessionIds

Array

List of upload session IDs generated for the action

status

String

Overall processing status (e.g., Pending, Success)

error

Null

Error message if any global failure occurs

invalidCampaignIds

Array

List of campaign IDs that failed processing

errorMessages

Array

Detailed per-campaign error information


68. Search Campaign

Endpoint: POST /api/v1/campaigns/search

Purpose: Search campaigns by keyword.

68.1. Request

POST /api/v1/campaigns/search HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 26
Host: localhost:8080

{
  "searchWord" : "cam"
}
Table 136. Request Fields
Path Type Description

searchWord

String

Campaign search keyword (minimum 3 characters)

68.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 64

[ "Test campaign 2511", "campaign test 0212", "Campaign new 1" ]
Table 137. Response Fields
Path Type Description

[]

Array

List of matching campaign names or suggestions


69. Get Campaign History Filters

Endpoint: GET /api/v1/campaigns/history/filters/{campaignId}

Purpose: Retrieve history filter options for a campaign.

69.1. Request

GET /api/v1/campaigns/history/filters/900182 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 138. /api/v1/campaigns/history/filters/{campaignId}
Parameter Description

campaignId

Campaign ID for history filters

69.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 35

{
  "field" : [ "All", "status" ]
}
Table 139. Response Fields
Path Type Description

field[]

Array

Dynamic filter values


70. Get Campaign History

Endpoint: POST /api/v1/campaigns/history/{campaignId}

Purpose: Retrieve campaign history.

70.1. Request

POST /api/v1/campaigns/history/900184 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 149
Host: localhost:8080

{
  "timeZone" : "Asia/Calcutta",
  "filters" : {
    "field" : [ "campaign_name" ],
    "toDate" : "2026-07-09",
    "fromDate" : "2026-06-30"
  }
}
Table 140. /api/v1/campaigns/history/{campaignId}
Parameter Description

campaignId

Campaign ID

Table 141. Request Fields
Path Type Description

timeZone

String

Timezone for history response

filters.fromDate

String

Start date filter

filters.toDate

String

End date filter

filters.field[]

Array

Fields to filter history on

70.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 390

{
  "campaignId" : 900184,
  "campaignName" : "Campaign doc 1",
  "campaignStatus" : "DRAFT",
  "campaignHistoryList" : [ {
    "campaignHistoryId" : 1330,
    "actionDateTime" : "2026-06-30 16:11:20",
    "userName" : "Vishnupriya J",
    "field" : "Campaign Name",
    "action" : "Edit",
    "previousValue" : "Campaign doc",
    "newValue" : "Campaign doc 1",
    "comments" : ""
  } ]
}
Table 142. Response Fields
Path Type Description

campaignId

Number

Campaign ID

campaignName

String

Campaign name

campaignStatus

String

Campaign status

campaignHistoryList[]

Array

List of campaign history records

campaignHistoryList[].campaignHistoryId

Number

History record ID

campaignHistoryList[].actionDateTime

String

Action timestamp

campaignHistoryList[].userName

String

User who performed action

campaignHistoryList[].field

String

Field changed

campaignHistoryList[].action

String

Action type

campaignHistoryList[].previousValue

String

Old value

campaignHistoryList[].newValue

String

New value

campaignHistoryList[].comments

String

Additional comments


71. Download Campaign History CSV

Endpoint: POST /api/v1/campaigns/history/download/{campaignId}

Purpose: Download campaign history as CSV.

71.1. Request

POST /api/v1/campaigns/history/download/900184 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 180
Host: localhost:8080

{
  "timeZone" : "Asia/Calcutta",
  "filters" : {
    "field" : [ "campaign_name" ],
    "toDate" : "2026-07-09",
    "fromDate" : "2026-06-30"
  },
  "campaignHistoryIds" : null
}
Table 143. /api/v1/campaigns/history/download/{campaignId}
Parameter Description

campaignId

Campaign ID

Table 144. Request Fields
Path Type Description

timeZone

String

Timezone for CSV export

filters.fromDate

String

Start date filter

filters.toDate

String

End date filter

filters.field[]

Array

Fields included in history export

campaignHistoryIds

Null

Optional list of history IDs to filter export


72. Get Campaign Filters

Endpoint: GET /api/v1/campaigns/filters

Purpose: Retrieve available campaign filter options.

72.1. Request

GET /api/v1/campaigns/filters HTTP/1.1
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080

72.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 167

{
  "campaignType" : [ "All", "MANUALLY_CURATED", "MERCHANT_CAMPAIGN" ],
  "campaignSource" : [ "All", "CRAYON", "HDFC" ],
  "status" : [ "All", "Draft", "Expired" ]
}
Table 145. Response Fields
Path Type Description

campaignType

Array

Campaign type filter values (e.g., MANUALLY_CURATED, MERCHANT_CAMPAIGN)

campaignSource

Array

Campaign source filter values (e.g., CRAYON, HDFC)

status

Array

Campaign status filter values (e.g., Draft, Live, Expired)

Bulk Upload APIs

73. Get Bulk Upload Status

Endpoint: GET /api/v1/bulkUpload/status

Purpose: Retrieve bulk upload session status.

73.1. Request

GET /api/v1/bulkUpload/status?offset=0&limit=3&sessionType=BULK_UPLOAD HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 146. Query Parameters
Parameter Description

offset

Pagination offset

limit

Number of records per page

sessionType

Type of upload session

73.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1857

{
  "uploadStatusResponse" : [ {
    "id" : 9343,
    "fileName" : "test nearby (1).xlsx",
    "createdAt" : "Nov 13, 2026",
    "status" : "COMPLETED",
    "fileSize" : 15117,
    "failedDocUrl" : "https://bank-maya-data.s3.amazonaws.com/bulk_upload/dev/data_validation/Output/9343/invalid/data/csv/offer.csv",
    "note" : "",
    "userUploadedFile" : "https://bank-maya-data.s3.amazonaws.com/bulk_upload/dev/input/csv/1794556416346/test%20nearby%20%281%29.xlsx",
    "successDocUrl" : "https://bank-maya-data.s3.amazonaws.com/bulk_upload/dev/data_validation/Output/9343/valid/data/csv/offer.csv",
    "uploadedBy" : "AUTOMATION ACCOUNT 2 HDFC"
  }, {
    "id" : 9328,
    "fileName" : "template (17).xlsx",
    "createdAt" : "Nov 12, 2026",
    "status" : "COMPLETED",
    "fileSize" : 13527,
    "failedDocUrl" : "https://bank-maya-data.s3.amazonaws.com/bulk_upload/dev/data_validation/Output/9328/invalid/data/csv/offer.csv",
    "note" : "",
    "userUploadedFile" : "https://bank-maya-data.s3.amazonaws.com/bulk_upload/dev/input/csv/1794481924511/template%20%2817%29.xlsx",
    "successDocUrl" : "https://bank-maya-data.s3.amazonaws.com/bulk_upload/dev/data_validation/Output/9328/valid/data/csv/offer.csv",
    "uploadedBy" : "AUTOMATION ACCOUNT 4 VY"
  }, {
    "id" : 9327,
    "fileName" : "template (17).xlsx",
    "createdAt" : "Nov 12, 2026",
    "status" : "FAILURE",
    "fileSize" : 13357,
    "failedDocUrl" : "https://bank-maya-data.s3.amazonaws.com/bulk_upload/dev/data_validation/Output/9327/invalid/data/csv/offer.csv",
    "note" : "Upload failed due to invalid offer data. No valid records found.",
    "userUploadedFile" : "https://bank-maya-data.s3.amazonaws.com/bulk_upload/dev/input/csv/1794481508013/template%20%2817%29.xlsx",
    "successDocUrl" : "",
    "uploadedBy" : "AUTOMATION ACCOUNT 4 VY"
  } ],
  "totalCount" : 1462
}
Table 147. Response Fields
Path Type Description

uploadStatusResponse[].id

Number

Upload session ID

uploadStatusResponse[].fileName

String

Uploaded file name

uploadStatusResponse[].createdAt

String

Upload timestamp

uploadStatusResponse[].status

String

Current upload status

uploadStatusResponse[].fileSize

Number

Size of the uploaded file in bytes

uploadStatusResponse[].failedDocUrl

String

URL of the failed records document

uploadStatusResponse[].note

String

Additional upload notes

uploadStatusResponse[].userUploadedFile

String

Original uploaded file URL

uploadStatusResponse[].successDocUrl

String

URL of the successfully processed document

uploadStatusResponse[].uploadedBy

String

User who uploaded the file

totalCount

Number

Total number of upload records


74. Bulk Offer Upload

Endpoint: POST /api/v1/bulkUpload/offers

Purpose: Upload offers in bulk via Excel file.

74.1. Request

POST /api/v1/bulkUpload/offers HTTP/1.1
Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=file; filename=offers.xlsx
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

dummy content
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
Table 148. Request Parts
Part Description

file

Excel file containing bulk offers

74.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 72

{
  "offerId" : null,
  "sessionId" : "422554",
  "status" : "SUCCESS"
}
Table 149. Response Fields
Path Type Description

offerId

Null

Offer ID (Null)

sessionId

String

Bulk upload session ID

status

String

Bulk upload status


75. Download File

Endpoint: GET /api/v1/bulkUpload/download/{uploadSessionId}

Purpose: Download uploaded file or processed result.

75.1. Request

GET /api/v1/bulkUpload/download/1562 HTTP/1.1
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080
Table 150. /api/v1/bulkUpload/download/{uploadSessionId}
Parameter Description

uploadSessionId

Upload session ID

75.2. Response

HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="offers.xlsx"
Content-Length: 18

Dummy file content
Table 151. Response Headers
Name Description

Content-Type

Content type of the downloaded file

Content-Disposition

Content disposition containing the downloaded file name

OMP Support APIs

76. Get Support Config

Endpoint: GET /api/v1/support/config

Purpose: Retrieve the OMP Support form configuration (support email, pre-filled user details, client and categories).

76.1. Request

GET /api/v1/support/config HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080

76.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 380

{
  "supportEmail" : "offermanagement@crayondata.com",
  "userName" : "John Doe",
  "email" : "john.doe@crayondata.com",
  "clientName" : "HDFC",
  "categories" : {
    "LOGIN_ACCESS" : "Login & Access",
    "MERCHANTS" : "Merchants",
    "OFFERS" : "Offers",
    "CAMPAIGNS" : "Campaigns",
    "BULK_UPLOAD" : "Bulk Upload",
    "REPORTS" : "Reports",
    "OTHER" : "Other"
  }
}
Table 152. Response Fields
Path Type Description

supportEmail

String

Support email address the request is sent to (read-only)

userName

String

Logged-in user’s name (pre-fill for 'Your name')

email

String

Logged-in user’s email (pre-fill for 'Reply-to email')

clientName

String

Logged-in user’s client name (read-only)

categories

Object

Support categories as key/label map


77. Raise Support Request

Endpoint: POST /api/v1/support/requests

Purpose: Raise an OMP Support request. Sends the request to the support team and an acknowledgement mail to the user.

77.1. Request

POST /api/v1/support/requests HTTP/1.1
Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Authorization: Bearer <JWT_TOKEN>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/130.0.0.0
Host: localhost:8080

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=request
Content-Type: application/json

{"name":"John Doe","replyToEmail":"john.doe@crayondata.com","category":"Offers","subject":"Test - Offer Hub is not visible","description":"Test - Offer hub page is not visible and re-directed","appVersion":"2.4.1","sourcePage":"/offers/hub"}
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=attachments; filename=error-screen.png
Content-Type: image/png

<<png data>>
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
Table 153. Request Headers
Name Description

Authorization

Bearer authentication token

User-Agent

Browser user agent (used to derive browser / OS)

Table 154. Request Parts
Part Description

request

Support request details (application/json)

attachments

Optional attachments (up to 3 files, 5 MB each: PNG, JPG, PDF, XLSX, CSV)

Table 155. Request Part Fields (request)
Path Type Description

name

String

User’s name (required)

replyToEmail

String

Reply-to email address (required)

category

String

Category key or label from the support config (required)

subject

String

Subject (required, max 150 characters)

description

String

Issue description (required, max 2000 characters)

appVersion

String

Frontend application version

sourcePage

String

Page the user came from (shown in the support mail)

77.2. Response

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 151

{
  "referenceNumber" : "OMP-SUP-000123",
  "replyToEmail" : "john.doe@crayondata.com",
  "status" : "SENT",
  "sentAt" : "2026-11-12T09:52:00+05:30"
}
Table 156. Response Fields
Path Type Description

referenceNumber

String

Unique support reference number

replyToEmail

String

Email address the acknowledgement was sent to

status

String

Support request status

sentAt

String

Time the support mail was sent (ISO-8601 with offset, in the configured support time zone)

Internal APIs

78. Trigger Country Dataset Load

Endpoint: POST /api/v1/internal/countries/loadData

Purpose: Trigger country data pipeline.

78.1. Request

POST /api/v1/internal/countries/loadData HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 72
Host: localhost:8080

{
  "countriesEntityName" : "Countries",
  "authKey" : "test-auth-key"
}
Table 157. Request Fields
Path Type Description

countriesEntityName

String

Country entity name (Countries or CountriesTest)

authKey

String

Authorization key for triggering the dataset load

78.2. Response

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 81

{
  "message" : "Countries Data Pipeline Triggered",
  "statusCode" : "CREATED"
}
Table 158. Response Fields
Path Type Description

message

String

Response message

statusCode

String

HTTP status of the operation


79. Clear Cache

Endpoint: POST /api/v1/internal/clearCache

Purpose: Clear application cache.

79.1. Request

POST /api/v1/internal/clearCache HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Host: localhost:8080

79.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 61

{
  "message" : "Cache Cleared",
  "statusCode" : "CREATED"
}
Table 159. Response Fields
Path Type Description

message

String

Cache clear operation status message

statusCode

String

HTTP status of the cache clear operation


80. Generate Client Secret

Endpoint: POST /api/v1/internal/generate-clientSecret

Purpose: Generate client secret for third-party integration.

80.1. Request

POST /api/v1/internal/generate-clientSecret HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 90
Host: localhost:8080

{
  "clientId" : 1,
  "email" : "john.doe@crayondata.com",
  "password" : "Password@123"
}
Table 160. Request Fields
Path Type Description

clientId

Number

Client ID

email

String

Client email address

password

String

Client password

80.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 44

{
  "ClientSecret" : "client secret token"
}
Table 161. Response Fields
Path Type Description

ClientSecret

String

Generated encrypted client secret


81. Add Client

Endpoint: POST /api/v1/internal/add-client

Purpose: Register a new client.

81.1. Request

POST /api/v1/internal/add-client HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Content-Length: 180
Host: localhost:8080

{
  "clientName" : "Test Client",
  "emailDomains" : "testclient.com",
  "isThirdparty" : false,
  "isApprovalSkip" : false,
  "restrictedEndpoints" : "/api/v1/test,/api/v1/demo"
}
Table 162. Request Fields
Path Type Description

clientName

String

Name of the client

emailDomains

String

Allowed email domain(s) for the client

isThirdparty

Boolean

Indicates whether the client is a third-party client

isApprovalSkip

Boolean

Indicates whether approval workflow should be skipped

restrictedEndpoints

String

Comma-separated list of restricted API endpoints

81.2. Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 65

{
  "clientId" : 1,
  "message" : "Client Created Successfully"
}
Table 163. Response Fields
Path Type Description

clientId

Number

Generated client ID

message

String

Client creation status

Error Codes & Exception Reference

Table 164. Error Codes
Exception HTTP Status When Thrown

UserNotFoundException

404 Not Found

When requested user does not exist in the system

CustomUnauthorizedException

401 Unauthorized

When authentication fails or user lacks required permissions

InternalServerException

500 Internal Server Error

When an unexpected server-side error occurs

OfferNotFoundException

404 Not Found

When requested offer ID does not exist

MailException

500 Internal Server Error

When email sending fails (verification, notification, etc.)

GenericException

500 Internal Server Error

Generic catch-all for unhandled business logic errors

MerchantAlreadyExistsException

409 Conflict

When trying to create a merchant that already exists

TokenNotGeneratedException

500 Internal Server Error

When JWT token generation fails

UserNotActiveException

401 Unauthorized

When user account is deactivated/suspended

RoleNotFoundException

404 Not Found

When specified role does not exist

InvalidCredentialsException

400 Bad Request

When login credentials are incorrect

VerifyEmailException

400 Bad Request

When email verification fails

UpdateUserException

400 Bad Request

When user profile update fails

UserAlreadyExistsException

400 Bad Request

When trying to register with existing email/username

InvalidTokenException

400 Bad Request

When provided token is invalid or malformed

ResponseNotFoundException

404 Not Found

When expected response data is not found

ClientNotFoundException

400 Bad Request

When client/tenant ID does not exist

MerchantNotFoundException

400 Bad Request

When requested merchant ID does not exist

OfferAlreadyExistsException

400 Bad Request

When trying to create an offer that already exists

IllegalArgumentException

400 Bad Request

When invalid argument is passed to a method

InvalidArgumentException

400 Bad Request

When method argument fails validation

InputValidationException

400 Bad Request

When input data fails validation rules

MethodArgumentNotValidException

400 Bad Request

When @Valid annotated request body fails validation

BadCredentialsException

401 Unauthorized

When Spring Security authentication fails

AccessDeniedException

401 Unauthorized

When user lacks required role/permission

SignatureException (JWT)

401 Unauthorized

When JWT signature verification fails

ExpiredJwtException

401 Unauthorized

When JWT token has expired

MalformedJwtException

401 Unauthorized

When JWT token structure is invalid

NoResourceFoundException

- (no response)

When requesting non-existent static resource

Exception (Fallback)

500 Internal Server Error

Catch-all for any unhandled exceptions