Contact

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
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

countrySymbol'AR' | 'CL' | 'BR' | 'CO' | 'MX' | 'PE' | 'US' | 'BO' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BQ' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CM' | 'CN' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW' required

Country symbol of the contact. Must be one of:

  • AR (Argentina)
  • CL (Chile)
  • BR (Brazil)
  • CO (Colombia)
  • MX (Mexico)
  • PE (Peru)
  • US (United States)
externalIdstring
firstNamestring required
lastNamestring
emailstring

Contact email (optional)

phonestring

Contact phone number (optional)

addressLine1string
addressLine2string
citystring
statestring
postalCodestring
businessType'PERSON' | 'COMPANY' | 'PROVIDER' | 'GOVERNMENT' | 'NON_PROFIT' | 'OTHER' required

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

taxIdType'RUT' | 'CUIT' | 'CNPJ' | 'RFC' | 'RUC' | 'NIT' | 'EIN' | 'VAT' | 'OTHER'

DEPRECATED: Use documentType instead. If provided, taxIdNumber must also be included.

taxIdNumberstring

DEPRECATED: Use documentNumber instead. Required if taxIdType is provided.

documentType'RUT' | 'DNI' | 'CUIL' | 'CPF' | 'CURP' | 'CED_CIU' | 'CED_EXT' | 'NIT' | 'NOP' | 'RC' | 'PP' | 'DIE' | 'EIN' | 'SSN' | 'RFC' | 'RUC' | 'VAT' | 'HKID' | 'CNID' | 'NRIC' | 'FIN' | 'OTHER' | 'CUIT' | 'CNPJ' | 'TXID'

If provided, documentNumber must also be included

documentNumberstring

Required if documentType is provided

externalBillingIdnumber
type'PERSON' | 'BUSINESS' | 'GOVERNMENT' | 'NGO' | 'FOREIGN' required

Contact type determined by document type and business type

stateIdstring

ID of the state/province/region

countyIdstring

ID of the county/district/municipality

dateOfBirthstring

Date of birth in ISO format (YYYY-MM-DD). Optional for all countries except Hong Kong.

documentExpirationDatestring

Document expiration date in ISO format (YYYY-MM-DD). Optional for all countries except Hong Kong.

nationalityCountrySymbol'AR' | 'CL' | 'BR' | 'CO' | 'MX' | 'PE' | 'US' | 'BO' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BQ' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CM' | 'CN' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW'

Nationality country code (ISO 3166-1 alpha-2). Will be resolved to nationalityCountryId.

nationalityCountryIdstring

Country ID for nationality (reference to Countries table). Auto-populated from nationalityCountrySymbol.

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

idstring required
countrySymbolstring required
merchantIdstring required
firstNamestring required
lastNamestring required
emailstring required
phonestring required
businessTypestring required
createdAtstring date-time required
updatedAtstring date-time required
externalIdstring required
dateOfBirthstring date-time

Date of birth

documentExpirationDatestring date-time

Document expiration date

nationalityCountryIdstring

Country ID for nationality

nationalityCountryobject

Nationality country details

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.