eBay-Style Marketplace Backend

frontend-prompt-12-productlistingservice • 1/2/2026

EBAYCCLONE

FRONTEND GUIDE FOR AI CODING AGENTS - PART 12 - ProductListing 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 productListing

Service Access

ProductListing service management is handled through service specific base urls.

ProductListing 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 productListing service, the base URLs are:

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

Scope

ProductListing Service Description

Handles product listings (both auction and fixed-price), image/media storage with validations, enforces immutable type, soft-delete, and public product discovery.

ProductListing 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.

productListingMedia Data Object: Stores and manages images/media associated with products, including secure URL, MIME type, and size validation. Each asset can be used by multiple products.

productListingProduct Data Object: Represents a single product listing (fixed-price or auction) in the marketplace, with seller, category, type, price information, shipping details, media references, and dynamic auction fields.

ProductListing Service Frontend Description By The Backend Architect

productListing Service UX Guidance

  • Product listings can be created/updated only by authenticated users, with fields conditional on type (fixed vs. auction).
  • Media upload endpoint returns array of validated mediaAssetIds for consumption in product creation or update forms.
  • In product details, always show category, subcategory, and seller info using available joins.
  • All public product queries must exclude inactive (soft-deleted) items.
  • Product type (auction/fixed) is displayed as immutable once created; UI to enforce as read-only for edits.
  • Media uploaded but not associated with a product may later be orphaned and subject to cleanup (handled by admin).

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.

ProductListingMedia Data Object

Stores and manages images/media associated with products, including secure URL, MIME type, and size validation. Each asset can be used by multiple products.

ProductListingMedia Data Object Frontend Description By The Backend Architect

  • Images must be validated (size, MIME type) during upload.
  • Media assets are referenced from product listings (mediaAssetIds).
  • Preview of uploaded media is available immediately after upload using returned mediaAssetIds and URLs.
  • Orphan/unreferenced media assets may be flagged by admin for cleanup.

ProductListingMedia Data Object Properties

ProductListingMedia 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
mimeType String false Yes MIME type of the uploaded media (e.g., image/jpeg)
productId ID false No ID of product associated with this media asset
url String false Yes Secure, validated URL for the media asset (S3 or equivalent)
size Integer false Yes Media size in bytes (for validation and quota)
  • 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

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.

  • 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: No

ProductListingProduct Data Object

Represents a single product listing (fixed-price or auction) in the marketplace, with seller, category, type, price information, shipping details, media references, and dynamic auction fields.

ProductListingProduct Data Object Frontend Description By The Backend Architect

  • Title, description, and price/auction fields are required per listing type.
  • Once created, listing type (fixed vs auction) cannot be changed via update UI.
    - Product media assets listed as thumbnails/lightbox from mediaAssetIds reference.
    - Show seller and category info via joins.
  • For auctions, display real-time currentBid & highestBidder; for fixed, show price.
    - Editing disabled for products currently engaged in transactions or bids (to be enforced at workflow level).

ProductListingProduct Data Object Properties

ProductListingProduct 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
currency String false Yes ISO currency code (e.g. USD, EUR)
description Text false Yes Product detailed description
condition Enum false Yes Condition of product: BRAND_NEW, NEW, or USED
startBid Double false No The opening bid value (for auction type products)
endPrice Double false No Optional immediate sale/upper end price for auction (if AUCTION type)
price Double false No Product price (required if fixed price type)
title String false Yes Product title
startPrice Double false No Minimum starting price for auction (required if AUCTION type)
type Enum false Yes Product listing type, either FIXED or AUCTION (immutable after creation)
endBid Double false No The upper (max) bid value for auction products (if any)
estimatedDelivery Date false No Estimated delivery date for this product
shippingCurrency String false Yes Currency code for shipping cost
sellerId ID false Yes Reference to user who listed the product
mediaAssetIds ID true No References to associated product/media assets
shippingMethod Enum false Yes Shipping option for product: STANDARD, EXPRESS, or FREE
shipping Double false Yes Shipping cost for this product
startBidDate Date false No Date/time when auction bidding begins
subcategoryId ID false Yes Reference to subcategory
categoryId ID false Yes Reference to parent category
endBidDate Date false No Date/time when auction bidding ends
currentBid Double false No Current highest bid for auction-type product (updated atomically on bid placement)
highestBidderId ID false No User ID of current highest bidder (auction-only, updated by auction microservice)
  • 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.

