PATCH /company/{company}/position/{uid}

Met à jour un poste (position) existant dans une entreprise.

Modifications possibles:

  • Changer le type de poste
  • Modifier les droits spécifiques
  • Activer/désactiver le poste

États du poste:

  • active : Poste actif, l'utilisateur a accès à l'entreprise
  • inactive : Poste désactivé, accès révoqué

Événement déclenché: UPDATE_POSITION

Path parameters

  • company string Required

    Identifiant unique de l'entreprise

  • uid string Required

    Identifiant unique du poste

application/json

Body Required

  • type string

    Type de poste (ID du Type de droits)

  • rights array[object]

    Liste des droits spécifiques

    Hide rights attributes Show rights attributes object
    • name string

      Nom du droit

    • group string

      Groupe du droit

    • checked boolean

      Droit activé ou non

  • state string

    État du poste

    Values are active or inactive.

Responses

  • 200 application/json

    Poste modifié avec succès

    Hide response attributes Show response attributes object
    • _id string

      Unique identifier for the position

    • company string

      ID of the company

    • user string

      ID of the user

    • userEmail string(email)

      Email of the user

    • first_name string

      First name

    • last_name string

      Last name

    • avatar string

      URL to avatar

    • state string

      State of the position

      Values are active or inactive.

    • type string

      Type of the position

    • rights array[object]

      List of rights

      Hide rights attributes Show rights attributes object
      • checked boolean

        Whether the right is checked

      • group string

        Group of the right

      • name string

        Name of the right

    • teams array[object]

      List of teams

      Hide teams attributes Show teams attributes object
      • team string

        ID of the team

      • rightType string

        Type of rights

      • default boolean

        Whether this is the default team

    • entry_date string(date-time)

      Date of entry

    • release_date string(date-time)

      Date of release

    • createdAt string(date-time)

      Date when position was created

    • updatedAt string(date-time)

      Date when position was last updated

  • 400

    Requête invalide - Données incorrectes

  • 403

    Non autorisé - Droits insuffisants pour modifier ce poste

  • 404

    Poste non trouvé

PATCH /company/{company}/position/{uid}
curl \
 --request PATCH 'https://wuro.pro/api/v3.2/company/{company}/position/{uid}' \
 --header "X-APP-ID: $API_KEY" \
 --header "X-APP-SECRET: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"type":"string","rights":[{"name":"string","group":"string","checked":true}],"state":"active"}'
Request examples
{
  "type": "string",
  "rights": [
    {
      "name": "string",
      "group": "string",
      "checked": true
    }
  ],
  "state": "active"
}
Response examples (200)
{
  "_id": "string",
  "company": "string",
  "user": "string",
  "userEmail": "hello@example.com",
  "first_name": "string",
  "last_name": "string",
  "avatar": "string",
  "state": "active",
  "type": "string",
  "rights": [
    {
      "checked": true,
      "group": "string",
      "name": "string"
    }
  ],
  "teams": [
    {
      "team": "string",
      "rightType": "string",
      "default": true
    }
  ],
  "entry_date": "2025-05-04T09:42:00Z",
  "release_date": "2025-05-04T09:42:00Z",
  "createdAt": "2025-05-04T09:42:00Z",
  "updatedAt": "2025-05-04T09:42:00Z"
}