Contact information

Updated at:
Copy as MD

This topic describes the OpenAPI operations for managing contact information, including their request and response parameters.

Create a contact

The sofa.apigateway.contact.create operation creates a contact.

Request parameters

Name

Type

Required

Example

Description

param

ContactInfoVO

Yes

Parameter

tenant_id

STRING

Yes

TSCPDICNT

The tenant ID.

workspace_id

STRING

Yes

default

The workspace ID.

Response parameters

Name

Type

Example

Description

data

ContactInfoVO

-

Data

Code examples

Request example

{
"param":{
"name":"kk",
"company":"ant",
"tel":"12345678",
"mail":"123@456.com",
"auth_app_info_id":"oxLIMO8MKn7x6nxy"
},
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}

Response example

{
"data":{
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo",
"mail":"123@456.com",
"auth_app_info_id":"oxLIMO8MKn7x6nxy",
"name":"kk",
"tel":"12345678",
"company":"ant",
"contact_id":"G2Vbw8Y8eXORnJYc"
},
"result_code":"OK"
}

Delete a contact

The sofa.apigateway.contact.delete operation deletes a contact.

Request parameters

Name

Type

Required

Example

Description

contact_id

STRING

Yes

contact_id1

The contact ID.

tenant_id

STRING

Yes

TSCPDICNT

The tenant ID.

workspace_id

STRING

Yes

default

The workspace ID.

Response parameters

Name

Type

Example

Description

data

BOOLEAN

true, false

Data

Code examples

Request example

{
"contact_id":"qwmtenkwcnmeysvd",
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}

Response Example

{
"data":false,
"result_code":"OK"
}

Update contact information

The sofa.apigateway.contact.update operation is used to update a contact.

Request parameters

Name

Type

Required

Example

Description

param

ContactInfoVO

No

-

Parameter

tenant_id

STRING

Yes

TSCPDICNT

The tenant ID.

workspace_id

STRING

Yes

default

The workspace ID.

Response parameters

Name

Type

Example

Description

data

BOOLEAN

-

data

Code examples

Request Example

{
"param":{
"mail":"123@lvk.com",
"contact_id":"iebxpwp3ipl9gmtu",
"name":"zhuowei",
"auth_app_info_id":"oxLIMO8MKn7x6nxy",
"tel":"1533242",
"company":"seu"
},
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}

Example response

{
"data":true,
"result_code":"OK"
}

Query a contact by ID

The sofa.apigateway.contact.get operation retrieves the details of a specific contact.

Request parameters

Name

Type

Required

Example

Description

contact_id

STRING

Yes

contact_id1

The contact ID.

tenant_id

STRING

Yes

TSCPDICNT

The tenant ID.

workspace_id

STRING

Yes

default

The workspace ID.

Response parameters

Name

Type

Example

Description

data

ContactInfoVO

-

Data

Code examples

Sample request

{
"contact_id":"iebxpwp3ipl9gmtu",
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}

Sample response

{
"data":{
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo",
"mail":"123@lvk.com",
"auth_app_info_id":"oxLIMO8MKn7x6nxy",
"name":"zhuowei",
"tel":"1533242",
"company":"seu",
"contact_id":"iebxpwp3ipl9gmtu"
},
"result_code":"OK"
}

Query a paginated list of contacts

The sofa.apigateway.contact.list operation retrieves a paginated list of contacts.

Request parameters

Name

Type

Required

Example

Description

param

ContactInfoQueryVO

No

-

parameter

tenant_id

STRING

Yes

TSCPDICNT

The tenant ID.

workspace_id

STRING

Yes

default

The workspace ID.

Response parameters

Name

Type

Example

Description

data

ContactInfoPagedListVO

-

data

Code examples

Example request

{
"param":{
"page_info":{
"page_index":1,
"page_size":10
},
"query":{}
},
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}

Sample response

{
"data":{
"page_info":{
"total":2,
"page_index":1,
"page_size":10
},
"list":[
{
"mail":"123@lvk.com",
"contactId":"iebxpwp3ipl9gmtu",
"name":"zhuowei",
"authAppInfoId":"oxLIMO8MKn7x6nxy",
"tenantId":"JADDGOCN",
"tel":"1533242",
"company":"seu",
"workspaceId":"antdemo"
},
{
"mail":"123@456.com",
"contactId":"G2Vbw8Y8eXORnJYc",
"name":"kk159",
"authAppInfoId":"oxLIMO8MKn7x6nxy",
"tenantId":"JADDGOCN",
"tel":"12345678",
"company":"ant",
"workspaceId":"antdemo"
}
]
},
"result_code":"OK"
}

Query a list of contacts by authorization application ID

The sofa.apigateway.contact.authapp.list operation retrieves all contacts for a specific authorization application.

Request parameters

Name

Type

Required

Example

Description

auth_app_info_id

STRING

Yes

a0VIPBXUI4rc25gR

The authorization application ID.

param

ContactInfoQueryVO

No

-

Parameter

tenant_id

STRING

Yes

TSCPDICNT

The tenant ID.

workspace_id

STRING

Yes

default

The workspace ID.

Response parameters

Name

Type

Example

Description

data

ContactInfoPagedListVO

-

Data

Code examples

Example request

{
"auth_app_info_id":"hg42jDqSYGREHHKN",
"param":{
"page_info":{
"page_index":1,
"page_size":10
},
"query":{}
},
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}

Response Example

{
"data":{
"page_info":{
"total":2,
"page_index":1,
"page_size":10
},
"list":[
{
"mail":"zhuoyu.cq@123.com",
"contactId":"rnE8hd4Tg2GGOcYa",
"name":"zhuoyu",
"authAppInfoId":"BzZy3T82r2vr2Jj4",
"tenantId":"JADDGOCN",
"tel":"12345678",
"company":"seu",
"workspaceId":"antdemo"
},
{
"mail":"123@lvk.com",
"contactId":"iebxpwp3ipl9gmtu",
"name":"zhuowei",
"authAppInfoId":"oxLIMO8MKn7x6nxy",
"tenantId":"JADDGOCN",
"tel":"1533242",
"company":"seu",
"workspaceId":"antdemo"
}
]
},
"result_code":"OK"
}