Follow

Add Product to Catalog

The Add Product to Catalog command allows you to add a product and details to a catalog. 

The Add Product to Catalog command requires the following arguments: Catalog ID, Project ID, Status, Availability, Product SKU, Product Type, Title, Product URL, Image URL, Price, and Currency.

api_web?r=myrealm&p=mypass&c=create_product&product_id=2020ABCxyz&catalog_id=68&active=1&availability=In%20Stock&psku=ABC&product_type=Paper%20%3E%0A%20Copy%20Paper&title=Paper&link=URL&image_link=URL&price=44.44&currency=USD

The command is ‘create_product', the realm is ‘myrealm’ and the password is ‘mypass’.  The new Product has ID  ‘2020ABCxyz’ in the catalog with ID ‘68’.

Example

Using create_product with all commands and arguments (please note the command is wrapped for display purposes only):

api_web?r=myrealm&p=mypass&c=create_product&product_id=2020ABCxyz&catalog_id=68&active=1&availability=In%20Stock&psku=ABC&vsku=xyz&product_type=Paper%20%3E%0A%20Copy%20Paper&title=Paper&link=URL&image_link=URL&price=44.44&currency=USD&brand=MyBrand&manufacturer=MyMfg&quantity=64&color=white&size=8x5x11&gender=none&variant_title=Copy%20Paper

Successful results return:

SUCCESS: Product added (product_id: 2020ABCxyz, catalog_id: 68)

Results

The Add Product to Catalog command outputs either a SUCCESS or FAILURE message. 

Success

The command success message returns the SUCCESS message.  The result format is:

SUCCESS: Product added (product_id: [product_feed_id], catalog_id: [catalog_id])

Failure

The command will fail if a Product with the same ID already exists, required data is missing, the Catalog does not exist, or invalid data is defined.  The result format is:

FAILURE: [Reason]  

Arguments

The command supports the following arguments:

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=listattrcreate

c=listattrcreate

Realm

Yes

Name of the realm to run the command.  This is required, and the command will fail if the realm and password do not match.

realm=[realm_name]

r=[realm_name]

Password

Yes

Authentication code for API access.  This is required, and the command will fail if the realm and password do not match.

pwd=[password]

p=[password]

Product ID Yes Unique ID for the product item.

product_id=[string]

Catalog ID Yes Unique ID for the grouping of product items into a Catalog.

catalog_id=[integer]

Status Yes

Active or Inactive status of the product. 

  • Active = 1, Y, y
  • Inactive = 0, N, n

active=[0,N,n,1,Y,y]

Availability Yes Current availability status of the product.  Supported values (url encoded for spaces):
  • In%20stock
  • Available%20for%20order
  • Out%20of%20stock
  • Preorder

availability=[validated string]

PSKU Yes Parent SKU identification

psku=[string]

VSKU   Variant SKU identification

vsku=[string]

Product Type Yes Product type, or category and sub-category, product is assigned to. 

product_type=[string]

Title Yes Product title at the parent SKU level

title=[string]

Variant Title   Product title at the variant SKU level

variant_title=[string]

Link Yes URL for the product at the parent SKU level including http:// or https:// prefix. 

link=[encoded URL]

Image Link Yes URL for the product image at the parent SKU level including http:// or https:// prefix.

image_link=[encoded URL]

Price Yes Price of product as a two decimal place value.

price=[float]

Currency Yes Currency used in the price field. This must be a valid ISO 4217 alphabetic code.

currency=[string]

Brand   Brand of the product.

brand=[string]

Manufacturer   Manufacturer of the product.

manufacturer=[string]

Quantity   Current quantity in of product in inventory.

quantity=[integer]

Color   Product Color(s).

color=[string]

Size   Product Size.

size=[string]

Gender   Gender for the product specified.  This optional string is not limited to any specific wording.

gender=[string]

Feature added in v15.14.00.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk