ApiCategories
Create a new category with translations
Access restricted to roles:
- admin
- manufacturer-admin
- manufacturer-user
- producer-admin
- producer-user
Authorization
bearer AuthorizationBearer <token>
In: header
Request Body
application/json
languageCode*string
Language code for the translation
Length
length <= 10name*string
Translated name of the category
translations?
Additional translations for the category
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://test.sweetconnect.io/api/storage/v1/categories" \ -H "Content-Type: application/json" \ -d '{ "languageCode": "en", "name": "Electronics" }'{
"data": {
"id": "AA",
"translations": [
{
"languageCode": "de",
"name": "Elektronik"
},
{
"languageCode": "en",
"name": "Electronics"
}
]
}
}{
"errors": [
{
"errorCode": "Conflict",
"message": "A conflict occurred due to duplicate data or resource state issues.",
"extension": {}
}
]
}{
"errors": [
{
"errorCode": "Unauthorized",
"message": "Authentication is required to access this resource.",
"extension": {}
}
]
}{
"errors": [
{
"errorCode": "NoPermission",
"message": "You do not have permission to access this resource.",
"extension": {}
}
]
}{
"errors": [
{
"errorCode": "InternalServerError",
"message": "An unexpected internal server error occurred.",
"extension": {}
}
]
}