Initiate Chat
This endpoint check if chat message exists, if it doesn’t, creates a new message. The response consists of a list of replies in a message status.
Path
get
/v1/chat/fs/:fs_id/initiate
Request Parameters
Parameter | Type | Required | Location | Description |
---|---|---|---|---|
fs_id | Integer | Required | path | Fulfillment service unique identifier |
order | Integer | Required | query | Order service unique identifier |
Example Request
- Curl
curl -X GET \
https://fs.tokopedia.net/v1/chat/fs/12345/initiate?order_id=1234 \
-H 'Authorization: Bearer OoHgyxcgQ5a1uCbmbbXjjA'
Response Parameters
Name | Type | Demo Value | Description |
---|---|---|---|
contact | Object | ||
Boolean | true | Is request success? | |
Integer | 121212 | Message Unique Identifier |
Success Response Examples
{
"header": {
"process_time": 0,
"messages": "success",
"reason": "",
"error_code": 0
},
"data": {
"contact": {
"id": 232323,
"role": "user",
"attributes": {
"Name": "Owen",
"tag": "Pengguna",
"thumbnail": "https://accounts.tokopedia.com/image/v1/u/232323/user_thumbnail/",
"is_gold": false,
"is_official": false
}
},
"is_success": true,
"msg_id": 121212
}
}
Error Response Examples
Error Codes
Error Code | Error Message | Description |
---|---|---|
SHP_GRPC_001 | Failed Send GRPC Request | Failed sending request to upstream |
SHP_GRPC_003 | Data Not Found | Failed finding data from upstream |
Notes
Response fields explanation:
- Field
is_gold
is to identify Seller Gold Merchant (Power Merchant) or not. - Field
role
has User, Shop Owner, Shop Admin, and Tokopedia Admin.