Profiles

Create client profile

Creates new client profile.

You can send custom fields in the request body and they will be saved as part of your document. Therefore, the schema and examples presented below may differ from yours. Your integration must be adapted accordingly.

The id field returned by this request is the profileId used to retrieve information on a specific profile later.

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

⚠️ The Profile System is only compatible with stores using the PII data architecture from Data Protection Plus, which is in closed beta phase, only available in select regions.

This feature is part of VTEX Shield. If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact Commercial Support. Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our contact form.

Permissions

Any user or API key must have at least one of the appropriate License Manager resources to be able to successfully run this request. Otherwise they will receive a status code 403 error. These are the applicable resources for this endpoint:

ProductCategoryResource
Profile SystemDocumentsGet Item
Profile SystemDocumentsSave and Update Item
Profile SystemDocumentsDelete Item

There are no applicable predefined roles for this resource list. You must create a custom role and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see Authentication overview.

❗ To prevent integrations from having excessive permissions, consider the best practices for managing API keys when assigning License Manager roles to integrations.

post/api/storage/profile-system/profiles

Query parameters

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.

{customField}string

Name of custom field defined in Create or delete custom fields. Can be of any type: string, number, boolean, array or object.

Example request

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

Response

Created

idstring

ID of the client's profile.

Example response

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

Changes

Changed in 10 of the 50 revisions of this API.4717

    • the response property / became required for the status

      response-property-became-required

    • removed the required property / from the response with the status

      response-required-property-removed

    • added the new optional request property

      new-optional-request-property

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

  • c68a1fb04e5a31See the full diff
    • removed the request property

      request-property-removed

    • removed the optional property / from the response with the status

      response-optional-property-removed

    • removed the optional property / from the response with the status

      response-optional-property-removed

    • added the required property / to the response with the status

      response-required-property-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • eb33b478ad5213See the full diff
    • removed the required property / from the response with the status

      response-required-property-removed

    • added the new optional request property

      new-optional-request-property

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

  • fb9c5ab4fd8d31See the full diff
    • removed the request property

      request-property-removed

    • removed the optional property / from the response with the status

      response-optional-property-removed

    • removed the optional property / from the response with the status

      response-optional-property-removed

    • added the required property / to the response with the status

      response-required-property-added

    • added the new optional request property

      new-optional-request-property

    • added the optional property / to the response with the status

      response-optional-property-added

  • 882bd80cdbee11See the full diff
    • removed the required property / from the response with the status

      response-required-property-removed

    • added the optional property / to the response with the status

      response-optional-property-added

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • a431490e785911See the full diff
    • removed the optional property / from the response with the status

      response-optional-property-removed

    • added the required property / to the response with the status

      response-required-property-added

  • 0e9f26a43a9611See the full diff
    • removed the required property / from the response with the status

      response-required-property-removed

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added