Content Management System (CMS)
Auxiliary Login API Overview
The Auxiliary Login API allows merchants to authenticate users and generate JSON Web Tokens (JWT) for user sessions. This API is designed to be integrated into merchant applications for user authentication purposes.
Base URL
POST /api/v1/apps/authenitcateRequest
Method:
POSTHeaders:
Content-Type: application/json
Body:
KeyKey data typeRequiredDescriptionmerchant
string
true
Marketplate Merchant Identifier
user
string
true
Spoonity User Identifier
vendor
string
true
Spoonity vendor Identifier
Response
Status Codes:
201 Created: Successful login, returns a JWT token.422 Unprocessable Entity: User does not exist.
Body (on success):
{
"token": "string",
"isAdmin": "boolean"
}token: JSON Web Token (JWT) for user session.isAdmin: Boolean indicating whether the user is an admin.
Error Responses
422 Unprocessable EntityBody:
{
"message": "User Does Not Exist"
}Other possible errors:
Internal server error (
500): In case of unexpected errors during token generation.
Notes
The generated token should be included in subsequent requests to authenticate the user.
The
isAdminfield indicates whether the user has administrative privileges.Make sure to handle errors gracefully, especially in the case of user not found.
CMS Content API Overview
The CMS Content API allows fetching content from a Content Management System (CMS) based on the provided token and API group. This API is designed to retrieve various types of content for integration into merchant applications.
Base URL
GET /api/v1/apps/homeRequest
Method:
GETHeaders:
Content-Type: application/jsonAuthorization: Bearer <token>The token should be provided in the request header for authentication.
Query Parameters:
KeyKey data typeRequiredDescriptionpage
number
false
Page number for pagination (Default is 1)
group
string
true
Group identifier for the card. (Required can have up to 6 comma separated groups)
timeFilter
string
false
Filter Content by
ActiveorInactive(Future Event)
Response
Status Codes:
200 OK: Successful retrieval of content.500 Internal Server Error: An unexpected error occurred.
Body:
{
"id": "number",
"content_group": "string",
"group_id": "number",
"primary_content": "string",
"secondary_content": "string",
"description": "string",
"image": "string",
"action_title": "string",
"navigation_url": "string",
"expiry": "string",
"navigation": "number",
"screen": "string",
"testMode": "boolean",
"link": "string",
"navigation_link": "string",
"qr_url": "string",
"available_days": "array",
"available_days_month": "array",
"menu_product": [
{
"name": "string",
"image": "string"
}
],
"available_time": {
"start": "number",
"end": "number"
},
"home_id": "number",
"created": "string"
}id: Not Used.home_id: CMS Content IDcontent_group: Content group namegroup_id: Content Sub Group ID.primary_content: CMS primary contentsecondary_content: CMS secondary contentdescription: CMS description contentimage: CMS content imageaction_title: CMS content button titlenavigation: Internal App navigation screen name on content clicknavigation_url: external URL to redirect on content clickexpiry: CMS expiry in UTCqr_url: Content QR URL entryavailable_days: days when the CMS content is active 0 - Sunday to 6 - Saturday.available_days_month: calendar days when the CMS content is active 1 to 31.menu_product: list of menu item that is linked to CMS with images.name: Name of the lime itemimage: Image Url for line item
available_time: time when the cms content is activecreated: CMS created time in UTC
Error Responses
500 Internal Server ErrorBody:
{
"message": "Internal Server Error"
}Notes
The token provided in the
Authorizationheader is used for authentication and authorization.Depending on the
typeparameter, additional parameters such aspageandgroupmay be required.Handle errors gracefully and provide appropriate error messages for better debugging and user experience.
Last updated
Was this helpful?