Create a new Contact

Creates a new contact with the following validations:

  1. Contact Information:

    • Email and phone are optional fields
    • If email is provided, it must be valid
    • If phone is provided, it must be valid according to country format
  2. Document Validation:

    • If documentType is provided, documentNumber must also be provided
    • Document number must be valid according to country format
    • Document type must match business type (e.g. DNI for PERSON, CUIT for COMPANY)
  3. Tax Information:

    • If taxIdType is provided, taxIdNumber must also be provided
    • Tax ID number must be valid according to country format
  4. Business Type:

    • Must be one of: PERSON, COMPANY, GOVERNMENT, NON_PROFIT, PROVIDER, OTHER
    • Must match the provided document type
  5. Country Symbol:

    • Must be one of:
      • AR (Argentina)
      • CL (Chile)
      • BR (Brazil)
      • CO (Colombia)
      • MX (Mexico)
      • PE (Peru)
      • US (United States)
    • Determines the valid formats for phone, document, and tax numbers

Path parameters

organizationIdstringRequired
Organization ID
merchantIdstringRequired
Merchant ID

Headers

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
countrySymbolenumRequired

Country symbol of the contact. Must be one of:

  • AR (Argentina)
  • CL (Chile)
  • BR (Brazil)
  • CO (Colombia)
  • MX (Mexico)
  • PE (Peru)
  • US (United States)
firstNamestringRequired
businessTypeenumRequired

Business type of the contact. Allowed values: PERSON, COMPANY, PROVIDER, GOVERNMENT, NON_PROFIT, OTHER. Must match the provided document type

typeenumRequired
Contact type determined by document type and business type
Allowed values:
externalIdstringOptional
lastNamestringOptional
emailstringOptional

Contact email (optional)

phonestringOptional

Contact phone number (optional)

addressLine1stringOptional
addressLine2stringOptional
citystringOptional
statestringOptional
postalCodestringOptional
taxIdTypeenumOptional
If provided, taxIdNumber must also be included
taxIdNumberstringOptional
Required if taxIdType is provided
documentTypeenumOptional
If provided, documentNumber must also be included
documentNumberstringOptional
Required if documentType is provided
externalBillingIddoubleOptional
stateIdstringOptional

ID of the state/province/region

countyIdstringOptional

ID of the county/district/municipality

Response

Contact created successfully
idstring
countrySymbolstring
merchantIdstring
firstNamestring
lastNamestring
emailstring
phonestring
addressobject
businessTypestring
taxobject
documentobject
createdAtdatetime
updatedAtdatetime
externalIdstring

Errors