Update product
const url = 'https://catalog.shopgate.io/v1/merchants/example/products/example';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":{"en-us":"string in english","de-de":"Zeichenkette auf Deutsch"},"longName":{"en-us":"string in english","de-de":"Zeichenkette auf Deutsch"},"shortDescription":{"en-us":"string in english","de-de":"Zeichenkette auf Deutsch"},"longDescription":{"en-us":"string in english","de-de":"Zeichenkette auf Deutsch"},"categories":[{"code":"123","isPrimary":true,"sequenceId":1}],"properties":[{"code":"abc123","name":{"en-us":"Color"},"value":{"en-us":["red","white","blue"]},"type":"simple","displayGroup":"properties","subDisplayGroup":{"en-us":"Appearance"},"isPriced":true,"attributePrice":5.5,"unit":"number"},{"code":"attributeCode","value":["attributeValueCode1","attributeValueCode2","attributeValueCode3"],"type":"attribute","displayGroup":"properties","subDisplayGroup":{"en-us":"Appearance"}}],"media":{"en-us":[{"code":"gdt5-c","url":"https://myAwesomeShop.com/image01.jpg","type":"image","altText":"a translated string","title":"a translated string","sequenceId":1}]},"options":[{"code":"color","values":[{"code":"black","additionalPrice":-1.25}]}],"extras":[{"code":"color","values":[{"code":"black","additionalPrice":-1.25}]}],"parentProductCode":"\"55585\"","modelType":"standard","identifiers":{"mfgPartNum":"example","upc":"example","ean":"example","isbn":"example","sku":"example","distiPartNum":"example"},"price":{"cost":2.55,"price":3.5,"unit":"kg","salePrice":3,"msrp":4.5,"minPrice":3,"maxPrice":7.5,"volumePricing":[{"minQty":1,"maxQty":2,"price":6.4,"salePrice":5,"unit":"kg","priceType":"fixed"}],"mapPricing":[{"startDate":"2018-12-12T14:27:23.114Z","endDate":"2018-12-15T00:00:23.114Z","price":10.1}],"currencyCode":"AED"},"fulfillmentMethods":["simplePickUpInStore"],"unit":null,"unitValue":250,"unitPriceRefUom":null,"unitPriceRefValue":100,"hasCatchWeight":false,"isSerialized":true,"status":"active","startDate":"2018-12-01T00:00:00.114Z","endDate":"2018-12-01T00:00:00.114Z","firstAvailableDate":"2018-12-01T00:00:00.114Z","eolDate":"2018-12-01T00:00:00.114Z","isInventoryManaged":true,"inventoryTreatment":"showOutOfStock","shippingInformation":{"isShippedAlone":true,"height":1,"heightUnit":"cm","width":2.3,"widthUnit":"cm","length":4,"lengthUnit":"cm","weight":5,"weightUnit":"kg"},"rating":5,"url":"https://myAwesomeShop.com/test","isTaxed":true,"taxClass":"f8c5c2e9-5671-4870-8557-7659832e0e20","minQty":2,"maxQty":5,"externalUpdateDate":"2018-12-15T00:00:23.114Z","goodType":"physical"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://catalog.shopgate.io/v1/merchants/example/products/example \ --header 'Content-Type: application/json' \ --data '{ "name": { "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch" }, "longName": { "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch" }, "shortDescription": { "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch" }, "longDescription": { "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch" }, "categories": [ { "code": "123", "isPrimary": true, "sequenceId": 1 } ], "properties": [ { "code": "abc123", "name": { "en-us": "Color" }, "value": { "en-us": [ "red", "white", "blue" ] }, "type": "simple", "displayGroup": "properties", "subDisplayGroup": { "en-us": "Appearance" }, "isPriced": true, "attributePrice": 5.5, "unit": "number" }, { "code": "attributeCode", "value": [ "attributeValueCode1", "attributeValueCode2", "attributeValueCode3" ], "type": "attribute", "displayGroup": "properties", "subDisplayGroup": { "en-us": "Appearance" } } ], "media": { "en-us": [ { "code": "gdt5-c", "url": "https://myAwesomeShop.com/image01.jpg", "type": "image", "altText": "a translated string", "title": "a translated string", "sequenceId": 1 } ] }, "options": [ { "code": "color", "values": [ { "code": "black", "additionalPrice": -1.25 } ] } ], "extras": [ { "code": "color", "values": [ { "code": "black", "additionalPrice": -1.25 } ] } ], "parentProductCode": "\"55585\"", "modelType": "standard", "identifiers": { "mfgPartNum": "example", "upc": "example", "ean": "example", "isbn": "example", "sku": "example", "distiPartNum": "example" }, "price": { "cost": 2.55, "price": 3.5, "unit": "kg", "salePrice": 3, "msrp": 4.5, "minPrice": 3, "maxPrice": 7.5, "volumePricing": [ { "minQty": 1, "maxQty": 2, "price": 6.4, "salePrice": 5, "unit": "kg", "priceType": "fixed" } ], "mapPricing": [ { "startDate": "2018-12-12T14:27:23.114Z", "endDate": "2018-12-15T00:00:23.114Z", "price": 10.1 } ], "currencyCode": "AED" }, "fulfillmentMethods": [ "simplePickUpInStore" ], "unit": null, "unitValue": 250, "unitPriceRefUom": null, "unitPriceRefValue": 100, "hasCatchWeight": false, "isSerialized": true, "status": "active", "startDate": "2018-12-01T00:00:00.114Z", "endDate": "2018-12-01T00:00:00.114Z", "firstAvailableDate": "2018-12-01T00:00:00.114Z", "eolDate": "2018-12-01T00:00:00.114Z", "isInventoryManaged": true, "inventoryTreatment": "showOutOfStock", "shippingInformation": { "isShippedAlone": true, "height": 1, "heightUnit": "cm", "width": 2.3, "widthUnit": "cm", "length": 4, "lengthUnit": "cm", "weight": 5, "weightUnit": "kg" }, "rating": 5, "url": "https://myAwesomeShop.com/test", "isTaxed": true, "taxClass": "f8c5c2e9-5671-4870-8557-7659832e0e20", "minQty": 2, "maxQty": 5, "externalUpdateDate": "2018-12-15T00:00:23.114Z", "goodType": "physical" }'Update the specific product. Only the values which are set will be updated.
Localizations
The following properties are localized:
- name
- longName
- shortDescription
- longDescription
- media
- properties[].name
- properties[].subDisplayGroup
- properties[].customDisplayGroupName
see Entity Localization for further information.
The media localization property is a little different to the simple localization string:
{
"en-us": [{
"code": "gdt5-c",
"url": "https://myAwesomeShop.com/image01.jpg",
"type": "image",
"altText": "a translated string",
"title": "a translated string",
"sequenceId": 1
}],
"de-de": [{
"code": "gdt5-g",
"url": "https://www.youtube.com/watch?v=aTKyjuhmZNo",
"type": "video",
"altText": "ein übersetzter Text",
"title": "ein übersetzter Text",
"sequenceId": 1
}]
}
Product Properties
See Product Properties on how to use the value property based on the property.type.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Request Body
Section titled “Request Body”object
Localization object, see Entity Localization for further information.
object
Example
{ "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch"}Localization object, see Entity Localization for further information.
object
Example
{ "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch"}Localization object, see Entity Localization for further information.
object
Example
{ "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch"}Localization object, see Entity Localization for further information.
object
Example
{ "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch"}object
Example
123Example
trueId of the sequence of the product in the category. The lowest number is at the top and the highest number is at the bottom.
Example
1object
Human readable code of the entity
Example
someCodeLocalization object, see Entity Localization for further information.
object
Example
{ "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch"}Localization object, see Entity Localization for further information.
Example
{ "de-de": { "": "null" }, "en-us": { "": "null" }}Example
simpleExample
propertiesLocalization object, see Entity Localization for further information.
object
Example
{ "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch"}Localization object, see Entity Localization for further information.
object
Example
{ "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch"}Example
[ { "code": "abc123", "name": { "en-us": "Color" }, "value": { "en-us": [ "red", "white", "blue" ] }, "type": "simple", "displayGroup": "properties", "subDisplayGroup": { "en-us": "Appearance" }, "isPriced": true, "attributePrice": 5.5, "unit": "number" }, { "code": "attributeCode", "value": [ "attributeValueCode1", "attributeValueCode2", "attributeValueCode3" ], "type": "attribute", "displayGroup": "properties", "subDisplayGroup": { "en-us": "Appearance" } }]Localization object, see Entity Localization for further information. We support type image, video, or pdf. In case of type video, we currently support vimeo and youtube urls
object
object
External code of the image
Example
gdt5-cExample
https://myAwesomeShop.com/image01.jpgIn case of type video, we currently support vimeo and youtube urls
Example
imageExample
a translated stringExample
a translated stringSequence of the media, by default this creates an ascending order meaning 0 is the first.
Example
1Example
{ "en-us": [ { "code": "gdt5-c", "url": "https://myAwesomeShop.com/image01.jpg", "type": "image", "altText": "a translated string", "title": "a translated string", "sequenceId": 1 } ]}object
Example
colorobject
Unique identifier for the attribute value
Example
blackThe price which is added to the base price of the configurable product. It can be positive and negative
Example
-1.25object
Example
colorobject
Unique identifier for the attribute value
Example
blackThe price which is added to the base price of the configurable product. It can be positive and negative
Example
-1.25Code of parent product
Example
"55585"Product Model Type
Example
standardobject
object
The actual cost for the merchant
Example
2.55Price for the shopper
Example
3.5Unit the price applies to (pieces, kg, packs)
Example
kgSale price
Example
3Manufacturer’s suggested retail price
Example
4.5Lowest possible price (configurable product)
Example
3Highest possible price (configurable product)
Example
7.5object
Example
1Example
2Price of the tier
Example
6.4Sale price of the tier
Example
5Example
kgFixed price, or relative to the standard price
Example
fixedobject
Example
2018-12-12T14:27:23.114ZExample
2018-12-15T00:00:23.114ZExample
10.1Example
USDExample
[ "simplePickUpInStore"]The unit this is product is measured in.
Example
gThe value of units this product represents. Example: 250, in combination with ‘unit’ set to ‘g’ indicates that this product weighs 250 grams.
Example
250The unit this is product is measured in for base price reference.
Example
gThe value of units this product’s base price represents. Example: 100, in combination with ‘unitPriceRefUom’ set to ‘g’ indicates that the base price of this product is per 100 grams.
Example
100Indicates if the product has catch weight
Example
trueIndicates if a product has serial numbers
Example
true‘scheduled’ is deprecated and should not be used anymore.
Example
activeStart date when the product should be visible (switch to the “active” status)
Example
2018-12-01T00:00:00.114ZEnd date when the product should no longer be visible (switch to the “inactive” status)
Example
2018-12-01T00:00:00.114ZDate when the product is buyable (marketing use cases)
Example
2018-12-01T00:00:00.114ZDate when the product is no longer buyable (marketing use cases)
Example
2018-12-01T00:00:00.114ZExample
trueExample
showOutOfStockobject
Example
trueExample
1Example
cmExample
2.3Example
cmExample
4Example
cmExample
5Example
kgRatings from (1-5). To save fractions of a rating, pass in e.g. 0.5 for a “1/2 star” representation.
Example
5Example
https://myAwesomeShop.com/testExample
trueExample
f8c5c2e9-5671-4870-8557-7659832e0e20Minimal amount of product that could be purchased at a single time
Example
2Maximal amount of product that could be purchased at a single time
Example
5Example
2018-12-15T00:00:23.114ZExample
physicalResponses
Section titled “Responses”Successfully updated
Validation error
object
object
object
object
The parameter-field, that failed to validate, like “userId”
The value, that was sent, like “xxx”
Machine readable error code
Human readable error code
object
object
Machine readable error code
Human readable error code
Example
{ "error": { "code": "SCHEMA_VALIDATION_FAILED", "results": { "errors": [ { "code": "MAX_LENGTH", "message": "Name too long", "description": "Property Name is too long", "path": [ "name" ] } ] } }}Merchant or product not found
object
Example
{ "code": "NotFound", "message": "Merchant not found"}
