eBay-Style Marketplace Backend

frontend-prompt-11-watchlistcartservice • 1/2/2026

EBAYCCLONE

FRONTEND GUIDE FOR AI CODING AGENTS - PART 11 - WatchlistCart Service

This document is a part of a REST API guide for the ebaycclone project. It is designed for AI agents that will generate frontend code to consume the project’s backend.

This document provides extensive instruction for the usage of watchlistCart

Service Access

WatchlistCart service management is handled through service specific base urls.

WatchlistCart service may be deployed to the preview server, staging server, or production server. Therefore,it has 3 access URLs. The frontend application must support all deployment environments during development, and the user should be able to select the target API server on the login page (already handled in first part.).

For the watchlistCart service, the base URLs are:

  • Preview: https://ebaycclone.prw.mindbricks.com/watchlistcart-api
  • Staging: https://ebaycclone-stage.mindbricks.co/watchlistcart-api
  • Production: https://ebaycclone.mindbricks.co/watchlistcart-api

Scope

WatchlistCart Service Description

Handles user watchlists (with custom folders) and shopping cart preparation for checkout, strictly enforcing only fixed-price products in carts, supporting item moves/bulk operations, and robust default/folder logic..

WatchlistCart service provides apis and business logic for following data objects in ebaycclone application. Each data object may be either a central domain of the application data structure or a related helper data object for a central concept. Note that data object concept is equal to table concept in the database, in the service database each data object is represented as a db table scheme and the object instances as table rows.

watchlistItem Data Object: Item in a user’s watchlist, optionally in a named folder; references product and user.

cartItem Data Object: Single product pending checkout in a user’s cart. Only fixed-price products permitted; quantity supported for multi-unit purchases (if allowed).

watchlistList Data Object: A named folder/list in a user’s watchlist. Default list exists for all users. Custom lists may be created and deleted.

WatchlistCart Service Frontend Description By The Backend Architect

  • Users can create custom watchlist folders to organize products. There is always a default list/folder, which cannot be deleted. When a folder is deleted, items within it are moved to the default list, not removed.
  • Adding to cart is only allowed for products listed as FIXED-price type; AUCTION products cannot be added to cart and will show a user-facing error.
  • Duplicate products in watchlist/cart are not allowed; attempts to add will be blocked with a clear error message.
  • Cart UI must refresh count/quantities on changes and clear after successful checkout.
  • Bulk move/remove is supported on watchlist items, as is moving items between cart and watchlists via explicit controls.
  • If the referenced product is deleted/inactive, it should visibly indicate as unavailable in the list/cart; actions on such items should fail with an appropriate message.
  • itemCount shown in watchlist folders should always reflect the number of associated (not soft-deleted) items.

API Structure

Object Structure of a Successful Response

When the service processes requests successfully, it wraps the requested resource(s) within a JSON envelope. This envelope includes the data and essential metadata such as configuration details and pagination information, providing context to the client.

HTTP Status Codes:

  • 200 OK: Returned for successful GET, LIST, UPDATE, or DELETE operations, indicating that the request was processed successfully.
  • 201 Created: Returned for CREATE operations, indicating that the resource was created successfully.

Success Response Format:

For successful operations, the response includes a "status": "OK" property, signaling that the request executed successfully. The structure of a successful response is outlined below:

{
  "status":"OK",
  "statusCode": 200,   
  "elapsedMs":126,
  "ssoTime":120,
  "source": "db",
  "cacheKey": "hexCode",
  "userId": "ID",
  "sessionId": "ID",
  "requestId": "ID",
  "dataName":"products",
  "method":"GET",
  "action":"list",
  "appVersion":"Version",
  "rowCount":3,
  "products":[{},{},{}],
  "paging": {
    "pageNumber":1, 
    "pageRowCount":25, 
    "totalRowCount":3,
    "pageCount":1
  },
  "filters": [],
  "uiPermissions": []
}
  • products: In this example, this key contains the actual response content, which may be a single object or an array of objects depending on the operation.

