post
https://app.fracttal.com/api/third_parties_contacts/
Through this API, you can create a contact associated with an existing third party. The contact will be linked to the specified third party and optionally to one of its branches.
Important Notes
- Name uniqueness: The contact name must be unique within the specified third party. You cannot create two contacts with the same name for the same third party.
- Email uniqueness: If an
emailis provided, it must be unique across the entire company. You cannot create two contacts with the same email, even if they belong to different third parties. - Third party validation: The
third_party_codemust correspond to an existing and active third party in the system. The search is case-insensitive. - Branch validation: If
branch_codeis provided, it must correspond to a valid branch that belongs to the specified third party. The branch must be configured as a child (id_parent) of the main third party. - Optional fields: The fields
email,telephone,movil,skype,linkedinandbranch_codeare optional. If not provided or empty, the contact will be created without that information. - Case-insensitive: Validations for
third_party_code,branch_code,emailandnameare case-insensitive.
Input Parameters
The following body must be sent:
| Parameter | Type | Required | Description |
|---|---|---|---|
third_party_code | Text | Yes | Code of the third party to which the contact will be associated. Must exist in the system. |
name | Text | Yes | Full name of the contact. Must be unique for the specified third party. |
role | Text | Yes | Position or role of the contact within the third party's organization. |
email | Text | No | Contact's email address. If provided, must be unique across the entire company. |
telephone | Text | No | Contact's landline phone number. |
movil | Text | No | Contact's mobile phone number. |
skype | Text | No | Contact's Skype username. |
linkedin | Text | No | Contact's LinkedIn profile. |
branch_code | Text | No | Code of the third party's branch to which the contact belongs. If provided, must correspond to a valid branch of the third party. |
Note: The fields email, telephone, movil, skype, linkedin and branch_code are optional and can be sent as empty strings or not included in the body.
Output Parameters
| Parameter | Type | Description |
|---|---|---|
id | Integer | Unique ID of the created contact. |
third_party_code | Text | Associated third party code. |
third_party_name | Text | Associated third party name. |
name | Text | Contact name. |
email | Text | Contact email. |
telephone | Text | Contact's landline phone number. |
movil | Text | Contact's mobile phone number. |
skype | Text | Contact's Skype username. |
linkedin | Text | Contact's LinkedIn profile. |
role | Text | Contact's position or role. |
branch_code | Text | Associated branch code (if applicable). |
branch_name | Text | Associated branch name (if applicable). |
Example
Request (POST): https://app.fracttal.com/api/third_parties_contacts/
{
"third_party_code": "THIRD002",
"name": "mateo pereze",
"email": "[email protected]",
"telephone": "+57 1 234 5678",
"movil": "+57 300 123 4567",
"skype": "mateo.pereze",
"linkedin": "linkedin.com/in/mateo-pereze",
"role": "Gerente de Compras",
"branch_code": "sucursal01"
}{
"success": true,
"message": "200",
"total": 1,
"data": {
"id": 12345,
"third_party_code": "THIRD002",
"third_party_name": "Proveedor ABC S.A.S",
"name": "mateo pereze",
"email": "[email protected]",
"telephone": "+57 1 234 5678",
"movil": "+57 300 123 4567",
"skype": "mateo.pereze",
"linkedin": "linkedin.com/in/mateo-pereze",
"role": "Gerente de Compras",
"branch_code": "sucursal01",
"branch_name": "Sucursal Norte"
}
} 200