Synchronize ambassador roles (manager)

PATCH /manager/ambassadors/{id}/roles

Path parameters

  • id integer Required

    The ambassador id

application/json

Body

  • status_role string Required

    Values are status-administrator, status-ambassador, status-employee, status-seller, status-shop-manager, status-manager, or status-expert.

  • manager_role string(nullable) Required

    Values are administrator, editor, or viewer.

Responses

  • 200 application/json

    success

    Hide response attribute Show response attribute object
  • 401 application/json

    Unauthorized.

    Hide response attribute Show response attribute object
  • Forbidden - You don't have permission to access this route

  • Not found - The ambassador does not exist

  • 422 application/json

    Unprocessable Content

    Hide response attributes Show response attributes object
    • message string

      Error message.

    • errors object
      Hide errors attributes Show errors attributes object
      • field array[string]

        Error message details.

      • * array[string] Additional properties

        Error message details.

PATCH /manager/ambassadors/{id}/roles
curl \
 -X PATCH https://domain.tld/api/v2/manager/ambassadors/{id}/roles \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"status_role":"status-administrator","manager_role":"administrator"}'
Request examples
{
  "status_role": "status-administrator",
  "manager_role": "administrator"
}
Response examples (200)
{
  "message": "Roles synchronized successfully"
}
Response examples (401)
{
  "message": "Unauthorized."
}
Response examples (422)
{
  "message": "field is required! (and 3 more error)",
  "errors": {
    "field": [
      "Error message details here"
    ],
    "additionalProperty1": [
      "Error message details here"
    ],
    "additionalProperty2": [
      "Error message details here"
    ]
  }
}