Additional Data

Each API may include additional data besides the main data object, depending on the business logic of the API. These will be provided in each API’s response signature.

Error Response

If a request encounters an issue—whether due to a logical fault or a technical problem—the service responds with a standardized JSON error structure. The HTTP status code indicates the nature of the error, using commonly recognized codes for clarity:

  • 400 Bad Request: The request was improperly formatted or contained invalid parameters.
  • 401 Unauthorized: The request lacked a valid authentication token; login is required.
  • 403 Forbidden: The current token does not grant access to the requested resource.
  • 404 Not Found: The requested resource was not found on the server.
  • 500 Internal Server Error: The server encountered an unexpected condition.

Each error response is structured to provide meaningful insight into the problem, assisting in efficient diagnosis and resolution.

{
  "result": "ERR",
  "status": 400,
  "message": "errMsg_organizationIdisNotAValidID",
  "errCode": 400,
  "date": "2024-03-19T12:13:54.124Z",
  "detail": "String"
}

Bucket Management

(This information is also given in PART 1 prompt.)

This application has a bucket service used to store user files and other object-related files. The bucket service is login-agnostic, so for write operations or private reads, include a bucket token (provided by services) in the request’s Authorization header as a Bearer token.

Please note that all other business services require the access token in the Bearer header, while the bucket service expects a bucket token because it is login-agnostic. Ensure you manage the required token injection properly; any auth interceptor should not replace the bucket token with the access token.

User Bucket This bucket stores public user files for each user.

When a user logs in—or in the /currentuser response—there is a userBucketToken to use when sending user-related public files to the bucket service.

{
  //...
  "userBucketToken": "e56d...."
}

To upload a file

POST {baseUrl}/bucket/upload

The request body is form-data which includes the bucketId and the file binary in the files field.

{
    bucketId: "{userId}-public-user-bucket",
    files: {binary}
}

Response status is 200 on success, e.g., body:

{
    "success": true,
    "data": [
        {
            "fileId": "9da03f6d-0409-41ad-bb06-225a244ae408",
            "originalName": "test (10).png",
            "mimeType": "image/png",
            "size": 604063,
            "status": "uploaded",
            "bucketName": "f7103b85-fcda-4dec-92c6-c336f71fd3a2-public-user-bucket",
            "isPublic": true,
            "downloadUrl": "https://babilcom.mindbricks.co/bucket/download/9da03f6d-0409-41ad-bb06-225a244ae408"
        }
    ]
}

To download a file from the bucket, you need its fileId. If you upload an avatar or other asset, ensure the download URL or the fileId is stored in the backend.

Buckets are mostly used in object creations that require an additional file, such as a product image or user avatar. After uploading your image to the bucket, insert the returned download URL into the related property of the target object record.

Application Bucket

This Ebaycclone application also includes a common public bucket that anyone can read, but only users with the superAdmin, admin, or saasAdmin roles can write (upload) to it.

When a user with one of these admin roles is logged in, the /login response or the /currentuser response also returns an applicationBucketToken field, which is used when uploading any file to the application bucket.

{
  //...
  "applicationBucketToken": "e23fd...."
}

The common public application bucket ID is

"ebaycclone-public-common-bucket"

In certain admin areas—such as product management pages—since the user already has the application bucket token, they will be able to upload related object images.

Please configure your UI to upload files to the application bucket using this bucket token whenever needed.

Object Buckets Some objects may also return a bucket token for uploading or accessing files related to that object. For example, in a project management application, when you fetch a project’s data, a public or private bucket token may be provided to upload or download project-related files.

These buckets will be used as described in the relevant object definitions.

WatchlistItem Data Object

Item in a user’s watchlist, optionally in a named folder; references product and user.

WatchlistItem Data Object Frontend Description By The Backend Architect

