Skip to content
↑↓ navigate↵ openEsc close

API reference

Contacts

Buyer contacts merged across stores, with order stats.

List contacts

GET/v1/contacts

Contacts with order stats, most recent first.

Scopes:contacts:read

Query parameters

  • qstringoptional

    max length 100

  • labelstringoptional

    max length 40

  • limitintegeroptional

    min 1 · max 200

  • offsetintegeroptional

    min 0

Response200 · application/json

OK

  • itemsarray<ContactSummary>required
    Show 6 child attributes
    • idstringrequired

      format: uuid

    • displayNamestringrequirednullable
    • labelsarray<string>required
    • channelsarray<string>required
    • statsContactStatsrequired
      Show 5 child attributes
      • ordersintegerrequired

        Non-cancelled orders.

      • totalSpendstring (decimal)required

        Decimal string with two fraction digits.

      • currencystringrequired
      • returnsintegerrequired
      • lastOrderAtstringrequirednullable

        format: date-time

    • createdAtstringrequired

      format: date-time

Example request · curl
curl "https://api.comnethub.app/v1/contacts?limit=20" \
  -H "Authorization: Bearer $THECOMNET_API_KEY"

List contact labels

GET/v1/contacts/labels

Labels in use on contacts.

Scopes:contacts:read

Response200 · application/json

OK

  • itemsarray<string>required
Example request · curl
curl "https://api.comnethub.app/v1/contacts/labels" \
  -H "Authorization: Bearer $THECOMNET_API_KEY"

Get contact

GET/v1/contacts/{contactId}

Contact with identities, orders, and conversations.

Scopes:contacts:read

Path parameters

  • contactIdstringrequired

    format: uuid

Response200 · application/json

OK

  • idstringrequired

    format: uuid

  • displayNamestringrequirednullable
  • labelsarray<string>required
  • channelsarray<string>required
  • statsContactStatsrequired
    Show 5 child attributes
    • ordersintegerrequired

      Non-cancelled orders.

    • totalSpendstring (decimal)required

      Decimal string with two fraction digits.

    • currencystringrequired
    • returnsintegerrequired
    • lastOrderAtstringrequirednullable

      format: date-time

  • createdAtstringrequired

    format: date-time

  • notesstringrequirednullable
  • identitiesarray<ContactIdentity>required
    Show 3 child attributes
    • channelstringrequired

      tiktok, shopee; later whatsapp, instagram.

    • externalIdstringrequired
    • displayNamestringrequirednullable
  • ordersarray<ChatBuyerOrder>required

    Latest 50.

    Show 7 child attributes
    • orderIdstringrequired

      format: uuid

    • externalOrderIdstringrequired
    • statusstringrequired
    • marketplaceStatusstringrequirednullable
    • totalstring (decimal)required

      Decimal string with two fraction digits.

    • currencystringrequired
    • placedAtstringrequired

      format: date-time

  • conversationsarray<ChatConversation>required
    Show 22 child attributes
    • contactIdstringrequirednullable

      format: uuid

    • assignedUserIdstringrequirednullable

      format: uuid

    • labelsarray<string>required
    • waitingSincestringrequirednullable

      Oldest unanswered buyer message; null when the shop spoke last.

      format: date-time

    • latebooleanrequired

      Waiting longer than the tenant's response target.

    • idstringrequired

      format: uuid

    • storeIdstringrequired

      format: uuid

    • storeNamestringrequired
    • marketplacestringrequired

      One of:tiktokshopeelazadatokopedia

    • externalConversationIdstringrequired
    • buyerNamestringrequirednullable
    • buyerAvatarstringrequirednullable
    • canSendbooleanrequired

      False when the marketplace does not allow the shop to message this buyer.

    • unreadCountintegerrequired
    • lastMessageAtstringrequirednullable

      format: date-time

    • lastMessagePreviewstringrequirednullable
    • lastMessageRolestringrequirednullable

      One of:buyershopagentsystemrobot

    • statusstringrequired

      One of:openresolved

    • needsHumanbooleanrequired
    • handoffReasonstringrequirednullable
    • agentPausedbooleanrequired
    • hasDraftbooleanrequired
Example request · curl
curl "https://api.comnethub.app/v1/contacts/$CONTACT_ID" \
  -H "Authorization: Bearer $THECOMNET_API_KEY"

Update contact

PATCH/v1/contacts/{contactId}

Rename, label, or annotate a contact.

Scopes:contacts:write

Path parameters

  • contactIdstringrequired

    format: uuid

Request bodyapplication/json

  • displayNamestringoptionalnullable

    max length 100

  • labelsarray<string>optional

    max items 20

  • notesstringoptionalnullable

    max length 4000

Response200 · application/json

OK

  • idstringrequired

    format: uuid

  • displayNamestringrequirednullable
  • labelsarray<string>required
  • channelsarray<string>required
  • statsContactStatsrequired
    Show 5 child attributes
    • ordersintegerrequired

      Non-cancelled orders.

    • totalSpendstring (decimal)required

      Decimal string with two fraction digits.

    • currencystringrequired
    • returnsintegerrequired
    • lastOrderAtstringrequirednullable

      format: date-time

  • createdAtstringrequired

    format: date-time

Example request · curl
curl -X PATCH "https://api.comnethub.app/v1/contacts/$CONTACT_ID" \
  -H "Authorization: Bearer $THECOMNET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "displayName": "string",
  "labels": [
    "string"
  ],
  "notes": "string"
}'