SweetConnect LogoSweetConnect
ApiCategories

Add a new translation to an existing category

Access restricted to roles:

  • admin
  • manufacturer-admin
  • manufacturer-user
  • producer-admin
  • producer-user
POST
/v1/categories/translation
AuthorizationBearer <token>

In: header

Request Body

application/json

categoryId*string

Identifier of the associated category

languageCode*string

Language code for the translation

Lengthlength <= 10
name*string

Translated name of the category

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://test.sweetconnect.io/api/storage/v1/categories/translation" \  -H "Content-Type: application/json" \  -d '{    "categoryId": "c1f3fae8-7e74-4f4b-9f8d-55f7b2d884f2",    "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": "NotFound",
      "message": "The requested resource was not found.",
      "extension": {}
    }
  ]
}
{
  "errors": [
    {
      "errorCode": "InternalServerError",
      "message": "An unexpected internal server error occurred.",
      "extension": {}
    }
  ]
}