Contact
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:
post/api/v1/organizations/{organizationId}/merchants/{merchantId}/contacts
Request
- Base URL: https://api-sandbox.koywe.com
- URL: https://api-sandbox.koywe.com/api/v1/organizations/{organizationId}/merchants/{merchantId}/contacts
- Auth: HTTP bearer
Path parameters
organizationIdstring required
Organization ID
merchantIdstring required
Merchant ID
Request body
Example request
{
"countrySymbol": "AR",
"externalId": "ext_a627a569-51c4-4fc4-ace6-a43482f1b08b",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "+54116644624",
"addressLine1": "123 Main Street",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"businessType": "PERSON",
"taxIdType": "CUIT",
"taxIdNumber": "123456789",
"documentType": "DNI",
"documentNumber": "123456789",
"externalBillingId": 123456789,
"type": "PERSON",
"stateId": "st_a627a569-51c4-4fc4-ace6-a43482f1b08b",
"countyId": "cnt_a627a569-51c4-4fc4-ace6-a43482f1b08b",
"dateOfBirth": "1990-01-15",
"documentExpirationDate": "2030-12-31",
"nationalityCountrySymbol": "HK",
"nationalityCountryId": "ctry_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"documents": [
{
"documentType": "DNI",
"documentNumber": "12345678",
"isDefault": true,
"isCompany": false
}
]
}Response
Contact created successfully
Example response
{
"id": "con_a627a569-51c4-4fc4-ace6-a43482f1b08b",
"countrySymbol": "AR",
"merchantId": "mer_84b8b218-2777-4e7f-863e-7d0601ac289f",
"firstName": "Mariano",
"lastName": "Romero",
"email": "mariano.romero@row.com",
"phone": "0116644624",
"address": {
"addressLine1": "San Martín 123",
"addressLine2": "Belgrano 222",
"city": "CABA",
"state": "Buenos Aires",
"postalCode": "1419",
"stateId": "st_a627a569-51c4-4fc4-ace6-a43482f1b08b",
"countyId": "cnt_a627a569-51c4-4fc4-ace6-a43482f1b08b"
},
"businessType": "PERSON",
"tax": {
"taxIdType": "DNI",
"taxIdNumber": "123456789"
},
"document": {
"documentType": "DNI",
"documentNumber": "123456789"
},
"createdAt": "2024-09-03T15:47:03.175Z",
"updatedAt": "2024-09-03T15:47:03.175Z",
"externalId": "ext_a627a569-51c4-4fc4-ace6-a43482f1b08b",
"documents": [
{
"id": "cdoc_a627a569-51c4-4fc4-ace6-a43482f1b08b",
"documentType": "DNI",
"documentNumber": "12345678",
"isDefault": true,
"isCompany": false,
"isDeleted": false
}
],
"dateOfBirth": "1990-01-15T00:00:00.000Z",
"documentExpirationDate": "2030-12-31T00:00:00.000Z",
"nationalityCountryId": "ctry_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Changes
No recorded changes to this operation across all 1 revision of this API.