Profiles

Updates client profile

Updates one or more fields of an existing client profile.

Since your store's profile schema is customizable, the schema and examples presented below may differ from yours. Your integration must be adapted accordingly.

Learn more about the Profile System and its other API endpoints.

patch/api/storage/profile-system/profiles/{profileId}

Path parameters

profileIdstring required
Example:70caf394-8534-447e-a0ca-1803c669c771

ID of the client's profile as returned by the Create profile endpoint's response, in the id field. It can also be an alternativeKey according to your custom profile schema. In this case, this request should also send the alternativeKey parameter.

Query parameters

alternativeKeystring
Example:email

The profileId path parameter may be substituted by other profile fields in this request. When making this request, send the alternativeKey parameter with a value equal to the key of the field you wish to use as profileId.

Currently, there are two possible values for this parameter: email and document.

ttlinteger
Example:365

This parameter sets the the Time To Live (TTL), in days, of the specific document being created or updated with this request. After this period of time from the moment of the request, the document is deleted. By sending this parameter you override the TTL set for the schema.

Currently, the available default document schemas have no TTL. This means that documents are stored indefinitely, unless a TTL is sent when creating or updating.

Headers

Content-Typestring required
Example:application/json

Type of the content being sent.

Acceptstring required
Example:application/json

HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.

Request body

firstNamestring required

Client's first name.

lastNamestring required

Client's last name.

emailstring required

Client's email address.

birthDatestring

Client's birth date in ISO 8601 format.

documentstring required

Client's document.

documentTypestring required

Type of document informed in document.

Example request

{
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@example.com",
  "birthDate": "1925-11-17",
  "document": "12345678900",
  "documentType": "CPF"
}

Response

OK

idstring

ID of the client's profile.

Example response

{
  "id": "70caf394-8534-447e-a0ca-1803c669c771",
  "document": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com",
    "birthDate": "1925-11-17",
    "document": "12345678911",
    "documentType": "CPF"
  },
  "meta": {
    "version": "abc",
    "author": "e40e0b6d-0605-4fa6-8176-1d69fbaf0818",
    "creationDate": "2022-01-05T15:41:37.5009471+00:00",
    "lastUpdate": "2022-01-17T15:41:37.5009471+00:00"
  }
}

Changes