Array Properties

mediaAssetIds

Array properties can hold multiple values. Array properties should be respected according to their multiple structure in the frontend in any user input for them. Please use multiple input components for the array proeprties when needed.

Enum Properties

Enum properties are defined with a set of allowed values, ensuring that only valid options can be assigned to them. The enum options value will be stored as strings in the database, but when a data object is created an additional property with the same name plus an idx suffix will be created, which will hold the index of the selected enum option. You can use the {fieldName_idx} property to sort by the enum value or when your enum options represent a hiyerarchy of values. In the frontend input components, enum type properties should only accept values from an option component that lists the enum options.

  • condition: [BRAND_NEW, NEW, USED]

  • type: [FIXED, AUCTION]

  • shippingMethod: [STANDARD, EXPRESS, FREE]

Relation Properties

sellerId mediaAssetIds subcategoryId categoryId highestBidderId

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.

  • sellerId: 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

  • mediaAssetIds: ID Relation to productListingMedia.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

  • subcategoryId: ID Relation to subcategory.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

  • categoryId: ID Relation to category.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

  • highestBidderId: 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: No

Filter Properties

currency condition price title type sellerId subcategoryId categoryId

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.

  • currency: String has a filter named currency

  • condition: Enum has a filter named condition

  • price: Double has a filter named price

  • title: String has a filter named title

  • type: Enum has a filter named type

  • sellerId: ID has a filter named sellerId

  • subcategoryId: ID has a filter named subcategoryId

  • categoryId: ID has a filter named categoryId

API Reference

List Productlistingmedia API

List all media assets (admin or for media management/bulk preview).

Rest Route

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

/v1/productlistingmedias

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

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

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

REST Response

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

Get Productlistingproduct API

Get a single product listing. Checks isActive and public status. Includes media, category, subcategory, and seller info via joins.

Rest Route

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

/v1/productlistingproducts/:productListingProductId

Rest Request Parameters

The getProductListingProduct api has got 1 request parameter

