SweetConnect LogoSweetConnect
ApiCategories

Update a translation name of a category

Access restricted to roles:

  • admin
  • manufacturer-admin
  • manufacturer-user
  • producer-admin
  • producer-user
PATCH
/v1/categories/{id}/{languageCode}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

The unique identifier of the category

languageCode*string

The language code of the translation to be updated

Request Body

application/json

name*string

Translated name of the category

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://test.sweetconnect.io/api/storage/v1/categories/c1f3fae8-7e74-4f4b-9f8d-55f7b2d884f2/en" \  -H "Content-Type: application/json" \  -d '{    "name": "Electronics"  }'
{
  "data": {
    "id": "AA",
    "translations": [
      {
        "languageCode": "de",
        "name": "Elektronik"
      },
      {
        "languageCode": "en",
        "name": "Electronics"
      }
    ]
  }
}
{
  "errors": [
    {
      "errorCode": "BadRequest",
      "message": "The request payload is invalid.",
      "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": {}
    }
  ]
}