Set an Image for a Category
POST/v1/categories/:categoryId/image
Set an Image for a Category
Request​
Path Parameters
categoryId stringrequired
Id of the Category
- multipart/form-data
Body
required
image binary
Responses​
- 200
- 400
- 401
- 403
Successfully add an image to a Category
Bad request
- application/json
- Schema
- Example (from schema)
- TooManyAttachments
- ContentTypeError
- MaxFileSize
- FiletypeNotSupported
- BadRequest
Schema
error
object
code string
title string
message string
reasons string[]nullable
{
"error": {
"code": "string",
"title": "string",
"message": "string",
"reasons": [
"string"
]
}
}
Upload - Too many attachments
{
"error": {
"code": "upload/too_many_files",
"title": "Bad request",
"message": "Too many files attached (max: 1)"
}
}
Upload - Content type error
{
"error": {
"code": "upload/content_type_error",
"title": "Bad request",
"message": "Unsupported content type: xls"
}
}
Upload - File exceeded max size
{
"error": {
"code": "upload/max_file_size",
"title": "Bad request",
"message": "Request size exceeded maximum for this endpoint (5242880 bytes)"
}
}
Upload - Filetype not supported
{
"error": {
"code": "upload/filetype_not_supported",
"title": "Bad request",
"message": "Filetype not supported. Supported types include: pdf, png, jpg"
}
}
400 Bad Request
{
"error": {
"code": "bad_request",
"title": "Bad request",
"message": "Something is wrong with your request, please check any parameters and try again"
}
}
Unauthorized
Forbidden
- application/json
- Schema
- Example (from schema)
Schema
error
object
code string
Example:
forbidden
title string
Example:
Forbidden
message string
Example:
Access is denied due to insufficient privileges
{
"error": {
"code": "forbidden",
"title": "Forbidden",
"message": "Access is denied due to insufficient privileges"
}
}
Loading...