Displayed as a product tile in one of the user's folders or the default list. Cannot be duplicated for same product in the same folder/list. Moving items is a frequent action; deletion removes only from list, not the product. Inactive or unavailable products should be flagged visually; actions blocked.

WatchlistItem Data Object Properties

WatchlistItem data object has got following properties that are represented as table fields in the database scheme. These properties don't stand just for data storage, but each may have different settings to manage the business logic.

Property Type IsArray Required Description
userId ID false Yes Owner of the watchlist item.
addedAt Date false Yes Timestamp watchlist item created.
productId ID false Yes Referenced product in the watchlist.
listId ID false No Owning watchlistList; null if in default watchlist.
  • Required properties are mandatory for creating objects and must be provided in the request body if no default value, formula or session bind is set.

Relation Properties

userId productId listId

Mindbricks supports relations between data objects, allowing you to define how objects are linked together. The relations may reference to a data object either in this service or in another service. Id the reference is remote, backend handles the relations through service communication or elastic search. These relations should be respected in the frontend so that instaead of showing the related objects id, the frontend should list human readable values from other data objects. If the relation points to another service, frontend should use the referenced service api in case it needs related data. The relation logic is montly handled in backend so the api responses feeds the frontend about the relational data. In mmost cases the api response will provide the relational data as well as the main one.

In frontend, please ensure that,

1- instaead of these relational ids you show the main human readable field of the related target data (like name), 2- if this data object needs a user input of these relational ids, you should provide a combobox with the list of possible records or (a searchbox) to select with the realted target data object main human readable field.

  • userId: ID Relation to user.id

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: Yes

  • productId: ID Relation to productListingProduct.id

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: Yes

  • listId: ID Relation to watchlistList.id

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: No

CartItem Data Object

Single product pending checkout in a user’s cart. Only fixed-price products permitted; quantity supported for multi-unit purchases (if allowed).

CartItem Data Object Frontend Description By The Backend Architect

User’s cart is visible as a list of product tiles with quantity per item. Only one cartItem allowed per (user, product). Attempts to add an auction-type product will fail. Duplicates are rejected. Items may be transferred back to watchlist.

CartItem Data Object Properties

CartItem data object has got following properties that are represented as table fields in the database scheme. These properties don't stand just for data storage, but each may have different settings to manage the business logic.

Property Type IsArray Required Description
addedAt Date false Yes Timestamp added to cart.
userId ID false Yes Cart owner.
quantity Integer false Yes How many units (if product allows).
productId ID false Yes Product being checked out.
  • Required properties are mandatory for creating objects and must be provided in the request body if no default value, formula or session bind is set.

Relation Properties

userId productId

Mindbricks supports relations between data objects, allowing you to define how objects are linked together. The relations may reference to a data object either in this service or in another service. Id the reference is remote, backend handles the relations through service communication or elastic search. These relations should be respected in the frontend so that instaead of showing the related objects id, the frontend should list human readable values from other data objects. If the relation points to another service, frontend should use the referenced service api in case it needs related data. The relation logic is montly handled in backend so the api responses feeds the frontend about the relational data. In mmost cases the api response will provide the relational data as well as the main one.

In frontend, please ensure that,

1- instaead of these relational ids you show the main human readable field of the related target data (like name), 2- if this data object needs a user input of these relational ids, you should provide a combobox with the list of possible records or (a searchbox) to select with the realted target data object main human readable field.

  • userId: ID Relation to user.id

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: Yes

  • productId: ID Relation to productListingProduct.id

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: Yes

WatchlistList Data Object

A named folder/list in a user’s watchlist. Default list exists for all users. Custom lists may be created and deleted.

WatchlistList Data Object Frontend Description By The Backend Architect

Default watchlist/folder is always present. When deleting a custom list, its items are moved to the default list; only empty lists can be deleted outright. itemCount shows count of non-deleted items. Folder organization is for user’s visual grouping only; does not affect cart or order flows.

