Appearance
lubb-team
2 endpoints.
GET /api/v1/team-contacts
List Contacts
Every live ERP contact with an email or a phone, with its customer.
Owner, 2026-11-05: "why so many? delete the deleted ones". A contact that belongs to a customer is listed only while that customer is live: by customer_id, or for the July ERPNext import (customer_id NULL) by the Customer named in links_json. Contacts of deleted customers, or of customers that never came across, are left out, so the sync removes them from the book. Supplier, Lead and unlinked contacts stay.
Owner, 2026-11-05: "Suppliers and Customers must each have their own contacts lists on team". Each contact carries book: customers, suppliers (by the Supplier in links_json), or contacts for leads and the rest, and the Team sync files it in that list.
Owner, 2026-11-05: "contact Groups not visible". Each contact also carries group, the contact group the sync puts it in inside its list: customers by account status, suppliers by Supplier Group, leads by the lead's status (matched on email, then phone); "Other" when there is none.
Owner, 2026-11-05: "create a leads group and sync only active leads". Active leads (ACTIVE_LEAD_STATUSES, not converted, not the cold-call file import) follow as book leads, grouped by status.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
x-team-contacts-secret | header | no |
200 — Successful Response
json
{
"type": "object",
"additionalProperties": true,
"title": "Response List Contacts Api V1 Team Contacts Get"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/team-contacts
Upsert Contact
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
x-team-contacts-secret | header | no |
Request body
json
{
"type": "object",
"additionalProperties": true,
"title": "Payload"
}200 — Successful Response
json
{
"type": "object",
"additionalProperties": true,
"title": "Response Upsert Contact Api V1 Team Contacts Post"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}