Referensi API
Chat
Percakapan dengan pembeli, balasan, catatan internal, dan label.
List chat conversations
/v1/chat/conversationsInbox, most recent activity first.
Scope:chat:read
Query parameter
storeIdstringopsionalformat: uuid
filterstringopsionalSalah satu dari:
allunreadneeds_humanopenresolvedlateassigneestringopsionalme, unassigned, or a user id.
panjang maks 40
labelstringopsionalpanjang maks 40
qstringopsionalpanjang maks 100
beforestringopsionalformat: date-time
limitintegeropsionalmin 1 · maks 100
Response200 · application/json
OK
itemsarray<ChatConversation>wajibTampilkan 22 atribut turunan
contactIdstringwajibnullableformat: uuid
assignedUserIdstringwajibnullableformat: uuid
labelsarray<string>wajibwaitingSincestringwajibnullableOldest unanswered buyer message; null when the shop spoke last.
format: date-time
latebooleanwajibWaiting longer than the tenant's response target.
idstringwajibformat: uuid
storeIdstringwajibformat: uuid
storeNamestringwajibmarketplacestringwajibSalah satu dari:
tiktokshopeelazadatokopediaexternalConversationIdstringwajibbuyerNamestringwajibnullablebuyerAvatarstringwajibnullablecanSendbooleanwajibFalse when the marketplace does not allow the shop to message this buyer.
unreadCountintegerwajiblastMessageAtstringwajibnullableformat: date-time
lastMessagePreviewstringwajibnullablelastMessageRolestringwajibnullableSalah satu dari:
buyershopagentsystemrobotstatusstringwajibSalah satu dari:
openresolvedneedsHumanbooleanwajibhandoffReasonstringwajibnullableagentPausedbooleanwajibhasDraftbooleanwajib
curl "https://api.comnethub.app/v1/chat/conversations?limit=20" \
-H "Authorization: Bearer $THECOMNET_API_KEY"Get chat conversation
/v1/chat/conversations/{conversationId}Conversation with messages, agent draft, and buyer orders.
Scope:chat:read
Path parameter
conversationIdstringwajibformat: uuid
Response200 · application/json
OK
contactIdstringwajibnullableformat: uuid
assignedUserIdstringwajibnullableformat: uuid
labelsarray<string>wajibwaitingSincestringwajibnullableOldest unanswered buyer message; null when the shop spoke last.
format: date-time
latebooleanwajibWaiting longer than the tenant's response target.
idstringwajibformat: uuid
storeIdstringwajibformat: uuid
storeNamestringwajibmarketplacestringwajibSalah satu dari:
tiktokshopeelazadatokopediaexternalConversationIdstringwajibbuyerNamestringwajibnullablebuyerAvatarstringwajibnullablecanSendbooleanwajibFalse when the marketplace does not allow the shop to message this buyer.
unreadCountintegerwajiblastMessageAtstringwajibnullableformat: date-time
lastMessagePreviewstringwajibnullablelastMessageRolestringwajibnullableSalah satu dari:
buyershopagentsystemrobotstatusstringwajibSalah satu dari:
openresolvedneedsHumanbooleanwajibhandoffReasonstringwajibnullableagentPausedbooleanwajibhasDraftbooleanwajibnotesarray<ChatNote>wajibTampilkan 5 atribut turunan
idstringwajibformat: uuid
userIdstringwajibnullableformat: uuid
userNamestringwajibnullablebodystringwajibcreatedAtstringwajibformat: date-time
messagesarray<ChatMessage>wajibOldest first, at most the latest 200.
Tampilkan 9 atribut turunan
idstringwajibformat: uuid
rolestringwajibSalah satu dari:
buyershopagentsystemrobotsenderNamestringwajibnullabletypestringwajibMarketplace message type, e.g. TEXT, IMAGE, ORDER_CARD, PRODUCT_CARD.
textstringwajibnullablecontentobject (map)wajibParsed marketplace content (url for images, order_id for order cards, ...).
sentByUserIdstringwajibnullableformat: uuid
sentByAgentbooleanwajibcreatedAtstringwajibformat: date-time
draftReplystringwajibnullabledraftRunIdstringwajibnullableformat: uuid
lastRunChatAgentRunwajibnullableTampilkan 12 atribut turunan
idstringwajibformat: uuid
conversationIdstringwajibformat: uuid
modestringwajibSalah satu dari:
offsuggestautooutcomestringwajibSalah satu dari:
repliedsuggestedhandoffskippederrorreplystringwajibnullablereasonstringwajibnullabletoolsarray<ChatAgentToolCall>wajibTampilkan 3 atribut turunan
namestringwajibinputobject (map)wajibokbooleanwajib
modelstringwajibnullableinputTokensintegerwajibnullableoutputTokensintegerwajibnullablecacheReadTokensintegerwajibnullablecreatedAtstringwajibformat: date-time
buyerOrdersarray<ChatBuyerOrder>wajibTampilkan 7 atribut turunan
orderIdstringwajibformat: uuid
externalOrderIdstringwajibstatusstringwajibmarketplaceStatusstringwajibnullabletotalstring (decimal)wajibDecimal string with two fraction digits.
currencystringwajibplacedAtstringwajibformat: date-time
curl "https://api.comnethub.app/v1/chat/conversations/$CONVERSATION_ID" \
-H "Authorization: Bearer $THECOMNET_API_KEY"Update chat conversation
/v1/chat/conversations/{conversationId}Resolve or reopen, clear the handoff flag, pause the agent.
Scope:chat:write
Path parameter
conversationIdstringwajibformat: uuid
Request bodyapplication/json
assignedUserIdstringopsionalnullableformat: uuid
labelsarray<string>opsionalitem maks 20
statusstringopsionalSalah satu dari:
openresolvedneedsHumanbooleanopsionalClears the handoff flag.
Salah satu dari:
falseagentPausedbooleanopsional
Response200 · application/json
OK
contactIdstringwajibnullableformat: uuid
assignedUserIdstringwajibnullableformat: uuid
labelsarray<string>wajibwaitingSincestringwajibnullableOldest unanswered buyer message; null when the shop spoke last.
format: date-time
latebooleanwajibWaiting longer than the tenant's response target.
idstringwajibformat: uuid
storeIdstringwajibformat: uuid
storeNamestringwajibmarketplacestringwajibSalah satu dari:
tiktokshopeelazadatokopediaexternalConversationIdstringwajibbuyerNamestringwajibnullablebuyerAvatarstringwajibnullablecanSendbooleanwajibFalse when the marketplace does not allow the shop to message this buyer.
unreadCountintegerwajiblastMessageAtstringwajibnullableformat: date-time
lastMessagePreviewstringwajibnullablelastMessageRolestringwajibnullableSalah satu dari:
buyershopagentsystemrobotstatusstringwajibSalah satu dari:
openresolvedneedsHumanbooleanwajibhandoffReasonstringwajibnullableagentPausedbooleanwajibhasDraftbooleanwajib
curl -X PATCH "https://api.comnethub.app/v1/chat/conversations/$CONVERSATION_ID" \
-H "Authorization: Bearer $THECOMNET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"assignedUserId": "0192f0c4-8d1e-7a4b-9c3e-5f6a7b8c9d0e",
"labels": [
"string"
],
"status": "open",
"needsHuman": false,
"agentPaused": true
}'Send chat message
/v1/chat/conversations/{conversationId}/messagesSend a text reply through the marketplace.
Scope:chat:write
Path parameter
conversationIdstringwajibformat: uuid
Request bodyapplication/json
textstringwajibpanjang min 1 · panjang maks 2000
fromDraftbooleanopsionalClears the agent draft after sending.
Response201 · application/json
OK
idstringwajibformat: uuid
rolestringwajibSalah satu dari:
buyershopagentsystemrobotsenderNamestringwajibnullabletypestringwajibMarketplace message type, e.g. TEXT, IMAGE, ORDER_CARD, PRODUCT_CARD.
textstringwajibnullablecontentobject (map)wajibParsed marketplace content (url for images, order_id for order cards, ...).
sentByUserIdstringwajibnullableformat: uuid
sentByAgentbooleanwajibcreatedAtstringwajibformat: date-time
curl -X POST "https://api.comnethub.app/v1/chat/conversations/$CONVERSATION_ID/messages" \
-H "Authorization: Bearer $THECOMNET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "string"
}'Add chat note
/v1/chat/conversations/{conversationId}/notesAdd an internal note (never sent to the buyer).
Scope:chat:write
Path parameter
conversationIdstringwajibformat: uuid
Request bodyapplication/json
bodystringwajibpanjang min 1 · panjang maks 2000
Response201 · application/json
OK
idstringwajibformat: uuid
userIdstringwajibnullableformat: uuid
userNamestringwajibnullablebodystringwajibcreatedAtstringwajibformat: date-time
curl -X POST "https://api.comnethub.app/v1/chat/conversations/$CONVERSATION_ID/notes" \
-H "Authorization: Bearer $THECOMNET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"body": "string"
}'List chat labels
/v1/chat/labelsLabels in use on conversations.
Scope:chat:read
Response200 · application/json
OK
itemsarray<string>wajib
curl "https://api.comnethub.app/v1/chat/labels" \
-H "Authorization: Bearer $THECOMNET_API_KEY"Mark chat read
/v1/chat/conversations/{conversationId}/readMark buyer messages read at the marketplace.
Scope:chat:write
Path parameter
conversationIdstringwajibformat: uuid
Response204
OK
Tidak ada response body.
curl -X POST "https://api.comnethub.app/v1/chat/conversations/$CONVERSATION_ID/read" \
-H "Authorization: Bearer $THECOMNET_API_KEY"List chat quick replies
/v1/chat/quick-repliesSaved replies.
Scope:chat:read
Response200 · application/json
OK
itemsarray<ChatQuickReply>wajibTampilkan 3 atribut turunan
idstringwajibformat: uuid
shortcutstringwajibbodystringwajib
curl "https://api.comnethub.app/v1/chat/quick-replies" \
-H "Authorization: Bearer $THECOMNET_API_KEY"