WatchlistList Data Object Properties

WatchlistList data object has got following properties that are represented as table fields in the database scheme. These properties don't stand just for data storage, but each may have different settings to manage the business logic.

Property Type IsArray Required Description
name String false Yes Custom folder or list name. 'Default' is reserved (non-deletable for each user).
itemCount Integer false Yes Number of (non-deleted) items in the list/folder.
userId ID false Yes Owner of the watchlist list/folder.
  • Required properties are mandatory for creating objects and must be provided in the request body if no default value, formula or session bind is set.

Relation Properties

userId

Mindbricks supports relations between data objects, allowing you to define how objects are linked together. The relations may reference to a data object either in this service or in another service. Id the reference is remote, backend handles the relations through service communication or elastic search. These relations should be respected in the frontend so that instaead of showing the related objects id, the frontend should list human readable values from other data objects. If the relation points to another service, frontend should use the referenced service api in case it needs related data. The relation logic is montly handled in backend so the api responses feeds the frontend about the relational data. In mmost cases the api response will provide the relational data as well as the main one.

In frontend, please ensure that,

1- instaead of these relational ids you show the main human readable field of the related target data (like name), 2- if this data object needs a user input of these relational ids, you should provide a combobox with the list of possible records or (a searchbox) to select with the realted target data object main human readable field.

  • userId: ID Relation to user.id

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: Yes

Filter Properties

name

Filter properties are used to define parameters that can be used in query filters, allowing for dynamic data retrieval based on user input or predefined criteria. These properties are automatically mapped as API parameters in the listing API's.

  • name: String has a filter named name

API Reference

List Watchlistlist API

List all lists in user’s watchlists. Supports listing by listId for folders.

Rest Route

The listWatchlistList API REST controller can be triggered via the following route:

/v1/watchlistlists

Rest Request Parameters The listWatchlistList api has got no request parameters.

