Passa al contenuto principale

Contact Endpoints

Manage organization contacts β€” customers, vendors, leads, and other business contacts used across the CRM module.

Base Path​

/api/organization-contact

Endpoints​

List Contacts (Paginated)​

GET /api/organization-contact/pagination
Authorization: Bearer {token}

Find All Contacts​

GET /api/organization-contact
Authorization: Bearer {token}

Get Contact by ID​

GET /api/organization-contact/:id
Authorization: Bearer {token}

Create Contact​

POST /api/organization-contact
Authorization: Bearer {token}
Content-Type: application/json

{
"name": "Acme Corporation",
"contactType": "CUSTOMER",
"primaryEmail": "info@acme.com",
"primaryPhone": "+1-555-0123",
"organizationId": "uuid",
"imageUrl": "https://...",
"budget": 50000,
"budgetType": "HOURS",
"members": [{ "id": "employee-uuid" }],
"tags": [{ "id": "tag-uuid" }]
}

Update Contact​

PUT /api/organization-contact/:id
Authorization: Bearer {token}
Content-Type: application/json

{
"name": "Updated Contact Name",
"primaryEmail": "new@email.com"
}

Delete Contact​

DELETE /api/organization-contact/:id
Authorization: Bearer {token}

Contact Types​

TypeDescription
CUSTOMERPaying customer
CLIENTClient relationship
LEADProspective customer
VENDORSupplier or vendor
PARTNERBusiness partner

Data Model​

interface IOrganizationContact {
id: string;
name: string;
contactType: ContactType;
primaryEmail?: string;
primaryPhone?: string;
imageUrl?: string;
budget?: number;
budgetType?: OrganizationContactBudgetTypeEnum;
notes?: string;

// Relations
organizationId: string;
members?: IEmployee[];
projects?: IOrganizationProject[];
invoices?: IInvoice[];
tags?: ITag[];
tenantId: string;
}

Permissions​

ActionRequired Permission
View contactsALL_ORG_VIEW or ORG_CONTACT_VIEW
Create contactsALL_ORG_EDIT or ORG_CONTACT_EDIT
Update contactsALL_ORG_EDIT or ORG_CONTACT_EDIT
Delete contactsALL_ORG_EDIT or ORG_CONTACT_EDIT