Add Product API: product_add

The Add Product API is used to add a new product to the product catalog.

API Endpoint and Methoddoc

URL Format

Copy
https://{baseurl}/api/{version}/{applicationName}/b2b/{comapnyHash}/{serviceName}

Example URL

Copy
https://api-dev.algonomy.com/api/v1/eventProductStore/b2b/BESQILOBZCGHVLZTCNTGJMYGQEARWVZVCUPYVUGNCZPJRSUDAR/product_add

HTTP Method

POST

Sample Body

Copy
{
“eventData”:{
  “ProductCode”: “String”,
  "ProductName": "String",
  "ProductDescription": "String",
  "ParentProductCode": "String",
  "ProductPrice": "double",
  "ProductBrand": "String",
  "ProductImageURL": "String",
  "ProductLinkURL": "String",
  "RecommendationFlag": "integer",
  "Rating": "integer",
  "ReviewCount": "integer",
  "RetailPrice": "double",
  "CreatedDate": "time in millis",
  "DiscontinuedDate":"time in millis"
}
}

Sample Request

Copy
{
    "eventData": {
        "productCode": "140010",
        "productName": "product_name_14000",
        "productDescription": "product_desc_14000",
        "parentProductCode": "5000",
        "productPrice": "140.56",
        "productBrand": "Product_brand_14000",
        "productImageURL": "https://algonomy.com/wp-content/uploads/2021/09/algonomy-products-portfolioo.png",
        "productLinkURL": "https://algonomy.com/wp-content/uploads/2022/08/algonomy-home-imageSTYLE-1-1-min.png",
        "recommendationFlag": 1,
        "rating": 2,
        "reviewCount": 1,
        "retailPrice": "150.67",
        "createdDate": 1633077176000,
        "discontinuedDate": 1633077176000
    }
}

Parameters

Parameter

Type Required or Optional Default Value

Description

ProductCode String Required  

Unique code for the product.

Example: "140010"

ProductName String

Required

 

Name of the product.

Example: "product_name_14000"

ProductDescription String Optional  

Description of the product.

Example: "High-quality cotton shirt"

ParentProductCode String Optional  

Code for the parent product, if applicable.

Example: "5000"

ProductPrice Double Optional  

Price of the product.

Example: "140.56"

ProductBrand String Optional  

Brand name associated with the product.

Example: "Product_brand_14000"

ProductImageURL String Optional  

URL of the product image.

Example: "https://example.com/product-image.png"

ProductLinkURL String Optional  

URL linking to the product page.

Example: "https://example.com/product-link.png"

RecommendationFlag

Integer

Optional

1

Indicates if the product is recommendable in eCom site? (1 = Yes, 0 = No).

Example: 1

Rating

Integer

Optional

 

Product rating, typically between 1 and 5 stars.

Example: 2

ReviewCount

Integer

Optional

 

Number of customer reviews.

Example: 1

RetailPrice

Double

Optional

 

Retail price of the product.

Example: "150.67"

CreatedDate

Long

Optional

Current Timestamp

Date when the product was created. That is, timestamp in milliseconds indicating when the product first becomes available.

Example: 1633077176000

DiscontinuedDate

Long

Optional

Current Timestamp

Date when the product is discontinued. That is, timestamp in milliseconds indicating when the product was discontinued.

Example: 1633077176000

HTTP Response Codes

Response Code

Description

202 Accepted When your request is accepted.
500 Internal Server Error

When the server encounters an internal error and fails to complete your request.