REST Request To access the api you can use the REST controller with the path GET /v1/watchlistlists

  axios({
    method: 'GET',
    url: '/v1/watchlistlists',
    data: {
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "watchlistLists",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"watchlistLists": [
		{
			"id": "ID",
			"name": "String",
			"itemCount": "Integer",
			"userId": "ID",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

List Cartitems API

List all cart items for a user (pending checkout).

Rest Route

The listCartItems API REST controller can be triggered via the following route:

/v1/cartitems

Rest Request Parameters The listCartItems api has got no request parameters.

REST Request To access the api you can use the REST controller with the path GET /v1/cartitems

  axios({
    method: 'GET',
    url: '/v1/cartitems',
    data: {
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "cartItems",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"cartItems": [
		{
			"id": "ID",
			"addedAt": "Date",
			"userId": "ID",
			"quantity": "Integer",
			"productId": "ID",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID",
			"product": [
				{
					"currency": "String",
					"description": "Text",
					"condition": "Enum",
					"condition_idx": "Integer",
					"price": "Double",
					"title": "String",
					"type": "Enum",
					"type_idx": "Integer",
					"mediaAssetIds": "ID"
				},
				{},
				{}
			]
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Delete Cartitem API

Remove an item from the user’s cart.

Rest Route

The deleteCartItem API REST controller can be triggered via the following route:

/v1/cartitems/:cartItemId

Rest Request Parameters

The deleteCartItem api has got 1 request parameter

Parameter Type Required Population
cartItemId ID true request.params?.cartItemId
cartItemId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/cartitems/:cartItemId

  axios({
    method: 'DELETE',
    url: `/v1/cartitems/${cartItemId}`,
    data: {
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "cartItem",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"cartItem": {
		"id": "ID",
		"addedAt": "Date",
		"userId": "ID",
		"quantity": "Integer",
		"productId": "ID",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Create Watchlistitem API

Add product to user’s watchlist (default or target list/folder). One (user, product, list) per item enforced. Block duplicates.

Rest Route

The createWatchlistItem API REST controller can be triggered via the following route:

/v1/watchlistitems

Rest Request Parameters

The createWatchlistItem api has got 3 request parameters

Parameter Type Required Population
addedAt Date true request.body?.addedAt
productId ID true request.body?.productId
listId ID false request.body?.listId
addedAt : Timestamp watchlist item created.
productId : Referenced product in the watchlist.
listId : Owning watchlistList; null if in default watchlist.

REST Request To access the api you can use the REST controller with the path POST /v1/watchlistitems

  axios({
    method: 'POST',
    url: '/v1/watchlistitems',
    data: {
            addedAt:"Date",  
            productId:"ID",  
            listId:"ID",  
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "watchlistItem",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"watchlistItem": {
		"id": "ID",
		"userId": "ID",
		"addedAt": "Date",
		"productId": "ID",
		"listId": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Watchlistitems API

List all products in user’s watchlists. Supports listing by listId for folders.

Rest Route

The listWatchlistItems API REST controller can be triggered via the following route:

/v1/watchlistitems

Rest Request Parameters The listWatchlistItems api has got no request parameters.

REST Request To access the api you can use the REST controller with the path GET /v1/watchlistitems

  axios({
    method: 'GET',
    url: '/v1/watchlistitems',
    data: {
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "watchlistItems",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"watchlistItems": [
		{
			"id": "ID",
			"userId": "ID",
			"addedAt": "Date",
			"productId": "ID",
			"listId": "ID",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Update Cartitemquantity API

Change the quantity for a cart item. User must own the item.

Rest Route

The updateCartItemQuantity API REST controller can be triggered via the following route:

/v1/cartitemquantity/:cartItemId

Rest Request Parameters

The updateCartItemQuantity api has got 2 request parameters

Parameter Type Required Population
cartItemId ID true request.params?.cartItemId
quantity Integer false request.body?.quantity
cartItemId : This id paremeter is used to select the required data object that will be updated
quantity : How many units (if product allows).

REST Request To access the api you can use the REST controller with the path PATCH /v1/cartitemquantity/:cartItemId

  axios({
    method: 'PATCH',
    url: `/v1/cartitemquantity/${cartItemId}`,
    data: {
            quantity:"Integer",  
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "cartItem",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"cartItem": {
		"id": "ID",
		"addedAt": "Date",
		"userId": "ID",
		"quantity": "Integer",
		"productId": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Create Watchlistlist API

Create a new custom watchlist folder. Name must be unique per user; ‘Default’ is reserved for system.

Rest Route

The createWatchlistList API REST controller can be triggered via the following route:

/v1/watchlistlists

Rest Request Parameters

The createWatchlistList api has got 1 request parameter

Parameter Type Required Population
name String true request.body?.name
name : Custom folder or list name. 'Default' is reserved (non-deletable for each user).

REST Request To access the api you can use the REST controller with the path POST /v1/watchlistlists

  axios({
    method: 'POST',
    url: '/v1/watchlistlists',
    data: {
            name:"String",  
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "watchlistList",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"watchlistList": {
		"id": "ID",
		"name": "String",
		"itemCount": "Integer",
		"userId": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Delete Watchlistlist API

Delete a custom watchlist (folder). Items are reassigned to user’s default list. Cannot delete default list.

Rest Route

The deleteWatchlistList API REST controller can be triggered via the following route:

/v1/watchlistlists/:watchlistListId

Rest Request Parameters

The deleteWatchlistList api has got 1 request parameter

Parameter Type Required Population
watchlistListId ID true request.params?.watchlistListId
watchlistListId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/watchlistlists/:watchlistListId

  axios({
    method: 'DELETE',
    url: `/v1/watchlistlists/${watchlistListId}`,
    data: {
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "watchlistList",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"watchlistList": {
		"id": "ID",
		"name": "String",
		"itemCount": "Integer",
		"userId": "ID",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Delete Watchlistitem API

Remove a product from a user’s watchlist.

Rest Route

The deleteWatchlistItem API REST controller can be triggered via the following route:

/v1/watchlistitems/:watchlistItemId

Rest Request Parameters

The deleteWatchlistItem api has got 1 request parameter

Parameter Type Required Population
watchlistItemId ID true request.params?.watchlistItemId
watchlistItemId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/watchlistitems/:watchlistItemId

  axios({
    method: 'DELETE',
    url: `/v1/watchlistitems/${watchlistItemId}`,
    data: {
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "watchlistItem",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"watchlistItem": {
		"id": "ID",
		"userId": "ID",
		"addedAt": "Date",
		"productId": "ID",
		"listId": "ID",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Create Cartitem API

Add an item to the user’s cart. Only fixed-price products allowed. Duplicates not permitted.

Rest Route

The createCartItem API REST controller can be triggered via the following route:

/v1/cartitems

Rest Request Parameters

The createCartItem api has got 3 request parameters

Parameter Type Required Population
addedAt Date true request.body?.addedAt
quantity Integer true request.body?.quantity
productId ID true request.body?.productId
addedAt : Timestamp added to cart.
quantity : How many units (if product allows).
productId : Product being checked out.

REST Request To access the api you can use the REST controller with the path POST /v1/cartitems

  axios({
    method: 'POST',
    url: '/v1/cartitems',
    data: {
            addedAt:"Date",  
            quantity:"Integer",  
            productId:"ID",  
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "cartItem",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"cartItem": {
		"id": "ID",
		"addedAt": "Date",
		"userId": "ID",
		"quantity": "Integer",
		"productId": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Do Userwatchlist API

userwatchlist

Rest Route

The userwatchlist API REST controller can be triggered via the following route:

/v1/userwatchlist

Rest Request Parameters The userwatchlist api has got no request parameters.

REST Request To access the api you can use the REST controller with the path GET /v1/userwatchlist

  axios({
    method: 'GET',
    url: '/v1/userwatchlist',
    data: {
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "watchlistItems",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"watchlistItems": [
		{
			"id": "ID",
			"userId": "ID",
			"addedAt": "Date",
			"productId": "ID",
			"listId": "ID",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

List Usercartitems API

list all cart items adde by user

Rest Route

The listUserCartItems API REST controller can be triggered via the following route:

/v1/usercartitems

Rest Request Parameters The listUserCartItems api has got no request parameters.

REST Request To access the api you can use the REST controller with the path GET /v1/usercartitems

  axios({
    method: 'GET',
    url: '/v1/usercartitems',
    data: {
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "cartItems",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"cartItems": [
		{
			"id": "ID",
			"addedAt": "Date",
			"userId": "ID",
			"quantity": "Integer",
			"productId": "ID",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID",
			"product": [
				{
					"currency": "String",
					"description": "Text",
					"condition": "Enum",
					"condition_idx": "Integer",
					"endPrice": "Double",
					"price": "Double",
					"title": "String",
					"startPrice": "Double",
					"type": "Enum",
					"type_idx": "Integer",
					"shipping": "Double"
				},
				{},
				{}
			]
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Do Userwatchlistlists API

list all watch lists created by user

Rest Route

The userwatchlistlists API REST controller can be triggered via the following route:

/v1/userwatchlistlists

Rest Request Parameters The userwatchlistlists api has got no request parameters.

REST Request To access the api you can use the REST controller with the path GET /v1/userwatchlistlists

  axios({
    method: 'GET',
    url: '/v1/userwatchlistlists',
    data: {
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "watchlistLists",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"watchlistLists": [
		{
			"id": "ID",
			"name": "String",
			"itemCount": "Integer",
			"userId": "ID",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

After this prompt, the user may give you new instructions to update the output of this prompt or provide subsequent prompts about the project.