PUT
/
accounts
curl --request PUT \
  --url https://api-test.koywe.com/rest/accounts \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "example@mail.com",
  "document": {
    "others": [
      {
        "documentNumber": "<string>",
        "documentType": "<string>",
        "country": "<string>"
      }
    ]
  },
  "address": {
    "addressCity": "<string>",
    "addressStreet": "<string>",
    "addressZipCode": "<string>",
    "addressCountry": "<string>",
    "addressState": "<string>",
    "addressNeighborhood": "<string>"
  },
  "personalInfo": {
    "names": "<string>",
    "firstLastname": "<string>",
    "secondLastname": "<string>",
    "activity": "<string>",
    "dob": "<string>",
    "phoneNumber": "<string>",
    "nationality": "<string>",
    "gender": "<string>"
  },
  "updateEmail": "example@mail.com",
  "updateDocumentNumber": "11111111",
  "updateDocumentType": "RUT"
}'
{
  "email": "example@mail.com",
  "document": {
    "isCompany": true,
    "documentNumber": "<string>",
    "documentType": "<string>",
    "country": "<string>",
    "others": [
      {
        "documentNumber": "<string>",
        "documentType": "<string>",
        "country": "<string>"
      }
    ]
  },
  "address": {
    "addressCity": "<string>",
    "addressStreet": "<string>",
    "addressZipCode": "<string>",
    "addressCountry": "<string>",
    "addressState": "<string>",
    "addressNeighborhood": "<string>"
  },
  "personalInfo": {
    "names": "<string>",
    "firstLastname": "<string>",
    "secondLastname": "<string>",
    "activity": "<string>",
    "dob": "<string>",
    "phoneNumber": "<string>",
    "nationality": "<string>",
    "gender": "<string>"
  },
  "resultUpdateDocumentNumber": "Document number is pending validation"
}

Updating Email or Document:

If an updated email is present, the API validates whether it is a valid email and ensures that another account with that email does not already exist.

If an updated document number or type is present, the API validates that it has a valid format, does not exist on another account, has no executed orders, and initiates an asynchronous validation for mismatching personal data.

The results of the asynchronous validation will be sent to the configured callback. You can find more information in the webhooks section.

Body

application/json
email
string
document
object
address
object
personalInfo
object
updateEmail
string
updateDocumentNumber
string
updateDocumentType
string

Response

200 - application/json
email
string
required
document
object
required
address
object
required
personalInfo
object
required
resultUpdateDocumentNumber
string