Create a Contact Associated with a Third Party

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 email is 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_code must correspond to an existing and active third party in the system. The search is case-insensitive.
  • Branch validation: If branch_code is 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, linkedin and branch_code are optional. If not provided or empty, the contact will be created without that information.
  • Case-insensitive: Validations for third_party_code, branch_code, email and name are case-insensitive.

Input Parameters

The following body must be sent:

ParameterTypeRequiredDescription
third_party_codeTextYesCode of the third party to which the contact will be associated. Must exist in the system.
nameTextYesFull name of the contact. Must be unique for the specified third party.
roleTextYesPosition or role of the contact within the third party's organization.
emailTextNoContact's email address. If provided, must be unique across the entire company.
telephoneTextNoContact's landline phone number.
movilTextNoContact's mobile phone number.
skypeTextNoContact's Skype username.
linkedinTextNoContact's LinkedIn profile.
branch_codeTextNoCode 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

ParameterTypeDescription
idIntegerUnique ID of the created contact.
third_party_codeTextAssociated third party code.
third_party_nameTextAssociated third party name.
nameTextContact name.
emailTextContact email.
telephoneTextContact's landline phone number.
movilTextContact's mobile phone number.
skypeTextContact's Skype username.
linkedinTextContact's LinkedIn profile.
roleTextContact's position or role.
branch_codeTextAssociated branch code (if applicable).
branch_nameTextAssociated 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"
    }
}
Response
200
Language
LoadingLoading…