Updated on 2024-12-30 GMT+08:00

Modifying an Organization Event

This API is used to synchronize updated organizations to the application system.

URL

POST https://{app_domain}/callback

Request Header

Authorization: Bearer {access_token}

Request Parameters

Table 1 Request parameters

Parameter

Fixed

Type

Description

id

Yes

String(50)

  • Organization ID of a downstream enterprise application.
  • After an organization is successfully synchronized by referring to Adding an Organization Event, an organization is created for a downstream enterprise application. At the same time, an organization ID is generated and sent back to OneAccess as the unique identifier of the organization.

code

Yes

String(100)

Organization ID, which is globally unique.

name

Yes

String(40)

Organization name, which must be unique at the current level.

parentId

No

String(50)

Parent organization ID.

Response Parameters

Table 2 Response parameter

Parameter

Type

Description

id

String(50)

  • The value is the same as the value of ID in Table 1.
  • Organization ID sent back to OneAccess after the downstream enterprise application updates the organization.
  • The ID must match the one in the downstream application. If they differ, the ID returned by the API will overwrite the previous ID.

Example Request

  • Example request with message signature and encryption enabled:
    {
    	"nonce": "AmgjjEAJbrMzWmUw",
    	"timestamp": 15093849585,
    	"eventType": "UPDATE_ORGANIZATION ",
    	"data": "6xrHydJIXEWxQhUa3UqsXHWsDZ5LTAo/xU3zhjq9H3syCuFYDYKg==",
    	"signature": "K08yDiTEc094KoccOY+VYLQFxxQ="
    }
  • The decrypted JSON string in the request body follows this format:
    Update the organization information based on the organization ID in the request and send the updated attributes to the enterprise application.
    {
    	"id": "6c5bb468-14b2-4183-baf2-06d523e03bd3",
    	"code": "1000003",
    	"name": "Wuhan branch",
    	"parentId": "5b183439-36a8-4d08-94ba-61b3c8d40b66"
    }

Example Response

Status code: 200

Request successful.

  • Response example with message signature and encryption enabled:
    {
    	"code": "200",
    	"message": "success",
    	"data": "T41FtX1Q1z1lZM0DDcUGFyaazO3NgnMbgK6UeWT35Druf5zyXg="
    }
  • The decrypted JSON string in the response body follows this format:
    {
    	"id": "6c5bb468-14b2-4183-baf2-06d523e03bd3"
    }