Aller au contenu

Environnement de développement : contenu en cours de rédaction, rien ne pointe vers la production.

Sommaire de la documentation

members

Version 0.1.06 opérations

Members with role and scope, and pending invitations

GET/organisations/{id}/membersSession du tableau de bord

Paramètres

  • idstringpathobligatoire

Réponses

  • 200

    • membersMemberDto[]obligatoire
      • userIdstring (uuid)obligatoire
      • emailstringobligatoire
      • firstNamestringobligatoire
      • lastNamestringobligatoire
      • roleIdstring (uuid)obligatoire
      • rolestring | nullobligatoire
      • roleNamestringobligatoire
      • isOwnerbooleanobligatoire
      • permissionsstring[]obligatoire
      • scopestringobligatoire
        • enum: "all", "accounts"
      • accountIdsstring[]obligatoire
      • lastLoginAtstring (date-time) | nullobligatoire
      • joinedAtstring (date-time)obligatoire
    • invitationsInvitationDto[]obligatoire

      Pending invitations

      • idstring (uuid)obligatoire
      • emailstringobligatoire
      • roleIdstring (uuid)obligatoire
      • roleNamestringobligatoire
      • scopestringobligatoire
        • enum: "all", "accounts"
      • accountIdsstring[]obligatoire
      • expiresAtstring (date-time)obligatoire
      • createdAtstring (date-time)obligatoire

Exemples de code

curl -X GET "$KONNECT_API_URL/organisations/id/members" \
  -H "Cookie: konnect_session=$KONNECT_SESSION"

Exemple : 200

{
  "members": [
    {
      "userId": "userId",
      "email": "buyer@example.com",
      "firstName": "Salma",
      "lastName": "Example",
      "roleId": "roleId",
      "role": "role",
      "roleName": "roleName",
      "isOwner": true,
      "permissions": [
        "payments.view"
      ],
      "scope": "all",
      "accountIds": [
        "string"
      ],
      "lastLoginAt": "2026-10-01T09:30:00.000Z",
      "joinedAt": "2026-10-01T09:30:00.000Z"
    }
  ],
  "invitations": [
    {
      "id": "id",
      "email": "buyer@example.com",
      "roleId": "roleId",
      "roleName": "roleName",
      "scope": "all",
      "accountIds": [
        "string"
      ],
      "expiresAt": "2026-10-01T09:30:00.000Z",
      "createdAt": "2026-10-01T09:30:00.000Z"
    }
  ]
}

Invite by email with a role and a scope (link returned outside production)

POST/organisations/{id}/membersSession du tableau de bord

Paramètres

  • idstringpathobligatoire

Corps de la requête application/json

  • scopestring
    • enum: "all", "accounts"
    • default: "all"
  • accountIdsstring[]

    Payment account ids when scope is "accounts"

  • emailstringobligatoire
  • roleIdstring (uuid)obligatoire

Réponses

  • 201

    • idstring (uuid)obligatoire
    • emailstringobligatoire
    • roleIdstring (uuid)obligatoire
    • roleNamestringobligatoire
    • scopestringobligatoire
      • enum: "all", "accounts"
    • accountIdsstring[]obligatoire
    • expiresAtstring (date-time)obligatoire
    • createdAtstring (date-time)obligatoire
    • inviteLinkstring | null

      Invitation link, returned outside production only until email transport exists

Exemples de code

curl -X POST "$KONNECT_API_URL/organisations/id/members" \
  -H "Cookie: konnect_session=$KONNECT_SESSION" \
  -H "Content-Type: application/json" \
  -d '{
  "scope": "all",
  "accountIds": [
    "string"
  ],
  "email": "new.member@example.test",
  "roleId": "roleId"
}'

Exemple : corps de la requête

{
  "scope": "all",
  "accountIds": [
    "string"
  ],
  "email": "new.member@example.test",
  "roleId": "roleId"
}

Exemple : 201

{
  "id": "id",
  "email": "buyer@example.com",
  "roleId": "roleId",
  "roleName": "roleName",
  "scope": "all",
  "accountIds": [
    "string"
  ],
  "expiresAt": "2026-10-01T09:30:00.000Z",
  "createdAt": "2026-10-01T09:30:00.000Z",
  "inviteLink": "inviteLink"
}

Change the role or the scope of a member (not the owner)

PATCH/organisations/{id}/members/{userId}Session du tableau de bord

Paramètres

  • idstringpathobligatoire
  • userIdstringpathobligatoire

Corps de la requête application/json

  • scopestring
    • enum: "all", "accounts"
    • default: "all"
  • accountIdsstring[]

    Payment account ids when scope is "accounts"

  • roleIdstring (uuid)

Réponses

  • 204

Exemples de code

curl -X PATCH "$KONNECT_API_URL/organisations/id/members/userId" \
  -H "Cookie: konnect_session=$KONNECT_SESSION" \
  -H "Content-Type: application/json" \
  -d '{
  "scope": "all",
  "accountIds": [
    "string"
  ],
  "roleId": "roleId"
}'

Exemple : corps de la requête

{
  "scope": "all",
  "accountIds": [
    "string"
  ],
  "roleId": "roleId"
}

Remove a member (not the owner)

DELETE/organisations/{id}/members/{userId}Session du tableau de bord

Paramètres

  • idstringpathobligatoire
  • userIdstringpathobligatoire

Réponses

  • 204

Exemples de code

curl -X DELETE "$KONNECT_API_URL/organisations/id/members/userId" \
  -H "Cookie: konnect_session=$KONNECT_SESSION"

Cancel a pending invitation

DELETE/organisations/{id}/invitations/{invitationId}Session du tableau de bord

Paramètres

  • idstringpathobligatoire
  • invitationIdstringpathobligatoire

Réponses

  • 204

Exemples de code

curl -X DELETE "$KONNECT_API_URL/organisations/id/invitations/invitationId" \
  -H "Cookie: konnect_session=$KONNECT_SESSION"

Accept an invitation: creates the account for a new email, or needs the session of the invited email

POST/invitations/accept

Paramètres

Aucun paramètre.

Corps de la requête application/json

  • tokenstringobligatoire
  • firstNamestring

    Required when the email has no account yet

  • lastNamestring

    Required when the email has no account yet

  • passwordstring (password)

    Required when the email has no account yet

Réponses

  • 200

    • organisationIdstring (uuid)obligatoire
    • userIdstring (uuid)obligatoire
    • accountCreatedbooleanobligatoire

      True when the account was created by this acceptance

Exemples de code

curl -X POST "$KONNECT_API_URL/invitations/accept" \
  -H "Content-Type: application/json" \
  -d '{
  "token": "token",
  "firstName": "Salma",
  "lastName": "Example",
  "password": "password"
}'

Exemple : corps de la requête

{
  "token": "token",
  "firstName": "Salma",
  "lastName": "Example",
  "password": "password"
}

Exemple : 200

{
  "organisationId": "org_01J9Z3K4EXAMPLE0000000000",
  "userId": "userId",
  "accountCreated": true
}