Parameter Type Required Population
productListingProductId ID true request.params?.productListingProductId
productListingProductId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/productlistingproducts/:productListingProductId

  axios({
    method: 'GET',
    url: `/v1/productlistingproducts/${productListingProductId}`,
    data: {
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "productListingProduct",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"productListingProduct": {
		"id": "ID",
		"currency": "String",
		"description": "Text",
		"condition": "Enum",
		"condition_idx": "Integer",
		"startBid": "Double",
		"endPrice": "Double",
		"price": "Double",
		"title": "String",
		"startPrice": "Double",
		"type": "Enum",
		"type_idx": "Integer",
		"endBid": "Double",
		"estimatedDelivery": "Date",
		"shippingCurrency": "String",
		"sellerId": "ID",
		"mediaAssetIds": "ID",
		"shippingMethod": "Enum",
		"shippingMethod_idx": "Integer",
		"shipping": "Double",
		"startBidDate": "Date",
		"subcategoryId": "ID",
		"categoryId": "ID",
		"endBidDate": "Date",
		"currentBid": "Double",
		"highestBidderId": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Productlistingownproducts API

listing the loggedin user's products

Rest Route

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

/v1/productlistingownproducts

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

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

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

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "productListingProducts",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"productListingProducts": [
		{
			"id": "ID",
			"currency": "String",
			"description": "Text",
			"condition": "Enum",
			"condition_idx": "Integer",
			"startBid": "Double",
			"endPrice": "Double",
			"price": "Double",
			"title": "String",
			"startPrice": "Double",
			"type": "Enum",
			"type_idx": "Integer",
			"endBid": "Double",
			"estimatedDelivery": "Date",
			"shippingCurrency": "String",
			"sellerId": "ID",
			"mediaAssetIds": "ID",
			"shippingMethod": "Enum",
			"shippingMethod_idx": "Integer",
			"shipping": "Double",
			"startBidDate": "Date",
			"subcategoryId": "ID",
			"categoryId": "ID",
			"endBidDate": "Date",
			"currentBid": "Double",
			"highestBidderId": "ID",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Get Productlistingmedia API

Get a single media asset by ID (for admin or to display in product UI).

Rest Route

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

/v1/productlistingmedias/:productListingMediaId

Rest Request Parameters

The getProductListingMedia api has got 1 request parameter

Parameter Type Required Population
productListingMediaId ID true request.params?.productListingMediaId
productListingMediaId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/productlistingmedias/:productListingMediaId

  axios({
    method: 'GET',
    url: `/v1/productlistingmedias/${productListingMediaId}`,
    data: {
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "productListingMedia",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"productListingMedia": {
		"id": "ID",
		"mimeType": "String",
		"productId": "ID",
		"url": "String",
		"size": "Integer",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Productlistingproducts API

List public product listings. Only isActive=true records are returned. Includes category, subcategory, seller, media joins. Supports filtering.

Rest Route

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

/v1/productlistingproducts

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

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

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

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "productListingProducts",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"productListingProducts": [
		{
			"id": "ID",
			"currency": "String",
			"description": "Text",
			"condition": "Enum",
			"condition_idx": "Integer",
			"startBid": "Double",
			"endPrice": "Double",
			"price": "Double",
			"title": "String",
			"startPrice": "Double",
			"type": "Enum",
			"type_idx": "Integer",
			"endBid": "Double",
			"estimatedDelivery": "Date",
			"shippingCurrency": "String",
			"sellerId": "ID",
			"mediaAssetIds": "ID",
			"shippingMethod": "Enum",
			"shippingMethod_idx": "Integer",
			"shipping": "Double",
			"startBidDate": "Date",
			"subcategoryId": "ID",
			"categoryId": "ID",
			"endBidDate": "Date",
			"currentBid": "Double",
			"highestBidderId": "ID",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Delete Productlistingproduct API

Soft-delete a product listing. Only owner or admin can delete.

Rest Route

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

/v1/productlistingproducts/:productListingProductId

Rest Request Parameters

The deleteProductListingProduct api has got 1 request parameter

Parameter Type Required Population
productListingProductId ID true request.params?.productListingProductId
productListingProductId : 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/productlistingproducts/:productListingProductId

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

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "productListingProduct",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"productListingProduct": {
		"id": "ID",
		"currency": "String",
		"description": "Text",
		"condition": "Enum",
		"condition_idx": "Integer",
		"startBid": "Double",
		"endPrice": "Double",
		"price": "Double",
		"title": "String",
		"startPrice": "Double",
		"type": "Enum",
		"type_idx": "Integer",
		"endBid": "Double",
		"estimatedDelivery": "Date",
		"shippingCurrency": "String",
		"sellerId": "ID",
		"mediaAssetIds": "ID",
		"shippingMethod": "Enum",
		"shippingMethod_idx": "Integer",
		"shipping": "Double",
		"startBidDate": "Date",
		"subcategoryId": "ID",
		"categoryId": "ID",
		"endBidDate": "Date",
		"currentBid": "Double",
		"highestBidderId": "ID",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Update Productlistingproduct API

Update a product listing. Product type cannot be changed (immutable).

Rest Route

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

/v1/productlistingproducts/:productListingProductId

Rest Request Parameters

The updateProductListingProduct api has got 21 request parameters

Parameter Type Required Population
productListingProductId ID true request.params?.productListingProductId
currency String false request.body?.currency
description Text false request.body?.description
condition Enum false request.body?.condition
startBid Double false request.body?.startBid
endPrice Double false request.body?.endPrice
price Double false request.body?.price
title String false request.body?.title
startPrice Double false request.body?.startPrice
endBid Double false request.body?.endBid
estimatedDelivery Date false request.body?.estimatedDelivery
shippingCurrency String false request.body?.shippingCurrency
mediaAssetIds ID false request.body?.mediaAssetIds
shippingMethod Enum false request.body?.shippingMethod
shipping Double false request.body?.shipping
startBidDate Date false request.body?.startBidDate
subcategoryId ID false request.body?.subcategoryId
categoryId ID false request.body?.categoryId
endBidDate Date false request.body?.endBidDate
currentBid Double false request.body?.currentBid
highestBidderId ID false request.body?.highestBidderId
productListingProductId : This id paremeter is used to select the required data object that will be updated
currency : ISO currency code (e.g. USD, EUR)
description : Product detailed description
condition : Condition of product: BRAND_NEW, NEW, or USED
startBid : The opening bid value (for auction type products)
endPrice : Optional immediate sale/upper end price for auction (if AUCTION type)
price : Product price (required if fixed price type)
title : Product title
startPrice : Minimum starting price for auction (required if AUCTION type)
endBid : The upper (max) bid value for auction products (if any)
estimatedDelivery : Estimated delivery date for this product
shippingCurrency : Currency code for shipping cost
mediaAssetIds : References to associated product/media assets
shippingMethod : Shipping option for product: STANDARD, EXPRESS, or FREE
shipping : Shipping cost for this product
startBidDate : Date/time when auction bidding begins
subcategoryId : Reference to subcategory
categoryId : Reference to parent category
endBidDate : Date/time when auction bidding ends
currentBid : Current highest bid for auction-type product (updated atomically on bid placement)
highestBidderId : User ID of current highest bidder (auction-only, updated by auction microservice)

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

  axios({
    method: 'PATCH',
    url: `/v1/productlistingproducts/${productListingProductId}`,
    data: {
            currency:"String",  
            description:"Text",  
            condition:"Enum",  
            startBid:"Double",  
            endPrice:"Double",  
            price:"Double",  
            title:"String",  
            startPrice:"Double",  
            endBid:"Double",  
            estimatedDelivery:"Date",  
            shippingCurrency:"String",  
            mediaAssetIds:"ID",  
            shippingMethod:"Enum",  
            shipping:"Double",  
            startBidDate:"Date",  
            subcategoryId:"ID",  
            categoryId:"ID",  
            endBidDate:"Date",  
            currentBid:"Double",  
            highestBidderId:"ID",  
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "productListingProduct",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"productListingProduct": {
		"id": "ID",
		"currency": "String",
		"description": "Text",
		"condition": "Enum",
		"condition_idx": "Integer",
		"startBid": "Double",
		"endPrice": "Double",
		"price": "Double",
		"title": "String",
		"startPrice": "Double",
		"type": "Enum",
		"type_idx": "Integer",
		"endBid": "Double",
		"estimatedDelivery": "Date",
		"shippingCurrency": "String",
		"sellerId": "ID",
		"mediaAssetIds": "ID",
		"shippingMethod": "Enum",
		"shippingMethod_idx": "Integer",
		"shipping": "Double",
		"startBidDate": "Date",
		"subcategoryId": "ID",
		"categoryId": "ID",
		"endBidDate": "Date",
		"currentBid": "Double",
		"highestBidderId": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Create Productlistingproduct API

Create a new product listing (fixed or auction), conditioned on product type. Type is immutable after creation.

Rest Route

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

/v1/productlistingproducts

Rest Request Parameters

The createProductListingProduct api has got 21 request parameters

Parameter Type Required Population
currency String true request.body?.currency
description Text true request.body?.description
condition Enum true request.body?.condition
startBid Double false request.body?.startBid
endPrice Double false request.body?.endPrice
price Double false request.body?.price
title String true request.body?.title
startPrice Double false request.body?.startPrice
type Enum true request.body?.type
endBid Double false request.body?.endBid
estimatedDelivery Date false request.body?.estimatedDelivery
shippingCurrency String true request.body?.shippingCurrency
mediaAssetIds ID false request.body?.mediaAssetIds
shippingMethod Enum true request.body?.shippingMethod
shipping Double true request.body?.shipping
startBidDate Date false request.body?.startBidDate
subcategoryId ID true request.body?.subcategoryId
categoryId ID true request.body?.categoryId
endBidDate Date false request.body?.endBidDate
currentBid Double false request.body?.currentBid
highestBidderId ID false request.body?.highestBidderId
currency : ISO currency code (e.g. USD, EUR)
description : Product detailed description
condition : Condition of product: BRAND_NEW, NEW, or USED
startBid : The opening bid value (for auction type products)
endPrice : Optional immediate sale/upper end price for auction (if AUCTION type)
price : Product price (required if fixed price type)
title : Product title
startPrice : Minimum starting price for auction (required if AUCTION type)
type : Product listing type, either FIXED or AUCTION (immutable after creation)
endBid : The upper (max) bid value for auction products (if any)
estimatedDelivery : Estimated delivery date for this product
shippingCurrency : Currency code for shipping cost
mediaAssetIds : References to associated product/media assets
shippingMethod : Shipping option for product: STANDARD, EXPRESS, or FREE
shipping : Shipping cost for this product
startBidDate : Date/time when auction bidding begins
subcategoryId : Reference to subcategory
categoryId : Reference to parent category
endBidDate : Date/time when auction bidding ends
currentBid : Current highest bid for auction-type product (updated atomically on bid placement)
highestBidderId : User ID of current highest bidder (auction-only, updated by auction microservice)

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

  axios({
    method: 'POST',
    url: '/v1/productlistingproducts',
    data: {
            currency:"String",  
            description:"Text",  
            condition:"Enum",  
            startBid:"Double",  
            endPrice:"Double",  
            price:"Double",  
            title:"String",  
            startPrice:"Double",  
            type:"Enum",  
            endBid:"Double",  
            estimatedDelivery:"Date",  
            shippingCurrency:"String",  
            mediaAssetIds:"ID",  
            shippingMethod:"Enum",  
            shipping:"Double",  
            startBidDate:"Date",  
            subcategoryId:"ID",  
            categoryId:"ID",  
            endBidDate:"Date",  
            currentBid:"Double",  
            highestBidderId:"ID",  
    
    },
    params: {
    
    }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "productListingProduct",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"productListingProduct": {
		"id": "ID",
		"currency": "String",
		"description": "Text",
		"condition": "Enum",
		"condition_idx": "Integer",
		"startBid": "Double",
		"endPrice": "Double",
		"price": "Double",
		"title": "String",
		"startPrice": "Double",
		"type": "Enum",
		"type_idx": "Integer",
		"endBid": "Double",
		"estimatedDelivery": "Date",
		"shippingCurrency": "String",
		"sellerId": "ID",
		"mediaAssetIds": "ID",
		"shippingMethod": "Enum",
		"shippingMethod_idx": "Integer",
		"shipping": "Double",
		"startBidDate": "Date",
		"subcategoryId": "ID",
		"categoryId": "ID",
		"endBidDate": "Date",
		"currentBid": "Double",
		"highestBidderId": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Delete Productlistingmedia API

Soft-delete a media asset (typically by admin or media owner for flagged/invalid content).

Rest Route

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

/v1/productlistingmedias/:productListingMediaId

Rest Request Parameters

The deleteProductListingMedia api has got 1 request parameter

Parameter Type Required Population
productListingMediaId ID true request.params?.productListingMediaId
productListingMediaId : 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/productlistingmedias/:productListingMediaId

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

REST Response

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

Create Productlistingmedia API

Create a new media asset record after validation. Used mainly by edge controller after upload.

Rest Route

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

/v1/productlistingmedias

Rest Request Parameters

The createProductListingMedia api has got 4 request parameters

Parameter Type Required Population
mimeType String true request.body?.mimeType
productId ID false request.body?.productId
url String true request.body?.url
size Integer true request.body?.size
mimeType : MIME type of the uploaded media (e.g., image/jpeg)
productId : ID of product associated with this media asset
url : Secure, validated URL for the media asset (S3 or equivalent)
size : Media size in bytes (for validation and quota)

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

  axios({
    method: 'POST',
    url: '/v1/productlistingmedias',
    data: {
            mimeType:"String",  
            productId:"ID",  
            url:"String",  
            size:"Integer",  
    
    },
    params: {
    
    }
  });

REST Response

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

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