Skip to main content

[I] Product

JSON Request

{
"body_html": {{NEEDMAP - KATIE}},
"created_at": "2012-02-15T15:12:21-05:00",
"trax_status" : {{itemsclr.lonlinestatus}},
"trax_website" : {{itemsclr.lclarityenabled}},
"handle": {{NEEDSMAP}}}, "my-fountain"
"id": {{NEEDSMAP}},
"images": [
{
"position": 1,
"src": {{itemsclr.cimglink}},
},
{
"position": 2,
"src": {{itemsclr.caltimg1}},
"variant_ids": [
1234,1234
]
},
{
"position": 3,
"src": {{itemsclr.caltimg2}},
"variant_ids": [
1234,1234
]
},
{
"position": 4,
"src": {{itemsclr.caltimg3}},
"variant_ids": [
1234,1234
]
},
{
"position": 5,
"src": {{itemsclr.caltimg4}},
"variant_ids": [
1234,1234
]
},
{
"position": 5,
"src": {{itemsclr.caltimg5}},
"variant_ids": [
1234,1234
]
}
],
"product_type": {{items.cprodtype}},
"published_at": "2007-12-31T19:00:00-05:00",
"published_scope": "global",
"status": {{NEEDSMAP}},
"tags": "{{SEE MAPPING DOC FOR 'TAG:'}}", WH_ITEM:T, INT_ITEM:F, VT_ITEM:F,
"template_suffix": "",
"title": {{NEEDMAP - KATIE}},
"position": 1,
"updated_at": "2012-08-24T14:01:47-04:00",
"variants": [
{
"barcode": {{itemsclr.cupccode}},
"compare_at_price": {{itemsclr.nmapprice - MAP DISPLAY}},
"created_at": "2012-08-24T14:01:47-04:00",
"fulfillment_service": "manual",
"weight": {{items.nweight}},
"weight_unit": "lbs",
"id": 808950810,
"inventory_item_id": 341629,
"inventory_management": "shopify",
"inventory_policy": "continue",
"inventory_quantity": 0,
"option1": {{itemsclr.ccolorname}},
"price": {{itemsclr.nmapprice}}, - DC < WHOLESALE < INTERNET < PROJECT < MSRP < [[MAP]]
"product_id": 632910392,
"requires_shipping": true,
"sku": {{itemsclr.cinternitemnum}},
"taxable": {{items.ltaxable}},
"updated_at": "2012-08-24T14:01:47-04:00",
"country_code_of_origin" :{{items.ccountoforig}},
"country_harmonized_system_code" :{{items.chstarrclass}},
"data_points" :
{
REFERENCE FIELDS
"ship_method" : {{items.cshipMethod}},
"length" : {{items.nlength}},
"length_units" : "in",
"width" : {{items.nwidth}},
"width_units" : "in",
"height" : {{items.nheight}},
"height_units" : "in",
"cad_src" : {{items.ccadlisting}},
"instructions_src" : {{item_fountains.cfouninstrsour}},
"msrp" : {{itemsclr.nmsrp}},
"map" : {{itemsclr.nmapprice}},
"moq_dc" : {{items.nmoqdc}},
"order_inc" : {{items.norderincrdc}},
"attributes" : []

ATTRIBUTES?
"catalog_page" : {{items.ccatalogref}},
"catalog_year" : {{item_attributes.nintrocat}},
"pump_size" : {{item_fountains.npumpsize}},
"cord_length" : {{item_fountains.ccordlength}},
"additional_drain_stop" : {{item_fountains.cadddrainstopper}},
"refill_device" : {{Item_fountains.crefilldevicereq }},
"volume" : {{items.nvolume}},
"water_weight" : {{item_fountains.nestwghtwwater}}

}
}
],
"vendor": {{items.csaleco}},
"additional_data" : {
"recom_pedestal" : [1234,1234,1234],
"recom_products" : [1234,1234,1234],
"additional_attributes" : { JSON ATTRIBUTE OBJECT },
"drain_hole" : {{item_attribues.cdrainholesinfo}},
"fountain_cover" : 1234,
"fountain_instructions" : {{item_fountains.cfouninstrour}},
"replacement_item" : {{item_fountains.creppkitemnum}} -- 1234,
"seo_description" : {{items.cintershortcopy}},
"seo_keywords" : {{items.ckeywords}}
},
"videos" : [
{
"position" : 1,
"src" : {{itemsclr.cvidlink}}
},{
"position" : 2,
"src" : {{itemsclr.caltvid1}}
},{
"position" : 3,
"src" : {{itemsclr.caltvid2}}
}
]
}

Product Create / Update

POST` https://devops-campania.herokuapps.com/api/products

Product Create / Update Method


Body - application/json

Headers

NameTypeDescription
API_Key*StringAPI KEY
API_Store*StringShopify primary myshopify.com url

Request Body

NameTypeDescription
body_html (required)StringProduct Description
created_atDate/TimeREAD ONLY - Shopify Created Time
updated_atDate/TimeREAD ONLY - Shopify Last Updated
trax_status (required)Boolean[itemsclr.lonlinestatus] - active or draft product in Shopify (T = ACTIVE)
trax_website (required)Boolean[itemsclr.lclarityenabled] - determines if the product is published to the website
handle (required)String[NEEDS TRAX DATA] Product Handle e.g. my-product
idString[NEEDS TRAX DATA] OPTIONAL - If not included, NEW Shopify Product Created | If included, Shopify Product Updated.
ImagesObjectArray of product images.position = Integer 1-XXX variant_ids = Array of strings listing variants this image references.src = image public URL or Dropbox internal folder link for API
product_typeString[items.cprodtype]. Default = "Fountains" if not provided
published_atDate/TimeDate to publish to online store - can be set into the future. Any date provided earlier than current date/time will automatically publish product.

INFO title="201: Created Product Created"

{ 
"code": "success",
"error": null,
"result": null
"product" : {
"body_html": "",
"created_at": "2012-02-15T15:12:21-05:00",
"handle": "my-fountain"
"id":123456,
"published_at": "2007-12-31T19:00:00-05:00",
"published_scope": "global",
"status": "active",
<SEE MAPPING DOC FOR ADDITIONAL FIELDS AVAILABLE - RESPONSE IS THE SAME AS SENT + ID Numbers>

}

}


INFO tab title="401: Unauthorized API Key or API_Store Invalid"

{ 
"code": "api-failed-auth",
"error": "API Failed to authenticate"
}

INFO title="403: Forbidden After 3 Failed 401" After 3 failed API authentications, the API Failed alert will fire and the server will block ALL requests with a 403: Forbidden response for 1 hour. Reset alert in the Shopify Admin App Panel by resetting the API KEY

{
"code" : "api-blocked",
"error" : "API Failed - Blocked for 1 hour"
}

INFO tab title="404: Not Found If Product ID Not Found On Shopify" If Product ID Not Found

{
"code" : "product-not-found",
"error" : "Product ID: {{ productId }} not found in Shopify."
}

If Variant ID Not Found - Note: NO UPDATE WILL OCCUR ON any part of the product.

// Some{
"code" : "variant-not-found",
"error" : "Product ID: {{ productId }} | Variant ID: {{ variantId }} not found in Shopify."
}