Create a new Contact
Creates a new contact with the following validations:
-
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
-
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)
-
Tax Information:
- If taxIdType is provided, taxIdNumber must also be provided
- Tax ID number must be valid according to country format
-
Business Type:
- Must be one of: PERSON, COMPANY, GOVERNMENT, NON_PROFIT, PROVIDER, OTHER
- Must match the provided document type
-
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
- Must be one of:
Path parameters
organizationId
Organization ID
merchantId
Merchant ID
Headers
Authorization
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
This endpoint expects an object.
countrySymbol
Country symbol of the contact. Must be one of:
- AR (Argentina)
- CL (Chile)
- BR (Brazil)
- CO (Colombia)
- MX (Mexico)
- PE (Peru)
- US (United States)
firstName
businessType
Business type of the contact. Allowed values: PERSON, COMPANY, PROVIDER, GOVERNMENT, NON_PROFIT, OTHER. Must match the provided document type
type
Contact type determined by document type and business type
Allowed values:
externalId
lastName
email
Contact email (optional)
phone
Contact phone number (optional)
addressLine1
addressLine2
city
state
postalCode
taxIdType
If provided, taxIdNumber must also be included
taxIdNumber
Required if taxIdType is provided
documentType
If provided, documentNumber must also be included
documentNumber
Required if documentType is provided
externalBillingId
stateId
ID of the state/province/region
countyId
ID of the county/district/municipality
Response
Contact created successfully
id
countrySymbol
merchantId
firstName
lastName
email
phone
address
businessType
tax
document
createdAt
updatedAt
externalId