Update category
POST
/merchants/{merchantCode}/categories/{categoryCode}
const url = 'https://catalog.shopgate.io/v1/merchants/example/categories/example';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"image":{"en-us":"string in english","de-de":"Zeichenkette auf Deutsch"},"name":{"en-us":"string in english","de-de":"Zeichenkette auf Deutsch"},"parentCategoryCode":"ParentCategoryA","url":{"en-us":"string in english","de-de":"Zeichenkette auf Deutsch"},"sequenceId":1,"description":{"en-us":"string in english","de-de":"Zeichenkette auf Deutsch"},"externalUpdateDate":"2018-12-15T00:00:23.114Z","status":"active"}'};
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/categories/example \ --header 'Content-Type: application/json' \ --data '{ "image": { "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch" }, "name": { "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch" }, "parentCategoryCode": "ParentCategoryA", "url": { "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch" }, "sequenceId": 1, "description": { "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch" }, "externalUpdateDate": "2018-12-15T00:00:23.114Z", "status": "active" }'Update category.
Localizations
The following properties are localized:
- name
- image
- url
- description
see Entity Localization for further information.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”merchantCode
required
string
categoryCode
required
string
Query Parameters
Section titled “Query Parameters”catalogCode
string
Request Body
Section titled “Request Body”Media typeapplication/json
object
image
Localization object, see Entity Localization for further information.
object
key
additional properties
string
Example
{ "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch"}name
Localization object, see Entity Localization for further information.
object
key
additional properties
string
Example
{ "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch"}parentCategoryCode
null | string
Example
ParentCategoryAurl
Url of the category in the desktop shop
object
key
additional properties
string
Example
{ "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch"}sequenceId
integer
Example
1description
Localization object, see Entity Localization for further information.
object
key
additional properties
string
Example
{ "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch"}externalUpdateDate
null | string format: date-time
Example
2018-12-15T00:00:23.114Zstatus
string
Example
activeResponses
Section titled “Responses”Successfully updated
Media typeapplication/json
Validation error
Media typeapplication/json
object
statusCode
number
message
string
code
string
additionalInfo
object
validationErrors
Array<object>
object
code
number
reason
string
entity
string
entityId
string
subentityPath
Array<string | number>
error
object
paramName
The parameter-field, that failed to validate, like “userId”
string
paramValue
The value, that was sent, like “xxx”
null | string | number | array | object
code
Machine readable error code
string
message
required
Human readable error code
string
results
object
errors
Array<object>
object
code
Machine readable error code
string
message
Human readable error code
string
description
string
path
Array<string>
warnings
array
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 category not found
Media typeapplication/json
object
statusCode
number
code
required
string
message
required
string
Example
{ "code": "NotFound", "message": "Merchant not found"}External update date is earlier than the existing one
Media typeapplication/json
object
statusCode
number
code
Machine readable error code
string
message
required
Human readable error code
string
Examplegenerated
{ "statusCode": 1, "code": "example", "message": "example"}
