{ "_": { "postman_id": "c1043b9a-592c-453e-97fa-a2fe30ec953b" }, "item": [ { "id": "00c76bbd-4c95-42e8-aedd-fd9f9be347a7", "name": "Profiles", "description": { "content": "", "type": "text/plain" }, "item": [ { "id": "d5716a80-a157-464d-af65-924089d57167", "name": "Create client profile", "request": { "name": "Create client profile", "description": { "content": "Creates new client profile.\n\r\n\rYou 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.\n\r\n\rThe `id` field returned by this request is the `profileId` used to retrieve information on a specific profile later.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "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.\n\r\n\r> 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.", "type": "text/plain" }, "key": "ttl", "value": "365" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "POST", "body": { "mode": "raw", "raw": "{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"document\": \"12345678900\",\n \"documentType\": \"CPF\",\n \"birthDate\": \"1925-11-17\",\n \"{customField}\": \"{value}\"\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "e8845406-99d0-4cb7-82f9-8d41e9ff18e6", "name": "Created", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "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.\n\r\n\r> 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.", "type": "text/plain" }, "key": "ttl", "value": "365" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "POST", "body": { "mode": "raw", "raw": "{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"document\": \"12345678900\",\n \"documentType\": \"CPF\",\n \"birthDate\": \"1925-11-17\",\n \"{customField}\": \"{value}\"\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "status": "Created", "code": 201, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"id\": \"c2cbebba-214e-40b2-b68f-98f862e755d5\",\n \"meta\": {\n \"version\": \"27112371-a71b-45d6-b3bc-93436a3a0b4f\",\n \"author\": \"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\",\n \"creationDate\": \"2022-01-05T15:41:37.5009471+00:00\",\n \"lastUpdate\": \"2022-01-05T15:41:37.5009471+00:00\"\n },\n \"document\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"birthDate\": \"1925-11-17\",\n \"document\": \"12345678911\",\n \"documentType\": \"CPF\",\n \"{customField}\": \"{value}\"\n }\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "38429675-3cc7-497e-8e0a-e1eecc85fc7f", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/storage/profile-system/profiles - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[POST]::/api/storage/profile-system/profiles - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[POST]::/api/storage/profile-system/profiles - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\"},\"meta\":{\"title\":\"Profile metadata\",\"type\":\"object\",\"description\":\"Profile metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the profile version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the profile.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the profile was created in ISO 8601 format.\"},\"lastUpdate\":{\"type\":\"string\",\"description\":\"Date when the profile was last updated in ISO 8601 format.\"}}},\"document\":{\"title\":\"Profile\",\"type\":\"object\",\"description\":\"Profile schema.\",\"required\":[\"firstName\",\"lastName\",\"email\",\"document\",\"documentType\"],\"properties\":{\"firstName\":{\"type\":\"string\",\"description\":\"Client's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Client's last name.\"},\"email\":{\"type\":\"string\",\"description\":\"Client's email address.\"},\"birthDate\":{\"type\":\"string\",\"description\":\"Client's birth date in ISO 8601 format.\"},\"document\":{\"type\":\"string\",\"description\":\"Client's document.\"},\"documentType\":{\"type\":\"string\",\"description\":\"Type of document informed in `document`.\"},\"{customField}\":{\"type\":\"string\",\"description\":\"Name of custom field defined in [Create or delete custom fields](https://developers.vtex.com/docs/api-reference/profile-system#put-/api/storage/profile-system/schemas/profileSystem/custom). Can be of any type: string, number, boolean, array or object.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[POST]::/api/storage/profile-system/profiles - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "757d47e1-be84-4776-9680-7a18051ecc78", "name": "Get profile", "request": { "name": "Get profile", "description": { "content": "Retrieves the information of a specific client, by its `profileId`.\n\r\n\r> Since your store's profile schema is customizable, the schema and examples presented below may differ from yours. Your integration must be adapted accordingly.\n\r\n\r> For security and privacy reasons, this request returns masked profile data. For unmasked information, see [Get unmasked profile](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/unmask).\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/). \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "fb2462e6-918a-44ae-9227-7e8df112523c", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "[\n {\n \"id\": \"70caf394-8534-447e-a0ca-1803c669c771\",\n \"meta\": {\n \"version\": \"abc\",\n \"author\": \"e40e0b6d-0605-4fa6-8176-1d69fbaf0818\",\n \"creationDate\": \"13/12/2021T00:00:00Z\",\n \"lastUpdate\": \"13/12/2021T00:00:00Z\"\n },\n \"document\": {\n \"firstName\": \"J***\",\n \"lastName\": \"D**\",\n \"email\": \"j***.d**@e******.c**\",\n \"birthDate\": \"1925-11-17\",\n \"document\": \"1**********\",\n \"documentType\": \"CPF\",\n \"{customField}\": \"{value}\"\n }\n }\n]", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "292b1862-0ba0-4a47-b315-c45590a10f67", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Masked profile response\",\"type\":\"array\",\"description\":\"Array containing masked profile information.\",\"items\":{\"type\":\"object\",\"description\":\"Masked profile information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\"},\"meta\":{\"title\":\"Profile metadata\",\"type\":\"object\",\"description\":\"Profile metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the profile version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the profile.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the profile was created in ISO 8601 format.\"},\"lastUpdate\":{\"type\":\"string\",\"description\":\"Date when the profile was last updated in ISO 8601 format.\"}}},\"document\":{\"title\":\"Profile\",\"type\":\"object\",\"description\":\"Profile schema.\",\"required\":[\"firstName\",\"lastName\",\"email\",\"document\",\"documentType\"],\"properties\":{\"firstName\":{\"type\":\"string\",\"description\":\"Client's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Client's last name.\"},\"email\":{\"type\":\"string\",\"description\":\"Client's email address.\"},\"birthDate\":{\"type\":\"string\",\"description\":\"Client's birth date in ISO 8601 format.\"},\"document\":{\"type\":\"string\",\"description\":\"Client's document.\"},\"documentType\":{\"type\":\"string\",\"description\":\"Type of document informed in `document`.\"},\"{customField}\":{\"type\":\"string\",\"description\":\"Name of custom field defined in [Create or delete custom fields](https://developers.vtex.com/docs/api-reference/profile-system#put-/api/storage/profile-system/schemas/profileSystem/custom). Can be of any type: string, number, boolean, array or object.\"}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "0f0d9f1e-f536-4f7d-9484-e81ba8b1919d", "name": "Update client profile", "request": { "name": "Update client profile", "description": { "content": "Updates one or more fields of an existing client profile.\n\r\n\r> Since your store's profile schema is customizable, the schema and examples presented below may differ from yours. Your integration must be adapted accordingly.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" }, { "disabled": true, "description": { "content": "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.\n\r\n\r> 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.", "type": "text/plain" }, "key": "ttl", "value": "365" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "PATCH", "body": { "mode": "raw", "raw": "{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"document\": \"12345678900\",\n \"documentType\": \"CPF\",\n \"birthDate\": \"1925-11-17\",\n \"{customField}\": \"{value}\"\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "bbfe0aa0-b933-4b31-af38-b92ef3b3a7b6", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" }, { "disabled": true, "description": { "content": "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.\n\r\n\r> 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.", "type": "text/plain" }, "key": "ttl", "value": "365" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "PATCH", "body": { "mode": "raw", "raw": "{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"document\": \"12345678900\",\n \"documentType\": \"CPF\",\n \"birthDate\": \"1925-11-17\",\n \"{customField}\": \"{value}\"\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"id\": \"70caf394-8534-447e-a0ca-1803c669c771\",\n \"document\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"birthDate\": \"1925-11-17\",\n \"document\": \"12345678911\",\n \"documentType\": \"CPF\"\n },\n \"meta\": {\n \"version\": \"abc\",\n \"author\": \"e40e0b6d-0605-4fa6-8176-1d69fbaf0818\",\n \"creationDate\": \"2022-01-05T15:41:37.5009471+00:00\",\n \"lastUpdate\": \"2022-01-17T15:41:37.5009471+00:00\"\n }\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "cefaefd8-6614-4456-a805-2984084c6a94", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PATCH]::/api/storage/profile-system/profiles/:profileId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[PATCH]::/api/storage/profile-system/profiles/:profileId - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[PATCH]::/api/storage/profile-system/profiles/:profileId - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Unmasked profile response\",\"type\":\"object\",\"description\":\"Unmasked profile response.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\"},\"document\":{\"title\":\"Profile\",\"type\":\"object\",\"description\":\"Profile schema.\",\"required\":[\"firstName\",\"lastName\",\"email\",\"document\",\"documentType\"],\"properties\":{\"firstName\":{\"type\":\"string\",\"description\":\"Client's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Client's last name.\"},\"email\":{\"type\":\"string\",\"description\":\"Client's email address.\"},\"birthDate\":{\"type\":\"string\",\"description\":\"Client's birth date in ISO 8601 format.\"},\"document\":{\"type\":\"string\",\"description\":\"Client's document.\"},\"documentType\":{\"type\":\"string\",\"description\":\"Type of document informed in `document`.\"},\"{customField}\":{\"type\":\"string\",\"description\":\"Name of custom field defined in [Create or delete custom fields](https://developers.vtex.com/docs/api-reference/profile-system#put-/api/storage/profile-system/schemas/profileSystem/custom). Can be of any type: string, number, boolean, array or object.\"}}},\"meta\":{\"title\":\"Profile metadata\",\"type\":\"object\",\"description\":\"Profile metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the profile version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the profile.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the profile was created in ISO 8601 format.\"},\"lastUpdate\":{\"type\":\"string\",\"description\":\"Date when the profile was last updated in ISO 8601 format.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[PATCH]::/api/storage/profile-system/profiles/:profileId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "29ea5b92-587a-4dd0-a00e-7f067573c71b", "name": "Delete client profile", "request": { "name": "Delete client profile", "description": { "content": "Deletes a client profile by `profileId`.\n\r\n\r>❗ This endpoint is not suitable for granting a shopper's [right to erasure](https://help.vtex.com/en/tutorial/data-subject-rights--6imchxTx09icupKMbzHVIM#erasure). For that purpose, open a [support](https://help.vtex.com/en/support) ticket, according to the instructions in the section [Request erasure via support](https://help.vtex.com/en/tutorial/erasing-customer-data--1R9Fn7A06Ifj4R9YD4JTKU#request-erasure-via-support) of the shopper data erasure guide.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" } ], "method": "DELETE", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "text" }, "id": "d9acb9e4-5c79-43f1-ab75-c40944fddc72", "name": "No content", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "DELETE", "body": {} }, "status": "No Content", "code": 204, "header": [], "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "30a53bce-7f73-49e2-ac0c-ba560967fb6a", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[DELETE]::/api/storage/profile-system/profiles/:profileId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response has empty Body \npm.test(\"[DELETE]::/api/storage/profile-system/profiles/:profileId - Response has empty Body\", function () {\n pm.response.to.not.be.withBody;\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "6cf54d0f-c68d-4754-987e-cae3aac72d1b", "name": "Get unmasked profile", "request": { "name": "Get unmasked profile", "description": { "content": "Retrieves unmasked information of a specific client, by its `profileId`.\n\r\n\r> Since your store's profile schema is customizable, the schema and examples presented below may differ from yours. Your integration must be adapted accordingly.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/). \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": false, "description": { "content": "(Required) Reason for requesting unmasked data.", "type": "text/plain" }, "key": "reason", "value": "data-validation" }, { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "dc5f059c-1484-4e38-b63b-e34bb513c9c4", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": false, "description": { "content": "(Required) Reason for requesting unmasked data.", "type": "text/plain" }, "key": "reason", "value": "data-validation" }, { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "[\n {\n \"id\": \"70caf394-8534-447e-a0ca-1803c669c771\",\n \"document\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"birthDate\": \"1925-11-17\",\n \"document\": \"12345678911\",\n \"documentType\": \"CPF\"\n },\n \"meta\": {\n \"version\": \"abc\",\n \"author\": \"e40e0b6d-0605-4fa6-8176-1d69fbaf0818\",\n \"creationDate\": \"2022-01-05T15:41:37.5009471+00:00\",\n \"lastUpdate\": \"2022-01-17T15:41:37.5009471+00:00\"\n }\n }\n]", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "e82664f6-da71-4cbf-a508-126d5bba76c5", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/unmask - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/unmask - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/unmask - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"type\":\"array\",\"description\":\"Array with unmasked profile information.\",\"items\":{\"title\":\"Unmasked profile response\",\"type\":\"object\",\"description\":\"Unmasked profile response.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\"},\"document\":{\"title\":\"Profile\",\"type\":\"object\",\"description\":\"Profile schema.\",\"required\":[\"firstName\",\"lastName\",\"email\",\"document\",\"documentType\"],\"properties\":{\"firstName\":{\"type\":\"string\",\"description\":\"Client's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Client's last name.\"},\"email\":{\"type\":\"string\",\"description\":\"Client's email address.\"},\"birthDate\":{\"type\":\"string\",\"description\":\"Client's birth date in ISO 8601 format.\"},\"document\":{\"type\":\"string\",\"description\":\"Client's document.\"},\"documentType\":{\"type\":\"string\",\"description\":\"Type of document informed in `document`.\"},\"{customField}\":{\"type\":\"string\",\"description\":\"Name of custom field defined in [Create or delete custom fields](https://developers.vtex.com/docs/api-reference/profile-system#put-/api/storage/profile-system/schemas/profileSystem/custom). Can be of any type: string, number, boolean, array or object.\"}}},\"meta\":{\"title\":\"Profile metadata\",\"type\":\"object\",\"description\":\"Profile metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the profile version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the profile.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the profile was created in ISO 8601 format.\"},\"lastUpdate\":{\"type\":\"string\",\"description\":\"Date when the profile was last updated in ISO 8601 format.\"}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/unmask - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "06691a5a-94e7-4a78-b66b-0dab21a65156", "name": "Get profile by version", "request": { "name": "Get profile by version", "description": { "content": "Retrieves the information of a specific version of a client profile.\n\r\n\r> Since your store's profile schema is customizable, the schema and examples presented below may differ from yours. Your integration must be adapted accordingly.\n\r\n\r> For security and privacy reasons, this request returns masked profile data. For unmasked information, see [Get unmasked profile by version](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/versions/-profileVersionId-/unmask).\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/). \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "versions", ":profileVersionId" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "disabled": false, "description": { "content": "(Required) ID of the version of the client's profile as returned by endpoints that create or update profile information in the `version` field.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileVersionId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "73420bf0-0417-41d1-90bb-f0a770f10f89", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "versions", ":profileVersionId" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "[\n {\n \"id\": \"70caf394-8534-447e-a0ca-1803c669c771\",\n \"document\": {\n \"firstName\": \"J***\",\n \"lastName\": \"G****\",\n \"email\": \"j***********\",\n \"birthDate\": \"1925-11-17\",\n \"document\": \"1********\",\n \"documentType\": \"CPF\",\n \"{customField}\": \"{value}\"\n },\n \"meta\": {\n \"version\": \"bb996089-b77c-4bf3-be35-b99b6d91f91c\",\n \"author\": \"e40e0b6d-0605-4fa6-8176-1d69fbaf0818\",\n \"creationDate\": \"2022-01-05T15:41:37.5009471+00:00\",\n \"lastUpdate\": \"2022-01-15T15:41:37.5009471+00:00\"\n }\n }\n]", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "229d3229-992c-436b-9d1a-eeb5e526f668", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/versions/:profileVersionId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/versions/:profileVersionId - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/versions/:profileVersionId - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Masked profile response\",\"type\":\"array\",\"description\":\"Array containing masked profile information.\",\"items\":{\"type\":\"object\",\"description\":\"Masked profile information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\"},\"document\":{\"title\":\"Profile\",\"type\":\"object\",\"description\":\"Profile schema.\",\"required\":[\"firstName\",\"lastName\",\"email\",\"document\",\"documentType\"],\"properties\":{\"firstName\":{\"type\":\"string\",\"description\":\"Client's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Client's last name.\"},\"email\":{\"type\":\"string\",\"description\":\"Client's email address.\"},\"birthDate\":{\"type\":\"string\",\"description\":\"Client's birth date in ISO 8601 format.\"},\"document\":{\"type\":\"string\",\"description\":\"Client's document.\"},\"documentType\":{\"type\":\"string\",\"description\":\"Type of document informed in `document`.\"},\"{customField}\":{\"type\":\"string\",\"description\":\"Name of custom field defined in [Create or delete custom fields](https://developers.vtex.com/docs/api-reference/profile-system#put-/api/storage/profile-system/schemas/profileSystem/custom). Can be of any type: string, number, boolean, array or object.\"}}},\"meta\":{\"title\":\"Profile metadata\",\"type\":\"object\",\"description\":\"Profile metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the profile version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the profile.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the profile was created in ISO 8601 format.\"},\"lastUpdate\":{\"type\":\"string\",\"description\":\"Date when the profile was last updated in ISO 8601 format.\"}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/versions/:profileVersionId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "ff277d7d-aba5-433c-be02-6747f2b281c6", "name": "Get unmasked profile by version", "request": { "name": "Get unmasked profile by version", "description": { "content": "Retrieves unmasked information of a specific version of a client profile.\n\r\n\r> Since your store's profile schema is customizable, the schema and examples presented below may differ from yours. Your integration must be adapted accordingly.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/). \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "versions", ":profileVersionId", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": false, "description": { "content": "(Required) Reason for requesting unmasked data.", "type": "text/plain" }, "key": "reason", "value": "data-validation" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "disabled": false, "description": { "content": "(Required) ID of the version of the client's profile as returned by endpoints that create or update profile information in the `version` field.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileVersionId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "cf2f6380-f4d6-4aa7-8195-e1d5c9c77c99", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "versions", ":profileVersionId", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": false, "description": { "content": "(Required) Reason for requesting unmasked data.", "type": "text/plain" }, "key": "reason", "value": "data-validation" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "[\n {\n \"id\": \"70caf394-8534-447e-a0ca-1803c669c771\",\n \"document\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"birthDate\": \"1925-11-17\",\n \"document\": \"12345678911\",\n \"documentType\": \"CPF\",\n \"{customField}\": \"{value}\"\n },\n \"meta\": {\n \"version\": \"abc\",\n \"author\": \"e40e0b6d-0605-4fa6-8176-1d69fbaf0818\",\n \"creationDate\": \"2022-01-05T15:41:37.5009471+00:00\",\n \"lastUpdate\": \"2022-01-17T15:41:37.5009471+00:00\"\n }\n }\n]", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "f625575e-bc42-4c40-8bda-813ca6b690a7", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/versions/:profileVersionId/unmask - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/versions/:profileVersionId/unmask - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/versions/:profileVersionId/unmask - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"type\":\"array\",\"description\":\"Array with unmasked profile information.\",\"items\":{\"title\":\"Unmasked profile response\",\"type\":\"object\",\"description\":\"Unmasked profile response.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\"},\"document\":{\"title\":\"Profile\",\"type\":\"object\",\"description\":\"Profile schema.\",\"required\":[\"firstName\",\"lastName\",\"email\",\"document\",\"documentType\"],\"properties\":{\"firstName\":{\"type\":\"string\",\"description\":\"Client's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Client's last name.\"},\"email\":{\"type\":\"string\",\"description\":\"Client's email address.\"},\"birthDate\":{\"type\":\"string\",\"description\":\"Client's birth date in ISO 8601 format.\"},\"document\":{\"type\":\"string\",\"description\":\"Client's document.\"},\"documentType\":{\"type\":\"string\",\"description\":\"Type of document informed in `document`.\"},\"{customField}\":{\"type\":\"string\",\"description\":\"Name of custom field defined in [Create or delete custom fields](https://developers.vtex.com/docs/api-reference/profile-system#put-/api/storage/profile-system/schemas/profileSystem/custom). Can be of any type: string, number, boolean, array or object.\"}}},\"meta\":{\"title\":\"Profile metadata\",\"type\":\"object\",\"description\":\"Profile metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the profile version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the profile.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the profile was created in ISO 8601 format.\"},\"lastUpdate\":{\"type\":\"string\",\"description\":\"Date when the profile was last updated in ISO 8601 format.\"}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/versions/:profileVersionId/unmask - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } } ], "event": [] }, { "id": "0db15095-5e4f-4941-9e73-2b4f527d07d3", "name": "Addresses", "description": { "content": "", "type": "text/plain" }, "item": [ { "id": "602d20cf-0a90-4b61-a48c-d8842de5d07b", "name": "Create client address", "request": { "name": "Create client address", "description": { "content": "Creates new address for a given client profile.\n\r\n\r> The `id` field returned by this request is the `addressId` used to retrieve or update information of a specific address later.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/). \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "POST", "body": { "mode": "raw", "raw": "{\n \"postalCode\": \"20200-000\",\n \"countryName\": \"Brasil\",\n \"countryCode\": \"BR\",\n \"administrativeAreaLevel1\": \"RJ\",\n \"locality\": \"Locality\",\n \"localityAreaLevel1\": \"locality area\",\n \"route\": \"51\",\n \"streetNumber\": \"999\",\n \"contactId\": \"1\"\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "cfd4822c-a8e4-496c-ad04-d06558159d7b", "name": "Created", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "POST", "body": { "mode": "raw", "raw": "{\n \"postalCode\": \"20200-000\",\n \"countryName\": \"Brasil\",\n \"countryCode\": \"BR\",\n \"administrativeAreaLevel1\": \"RJ\",\n \"locality\": \"Locality\",\n \"localityAreaLevel1\": \"locality area\",\n \"route\": \"51\",\n \"streetNumber\": \"999\",\n \"contactId\": \"1\"\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "status": "Created", "code": 201, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"id\": \"bf82180e-cf9e-4089-9af6-ae1518555992\",\n \"document\": {\n \"postalCode\": \"20200-000\",\n \"countryName\": \"Brasil\",\n \"countryCode\": \"BR\",\n \"administrativeAreaLevel1\": \"RJ\",\n \"locality\": \"Locality\",\n \"localityAreaLevel1\": \"locality area\",\n \"route\": \"51\",\n \"streetNumber\": \"999\",\n \"profileId\": \"70caf394-8534-447e-a0ca-1803c669c771\"\n },\n \"meta\": {\n \"version\": \"c9c44895-4589-4d0d-a28d-e0e656ca1926\",\n \"author\": \"80aa79a3-aa89-4912-a20e-8ef69af19a6c\",\n \"creationDate\": \"2022-01-18T18:51:34.1293829+00:00\",\n \"lastUpdateDate\": \"2022-01-18T18:51:34.1293829+00:00\"\n }\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "ef143624-0e13-4d07-925b-527b4dafdf42", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/storage/profile-system/profiles/:profileId/addresses - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[POST]::/api/storage/profile-system/profiles/:profileId/addresses - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[POST]::/api/storage/profile-system/profiles/:profileId/addresses - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Unmasked address response\",\"type\":\"object\",\"description\":\"Unmasked address information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of a client's address.\"},\"document\":{\"title\":\"Address\",\"type\":\"object\",\"description\":\"Address information.\",\"required\":[\"postalCode\",\"countryName\",\"administrativeAreaLevel1\",\"locality\",\"localityAreaLevel1\",\"route\",\"streetNumber\",\"profileId\"],\"properties\":{\"postalCode\":{\"type\":\"string\",\"description\":\"Address postal code.\"},\"countryName\":{\"type\":\"string\",\"description\":\"Name of the address country.\"},\"countryCode\":{\"type\":\"string\",\"description\":\"Two letter country code.\"},\"administrativeAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of administrative area, such as the state or province.\"},\"locality\":{\"type\":\"string\",\"description\":\"Name of address locality, such as the city.\"},\"localityAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of the address locality area, such as the neighborhood or district.\"},\"route\":{\"type\":\"string\",\"description\":\"Address route or street name.\"},\"streetNumber\":{\"type\":\"string\",\"description\":\"Address street number.\"},\"profileId\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\"},\"contactId\":{\"type\":\"string\",\"description\":\"Contact unique identifier.\"}}},\"meta\":{\"title\":\"Address metadata\",\"type\":\"object\",\"description\":\"Address metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the address version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the address.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the address was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the address was last updated in ISO 8601 format.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[POST]::/api/storage/profile-system/profiles/:profileId/addresses - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "adaa12c6-3757-40dd-82c9-5f9227953ab3", "name": "Get client addresses", "request": { "name": "Get client addresses", "description": { "content": "Retrieves information of all addresses of a given client, by its `profileId`.\n\r\n\r> For security and privacy reasons, this request returns masked address data. For unmasked information, see [Get unmasked client addresses](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/addresses/unmask).\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/). \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "2d32ce12-aec8-414e-ad00-7049369c2721", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "[\n {\n \"id\": \"bf82180e-cf9e-4089-9af6-ae1518555992\",\n \"document\": {\n \"postalCode\": \"2****-0**\",\n \"countryName\": \"B*****\",\n \"countryCode\": \"BR\",\n \"administrativeAreaLevel1\": \"RJ\",\n \"locality\": \"L*******\",\n \"localityAreaLevel1\": \"locality area\",\n \"route\": \"51\",\n \"streetNumber\": \"999\",\n \"profileId\": \"70caf394-8534-447e-a0ca-1803c669c771\"\n },\n \"meta\": {\n \"version\": \"c9c44895-4589-4d0d-a28d-e0e656ca1926\",\n \"author\": \"80aa79a3-aa89-4912-a20e-8ef69af19a6c\",\n \"creationDate\": \"2022-01-18T18:51:34.1293829+00:00\",\n \"lastUpdateDate\": \"2022-01-18T18:51:34.1293829+00:00\"\n }\n }\n]", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "8b553c8d-c8d4-482a-a205-a9cae9852d82", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"type\":\"array\",\"items\":{\"title\":\"Masked address response\",\"type\":\"object\",\"description\":\"Masked address information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of a client's address.\"},\"document\":{\"title\":\"Address\",\"type\":\"object\",\"description\":\"Address information.\",\"required\":[\"postalCode\",\"countryName\",\"administrativeAreaLevel1\",\"locality\",\"localityAreaLevel1\",\"route\",\"streetNumber\",\"profileId\"],\"properties\":{\"postalCode\":{\"type\":\"string\",\"description\":\"Address postal code.\"},\"countryName\":{\"type\":\"string\",\"description\":\"Name of the address country.\"},\"countryCode\":{\"type\":\"string\",\"description\":\"Two letter country code.\"},\"administrativeAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of administrative area, such as the state or province.\"},\"locality\":{\"type\":\"string\",\"description\":\"Name of address locality, such as the city.\"},\"localityAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of the address locality area, such as the neighborhood or district.\"},\"route\":{\"type\":\"string\",\"description\":\"Address route or street name.\"},\"streetNumber\":{\"type\":\"string\",\"description\":\"Address street number.\"},\"profileId\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\"},\"contactId\":{\"type\":\"string\",\"description\":\"Contact unique identifier.\"}}},\"meta\":{\"title\":\"Address metadata\",\"type\":\"object\",\"description\":\"Address metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the address version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the address.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the address was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the address was last updated in ISO 8601 format.\"}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "884fd2b1-7ee6-4ec7-b436-451aa2cd69f1", "name": "Get unmasked client addresses", "request": { "name": "Get unmasked client addresses", "description": { "content": "Retrieves unmasked information of all addresses of a given client, by its `profileId`.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "95c476f6-267c-42c7-b69a-e4ffbb2a0bd7", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "[\n {\n \"id\": \"bf82180e-cf9e-4089-9af6-ae1518555992\",\n \"document\": {\n \"postalCode\": \"20200-000\",\n \"countryName\": \"Brasil\",\n \"countryCode\": \"BR\",\n \"administrativeAreaLevel1\": \"RJ\",\n \"locality\": \"Locality\",\n \"localityAreaLevel1\": \"locality area\",\n \"route\": \"51\",\n \"streetNumber\": \"999\",\n \"profileId\": \"70caf394-8534-447e-a0ca-1803c669c771\"\n },\n \"meta\": {\n \"version\": \"c9c44895-4589-4d0d-a28d-e0e656ca1926\",\n \"author\": \"80aa79a3-aa89-4912-a20e-8ef69af19a6c\",\n \"creationDate\": \"2022-01-18T18:51:34.1293829+00:00\",\n \"lastUpdateDate\": \"2022-01-18T18:51:34.1293829+00:00\"\n }\n }\n]", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "89061dec-9c98-4498-b719-147a75ddb018", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/unmask - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/unmask - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/unmask - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"type\":\"array\",\"items\":{\"title\":\"Unmasked address response\",\"type\":\"object\",\"description\":\"Unmasked address information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of a client's address.\"},\"document\":{\"title\":\"Address\",\"type\":\"object\",\"description\":\"Address information.\",\"required\":[\"postalCode\",\"countryName\",\"administrativeAreaLevel1\",\"locality\",\"localityAreaLevel1\",\"route\",\"streetNumber\",\"profileId\"],\"properties\":{\"postalCode\":{\"type\":\"string\",\"description\":\"Address postal code.\"},\"countryName\":{\"type\":\"string\",\"description\":\"Name of the address country.\"},\"countryCode\":{\"type\":\"string\",\"description\":\"Two letter country code.\"},\"administrativeAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of administrative area, such as the state or province.\"},\"locality\":{\"type\":\"string\",\"description\":\"Name of address locality, such as the city.\"},\"localityAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of the address locality area, such as the neighborhood or district.\"},\"route\":{\"type\":\"string\",\"description\":\"Address route or street name.\"},\"streetNumber\":{\"type\":\"string\",\"description\":\"Address street number.\"},\"profileId\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\"},\"contactId\":{\"type\":\"string\",\"description\":\"Contact unique identifier.\"}}},\"meta\":{\"title\":\"Address metadata\",\"type\":\"object\",\"description\":\"Address metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the address version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the address.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the address was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the address was last updated in ISO 8601 format.\"}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/unmask - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "2db79454-d5a5-4050-974d-03129f6b984e", "name": "Get address", "request": { "name": "Get address", "description": { "content": "Retrieves information of a specific address of a given client, by its respectives `adderssId` and `profileId`.\n\r\n\r> For security and privacy reasons, this request returns masked address data. For unmasked information, see [Get unmasked address](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/addresses/-addressId-/unmask).\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "disabled": false, "description": { "content": "(Required) ID of a client's specific address as returned in the [Create client address](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles/-profileId-/addresses) endpoint's response, in the `id` field.", "type": "text/plain" }, "type": "any", "value": "bf82180e-cf9e-4089-9af6-ae1518555992", "key": "addressId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "b8bf9135-1080-4d8d-b8e5-ba1570fc7894", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"id\": \"bf82180e-cf9e-4089-9af6-ae1518555992\",\n \"document\": {\n \"postalCode\": \"2****-0**\",\n \"countryName\": \"B*****\",\n \"countryCode\": \"BR\",\n \"administrativeAreaLevel1\": \"RJ\",\n \"locality\": \"L*******\",\n \"localityAreaLevel1\": \"locality area\",\n \"route\": \"51\",\n \"streetNumber\": \"999\",\n \"profileId\": \"70caf394-8534-447e-a0ca-1803c669c771\"\n },\n \"meta\": {\n \"version\": \"c9c44895-4589-4d0d-a28d-e0e656ca1926\",\n \"author\": \"80aa79a3-aa89-4912-a20e-8ef69af19a6c\",\n \"creationDate\": \"2022-01-18T18:51:34.1293829+00:00\",\n \"lastUpdateDate\": \"2022-01-18T18:51:34.1293829+00:00\"\n }\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "c2b28981-f80d-45b7-829a-e600dab65105", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Masked address response\",\"type\":\"object\",\"description\":\"Masked address information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of a client's address.\"},\"document\":{\"title\":\"Address\",\"type\":\"object\",\"description\":\"Address information.\",\"required\":[\"postalCode\",\"countryName\",\"administrativeAreaLevel1\",\"locality\",\"localityAreaLevel1\",\"route\",\"streetNumber\",\"profileId\"],\"properties\":{\"postalCode\":{\"type\":\"string\",\"description\":\"Address postal code.\"},\"countryName\":{\"type\":\"string\",\"description\":\"Name of the address country.\"},\"countryCode\":{\"type\":\"string\",\"description\":\"Two letter country code.\"},\"administrativeAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of administrative area, such as the state or province.\"},\"locality\":{\"type\":\"string\",\"description\":\"Name of address locality, such as the city.\"},\"localityAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of the address locality area, such as the neighborhood or district.\"},\"route\":{\"type\":\"string\",\"description\":\"Address route or street name.\"},\"streetNumber\":{\"type\":\"string\",\"description\":\"Address street number.\"},\"profileId\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\"},\"contactId\":{\"type\":\"string\",\"description\":\"Contact unique identifier.\"}}},\"meta\":{\"title\":\"Address metadata\",\"type\":\"object\",\"description\":\"Address metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the address version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the address.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the address was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the address was last updated in ISO 8601 format.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "63fee58c-b750-48e9-9cd0-f582b5e3d995", "name": "Update client address", "request": { "name": "Update client address", "description": { "content": "Updates one or more fields of an existing address for a given client profile.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "disabled": false, "description": { "content": "(Required) ID of a client's specific address as returned in the [Create client address](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles/-profileId-/addresses) endpoint's response, in the `id` field.", "type": "text/plain" }, "type": "any", "value": "bf82180e-cf9e-4089-9af6-ae1518555992", "key": "addressId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "PATCH", "body": { "mode": "raw", "raw": "{\n \"postalCode\": \"20200-000\",\n \"countryName\": \"Brasil\",\n \"countryCode\": \"BR\",\n \"administrativeAreaLevel1\": \"RJ\",\n \"locality\": \"Locality\",\n \"localityAreaLevel1\": \"locality area\",\n \"route\": \"51\",\n \"streetNumber\": \"999\",\n \"contactId\": \"1\"\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "ca9a9115-5e54-459c-b279-3aabcb0d34a6", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "PATCH", "body": { "mode": "raw", "raw": "{\n \"postalCode\": \"20200-000\",\n \"countryName\": \"Brasil\",\n \"countryCode\": \"BR\",\n \"administrativeAreaLevel1\": \"RJ\",\n \"locality\": \"Locality\",\n \"localityAreaLevel1\": \"locality area\",\n \"route\": \"51\",\n \"streetNumber\": \"999\",\n \"contactId\": \"1\"\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"id\": \"bf82180e-cf9e-4089-9af6-ae1518555992\",\n \"document\": {\n \"postalCode\": \"20200-000\",\n \"countryName\": \"Brasil\",\n \"countryCode\": \"BR\",\n \"administrativeAreaLevel1\": \"RJ\",\n \"locality\": \"Locality\",\n \"localityAreaLevel1\": \"locality area\",\n \"route\": \"34\",\n \"streetNumber\": \"333\",\n \"profileId\": \"70caf394-8534-447e-a0ca-1803c669c771\"\n },\n \"meta\": {\n \"version\": \"86dfae79-1d23-43f2-a643-2fc8f1839461\",\n \"author\": \"80aa79a3-aa89-4912-a20e-8ef69af19a6c\",\n \"creationDate\": \"2022-01-18T18:51:34.1293829+00:00\",\n \"lastUpdateDate\": \"2022-01-18T21:08:02.9364099+00:00\"\n }\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "ca1f37f2-7777-4403-b597-bf9ff1bc79cd", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PATCH]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[PATCH]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[PATCH]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Unmasked address response\",\"type\":\"object\",\"description\":\"Unmasked address information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of a client's address.\"},\"document\":{\"title\":\"Address\",\"type\":\"object\",\"description\":\"Address information.\",\"required\":[\"postalCode\",\"countryName\",\"administrativeAreaLevel1\",\"locality\",\"localityAreaLevel1\",\"route\",\"streetNumber\",\"profileId\"],\"properties\":{\"postalCode\":{\"type\":\"string\",\"description\":\"Address postal code.\"},\"countryName\":{\"type\":\"string\",\"description\":\"Name of the address country.\"},\"countryCode\":{\"type\":\"string\",\"description\":\"Two letter country code.\"},\"administrativeAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of administrative area, such as the state or province.\"},\"locality\":{\"type\":\"string\",\"description\":\"Name of address locality, such as the city.\"},\"localityAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of the address locality area, such as the neighborhood or district.\"},\"route\":{\"type\":\"string\",\"description\":\"Address route or street name.\"},\"streetNumber\":{\"type\":\"string\",\"description\":\"Address street number.\"},\"profileId\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\"},\"contactId\":{\"type\":\"string\",\"description\":\"Contact unique identifier.\"}}},\"meta\":{\"title\":\"Address metadata\",\"type\":\"object\",\"description\":\"Address metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the address version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the address.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the address was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the address was last updated in ISO 8601 format.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[PATCH]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "d33a52b7-268d-49bb-9f81-3e3e4531672e", "name": "Delete address", "request": { "name": "Delete address", "description": { "content": "Deletes a client's address by `profileId` and `addressId`.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "disabled": false, "description": { "content": "(Required) ID of a client's specific address as returned in the [Create client address](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles/-profileId-/addresses) endpoint's response, in the `id` field.", "type": "text/plain" }, "type": "any", "value": "bf82180e-cf9e-4089-9af6-ae1518555992", "key": "addressId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" } ], "method": "DELETE", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "text" }, "id": "5635f530-9fda-4002-977e-8c3dbaae06e7", "name": "No content", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "DELETE", "body": {} }, "status": "No Content", "code": 204, "header": [], "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "48bc14ca-81fc-4f33-bcdd-4aa9135804f8", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[DELETE]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response has empty Body \npm.test(\"[DELETE]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId - Response has empty Body\", function () {\n pm.response.to.not.be.withBody;\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "c12a753f-871d-405d-928a-89b59c54c66a", "name": "Get unmasked address", "request": { "name": "Get unmasked address", "description": { "content": "Retrieves unmasked information of a specific address of a given client, by its respectives `adderssId` and `profileId`.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": false, "description": { "content": "(Required) Reason for requesting unmasked data.", "type": "text/plain" }, "key": "reason", "value": "data-validation" }, { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "disabled": false, "description": { "content": "(Required) ID of a client's specific address as returned in the [Create client address](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles/-profileId-/addresses) endpoint's response, in the `id` field.", "type": "text/plain" }, "type": "any", "value": "bf82180e-cf9e-4089-9af6-ae1518555992", "key": "addressId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "5c373be3-4e32-4d54-8755-0c2f4fcb78fa", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": false, "description": { "content": "(Required) Reason for requesting unmasked data.", "type": "text/plain" }, "key": "reason", "value": "data-validation" }, { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"id\": \"bf82180e-cf9e-4089-9af6-ae1518555992\",\n \"document\": {\n \"postalCode\": \"20200-000\",\n \"countryName\": \"Brasil\",\n \"countryCode\": \"BR\",\n \"administrativeAreaLevel1\": \"RJ\",\n \"locality\": \"Locality\",\n \"localityAreaLevel1\": \"locality area\",\n \"route\": \"51\",\n \"streetNumber\": \"999\",\n \"profileId\": \"70caf394-8534-447e-a0ca-1803c669c771\"\n },\n \"meta\": {\n \"version\": \"c9c44895-4589-4d0d-a28d-e0e656ca1926\",\n \"author\": \"80aa79a3-aa89-4912-a20e-8ef69af19a6c\",\n \"creationDate\": \"2022-01-18T18:51:34.1293829+00:00\",\n \"lastUpdateDate\": \"2022-01-18T18:51:34.1293829+00:00\"\n }\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "7157ad9f-4975-4c54-a650-fb926f600b72", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId/unmask - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId/unmask - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId/unmask - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Unmasked address response\",\"type\":\"object\",\"description\":\"Unmasked address information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of a client's address.\"},\"document\":{\"title\":\"Address\",\"type\":\"object\",\"description\":\"Address information.\",\"required\":[\"postalCode\",\"countryName\",\"administrativeAreaLevel1\",\"locality\",\"localityAreaLevel1\",\"route\",\"streetNumber\",\"profileId\"],\"properties\":{\"postalCode\":{\"type\":\"string\",\"description\":\"Address postal code.\"},\"countryName\":{\"type\":\"string\",\"description\":\"Name of the address country.\"},\"countryCode\":{\"type\":\"string\",\"description\":\"Two letter country code.\"},\"administrativeAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of administrative area, such as the state or province.\"},\"locality\":{\"type\":\"string\",\"description\":\"Name of address locality, such as the city.\"},\"localityAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of the address locality area, such as the neighborhood or district.\"},\"route\":{\"type\":\"string\",\"description\":\"Address route or street name.\"},\"streetNumber\":{\"type\":\"string\",\"description\":\"Address street number.\"},\"profileId\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\"},\"contactId\":{\"type\":\"string\",\"description\":\"Contact unique identifier.\"}}},\"meta\":{\"title\":\"Address metadata\",\"type\":\"object\",\"description\":\"Address metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the address version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the address.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the address was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the address was last updated in ISO 8601 format.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId/unmask - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "cf044316-069c-450f-8666-e07716d3a63d", "name": "Get address by version", "request": { "name": "Get address by version", "description": { "content": "Retrieves information of a specific version address of a given client.\n\r\n\r> For security and privacy reasons, this request returns masked address data by version. For unmasked information, see [Get unmasked address by version](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/addresses/-addressId-/versions/-addressVersionId-/unmask).\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId", "versions", ":addressVersionId" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": false, "description": { "content": "(Required) Reason for requesting unmasked data.", "type": "text/plain" }, "key": "reason", "value": "data-validation" }, { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "disabled": false, "description": { "content": "(Required) ID of a client's specific address as returned in the [Create client address](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles/-profileId-/addresses) endpoint's response, in the `id` field.", "type": "text/plain" }, "type": "any", "value": "bf82180e-cf9e-4089-9af6-ae1518555992", "key": "addressId" }, { "disabled": false, "description": { "content": "(Required) ID of the version of a given client's address as returned by endpoints that create or update address information in the `version` field.", "type": "text/plain" }, "type": "any", "value": "86dfae79-1d23-43f2-a643-2fc8f1839461", "key": "addressVersionId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "a3a7b589-54b6-4fdd-9146-cd53393ca633", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId", "versions", ":addressVersionId" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": false, "description": { "content": "(Required) Reason for requesting unmasked data.", "type": "text/plain" }, "key": "reason", "value": "data-validation" }, { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"id\": \"bf82180e-cf9e-4089-9af6-ae1518555992\",\n \"document\": {\n \"postalCode\": \"2****-0**\",\n \"countryName\": \"B*****\",\n \"countryCode\": \"BR\",\n \"administrativeAreaLevel1\": \"RJ\",\n \"locality\": \"L*******\",\n \"localityAreaLevel1\": \"locality area\",\n \"route\": \"51\",\n \"streetNumber\": \"999\",\n \"profileId\": \"70caf394-8534-447e-a0ca-1803c669c771\"\n },\n \"meta\": {\n \"version\": \"c9c44895-4589-4d0d-a28d-e0e656ca1926\",\n \"author\": \"80aa79a3-aa89-4912-a20e-8ef69af19a6c\",\n \"creationDate\": \"2022-01-18T18:51:34.1293829+00:00\",\n \"lastUpdateDate\": \"2022-01-18T18:51:34.1293829+00:00\"\n }\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "658a52ed-4756-4a7a-9a6d-9c148da1efbf", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId/versions/:addressVersionId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId/versions/:addressVersionId - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId/versions/:addressVersionId - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Masked address response\",\"type\":\"object\",\"description\":\"Masked address information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of a client's address.\"},\"document\":{\"title\":\"Address\",\"type\":\"object\",\"description\":\"Address information.\",\"required\":[\"postalCode\",\"countryName\",\"administrativeAreaLevel1\",\"locality\",\"localityAreaLevel1\",\"route\",\"streetNumber\",\"profileId\"],\"properties\":{\"postalCode\":{\"type\":\"string\",\"description\":\"Address postal code.\"},\"countryName\":{\"type\":\"string\",\"description\":\"Name of the address country.\"},\"countryCode\":{\"type\":\"string\",\"description\":\"Two letter country code.\"},\"administrativeAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of administrative area, such as the state or province.\"},\"locality\":{\"type\":\"string\",\"description\":\"Name of address locality, such as the city.\"},\"localityAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of the address locality area, such as the neighborhood or district.\"},\"route\":{\"type\":\"string\",\"description\":\"Address route or street name.\"},\"streetNumber\":{\"type\":\"string\",\"description\":\"Address street number.\"},\"profileId\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\"},\"contactId\":{\"type\":\"string\",\"description\":\"Contact unique identifier.\"}}},\"meta\":{\"title\":\"Address metadata\",\"type\":\"object\",\"description\":\"Address metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the address version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the address.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the address was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the address was last updated in ISO 8601 format.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId/versions/:addressVersionId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "df44b9e1-2488-46f8-b340-0fe46c49fb85", "name": "Get unmasked address by version", "request": { "name": "Get unmasked address by version", "description": { "content": "Retrieves unmasked information of a specific address version of a given client.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId", "versions", ":addressVersionId", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": false, "description": { "content": "(Required) Reason for requesting unmasked data.", "type": "text/plain" }, "key": "reason", "value": "data-validation" }, { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "disabled": false, "description": { "content": "(Required) ID of a client's specific address as returned in the [Create client address](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles/-profileId-/addresses) endpoint's response, in the `id` field.", "type": "text/plain" }, "type": "any", "value": "bf82180e-cf9e-4089-9af6-ae1518555992", "key": "addressId" }, { "disabled": false, "description": { "content": "(Required) ID of the version of a given client's address as returned by endpoints that create or update address information in the `version` field.", "type": "text/plain" }, "type": "any", "value": "86dfae79-1d23-43f2-a643-2fc8f1839461", "key": "addressVersionId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "2abcee34-8670-461d-98e7-3e71f79fea2b", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId", "versions", ":addressVersionId", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": false, "description": { "content": "(Required) Reason for requesting unmasked data.", "type": "text/plain" }, "key": "reason", "value": "data-validation" }, { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"id\": \"bf82180e-cf9e-4089-9af6-ae1518555992\",\n \"document\": {\n \"postalCode\": \"20200-000\",\n \"countryName\": \"Brasil\",\n \"countryCode\": \"BR\",\n \"administrativeAreaLevel1\": \"RJ\",\n \"locality\": \"Locality\",\n \"localityAreaLevel1\": \"locality area\",\n \"route\": \"51\",\n \"streetNumber\": \"999\",\n \"profileId\": \"70caf394-8534-447e-a0ca-1803c669c771\"\n },\n \"meta\": {\n \"version\": \"c9c44895-4589-4d0d-a28d-e0e656ca1926\",\n \"author\": \"80aa79a3-aa89-4912-a20e-8ef69af19a6c\",\n \"creationDate\": \"2022-01-18T18:51:34.1293829+00:00\",\n \"lastUpdateDate\": \"2022-01-18T18:51:34.1293829+00:00\"\n }\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "bb7898cd-ad05-4b31-8860-0f7c57019903", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId/versions/:addressVersionId/unmask - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId/versions/:addressVersionId/unmask - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId/versions/:addressVersionId/unmask - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Unmasked address response\",\"type\":\"object\",\"description\":\"Unmasked address information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of a client's address.\"},\"document\":{\"title\":\"Address\",\"type\":\"object\",\"description\":\"Address information.\",\"required\":[\"postalCode\",\"countryName\",\"administrativeAreaLevel1\",\"locality\",\"localityAreaLevel1\",\"route\",\"streetNumber\",\"profileId\"],\"properties\":{\"postalCode\":{\"type\":\"string\",\"description\":\"Address postal code.\"},\"countryName\":{\"type\":\"string\",\"description\":\"Name of the address country.\"},\"countryCode\":{\"type\":\"string\",\"description\":\"Two letter country code.\"},\"administrativeAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of administrative area, such as the state or province.\"},\"locality\":{\"type\":\"string\",\"description\":\"Name of address locality, such as the city.\"},\"localityAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of the address locality area, such as the neighborhood or district.\"},\"route\":{\"type\":\"string\",\"description\":\"Address route or street name.\"},\"streetNumber\":{\"type\":\"string\",\"description\":\"Address street number.\"},\"profileId\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\"},\"contactId\":{\"type\":\"string\",\"description\":\"Contact unique identifier.\"}}},\"meta\":{\"title\":\"Address metadata\",\"type\":\"object\",\"description\":\"Address metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the address version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the address.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the address was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the address was last updated in ISO 8601 format.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/addresses/:addressId/versions/:addressVersionId/unmask - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } } ], "event": [] }, { "id": "fe169008-7035-472c-b98a-3c9566ce0111", "name": "Prospects", "description": { "content": "", "type": "text/plain" }, "item": [ { "id": "9b3afd14-d838-4e39-abb3-9ec38e69b6ab", "name": "Create prospect", "request": { "name": "Create prospect", "description": { "content": "Creates new prospect.\n\r\n\r> The `id` field returned by this request is the `prospectId` used to retrieve information on a specific prospect later.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "prospects" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "POST", "body": { "mode": "raw", "raw": "{\n \"availableAddresses\": [\n {\n \"disposable\": true,\n \"userId\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"addressName\": \"Home\",\n \"addressType\": \"residential\",\n \"postalCode\": \"32137\",\n \"city\": \"Palm Coast\",\n \"country\": \"USA\",\n \"street\": \"Fifth St.\",\n \"number\": \"9538\",\n \"complement\": \"Apartment 2B\",\n \"geoCoordinate\": [\n \"49.334934\",\n \"49.334934\"\n ]\n },\n {\n \"disposable\": true,\n \"userId\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"addressName\": \"Home\",\n \"addressType\": \"residential\",\n \"postalCode\": \"32137\",\n \"city\": \"Palm Coast\",\n \"country\": \"USA\",\n \"street\": \"Fifth St.\",\n \"number\": \"9538\",\n \"complement\": \"Apartment 2B\",\n \"geoCoordinate\": [\n \"49.334934\",\n \"49.334934\"\n ]\n }\n ],\n \"paymentData\": {\n \"availableAccounts\": [\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443334\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\",\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n },\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443334\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\",\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n }\n ],\n \"availableTokens\": [\n \"12345\",\n \"12345\"\n ],\n \"transactions\": [\n {\n \"isActive\": true,\n \"transactionId\": \"418213DE29634837A63DD693A937A696\",\n \"merchantName\": \"luxstore\",\n \"payments\": [\n {\n \"id\": \"culpa in nisi sit veniam\",\n \"paymentSystem\": \"dolore eu minim cupida\",\n \"paymentSystemName\": \"sed nulla laborum dolore\",\n \"value\": 19794399,\n \"installments\": -67705574,\n \"referenceValue\": -63837365,\n \"cardHolder\": \"do ut est Ut\",\n \"cardNumber\": \"aliqua\",\n \"firstDigits\": \"adipisicing quis dolore fugiat\",\n \"lastDigits\": \"ullamco tempor in ea non\",\n \"cvv2\": \"exercitation ut\",\n \"expireMonth\": \"consequat cillum\",\n \"expireYear\": \"ut laborum dolore irure\",\n \"url\": \"sint enim sunt ut\",\n \"giftCardId\": \"nulla in\",\n \"giftCardName\": \"sint quis sed\",\n \"giftCardCaption\": \"ut laboris pari\",\n \"redemptionCode\": \"sunt exercitation nostrud\",\n \"group\": \"fugiat ut cillum in\",\n \"tid\": \"officia esse proident\",\n \"dueDate\": \"reprehenderit officia dolor\",\n \"connectorResponses\": {}\n },\n {\n \"id\": \"deserunt\",\n \"paymentSystem\": \"aute ex ullamco nisi\",\n \"paymentSystemName\": \"cupidatat commodo incididunt\",\n \"value\": -44330911,\n \"installments\": -3274686,\n \"referenceValue\": -20720008,\n \"cardHolder\": \"sed in\",\n \"cardNumber\": \"deserunt mollit eni\",\n \"firstDigits\": \"sit ad\",\n \"lastDigits\": \"tempor occaecat aliquip\",\n \"cvv2\": \"velit anim\",\n \"expireMonth\": \"magna\",\n \"expireYear\": \"veniam id Lorem\",\n \"url\": \"cillum in eu laboris eiusmod\",\n \"giftCardId\": \"Duis consectetur dolor non proident\",\n \"giftCardName\": \"velit ex pariatur ad mollit\",\n \"giftCardCaption\": \"magna cupidatat\",\n \"redemptionCode\": \"laborum eiusmod ut in\",\n \"group\": \"ut nisi\",\n \"tid\": \"fugiat et Ut\",\n \"dueDate\": \"sit id\",\n \"connectorResponses\": {}\n }\n ]\n },\n {\n \"isActive\": true,\n \"transactionId\": \"418213DE29634837A63DD693A937A696\",\n \"merchantName\": \"luxstore\",\n \"payments\": [\n {\n \"id\": \"quis\",\n \"paymentSystem\": \"ea dolore\",\n \"paymentSystemName\": \"nisi ut est\",\n \"value\": -75722387,\n \"installments\": -97421684,\n \"referenceValue\": -29672698,\n \"cardHolder\": \"ut tempor\",\n \"cardNumber\": \"minim amet\",\n \"firstDigits\": \"sed cupidatat dolor\",\n \"lastDigits\": \"mollit minim e\",\n \"cvv2\": \"quis labore\",\n \"expireMonth\": \"sit\",\n \"expireYear\": \"tempor proident velit reprehenderit\",\n \"url\": \"in in do\",\n \"giftCardId\": \"Ut est reprehenderit aliquip\",\n \"giftCardName\": \"tempor consequat\",\n \"giftCardCaption\": \"sin\",\n \"redemptionCode\": \"elit mollit tempor\",\n \"group\": \"magna\",\n \"tid\": \"voluptate i\",\n \"dueDate\": \"Ut occaecat ea eiusmod\",\n \"connectorResponses\": {}\n },\n {\n \"id\": \"esse\",\n \"paymentSystem\": \"mollit laborum ut cillum sit\",\n \"paymentSystemName\": \"consequat dolore magna\",\n \"value\": -87167928,\n \"installments\": -75150717,\n \"referenceValue\": -94213577,\n \"cardHolder\": \"do minim\",\n \"cardNumber\": \"exercitation reprehenderit pariatur elit aliquip\",\n \"firstDigits\": \"aliquip magna incididunt\",\n \"lastDigits\": \"sed elit eu\",\n \"cvv2\": \"sit\",\n \"expireMonth\": \"Duis\",\n \"expireYear\": \"id Ut anim Lorem\",\n \"url\": \"deserunt laboris\",\n \"giftCardId\": \"fugiat tempor incididunt laborum\",\n \"giftCardName\": \"enim adipisicing cillum ipsum\",\n \"giftCardCaption\": \"occaecat incididunt dolore\",\n \"redemptionCode\": \"proident ea\",\n \"group\": \"pariatur aliquip consectetur\",\n \"tid\": \"Ut officia reprehenderit sed eiusmod\",\n \"dueDate\": \"ex culpa aliquip\",\n \"connectorResponses\": {}\n }\n ]\n }\n ],\n \"giftCards\": [\n \"12345\",\n \"12345\"\n ],\n \"giftCardMessages\": [\n \"Message.\",\n \"Message.\"\n ],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"contacts\": [\n {\n \"contactId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\",\n \"document\": \"12345678910\"\n },\n {\n \"contactId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\",\n \"document\": \"12345678910\"\n }\n ],\n \"invoiceSubject\": {\n \"invoiceSubjectId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\"\n },\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"document\": \"5397eefef23741d4976ebdf772cc42e0\",\n \"cellPhone\": \"12345678910\",\n \"isPJ\": false,\n \"customerCode\": \"5397eefe-f237-41d4-976e-bdf772cc42e0\"\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "65f7e5fb-803b-480b-ad57-e4be4238e998", "name": "Created", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "prospects" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "POST", "body": { "mode": "raw", "raw": "{\n \"availableAddresses\": [\n {\n \"disposable\": true,\n \"userId\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"addressName\": \"Home\",\n \"addressType\": \"residential\",\n \"postalCode\": \"32137\",\n \"city\": \"Palm Coast\",\n \"country\": \"USA\",\n \"street\": \"Fifth St.\",\n \"number\": \"9538\",\n \"complement\": \"Apartment 2B\",\n \"geoCoordinate\": [\n \"49.334934\",\n \"49.334934\"\n ]\n },\n {\n \"disposable\": true,\n \"userId\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"addressName\": \"Home\",\n \"addressType\": \"residential\",\n \"postalCode\": \"32137\",\n \"city\": \"Palm Coast\",\n \"country\": \"USA\",\n \"street\": \"Fifth St.\",\n \"number\": \"9538\",\n \"complement\": \"Apartment 2B\",\n \"geoCoordinate\": [\n \"49.334934\",\n \"49.334934\"\n ]\n }\n ],\n \"paymentData\": {\n \"availableAccounts\": [\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443334\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\",\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n },\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443334\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\",\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n }\n ],\n \"availableTokens\": [\n \"12345\",\n \"12345\"\n ],\n \"transactions\": [\n {\n \"isActive\": true,\n \"transactionId\": \"418213DE29634837A63DD693A937A696\",\n \"merchantName\": \"luxstore\",\n \"payments\": [\n {\n \"id\": \"culpa in nisi sit veniam\",\n \"paymentSystem\": \"dolore eu minim cupida\",\n \"paymentSystemName\": \"sed nulla laborum dolore\",\n \"value\": 19794399,\n \"installments\": -67705574,\n \"referenceValue\": -63837365,\n \"cardHolder\": \"do ut est Ut\",\n \"cardNumber\": \"aliqua\",\n \"firstDigits\": \"adipisicing quis dolore fugiat\",\n \"lastDigits\": \"ullamco tempor in ea non\",\n \"cvv2\": \"exercitation ut\",\n \"expireMonth\": \"consequat cillum\",\n \"expireYear\": \"ut laborum dolore irure\",\n \"url\": \"sint enim sunt ut\",\n \"giftCardId\": \"nulla in\",\n \"giftCardName\": \"sint quis sed\",\n \"giftCardCaption\": \"ut laboris pari\",\n \"redemptionCode\": \"sunt exercitation nostrud\",\n \"group\": \"fugiat ut cillum in\",\n \"tid\": \"officia esse proident\",\n \"dueDate\": \"reprehenderit officia dolor\",\n \"connectorResponses\": {}\n },\n {\n \"id\": \"deserunt\",\n \"paymentSystem\": \"aute ex ullamco nisi\",\n \"paymentSystemName\": \"cupidatat commodo incididunt\",\n \"value\": -44330911,\n \"installments\": -3274686,\n \"referenceValue\": -20720008,\n \"cardHolder\": \"sed in\",\n \"cardNumber\": \"deserunt mollit eni\",\n \"firstDigits\": \"sit ad\",\n \"lastDigits\": \"tempor occaecat aliquip\",\n \"cvv2\": \"velit anim\",\n \"expireMonth\": \"magna\",\n \"expireYear\": \"veniam id Lorem\",\n \"url\": \"cillum in eu laboris eiusmod\",\n \"giftCardId\": \"Duis consectetur dolor non proident\",\n \"giftCardName\": \"velit ex pariatur ad mollit\",\n \"giftCardCaption\": \"magna cupidatat\",\n \"redemptionCode\": \"laborum eiusmod ut in\",\n \"group\": \"ut nisi\",\n \"tid\": \"fugiat et Ut\",\n \"dueDate\": \"sit id\",\n \"connectorResponses\": {}\n }\n ]\n },\n {\n \"isActive\": true,\n \"transactionId\": \"418213DE29634837A63DD693A937A696\",\n \"merchantName\": \"luxstore\",\n \"payments\": [\n {\n \"id\": \"quis\",\n \"paymentSystem\": \"ea dolore\",\n \"paymentSystemName\": \"nisi ut est\",\n \"value\": -75722387,\n \"installments\": -97421684,\n \"referenceValue\": -29672698,\n \"cardHolder\": \"ut tempor\",\n \"cardNumber\": \"minim amet\",\n \"firstDigits\": \"sed cupidatat dolor\",\n \"lastDigits\": \"mollit minim e\",\n \"cvv2\": \"quis labore\",\n \"expireMonth\": \"sit\",\n \"expireYear\": \"tempor proident velit reprehenderit\",\n \"url\": \"in in do\",\n \"giftCardId\": \"Ut est reprehenderit aliquip\",\n \"giftCardName\": \"tempor consequat\",\n \"giftCardCaption\": \"sin\",\n \"redemptionCode\": \"elit mollit tempor\",\n \"group\": \"magna\",\n \"tid\": \"voluptate i\",\n \"dueDate\": \"Ut occaecat ea eiusmod\",\n \"connectorResponses\": {}\n },\n {\n \"id\": \"esse\",\n \"paymentSystem\": \"mollit laborum ut cillum sit\",\n \"paymentSystemName\": \"consequat dolore magna\",\n \"value\": -87167928,\n \"installments\": -75150717,\n \"referenceValue\": -94213577,\n \"cardHolder\": \"do minim\",\n \"cardNumber\": \"exercitation reprehenderit pariatur elit aliquip\",\n \"firstDigits\": \"aliquip magna incididunt\",\n \"lastDigits\": \"sed elit eu\",\n \"cvv2\": \"sit\",\n \"expireMonth\": \"Duis\",\n \"expireYear\": \"id Ut anim Lorem\",\n \"url\": \"deserunt laboris\",\n \"giftCardId\": \"fugiat tempor incididunt laborum\",\n \"giftCardName\": \"enim adipisicing cillum ipsum\",\n \"giftCardCaption\": \"occaecat incididunt dolore\",\n \"redemptionCode\": \"proident ea\",\n \"group\": \"pariatur aliquip consectetur\",\n \"tid\": \"Ut officia reprehenderit sed eiusmod\",\n \"dueDate\": \"ex culpa aliquip\",\n \"connectorResponses\": {}\n }\n ]\n }\n ],\n \"giftCards\": [\n \"12345\",\n \"12345\"\n ],\n \"giftCardMessages\": [\n \"Message.\",\n \"Message.\"\n ],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"contacts\": [\n {\n \"contactId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\",\n \"document\": \"12345678910\"\n },\n {\n \"contactId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\",\n \"document\": \"12345678910\"\n }\n ],\n \"invoiceSubject\": {\n \"invoiceSubjectId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\"\n },\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"document\": \"5397eefef23741d4976ebdf772cc42e0\",\n \"cellPhone\": \"12345678910\",\n \"isPJ\": false,\n \"customerCode\": \"5397eefe-f237-41d4-976e-bdf772cc42e0\"\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "status": "Created", "code": 201, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"id\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"document\": {\n \"availableAddresses\": [\n {\n \"disposable\": true,\n \"userId\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"addressName\": \"customerAddressId\",\n \"addressType\": \"residential\",\n \"postalCode\": \"32137\",\n \"city\": \"Palm Coast\",\n \"country\": \"USA\",\n \"street\": \"Fifth St.\",\n \"number\": \"9538\",\n \"complement\": \"\",\n \"receiverName\": \"Jane Doe\",\n \"geoCoordinate\": []\n }\n ],\n \"paymentData\": {\n \"availableAccounts\": [],\n \"availableTokens\": [],\n \"transactions\": null,\n \"giftCards\": [],\n \"giftCardMessages\": [],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"contacts\": [\n {\n \"contactId\": \"0\",\n \"email\": \"\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"\",\n \"document\": \"\",\n \"documentType\": \"\"\n }\n ],\n \"invoiceSubject\": {\n \"invoiceSubjectId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\"\n },\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"document\": \"5397eefef23741d4976ebdf772cc42e0\",\n \"cellPhone\": \"12345678910\",\n \"isPJ\": false,\n \"customerCode\": \"5397eefe-f237-41d4-976e-bdf772cc42e0\"\n },\n \"meta\": {\n \"version\": \"af9117e9-4169-46ee-ab4b-d4b17b881488\",\n \"author\": \"d6d8269f-e7cc-4e4b-8b89-3b46a1407937\",\n \"creationDate\": \"2023-10-25T13:59:52.7633627+00:00\",\n \"lastUpdateDate\": \"2023-10-25T14:02:45.7277154+00:00\",\n \"expirationDate\": null\n }\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "4f9be294-8f62-4171-a3ca-e8697a5eafbb", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/storage/profile-system/prospects - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[POST]::/api/storage/profile-system/prospects - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[POST]::/api/storage/profile-system/prospects - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Unmasked prospect information.\",\"type\":\"object\",\"description\":\"Unmasked prospect information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the prospect.\"},\"document\":{\"title\":\"Prospect information.\",\"type\":\"object\",\"description\":\"Prospect information.\",\"properties\":{\"availableAddresses\":{\"type\":\"array\",\"description\":\"Available addresses.\",\"items\":{\"type\":\"object\",\"description\":\"Available address information.\",\"properties\":{\"disposable\":{\"type\":\"boolean\",\"description\":\"Defines whether the address is deleted after use (`true`) or not (`false`).\"},\"userId\":{\"type\":\"string\",\"description\":\"User unique identifier.\"},\"addressName\":{\"type\":\"string\",\"description\":\"Address name.\"},\"addressType\":{\"type\":\"string\",\"description\":\"Address type.\"},\"postalCode\":{\"type\":\"string\",\"description\":\"Postal code.\"},\"city\":{\"type\":\"string\",\"description\":\"City.\"},\"country\":{\"type\":\"string\",\"description\":\"Country code.\"},\"street\":{\"type\":\"string\",\"description\":\"Street name.\"},\"number\":{\"type\":\"string\",\"description\":\"Street number.\"},\"complement\":{\"type\":\"string\",\"description\":\"Complement information.\"},\"geoCoordinate\":{\"type\":\"array\",\"description\":\"Array with two strings that represent geocoordinates: first latitude, then longitude.\",\"items\":{\"type\":\"string\",\"description\":\"Geocoordinate.\"}}}}},\"paymentData\":{\"title\":\"paymentData\",\"type\":\"object\",\"description\":\"Payment data.\",\"properties\":{\"availableAccounts\":{\"type\":\"array\",\"description\":\"List of available payment accounts.\",\"items\":{\"type\":\"object\",\"description\":\"Information about an available payment account.\",\"properties\":{\"accountId\":{\"type\":\"string\",\"description\":\"Payment account ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\"},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\"}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\"}},\"transactions\":{\"type\":[\"array\",\"null\"],\"description\":\"List of transactions.\",\"items\":{\"type\":\"object\",\"description\":\"Transaction information.\",\"required\":[\"isActive\",\"transactionId\",\"merchantName\",\"payments\"],\"properties\":{\"isActive\":{\"type\":\"boolean\",\"description\":\"Indicates whether the transaction is active (`true`) or not (`false`).\"},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\"},\"payments\":{\"type\":\"array\",\"description\":\"List of payments information.\",\"items\":{\"title\":\"Payment\",\"required\":[\"id\",\"paymentSystem\",\"paymentSystemName\",\"value\",\"installments\",\"referenceValue\",\"cardHolder\",\"cardNumber\",\"firstDigits\",\"lastDigits\",\"cvv2\",\"expireMonth\",\"expireYear\",\"url\",\"giftCardId\",\"giftCardName\",\"giftCardCaption\",\"redemptionCode\",\"group\",\"tid\",\"dueDate\",\"connectorResponses\"],\"type\":\"object\",\"description\":\"Payment information.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Payment ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"value\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment value in cents.\"},\"installments\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment installments.\"},\"referenceValue\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Reference value for interest calculation in cents.\"},\"cardHolder\":{\"type\":[\"string\",\"null\"],\"description\":\"Card holder.\"},\"cardNumber\":{\"type\":[\"string\",\"null\"],\"description\":\"Card number.\"},\"firstDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card first digits.\"},\"lastDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card last digits.\"},\"cvv2\":{\"type\":[\"string\",\"null\"],\"description\":\"Card verification code.\"},\"expireMonth\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration month.\"},\"expireYear\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration year.\"},\"url\":{\"type\":\"string\",\"description\":\"Payment URL.\"},\"giftCardId\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card ID.\"},\"giftCardName\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card name.\"},\"giftCardCaption\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card caption.\"},\"redemptionCode\":{\"type\":[\"string\",\"null\"],\"description\":\"Redemption code.\"},\"group\":{\"type\":\"string\",\"description\":\"Payment group.\"},\"tid\":{\"type\":[\"string\",\"null\"],\"description\":\"Payment TID.\"},\"dueDate\":{\"type\":\"string\",\"description\":\"Due date.\"},\"connectorResponses\":{\"type\":\"object\",\"description\":\"Connector responses.\"}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\"},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\"},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\"}}},\"contacts\":{\"type\":\"array\",\"description\":\"List of contacts.\",\"items\":{\"type\":\"object\",\"description\":\"Contact information.\",\"properties\":{\"contactId\":{\"type\":\"string\",\"description\":\"Contact's unique identifier.\"},\"email\":{\"type\":\"string\",\"description\":\"Contact's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Contact's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Contact's last name.\"},\"phone\":{\"type\":\"string\",\"description\":\"Contact's phone number.\"},\"document\":{\"type\":\"string\",\"description\":\"Contact's document.\"}}}},\"invoiceSubject\":{\"type\":\"object\",\"description\":\"Information about the invoice subject.\",\"properties\":{\"invoiceSubjectId\":{\"type\":\"string\",\"description\":\"Invoice subject ID.\"},\"email\":{\"type\":\"string\",\"description\":\"Invoice subject's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Invoice subject's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Invoice subject's last name.\"},\"phone\":{\"type\":\"string\",\"description\":\"Invoice subject's phone number.\"}}},\"email\":{\"type\":\"string\",\"description\":\"Prospect's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Prospect's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Prospect's last name.\"},\"document\":{\"type\":\"string\",\"description\":\"Prospect's document.\"},\"cellPhone\":{\"type\":\"string\",\"description\":\"Prospect's cellphone number.\"},\"isPJ\":{\"type\":\"boolean\",\"description\":\"Defines if a prospect is corporate (`true`) or not (`false`).\"},\"customerCode\":{\"type\":\"string\",\"description\":\"Prospect's customer code.\"}}},\"meta\":{\"title\":\"Prospect information metadata.\",\"description\":\"Prospect information metadata.\",\"type\":\"object\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the prospect version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the prospect.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was last updated in ISO 8601 format.\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the prospect information expires in ISO 8601 format.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[POST]::/api/storage/profile-system/prospects - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "3e78ccc3-a6bf-4b31-9be9-a82fe4e995ef", "name": "Get prospects", "request": { "name": "Get prospects", "description": { "content": "Retrieves information of all prospects.\n\r\n\r> For security and privacy reasons, this request returns masked prospect data. For unmasked information, see [Get unmasked prospects](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/prospects/unmask).\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/). \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "prospects" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "c99d9154-5c8c-4e8c-b4e7-b31496209c74", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "prospects" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "[\n {\n \"id\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"document\": {\n \"availableAddresses\": [\n {\n \"disposable\": true,\n \"userId\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"addressName\": \"customerAddressId\",\n \"addressType\": \"residential\",\n \"postalCode\": \"3*****\",\n \"city\": \"P*****\",\n \"country\": \"USA\",\n \"street\": \"F*****\",\n \"number\": \"9****\",\n \"complement\": \"\",\n \"receiverName\": \"J*** D**\",\n \"geoCoordinate\": []\n }\n ],\n \"paymentData\": {\n \"availableAccounts\": [],\n \"availableTokens\": [],\n \"transactions\": null,\n \"giftCards\": [],\n \"giftCardMessages\": [],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"contacts\": [\n {\n \"contactId\": \"0\",\n \"email\": \"\",\n \"firstName\": \"J***\",\n \"lastName\": \"D**\",\n \"phone\": \"\",\n \"document\": \"\",\n \"documentType\": \"\"\n }\n ],\n \"invoiceSubject\": {\n \"invoiceSubjectId\": \"0\",\n \"email\": \"j***@m***.c**\",\n \"firstName\": \"J***\",\n \"lastName\": \"D**\",\n \"phone\": \"1**********\"\n },\n \"email\": \"j***@m***.c**\",\n \"firstName\": \"J***\",\n \"lastName\": \"D**\",\n \"document\": \"1**********\",\n \"cellPhone\": \"1**********\",\n \"isPJ\": false,\n \"customerCode\": \"5397eefe-f237-41d4-976e-bdf772cc42e0\"\n },\n \"meta\": {\n \"version\": \"af9117e9-4169-46ee-ab4b-d4b17b881488\",\n \"author\": \"d6d8269f-e7cc-4e4b-8b89-3b46a1407937\",\n \"creationDate\": \"2023-10-25T13:59:52.7633627+00:00\",\n \"lastUpdateDate\": \"2023-10-25T14:02:45.7277154+00:00\",\n \"expirationDate\": null\n }\n }\n]", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "d542392c-2660-4c8f-9910-057a2c465a40", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/prospects - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/prospects - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/prospects - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"type\":\"array\",\"description\":\"List of masked prospects.\",\"items\":{\"title\":\"Masked prospect information.\",\"type\":\"object\",\"description\":\"Masked prospect information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the prospect.\"},\"document\":{\"title\":\"Prospect information.\",\"type\":\"object\",\"description\":\"Prospect information.\",\"properties\":{\"availableAddresses\":{\"type\":\"array\",\"description\":\"Available addresses.\",\"items\":{\"type\":\"object\",\"description\":\"Available address information.\",\"properties\":{\"disposable\":{\"type\":\"boolean\",\"description\":\"Defines whether the address is deleted after use (`true`) or not (`false`).\"},\"userId\":{\"type\":\"string\",\"description\":\"User unique identifier.\"},\"addressName\":{\"type\":\"string\",\"description\":\"Address name.\"},\"addressType\":{\"type\":\"string\",\"description\":\"Address type.\"},\"postalCode\":{\"type\":\"string\",\"description\":\"Postal code.\"},\"city\":{\"type\":\"string\",\"description\":\"City.\"},\"country\":{\"type\":\"string\",\"description\":\"Country code.\"},\"street\":{\"type\":\"string\",\"description\":\"Street name.\"},\"number\":{\"type\":\"string\",\"description\":\"Street number.\"},\"complement\":{\"type\":\"string\",\"description\":\"Complement information.\"},\"geoCoordinate\":{\"type\":\"array\",\"description\":\"Array with two strings that represent geocoordinates: first latitude, then longitude.\",\"items\":{\"type\":\"string\",\"description\":\"Geocoordinate.\"}}}}},\"paymentData\":{\"title\":\"paymentData\",\"type\":\"object\",\"description\":\"Payment data.\",\"properties\":{\"availableAccounts\":{\"type\":\"array\",\"description\":\"List of available payment accounts.\",\"items\":{\"type\":\"object\",\"description\":\"Information about an available payment account.\",\"properties\":{\"accountId\":{\"type\":\"string\",\"description\":\"Payment account ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\"},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\"}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\"}},\"transactions\":{\"type\":[\"array\",\"null\"],\"description\":\"List of transactions.\",\"items\":{\"type\":\"object\",\"description\":\"Transaction information.\",\"required\":[\"isActive\",\"transactionId\",\"merchantName\",\"payments\"],\"properties\":{\"isActive\":{\"type\":\"boolean\",\"description\":\"Indicates whether the transaction is active (`true`) or not (`false`).\"},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\"},\"payments\":{\"type\":\"array\",\"description\":\"List of payments information.\",\"items\":{\"title\":\"Payment\",\"required\":[\"id\",\"paymentSystem\",\"paymentSystemName\",\"value\",\"installments\",\"referenceValue\",\"cardHolder\",\"cardNumber\",\"firstDigits\",\"lastDigits\",\"cvv2\",\"expireMonth\",\"expireYear\",\"url\",\"giftCardId\",\"giftCardName\",\"giftCardCaption\",\"redemptionCode\",\"group\",\"tid\",\"dueDate\",\"connectorResponses\"],\"type\":\"object\",\"description\":\"Payment information.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Payment ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"value\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment value in cents.\"},\"installments\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment installments.\"},\"referenceValue\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Reference value for interest calculation in cents.\"},\"cardHolder\":{\"type\":[\"string\",\"null\"],\"description\":\"Card holder.\"},\"cardNumber\":{\"type\":[\"string\",\"null\"],\"description\":\"Card number.\"},\"firstDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card first digits.\"},\"lastDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card last digits.\"},\"cvv2\":{\"type\":[\"string\",\"null\"],\"description\":\"Card verification code.\"},\"expireMonth\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration month.\"},\"expireYear\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration year.\"},\"url\":{\"type\":\"string\",\"description\":\"Payment URL.\"},\"giftCardId\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card ID.\"},\"giftCardName\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card name.\"},\"giftCardCaption\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card caption.\"},\"redemptionCode\":{\"type\":[\"string\",\"null\"],\"description\":\"Redemption code.\"},\"group\":{\"type\":\"string\",\"description\":\"Payment group.\"},\"tid\":{\"type\":[\"string\",\"null\"],\"description\":\"Payment TID.\"},\"dueDate\":{\"type\":\"string\",\"description\":\"Due date.\"},\"connectorResponses\":{\"type\":\"object\",\"description\":\"Connector responses.\"}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\"},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\"},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\"}}},\"contacts\":{\"type\":\"array\",\"description\":\"List of contacts.\",\"items\":{\"type\":\"object\",\"description\":\"Contact information.\",\"properties\":{\"contactId\":{\"type\":\"string\",\"description\":\"Contact's unique identifier.\"},\"email\":{\"type\":\"string\",\"description\":\"Contact's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Contact's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Contact's last name.\"},\"phone\":{\"type\":\"string\",\"description\":\"Contact's phone number.\"},\"document\":{\"type\":\"string\",\"description\":\"Contact's document.\"}}}},\"invoiceSubject\":{\"type\":\"object\",\"description\":\"Information about the invoice subject.\",\"properties\":{\"invoiceSubjectId\":{\"type\":\"string\",\"description\":\"Invoice subject ID.\"},\"email\":{\"type\":\"string\",\"description\":\"Invoice subject's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Invoice subject's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Invoice subject's last name.\"},\"phone\":{\"type\":\"string\",\"description\":\"Invoice subject's phone number.\"}}},\"email\":{\"type\":\"string\",\"description\":\"Prospect's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Prospect's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Prospect's last name.\"},\"document\":{\"type\":\"string\",\"description\":\"Prospect's document.\"},\"cellPhone\":{\"type\":\"string\",\"description\":\"Prospect's cellphone number.\"},\"isPJ\":{\"type\":\"boolean\",\"description\":\"Defines if a prospect is corporate (`true`) or not (`false`).\"},\"customerCode\":{\"type\":\"string\",\"description\":\"Prospect's customer code.\"}}},\"meta\":{\"title\":\"Prospect information metadata.\",\"description\":\"Prospect information metadata.\",\"type\":\"object\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the prospect version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the prospect.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was last updated in ISO 8601 format.\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the prospect information expires in ISO 8601 format.\"}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/prospects - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "d89dcdc1-fbd1-494f-b0a7-9d2503823d04", "name": "Get unmasked prospects", "request": { "name": "Get unmasked prospects", "description": { "content": "Retrieves unmasked information of all prospects.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/). \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "prospects", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "4937a6cd-c612-407d-9afa-3d79548ac007", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "prospects", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "[\n {\n \"id\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"document\": {\n \"availableAddresses\": [\n {\n \"disposable\": true,\n \"userId\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"addressName\": \"customerAddressId\",\n \"addressType\": \"residential\",\n \"postalCode\": \"32137\",\n \"city\": \"Palm Coast\",\n \"country\": \"USA\",\n \"street\": \"Fifth St.\",\n \"number\": \"9538\",\n \"complement\": \"\",\n \"receiverName\": \"Jane Doe\",\n \"geoCoordinate\": []\n }\n ],\n \"paymentData\": {\n \"availableAccounts\": [],\n \"availableTokens\": [],\n \"transactions\": null,\n \"giftCards\": [],\n \"giftCardMessages\": [],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"contacts\": [\n {\n \"contactId\": \"0\",\n \"email\": \"\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"\",\n \"document\": \"\",\n \"documentType\": \"\"\n }\n ],\n \"invoiceSubject\": {\n \"invoiceSubjectId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\"\n },\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"document\": \"5397eefef23741d4976ebdf772cc42e0\",\n \"cellPhone\": \"12345678910\",\n \"isPJ\": false,\n \"customerCode\": \"5397eefe-f237-41d4-976e-bdf772cc42e0\"\n },\n \"meta\": {\n \"version\": \"af9117e9-4169-46ee-ab4b-d4b17b881488\",\n \"author\": \"d6d8269f-e7cc-4e4b-8b89-3b46a1407937\",\n \"creationDate\": \"2023-10-25T13:59:52.7633627+00:00\",\n \"lastUpdateDate\": \"2023-10-25T14:02:45.7277154+00:00\",\n \"expirationDate\": null\n }\n }\n]", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "cf5ae80b-333e-4529-8ab7-ce2227da44df", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/prospects/unmask - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/prospects/unmask - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/prospects/unmask - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"type\":\"array\",\"description\":\"List of prospects.\",\"items\":{\"title\":\"Unmasked prospect information.\",\"type\":\"object\",\"description\":\"Unmasked prospect information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the prospect.\"},\"document\":{\"title\":\"Prospect information.\",\"type\":\"object\",\"description\":\"Prospect information.\",\"properties\":{\"availableAddresses\":{\"type\":\"array\",\"description\":\"Available addresses.\",\"items\":{\"type\":\"object\",\"description\":\"Available address information.\",\"properties\":{\"disposable\":{\"type\":\"boolean\",\"description\":\"Defines whether the address is deleted after use (`true`) or not (`false`).\"},\"userId\":{\"type\":\"string\",\"description\":\"User unique identifier.\"},\"addressName\":{\"type\":\"string\",\"description\":\"Address name.\"},\"addressType\":{\"type\":\"string\",\"description\":\"Address type.\"},\"postalCode\":{\"type\":\"string\",\"description\":\"Postal code.\"},\"city\":{\"type\":\"string\",\"description\":\"City.\"},\"country\":{\"type\":\"string\",\"description\":\"Country code.\"},\"street\":{\"type\":\"string\",\"description\":\"Street name.\"},\"number\":{\"type\":\"string\",\"description\":\"Street number.\"},\"complement\":{\"type\":\"string\",\"description\":\"Complement information.\"},\"geoCoordinate\":{\"type\":\"array\",\"description\":\"Array with two strings that represent geocoordinates: first latitude, then longitude.\",\"items\":{\"type\":\"string\",\"description\":\"Geocoordinate.\"}}}}},\"paymentData\":{\"title\":\"paymentData\",\"type\":\"object\",\"description\":\"Payment data.\",\"properties\":{\"availableAccounts\":{\"type\":\"array\",\"description\":\"List of available payment accounts.\",\"items\":{\"type\":\"object\",\"description\":\"Information about an available payment account.\",\"properties\":{\"accountId\":{\"type\":\"string\",\"description\":\"Payment account ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\"},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\"}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\"}},\"transactions\":{\"type\":[\"array\",\"null\"],\"description\":\"List of transactions.\",\"items\":{\"type\":\"object\",\"description\":\"Transaction information.\",\"required\":[\"isActive\",\"transactionId\",\"merchantName\",\"payments\"],\"properties\":{\"isActive\":{\"type\":\"boolean\",\"description\":\"Indicates whether the transaction is active (`true`) or not (`false`).\"},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\"},\"payments\":{\"type\":\"array\",\"description\":\"List of payments information.\",\"items\":{\"title\":\"Payment\",\"required\":[\"id\",\"paymentSystem\",\"paymentSystemName\",\"value\",\"installments\",\"referenceValue\",\"cardHolder\",\"cardNumber\",\"firstDigits\",\"lastDigits\",\"cvv2\",\"expireMonth\",\"expireYear\",\"url\",\"giftCardId\",\"giftCardName\",\"giftCardCaption\",\"redemptionCode\",\"group\",\"tid\",\"dueDate\",\"connectorResponses\"],\"type\":\"object\",\"description\":\"Payment information.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Payment ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"value\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment value in cents.\"},\"installments\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment installments.\"},\"referenceValue\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Reference value for interest calculation in cents.\"},\"cardHolder\":{\"type\":[\"string\",\"null\"],\"description\":\"Card holder.\"},\"cardNumber\":{\"type\":[\"string\",\"null\"],\"description\":\"Card number.\"},\"firstDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card first digits.\"},\"lastDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card last digits.\"},\"cvv2\":{\"type\":[\"string\",\"null\"],\"description\":\"Card verification code.\"},\"expireMonth\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration month.\"},\"expireYear\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration year.\"},\"url\":{\"type\":\"string\",\"description\":\"Payment URL.\"},\"giftCardId\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card ID.\"},\"giftCardName\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card name.\"},\"giftCardCaption\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card caption.\"},\"redemptionCode\":{\"type\":[\"string\",\"null\"],\"description\":\"Redemption code.\"},\"group\":{\"type\":\"string\",\"description\":\"Payment group.\"},\"tid\":{\"type\":[\"string\",\"null\"],\"description\":\"Payment TID.\"},\"dueDate\":{\"type\":\"string\",\"description\":\"Due date.\"},\"connectorResponses\":{\"type\":\"object\",\"description\":\"Connector responses.\"}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\"},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\"},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\"}}},\"contacts\":{\"type\":\"array\",\"description\":\"List of contacts.\",\"items\":{\"type\":\"object\",\"description\":\"Contact information.\",\"properties\":{\"contactId\":{\"type\":\"string\",\"description\":\"Contact's unique identifier.\"},\"email\":{\"type\":\"string\",\"description\":\"Contact's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Contact's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Contact's last name.\"},\"phone\":{\"type\":\"string\",\"description\":\"Contact's phone number.\"},\"document\":{\"type\":\"string\",\"description\":\"Contact's document.\"}}}},\"invoiceSubject\":{\"type\":\"object\",\"description\":\"Information about the invoice subject.\",\"properties\":{\"invoiceSubjectId\":{\"type\":\"string\",\"description\":\"Invoice subject ID.\"},\"email\":{\"type\":\"string\",\"description\":\"Invoice subject's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Invoice subject's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Invoice subject's last name.\"},\"phone\":{\"type\":\"string\",\"description\":\"Invoice subject's phone number.\"}}},\"email\":{\"type\":\"string\",\"description\":\"Prospect's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Prospect's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Prospect's last name.\"},\"document\":{\"type\":\"string\",\"description\":\"Prospect's document.\"},\"cellPhone\":{\"type\":\"string\",\"description\":\"Prospect's cellphone number.\"},\"isPJ\":{\"type\":\"boolean\",\"description\":\"Defines if a prospect is corporate (`true`) or not (`false`).\"},\"customerCode\":{\"type\":\"string\",\"description\":\"Prospect's customer code.\"}}},\"meta\":{\"title\":\"Prospect information metadata.\",\"description\":\"Prospect information metadata.\",\"type\":\"object\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the prospect version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the prospect.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was last updated in ISO 8601 format.\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the prospect information expires in ISO 8601 format.\"}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/prospects/unmask - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "2983aaba-c29a-4ef5-9262-8cadb103550d", "name": "Get prospect", "request": { "name": "Get prospect", "description": { "content": "Retrieves the information of a specific prospect, by its `prospectId`.\n\r\n\r> For security and privacy reasons, this request returns masked prospect data. For unmasked information, see [Get unmasked prospect](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/prospects/-prospectId-/unmask).\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "prospects", ":prospectId" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the prospect as returned by the [Create prospect](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/prospects) endpoint's response, in the `id` field.", "type": "text/plain" }, "type": "any", "value": "98478f6b-d025-4f35-a560-dd1ee7a6f26e", "key": "prospectId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "0e260090-19be-4247-9cf5-2be6a97b0c75", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "prospects", ":prospectId" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"id\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"document\": {\n \"availableAddresses\": [\n {\n \"disposable\": true,\n \"userId\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"addressName\": \"customerAddressId\",\n \"addressType\": \"residential\",\n \"postalCode\": \"3*****\",\n \"city\": \"P*****\",\n \"country\": \"USA\",\n \"street\": \"F*****\",\n \"number\": \"9****\",\n \"complement\": \"\",\n \"receiverName\": \"J*** D**\",\n \"geoCoordinate\": []\n }\n ],\n \"paymentData\": {\n \"availableAccounts\": [],\n \"availableTokens\": [],\n \"transactions\": null,\n \"giftCards\": [],\n \"giftCardMessages\": [],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"contacts\": [\n {\n \"contactId\": \"0\",\n \"email\": \"\",\n \"firstName\": \"J***\",\n \"lastName\": \"D**\",\n \"phone\": \"\",\n \"document\": \"\",\n \"documentType\": \"\"\n }\n ],\n \"invoiceSubject\": {\n \"invoiceSubjectId\": \"0\",\n \"email\": \"j***@m***.c**\",\n \"firstName\": \"J***\",\n \"lastName\": \"D**\",\n \"phone\": \"1**********\"\n },\n \"email\": \"j***@m***.c**\",\n \"firstName\": \"J***\",\n \"lastName\": \"D**\",\n \"document\": \"1**********\",\n \"cellPhone\": \"1**********\",\n \"isPJ\": false,\n \"customerCode\": \"5397eefe-f237-41d4-976e-bdf772cc42e0\"\n },\n \"meta\": {\n \"version\": \"af9117e9-4169-46ee-ab4b-d4b17b881488\",\n \"author\": \"d6d8269f-e7cc-4e4b-8b89-3b46a1407937\",\n \"creationDate\": \"2023-10-25T13:59:52.7633627+00:00\",\n \"lastUpdateDate\": \"2023-10-25T14:02:45.7277154+00:00\",\n \"expirationDate\": null\n }\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "93a980ef-d17e-4853-918b-877b3e77a568", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/prospects/:prospectId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/prospects/:prospectId - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/prospects/:prospectId - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Masked prospect information.\",\"type\":\"object\",\"description\":\"Masked prospect information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the prospect.\"},\"document\":{\"title\":\"Prospect information.\",\"type\":\"object\",\"description\":\"Prospect information.\",\"properties\":{\"availableAddresses\":{\"type\":\"array\",\"description\":\"Available addresses.\",\"items\":{\"type\":\"object\",\"description\":\"Available address information.\",\"properties\":{\"disposable\":{\"type\":\"boolean\",\"description\":\"Defines whether the address is deleted after use (`true`) or not (`false`).\"},\"userId\":{\"type\":\"string\",\"description\":\"User unique identifier.\"},\"addressName\":{\"type\":\"string\",\"description\":\"Address name.\"},\"addressType\":{\"type\":\"string\",\"description\":\"Address type.\"},\"postalCode\":{\"type\":\"string\",\"description\":\"Postal code.\"},\"city\":{\"type\":\"string\",\"description\":\"City.\"},\"country\":{\"type\":\"string\",\"description\":\"Country code.\"},\"street\":{\"type\":\"string\",\"description\":\"Street name.\"},\"number\":{\"type\":\"string\",\"description\":\"Street number.\"},\"complement\":{\"type\":\"string\",\"description\":\"Complement information.\"},\"geoCoordinate\":{\"type\":\"array\",\"description\":\"Array with two strings that represent geocoordinates: first latitude, then longitude.\",\"items\":{\"type\":\"string\",\"description\":\"Geocoordinate.\"}}}}},\"paymentData\":{\"title\":\"paymentData\",\"type\":\"object\",\"description\":\"Payment data.\",\"properties\":{\"availableAccounts\":{\"type\":\"array\",\"description\":\"List of available payment accounts.\",\"items\":{\"type\":\"object\",\"description\":\"Information about an available payment account.\",\"properties\":{\"accountId\":{\"type\":\"string\",\"description\":\"Payment account ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\"},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\"}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\"}},\"transactions\":{\"type\":[\"array\",\"null\"],\"description\":\"List of transactions.\",\"items\":{\"type\":\"object\",\"description\":\"Transaction information.\",\"required\":[\"isActive\",\"transactionId\",\"merchantName\",\"payments\"],\"properties\":{\"isActive\":{\"type\":\"boolean\",\"description\":\"Indicates whether the transaction is active (`true`) or not (`false`).\"},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\"},\"payments\":{\"type\":\"array\",\"description\":\"List of payments information.\",\"items\":{\"title\":\"Payment\",\"required\":[\"id\",\"paymentSystem\",\"paymentSystemName\",\"value\",\"installments\",\"referenceValue\",\"cardHolder\",\"cardNumber\",\"firstDigits\",\"lastDigits\",\"cvv2\",\"expireMonth\",\"expireYear\",\"url\",\"giftCardId\",\"giftCardName\",\"giftCardCaption\",\"redemptionCode\",\"group\",\"tid\",\"dueDate\",\"connectorResponses\"],\"type\":\"object\",\"description\":\"Payment information.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Payment ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"value\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment value in cents.\"},\"installments\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment installments.\"},\"referenceValue\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Reference value for interest calculation in cents.\"},\"cardHolder\":{\"type\":[\"string\",\"null\"],\"description\":\"Card holder.\"},\"cardNumber\":{\"type\":[\"string\",\"null\"],\"description\":\"Card number.\"},\"firstDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card first digits.\"},\"lastDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card last digits.\"},\"cvv2\":{\"type\":[\"string\",\"null\"],\"description\":\"Card verification code.\"},\"expireMonth\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration month.\"},\"expireYear\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration year.\"},\"url\":{\"type\":\"string\",\"description\":\"Payment URL.\"},\"giftCardId\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card ID.\"},\"giftCardName\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card name.\"},\"giftCardCaption\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card caption.\"},\"redemptionCode\":{\"type\":[\"string\",\"null\"],\"description\":\"Redemption code.\"},\"group\":{\"type\":\"string\",\"description\":\"Payment group.\"},\"tid\":{\"type\":[\"string\",\"null\"],\"description\":\"Payment TID.\"},\"dueDate\":{\"type\":\"string\",\"description\":\"Due date.\"},\"connectorResponses\":{\"type\":\"object\",\"description\":\"Connector responses.\"}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\"},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\"},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\"}}},\"contacts\":{\"type\":\"array\",\"description\":\"List of contacts.\",\"items\":{\"type\":\"object\",\"description\":\"Contact information.\",\"properties\":{\"contactId\":{\"type\":\"string\",\"description\":\"Contact's unique identifier.\"},\"email\":{\"type\":\"string\",\"description\":\"Contact's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Contact's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Contact's last name.\"},\"phone\":{\"type\":\"string\",\"description\":\"Contact's phone number.\"},\"document\":{\"type\":\"string\",\"description\":\"Contact's document.\"}}}},\"invoiceSubject\":{\"type\":\"object\",\"description\":\"Information about the invoice subject.\",\"properties\":{\"invoiceSubjectId\":{\"type\":\"string\",\"description\":\"Invoice subject ID.\"},\"email\":{\"type\":\"string\",\"description\":\"Invoice subject's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Invoice subject's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Invoice subject's last name.\"},\"phone\":{\"type\":\"string\",\"description\":\"Invoice subject's phone number.\"}}},\"email\":{\"type\":\"string\",\"description\":\"Prospect's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Prospect's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Prospect's last name.\"},\"document\":{\"type\":\"string\",\"description\":\"Prospect's document.\"},\"cellPhone\":{\"type\":\"string\",\"description\":\"Prospect's cellphone number.\"},\"isPJ\":{\"type\":\"boolean\",\"description\":\"Defines if a prospect is corporate (`true`) or not (`false`).\"},\"customerCode\":{\"type\":\"string\",\"description\":\"Prospect's customer code.\"}}},\"meta\":{\"title\":\"Prospect information metadata.\",\"description\":\"Prospect information metadata.\",\"type\":\"object\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the prospect version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the prospect.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was last updated in ISO 8601 format.\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the prospect information expires in ISO 8601 format.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/prospects/:prospectId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "4c150843-6e5d-41ad-a74a-3437521ac9ab", "name": "Update prospect", "request": { "name": "Update prospect", "description": { "content": "Updates one or more fields of an existing prospect.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "prospects", ":prospectId" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the prospect as returned by the [Create prospect](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/prospects) endpoint's response, in the `id` field.", "type": "text/plain" }, "type": "any", "value": "98478f6b-d025-4f35-a560-dd1ee7a6f26e", "key": "prospectId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "PATCH", "body": { "mode": "raw", "raw": "{\n \"availableAddresses\": [\n {\n \"disposable\": true,\n \"userId\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"addressName\": \"Home\",\n \"addressType\": \"residential\",\n \"postalCode\": \"32137\",\n \"city\": \"Palm Coast\",\n \"country\": \"USA\",\n \"street\": \"Fifth St.\",\n \"number\": \"9538\",\n \"complement\": \"Apartment 2B\",\n \"geoCoordinate\": [\n \"49.334934\",\n \"49.334934\"\n ]\n },\n {\n \"disposable\": true,\n \"userId\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"addressName\": \"Home\",\n \"addressType\": \"residential\",\n \"postalCode\": \"32137\",\n \"city\": \"Palm Coast\",\n \"country\": \"USA\",\n \"street\": \"Fifth St.\",\n \"number\": \"9538\",\n \"complement\": \"Apartment 2B\",\n \"geoCoordinate\": [\n \"49.334934\",\n \"49.334934\"\n ]\n }\n ],\n \"paymentData\": {\n \"availableAccounts\": [\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443334\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\",\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n },\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443334\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\",\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n }\n ],\n \"availableTokens\": [\n \"12345\",\n \"12345\"\n ],\n \"transactions\": [\n {\n \"isActive\": true,\n \"transactionId\": \"418213DE29634837A63DD693A937A696\",\n \"merchantName\": \"luxstore\",\n \"payments\": [\n {\n \"id\": \"culpa in nisi sit veniam\",\n \"paymentSystem\": \"dolore eu minim cupida\",\n \"paymentSystemName\": \"sed nulla laborum dolore\",\n \"value\": 19794399,\n \"installments\": -67705574,\n \"referenceValue\": -63837365,\n \"cardHolder\": \"do ut est Ut\",\n \"cardNumber\": \"aliqua\",\n \"firstDigits\": \"adipisicing quis dolore fugiat\",\n \"lastDigits\": \"ullamco tempor in ea non\",\n \"cvv2\": \"exercitation ut\",\n \"expireMonth\": \"consequat cillum\",\n \"expireYear\": \"ut laborum dolore irure\",\n \"url\": \"sint enim sunt ut\",\n \"giftCardId\": \"nulla in\",\n \"giftCardName\": \"sint quis sed\",\n \"giftCardCaption\": \"ut laboris pari\",\n \"redemptionCode\": \"sunt exercitation nostrud\",\n \"group\": \"fugiat ut cillum in\",\n \"tid\": \"officia esse proident\",\n \"dueDate\": \"reprehenderit officia dolor\",\n \"connectorResponses\": {}\n },\n {\n \"id\": \"deserunt\",\n \"paymentSystem\": \"aute ex ullamco nisi\",\n \"paymentSystemName\": \"cupidatat commodo incididunt\",\n \"value\": -44330911,\n \"installments\": -3274686,\n \"referenceValue\": -20720008,\n \"cardHolder\": \"sed in\",\n \"cardNumber\": \"deserunt mollit eni\",\n \"firstDigits\": \"sit ad\",\n \"lastDigits\": \"tempor occaecat aliquip\",\n \"cvv2\": \"velit anim\",\n \"expireMonth\": \"magna\",\n \"expireYear\": \"veniam id Lorem\",\n \"url\": \"cillum in eu laboris eiusmod\",\n \"giftCardId\": \"Duis consectetur dolor non proident\",\n \"giftCardName\": \"velit ex pariatur ad mollit\",\n \"giftCardCaption\": \"magna cupidatat\",\n \"redemptionCode\": \"laborum eiusmod ut in\",\n \"group\": \"ut nisi\",\n \"tid\": \"fugiat et Ut\",\n \"dueDate\": \"sit id\",\n \"connectorResponses\": {}\n }\n ]\n },\n {\n \"isActive\": true,\n \"transactionId\": \"418213DE29634837A63DD693A937A696\",\n \"merchantName\": \"luxstore\",\n \"payments\": [\n {\n \"id\": \"quis\",\n \"paymentSystem\": \"ea dolore\",\n \"paymentSystemName\": \"nisi ut est\",\n \"value\": -75722387,\n \"installments\": -97421684,\n \"referenceValue\": -29672698,\n \"cardHolder\": \"ut tempor\",\n \"cardNumber\": \"minim amet\",\n \"firstDigits\": \"sed cupidatat dolor\",\n \"lastDigits\": \"mollit minim e\",\n \"cvv2\": \"quis labore\",\n \"expireMonth\": \"sit\",\n \"expireYear\": \"tempor proident velit reprehenderit\",\n \"url\": \"in in do\",\n \"giftCardId\": \"Ut est reprehenderit aliquip\",\n \"giftCardName\": \"tempor consequat\",\n \"giftCardCaption\": \"sin\",\n \"redemptionCode\": \"elit mollit tempor\",\n \"group\": \"magna\",\n \"tid\": \"voluptate i\",\n \"dueDate\": \"Ut occaecat ea eiusmod\",\n \"connectorResponses\": {}\n },\n {\n \"id\": \"esse\",\n \"paymentSystem\": \"mollit laborum ut cillum sit\",\n \"paymentSystemName\": \"consequat dolore magna\",\n \"value\": -87167928,\n \"installments\": -75150717,\n \"referenceValue\": -94213577,\n \"cardHolder\": \"do minim\",\n \"cardNumber\": \"exercitation reprehenderit pariatur elit aliquip\",\n \"firstDigits\": \"aliquip magna incididunt\",\n \"lastDigits\": \"sed elit eu\",\n \"cvv2\": \"sit\",\n \"expireMonth\": \"Duis\",\n \"expireYear\": \"id Ut anim Lorem\",\n \"url\": \"deserunt laboris\",\n \"giftCardId\": \"fugiat tempor incididunt laborum\",\n \"giftCardName\": \"enim adipisicing cillum ipsum\",\n \"giftCardCaption\": \"occaecat incididunt dolore\",\n \"redemptionCode\": \"proident ea\",\n \"group\": \"pariatur aliquip consectetur\",\n \"tid\": \"Ut officia reprehenderit sed eiusmod\",\n \"dueDate\": \"ex culpa aliquip\",\n \"connectorResponses\": {}\n }\n ]\n }\n ],\n \"giftCards\": [\n \"12345\",\n \"12345\"\n ],\n \"giftCardMessages\": [\n \"Message.\",\n \"Message.\"\n ],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"contacts\": [\n {\n \"contactId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\",\n \"document\": \"12345678910\"\n },\n {\n \"contactId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\",\n \"document\": \"12345678910\"\n }\n ],\n \"invoiceSubject\": {\n \"invoiceSubjectId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\"\n },\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"document\": \"5397eefef23741d4976ebdf772cc42e0\",\n \"cellPhone\": \"12345678910\",\n \"isPJ\": false,\n \"customerCode\": \"5397eefe-f237-41d4-976e-bdf772cc42e0\"\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "5b31c7cd-aea8-4460-9533-ef7862d783fb", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "prospects", ":prospectId" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "PATCH", "body": { "mode": "raw", "raw": "{\n \"availableAddresses\": [\n {\n \"disposable\": true,\n \"userId\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"addressName\": \"Home\",\n \"addressType\": \"residential\",\n \"postalCode\": \"32137\",\n \"city\": \"Palm Coast\",\n \"country\": \"USA\",\n \"street\": \"Fifth St.\",\n \"number\": \"9538\",\n \"complement\": \"Apartment 2B\",\n \"geoCoordinate\": [\n \"49.334934\",\n \"49.334934\"\n ]\n },\n {\n \"disposable\": true,\n \"userId\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"addressName\": \"Home\",\n \"addressType\": \"residential\",\n \"postalCode\": \"32137\",\n \"city\": \"Palm Coast\",\n \"country\": \"USA\",\n \"street\": \"Fifth St.\",\n \"number\": \"9538\",\n \"complement\": \"Apartment 2B\",\n \"geoCoordinate\": [\n \"49.334934\",\n \"49.334934\"\n ]\n }\n ],\n \"paymentData\": {\n \"availableAccounts\": [\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443334\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\",\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n },\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443334\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\",\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n }\n ],\n \"availableTokens\": [\n \"12345\",\n \"12345\"\n ],\n \"transactions\": [\n {\n \"isActive\": true,\n \"transactionId\": \"418213DE29634837A63DD693A937A696\",\n \"merchantName\": \"luxstore\",\n \"payments\": [\n {\n \"id\": \"culpa in nisi sit veniam\",\n \"paymentSystem\": \"dolore eu minim cupida\",\n \"paymentSystemName\": \"sed nulla laborum dolore\",\n \"value\": 19794399,\n \"installments\": -67705574,\n \"referenceValue\": -63837365,\n \"cardHolder\": \"do ut est Ut\",\n \"cardNumber\": \"aliqua\",\n \"firstDigits\": \"adipisicing quis dolore fugiat\",\n \"lastDigits\": \"ullamco tempor in ea non\",\n \"cvv2\": \"exercitation ut\",\n \"expireMonth\": \"consequat cillum\",\n \"expireYear\": \"ut laborum dolore irure\",\n \"url\": \"sint enim sunt ut\",\n \"giftCardId\": \"nulla in\",\n \"giftCardName\": \"sint quis sed\",\n \"giftCardCaption\": \"ut laboris pari\",\n \"redemptionCode\": \"sunt exercitation nostrud\",\n \"group\": \"fugiat ut cillum in\",\n \"tid\": \"officia esse proident\",\n \"dueDate\": \"reprehenderit officia dolor\",\n \"connectorResponses\": {}\n },\n {\n \"id\": \"deserunt\",\n \"paymentSystem\": \"aute ex ullamco nisi\",\n \"paymentSystemName\": \"cupidatat commodo incididunt\",\n \"value\": -44330911,\n \"installments\": -3274686,\n \"referenceValue\": -20720008,\n \"cardHolder\": \"sed in\",\n \"cardNumber\": \"deserunt mollit eni\",\n \"firstDigits\": \"sit ad\",\n \"lastDigits\": \"tempor occaecat aliquip\",\n \"cvv2\": \"velit anim\",\n \"expireMonth\": \"magna\",\n \"expireYear\": \"veniam id Lorem\",\n \"url\": \"cillum in eu laboris eiusmod\",\n \"giftCardId\": \"Duis consectetur dolor non proident\",\n \"giftCardName\": \"velit ex pariatur ad mollit\",\n \"giftCardCaption\": \"magna cupidatat\",\n \"redemptionCode\": \"laborum eiusmod ut in\",\n \"group\": \"ut nisi\",\n \"tid\": \"fugiat et Ut\",\n \"dueDate\": \"sit id\",\n \"connectorResponses\": {}\n }\n ]\n },\n {\n \"isActive\": true,\n \"transactionId\": \"418213DE29634837A63DD693A937A696\",\n \"merchantName\": \"luxstore\",\n \"payments\": [\n {\n \"id\": \"quis\",\n \"paymentSystem\": \"ea dolore\",\n \"paymentSystemName\": \"nisi ut est\",\n \"value\": -75722387,\n \"installments\": -97421684,\n \"referenceValue\": -29672698,\n \"cardHolder\": \"ut tempor\",\n \"cardNumber\": \"minim amet\",\n \"firstDigits\": \"sed cupidatat dolor\",\n \"lastDigits\": \"mollit minim e\",\n \"cvv2\": \"quis labore\",\n \"expireMonth\": \"sit\",\n \"expireYear\": \"tempor proident velit reprehenderit\",\n \"url\": \"in in do\",\n \"giftCardId\": \"Ut est reprehenderit aliquip\",\n \"giftCardName\": \"tempor consequat\",\n \"giftCardCaption\": \"sin\",\n \"redemptionCode\": \"elit mollit tempor\",\n \"group\": \"magna\",\n \"tid\": \"voluptate i\",\n \"dueDate\": \"Ut occaecat ea eiusmod\",\n \"connectorResponses\": {}\n },\n {\n \"id\": \"esse\",\n \"paymentSystem\": \"mollit laborum ut cillum sit\",\n \"paymentSystemName\": \"consequat dolore magna\",\n \"value\": -87167928,\n \"installments\": -75150717,\n \"referenceValue\": -94213577,\n \"cardHolder\": \"do minim\",\n \"cardNumber\": \"exercitation reprehenderit pariatur elit aliquip\",\n \"firstDigits\": \"aliquip magna incididunt\",\n \"lastDigits\": \"sed elit eu\",\n \"cvv2\": \"sit\",\n \"expireMonth\": \"Duis\",\n \"expireYear\": \"id Ut anim Lorem\",\n \"url\": \"deserunt laboris\",\n \"giftCardId\": \"fugiat tempor incididunt laborum\",\n \"giftCardName\": \"enim adipisicing cillum ipsum\",\n \"giftCardCaption\": \"occaecat incididunt dolore\",\n \"redemptionCode\": \"proident ea\",\n \"group\": \"pariatur aliquip consectetur\",\n \"tid\": \"Ut officia reprehenderit sed eiusmod\",\n \"dueDate\": \"ex culpa aliquip\",\n \"connectorResponses\": {}\n }\n ]\n }\n ],\n \"giftCards\": [\n \"12345\",\n \"12345\"\n ],\n \"giftCardMessages\": [\n \"Message.\",\n \"Message.\"\n ],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"contacts\": [\n {\n \"contactId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\",\n \"document\": \"12345678910\"\n },\n {\n \"contactId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\",\n \"document\": \"12345678910\"\n }\n ],\n \"invoiceSubject\": {\n \"invoiceSubjectId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\"\n },\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"document\": \"5397eefef23741d4976ebdf772cc42e0\",\n \"cellPhone\": \"12345678910\",\n \"isPJ\": false,\n \"customerCode\": \"5397eefe-f237-41d4-976e-bdf772cc42e0\"\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"id\": \"c2cbebba-214e-40b2-b68f-98f862e755d5\",\n \"document\": {\n \"availableAddresses\": [\n {\n \"disposable\": true,\n \"userId\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"addressName\": \"Home\",\n \"addressType\": \"residential\",\n \"postalCode\": \"32137\",\n \"city\": \"Palm Coast\",\n \"country\": \"USA\",\n \"street\": \"Fifth St.\",\n \"number\": \"9538\",\n \"complement\": \"Apartment 2B\",\n \"geoCoordinate\": [\n \"string\"\n ]\n }\n ],\n \"paymentData\": {\n \"availableAccounts\": [\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443334\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n }\n ],\n \"availableTokens\": [\n \"12345\"\n ],\n \"transactions\": [\n {\n \"isActive\": true,\n \"transactionId\": \"418213DE29634837A63DD693A937A696\",\n \"merchantName\": \"luxstore\",\n \"payments\": [\n {\n \"id\": \"D3DEECAB3C6C4B9EAF8EF4C1FE062FF3\",\n \"paymentSystem\": \"6\",\n \"paymentSystemName\": \"Boleto Bancário\",\n \"value\": 4450,\n \"installments\": 1,\n \"referenceValue\": 4450,\n \"cardHolder\": null,\n \"cardNumber\": null,\n \"firstDigits\": null,\n \"lastDigits\": null,\n \"cvv2\": null,\n \"expireMonth\": null,\n \"expireYear\": null,\n \"url\": \"https://luxstore.vtexpayments.com.br:443/BankIssuedInvoice/Transaction/418213DE29634837A63DD693A937A696/Payment/D3DEECAB3C6C4B9EAF8EF4C1FE062FF3/Installment/{Installment}\",\n \"giftCardId\": null,\n \"giftCardName\": null,\n \"giftCardCaption\": null,\n \"redemptionCode\": null,\n \"group\": \"bankInvoice\",\n \"tid\": null,\n \"dueDate\": \"2019-02-02\",\n \"connectorResponses\": {}\n }\n ]\n }\n ],\n \"giftCards\": [\n \"12345\"\n ],\n \"giftCardMessages\": [\n \"Message.\"\n ],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"contacts\": [\n {\n \"contactId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\",\n \"document\": \"12345678910\"\n }\n ],\n \"invoiceSubject\": {\n \"invoiceSubjectId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\"\n },\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"document\": \"5397eefef23741d4976ebdf772cc42e0\",\n \"cellPhone\": \"12345678910\",\n \"isPJ\": false,\n \"customerCode\": \"5397eefe-f237-41d4-976e-bdf772cc42e0\"\n },\n \"meta\": {\n \"version\": \"27112371-a71b-45d6-b3bc-93436a3a0b4f\",\n \"author\": \"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\",\n \"creationDate\": \"2022-01-05T15:41:37.5009471+00:00\",\n \"lastUpdateDate\": \"2022-01-05T15:41:37.5009471+00:00\",\n \"expirationDate\": \"2022-01-05T15:41:37.5009471+00:00\"\n }\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "1296d102-fb54-4ba3-a509-9b2111e1f99f", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PATCH]::/api/storage/profile-system/prospects/:prospectId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[PATCH]::/api/storage/profile-system/prospects/:prospectId - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[PATCH]::/api/storage/profile-system/prospects/:prospectId - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Unmasked prospect information.\",\"type\":\"object\",\"description\":\"Unmasked prospect information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the prospect.\"},\"document\":{\"title\":\"Prospect information.\",\"type\":\"object\",\"description\":\"Prospect information.\",\"properties\":{\"availableAddresses\":{\"type\":\"array\",\"description\":\"Available addresses.\",\"items\":{\"type\":\"object\",\"description\":\"Available address information.\",\"properties\":{\"disposable\":{\"type\":\"boolean\",\"description\":\"Defines whether the address is deleted after use (`true`) or not (`false`).\"},\"userId\":{\"type\":\"string\",\"description\":\"User unique identifier.\"},\"addressName\":{\"type\":\"string\",\"description\":\"Address name.\"},\"addressType\":{\"type\":\"string\",\"description\":\"Address type.\"},\"postalCode\":{\"type\":\"string\",\"description\":\"Postal code.\"},\"city\":{\"type\":\"string\",\"description\":\"City.\"},\"country\":{\"type\":\"string\",\"description\":\"Country code.\"},\"street\":{\"type\":\"string\",\"description\":\"Street name.\"},\"number\":{\"type\":\"string\",\"description\":\"Street number.\"},\"complement\":{\"type\":\"string\",\"description\":\"Complement information.\"},\"geoCoordinate\":{\"type\":\"array\",\"description\":\"Array with two strings that represent geocoordinates: first latitude, then longitude.\",\"items\":{\"type\":\"string\",\"description\":\"Geocoordinate.\"}}}}},\"paymentData\":{\"title\":\"paymentData\",\"type\":\"object\",\"description\":\"Payment data.\",\"properties\":{\"availableAccounts\":{\"type\":\"array\",\"description\":\"List of available payment accounts.\",\"items\":{\"type\":\"object\",\"description\":\"Information about an available payment account.\",\"properties\":{\"accountId\":{\"type\":\"string\",\"description\":\"Payment account ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\"},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\"}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\"}},\"transactions\":{\"type\":[\"array\",\"null\"],\"description\":\"List of transactions.\",\"items\":{\"type\":\"object\",\"description\":\"Transaction information.\",\"required\":[\"isActive\",\"transactionId\",\"merchantName\",\"payments\"],\"properties\":{\"isActive\":{\"type\":\"boolean\",\"description\":\"Indicates whether the transaction is active (`true`) or not (`false`).\"},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\"},\"payments\":{\"type\":\"array\",\"description\":\"List of payments information.\",\"items\":{\"title\":\"Payment\",\"required\":[\"id\",\"paymentSystem\",\"paymentSystemName\",\"value\",\"installments\",\"referenceValue\",\"cardHolder\",\"cardNumber\",\"firstDigits\",\"lastDigits\",\"cvv2\",\"expireMonth\",\"expireYear\",\"url\",\"giftCardId\",\"giftCardName\",\"giftCardCaption\",\"redemptionCode\",\"group\",\"tid\",\"dueDate\",\"connectorResponses\"],\"type\":\"object\",\"description\":\"Payment information.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Payment ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"value\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment value in cents.\"},\"installments\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment installments.\"},\"referenceValue\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Reference value for interest calculation in cents.\"},\"cardHolder\":{\"type\":[\"string\",\"null\"],\"description\":\"Card holder.\"},\"cardNumber\":{\"type\":[\"string\",\"null\"],\"description\":\"Card number.\"},\"firstDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card first digits.\"},\"lastDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card last digits.\"},\"cvv2\":{\"type\":[\"string\",\"null\"],\"description\":\"Card verification code.\"},\"expireMonth\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration month.\"},\"expireYear\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration year.\"},\"url\":{\"type\":\"string\",\"description\":\"Payment URL.\"},\"giftCardId\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card ID.\"},\"giftCardName\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card name.\"},\"giftCardCaption\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card caption.\"},\"redemptionCode\":{\"type\":[\"string\",\"null\"],\"description\":\"Redemption code.\"},\"group\":{\"type\":\"string\",\"description\":\"Payment group.\"},\"tid\":{\"type\":[\"string\",\"null\"],\"description\":\"Payment TID.\"},\"dueDate\":{\"type\":\"string\",\"description\":\"Due date.\"},\"connectorResponses\":{\"type\":\"object\",\"description\":\"Connector responses.\"}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\"},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\"},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\"}}},\"contacts\":{\"type\":\"array\",\"description\":\"List of contacts.\",\"items\":{\"type\":\"object\",\"description\":\"Contact information.\",\"properties\":{\"contactId\":{\"type\":\"string\",\"description\":\"Contact's unique identifier.\"},\"email\":{\"type\":\"string\",\"description\":\"Contact's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Contact's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Contact's last name.\"},\"phone\":{\"type\":\"string\",\"description\":\"Contact's phone number.\"},\"document\":{\"type\":\"string\",\"description\":\"Contact's document.\"}}}},\"invoiceSubject\":{\"type\":\"object\",\"description\":\"Information about the invoice subject.\",\"properties\":{\"invoiceSubjectId\":{\"type\":\"string\",\"description\":\"Invoice subject ID.\"},\"email\":{\"type\":\"string\",\"description\":\"Invoice subject's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Invoice subject's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Invoice subject's last name.\"},\"phone\":{\"type\":\"string\",\"description\":\"Invoice subject's phone number.\"}}},\"email\":{\"type\":\"string\",\"description\":\"Prospect's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Prospect's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Prospect's last name.\"},\"document\":{\"type\":\"string\",\"description\":\"Prospect's document.\"},\"cellPhone\":{\"type\":\"string\",\"description\":\"Prospect's cellphone number.\"},\"isPJ\":{\"type\":\"boolean\",\"description\":\"Defines if a prospect is corporate (`true`) or not (`false`).\"},\"customerCode\":{\"type\":\"string\",\"description\":\"Prospect's customer code.\"}}},\"meta\":{\"title\":\"Prospect information metadata.\",\"description\":\"Prospect information metadata.\",\"type\":\"object\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the prospect version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the prospect.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was last updated in ISO 8601 format.\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the prospect information expires in ISO 8601 format.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[PATCH]::/api/storage/profile-system/prospects/:prospectId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "8b38c1b9-c620-43f4-be56-8b1fb5fcc1dc", "name": "Delete prospect", "request": { "name": "Delete prospect", "description": { "content": "Deletes a prospect by `prospectId`.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "prospects", ":prospectId" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the prospect as returned by the [Create prospect](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/prospects) endpoint's response, in the `id` field.", "type": "text/plain" }, "type": "any", "value": "98478f6b-d025-4f35-a560-dd1ee7a6f26e", "key": "prospectId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" } ], "method": "DELETE", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "text" }, "id": "9b2c7871-1872-4129-9aff-3f741be6dc37", "name": "No content", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "prospects", ":prospectId" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "DELETE", "body": {} }, "status": "No Content", "code": 204, "header": [], "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "205fbfc7-6e63-4d16-bc7e-6030829502be", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[DELETE]::/api/storage/profile-system/prospects/:prospectId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response has empty Body \npm.test(\"[DELETE]::/api/storage/profile-system/prospects/:prospectId - Response has empty Body\", function () {\n pm.response.to.not.be.withBody;\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "be59cbd7-1467-4ce2-bce9-a6e5e23127d8", "name": "Get unmasked prospect", "request": { "name": "Get unmasked prospect", "description": { "content": "Retrieves unmasked information of a specific prospect, by its `prospectId`.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "prospects", ":prospectId", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": false, "description": { "content": "(Required) Reason for requesting unmasked data.", "type": "text/plain" }, "key": "reason", "value": "data-validation" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the prospect as returned by the [Create prospect](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/prospects) endpoint's response, in the `id` field.", "type": "text/plain" }, "type": "any", "value": "98478f6b-d025-4f35-a560-dd1ee7a6f26e", "key": "prospectId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "d587c409-f7cb-440b-9497-ec85aad736df", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "prospects", ":prospectId", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": false, "description": { "content": "(Required) Reason for requesting unmasked data.", "type": "text/plain" }, "key": "reason", "value": "data-validation" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"id\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"document\": {\n \"availableAddresses\": [\n {\n \"disposable\": true,\n \"userId\": \"98478f6b-d025-4f35-a560-dd1ee7a6f26e\",\n \"addressName\": \"customerAddressId\",\n \"addressType\": \"residential\",\n \"postalCode\": \"32137\",\n \"city\": \"Palm Coast\",\n \"country\": \"USA\",\n \"street\": \"Fifth St.\",\n \"number\": \"9538\",\n \"complement\": \"\",\n \"receiverName\": \"Jane Doe\",\n \"geoCoordinate\": []\n }\n ],\n \"paymentData\": {\n \"availableAccounts\": [],\n \"availableTokens\": [],\n \"transactions\": null,\n \"giftCards\": [],\n \"giftCardMessages\": [],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"contacts\": [\n {\n \"contactId\": \"0\",\n \"email\": \"\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"\",\n \"document\": \"\",\n \"documentType\": \"\"\n }\n ],\n \"invoiceSubject\": {\n \"invoiceSubjectId\": \"0\",\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phone\": \"12345678910\"\n },\n \"email\": \"jane@mail.com\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"document\": \"5397eefef23741d4976ebdf772cc42e0\",\n \"cellPhone\": \"12345678910\",\n \"isPJ\": false,\n \"customerCode\": \"5397eefe-f237-41d4-976e-bdf772cc42e0\"\n },\n \"meta\": {\n \"version\": \"af9117e9-4169-46ee-ab4b-d4b17b881488\",\n \"author\": \"d6d8269f-e7cc-4e4b-8b89-3b46a1407937\",\n \"creationDate\": \"2023-10-25T13:59:52.7633627+00:00\",\n \"lastUpdateDate\": \"2023-10-25T14:02:45.7277154+00:00\",\n \"expirationDate\": null\n }\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "41c2282b-9521-488e-9973-69dd32a0bf76", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/prospects/:prospectId/unmask - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/prospects/:prospectId/unmask - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/prospects/:prospectId/unmask - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Unmasked prospect information.\",\"type\":\"object\",\"description\":\"Unmasked prospect information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the prospect.\"},\"document\":{\"title\":\"Prospect information.\",\"type\":\"object\",\"description\":\"Prospect information.\",\"properties\":{\"availableAddresses\":{\"type\":\"array\",\"description\":\"Available addresses.\",\"items\":{\"type\":\"object\",\"description\":\"Available address information.\",\"properties\":{\"disposable\":{\"type\":\"boolean\",\"description\":\"Defines whether the address is deleted after use (`true`) or not (`false`).\"},\"userId\":{\"type\":\"string\",\"description\":\"User unique identifier.\"},\"addressName\":{\"type\":\"string\",\"description\":\"Address name.\"},\"addressType\":{\"type\":\"string\",\"description\":\"Address type.\"},\"postalCode\":{\"type\":\"string\",\"description\":\"Postal code.\"},\"city\":{\"type\":\"string\",\"description\":\"City.\"},\"country\":{\"type\":\"string\",\"description\":\"Country code.\"},\"street\":{\"type\":\"string\",\"description\":\"Street name.\"},\"number\":{\"type\":\"string\",\"description\":\"Street number.\"},\"complement\":{\"type\":\"string\",\"description\":\"Complement information.\"},\"geoCoordinate\":{\"type\":\"array\",\"description\":\"Array with two strings that represent geocoordinates: first latitude, then longitude.\",\"items\":{\"type\":\"string\",\"description\":\"Geocoordinate.\"}}}}},\"paymentData\":{\"title\":\"paymentData\",\"type\":\"object\",\"description\":\"Payment data.\",\"properties\":{\"availableAccounts\":{\"type\":\"array\",\"description\":\"List of available payment accounts.\",\"items\":{\"type\":\"object\",\"description\":\"Information about an available payment account.\",\"properties\":{\"accountId\":{\"type\":\"string\",\"description\":\"Payment account ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\"},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\"}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\"}},\"transactions\":{\"type\":[\"array\",\"null\"],\"description\":\"List of transactions.\",\"items\":{\"type\":\"object\",\"description\":\"Transaction information.\",\"required\":[\"isActive\",\"transactionId\",\"merchantName\",\"payments\"],\"properties\":{\"isActive\":{\"type\":\"boolean\",\"description\":\"Indicates whether the transaction is active (`true`) or not (`false`).\"},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\"},\"payments\":{\"type\":\"array\",\"description\":\"List of payments information.\",\"items\":{\"title\":\"Payment\",\"required\":[\"id\",\"paymentSystem\",\"paymentSystemName\",\"value\",\"installments\",\"referenceValue\",\"cardHolder\",\"cardNumber\",\"firstDigits\",\"lastDigits\",\"cvv2\",\"expireMonth\",\"expireYear\",\"url\",\"giftCardId\",\"giftCardName\",\"giftCardCaption\",\"redemptionCode\",\"group\",\"tid\",\"dueDate\",\"connectorResponses\"],\"type\":\"object\",\"description\":\"Payment information.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Payment ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"value\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment value in cents.\"},\"installments\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment installments.\"},\"referenceValue\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Reference value for interest calculation in cents.\"},\"cardHolder\":{\"type\":[\"string\",\"null\"],\"description\":\"Card holder.\"},\"cardNumber\":{\"type\":[\"string\",\"null\"],\"description\":\"Card number.\"},\"firstDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card first digits.\"},\"lastDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card last digits.\"},\"cvv2\":{\"type\":[\"string\",\"null\"],\"description\":\"Card verification code.\"},\"expireMonth\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration month.\"},\"expireYear\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration year.\"},\"url\":{\"type\":\"string\",\"description\":\"Payment URL.\"},\"giftCardId\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card ID.\"},\"giftCardName\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card name.\"},\"giftCardCaption\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card caption.\"},\"redemptionCode\":{\"type\":[\"string\",\"null\"],\"description\":\"Redemption code.\"},\"group\":{\"type\":\"string\",\"description\":\"Payment group.\"},\"tid\":{\"type\":[\"string\",\"null\"],\"description\":\"Payment TID.\"},\"dueDate\":{\"type\":\"string\",\"description\":\"Due date.\"},\"connectorResponses\":{\"type\":\"object\",\"description\":\"Connector responses.\"}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\"},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\"},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\"}}},\"contacts\":{\"type\":\"array\",\"description\":\"List of contacts.\",\"items\":{\"type\":\"object\",\"description\":\"Contact information.\",\"properties\":{\"contactId\":{\"type\":\"string\",\"description\":\"Contact's unique identifier.\"},\"email\":{\"type\":\"string\",\"description\":\"Contact's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Contact's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Contact's last name.\"},\"phone\":{\"type\":\"string\",\"description\":\"Contact's phone number.\"},\"document\":{\"type\":\"string\",\"description\":\"Contact's document.\"}}}},\"invoiceSubject\":{\"type\":\"object\",\"description\":\"Information about the invoice subject.\",\"properties\":{\"invoiceSubjectId\":{\"type\":\"string\",\"description\":\"Invoice subject ID.\"},\"email\":{\"type\":\"string\",\"description\":\"Invoice subject's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Invoice subject's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Invoice subject's last name.\"},\"phone\":{\"type\":\"string\",\"description\":\"Invoice subject's phone number.\"}}},\"email\":{\"type\":\"string\",\"description\":\"Prospect's email address.\"},\"firstName\":{\"type\":\"string\",\"description\":\"Prospect's first name.\"},\"lastName\":{\"type\":\"string\",\"description\":\"Prospect's last name.\"},\"document\":{\"type\":\"string\",\"description\":\"Prospect's document.\"},\"cellPhone\":{\"type\":\"string\",\"description\":\"Prospect's cellphone number.\"},\"isPJ\":{\"type\":\"boolean\",\"description\":\"Defines if a prospect is corporate (`true`) or not (`false`).\"},\"customerCode\":{\"type\":\"string\",\"description\":\"Prospect's customer code.\"}}},\"meta\":{\"title\":\"Prospect information metadata.\",\"description\":\"Prospect information metadata.\",\"type\":\"object\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the prospect version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the prospect.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was last updated in ISO 8601 format.\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the prospect information expires in ISO 8601 format.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/prospects/:prospectId/unmask - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } } ], "event": [] }, { "id": "bdad3b91-94ea-460c-93ab-0907a9a13fad", "name": "Purchase information", "description": { "content": "", "type": "text/plain" }, "item": [ { "id": "bac4d30a-693d-4947-b258-727329ecaeea", "name": "Create purchase information", "request": { "name": "Create purchase information", "description": { "content": "Creates purchase information for a given client profile.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "purchase-info" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "POST", "body": { "mode": "raw", "raw": "{\n \"paymentData\": {\n \"availableAccounts\": [\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443334\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n }\n ],\n \"availableTokens\": [],\n \"transactions\": null,\n \"giftCards\": [],\n \"giftCardMessages\": [],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"clientPreferences\": {\n \"userId\": \"d9b946b8-9524-4b2d-96ec-b35d0625c0a7\",\n \"localeDefault\": \"pt-BR\",\n \"isNewsletterOptIn\": true\n },\n \"isToSavePersonalData\": true,\n \"lastUserPurchases\": [\n {\n \"creationDate\": \"2023-10-23T19:22:12.8989883Z\",\n \"orderId\": \"1370990595750-01\",\n \"orderGroup\": \"1370990595750\",\n \"value\": 3498\n }\n ],\n \"lastPurchasesAddressId\": \"db267dcc53c14fb2b9a985532dd287bc\"\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "2ef07106-5392-45cf-9090-95df67cceeca", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "purchase-info" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "POST", "body": { "mode": "raw", "raw": "{\n \"paymentData\": {\n \"availableAccounts\": [\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443334\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n }\n ],\n \"availableTokens\": [],\n \"transactions\": null,\n \"giftCards\": [],\n \"giftCardMessages\": [],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"clientPreferences\": {\n \"userId\": \"d9b946b8-9524-4b2d-96ec-b35d0625c0a7\",\n \"localeDefault\": \"pt-BR\",\n \"isNewsletterOptIn\": true\n },\n \"isToSavePersonalData\": true,\n \"lastUserPurchases\": [\n {\n \"creationDate\": \"2023-10-23T19:22:12.8989883Z\",\n \"orderId\": \"1370990595750-01\",\n \"orderGroup\": \"1370990595750\",\n \"value\": 3498\n }\n ],\n \"lastPurchasesAddressId\": \"db267dcc53c14fb2b9a985532dd287bc\"\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"id\": \"d9b946b8-9524-4b2d-96ec-b35d0625c0a7\",\n \"document\": {\n \"paymentData\": {\n \"availableAccounts\": [\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443334\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n }\n ],\n \"availableTokens\": [],\n \"transactions\": null,\n \"giftCards\": [],\n \"giftCardMessages\": [],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"clientPreferences\": {\n \"userId\": \"d9b946b8-9524-4b2d-96ec-b35d0625c0a7\",\n \"localeDefault\": \"pt-BR\",\n \"isNewsletterOptIn\": true\n },\n \"isToSavePersonalData\": true,\n \"lastUserPurchases\": [\n {\n \"creationDate\": \"2023-10-23T19:22:12.8989883Z\",\n \"orderId\": \"1370990595750-01\",\n \"orderGroup\": \"1370990595750\",\n \"value\": 3498\n }\n ],\n \"lastPurchasesAddressId\": \"db267dcc53c14fb2b9a985532dd287bc\"\n },\n \"meta\": {\n \"version\": \"6f693feb-7354-4a44-af96-3693ed282a2e\",\n \"author\": \"7b95bb3d-b567-48b2-b6fa-48b0b6c7f112\",\n \"creationDate\": \"2023-10-23T19:22:23.6716469+00:00\",\n \"lastUpdateDate\": \"2023-10-24T16:18:25.7338837+00:00\",\n \"expirationDate\": null\n }\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "7c278a2c-6f2d-4221-95d2-848a73c4a29c", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/storage/profile-system/profiles/:profileId/purchase-info - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[POST]::/api/storage/profile-system/profiles/:profileId/purchase-info - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[POST]::/api/storage/profile-system/profiles/:profileId/purchase-info - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Masked purchase information response.\",\"type\":\"object\",\"description\":\"Masked purchase information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of purchase information.\"},\"document\":{\"title\":\"Purchase information.\",\"type\":\"object\",\"description\":\"Purchase information object.\",\"properties\":{\"paymentData\":{\"title\":\"paymentData\",\"type\":\"object\",\"description\":\"Payment data.\",\"properties\":{\"availableAccounts\":{\"type\":\"array\",\"description\":\"List of available payment accounts.\",\"items\":{\"type\":\"object\",\"description\":\"Information about an available payment account.\",\"properties\":{\"accountId\":{\"type\":\"string\",\"description\":\"Payment account ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\"},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\"}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\"}},\"transactions\":{\"type\":[\"array\",\"null\"],\"description\":\"List of transactions.\",\"items\":{\"type\":\"object\",\"description\":\"Transaction information.\",\"required\":[\"isActive\",\"transactionId\",\"merchantName\",\"payments\"],\"properties\":{\"isActive\":{\"type\":\"boolean\",\"description\":\"Indicates whether the transaction is active (`true`) or not (`false`).\"},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\"},\"payments\":{\"type\":\"array\",\"description\":\"List of payments information.\",\"items\":{\"title\":\"Payment\",\"required\":[\"id\",\"paymentSystem\",\"paymentSystemName\",\"value\",\"installments\",\"referenceValue\",\"cardHolder\",\"cardNumber\",\"firstDigits\",\"lastDigits\",\"cvv2\",\"expireMonth\",\"expireYear\",\"url\",\"giftCardId\",\"giftCardName\",\"giftCardCaption\",\"redemptionCode\",\"group\",\"tid\",\"dueDate\",\"connectorResponses\"],\"type\":\"object\",\"description\":\"Payment information.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Payment ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"value\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment value in cents.\"},\"installments\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment installments.\"},\"referenceValue\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Reference value for interest calculation in cents.\"},\"cardHolder\":{\"type\":[\"string\",\"null\"],\"description\":\"Card holder.\"},\"cardNumber\":{\"type\":[\"string\",\"null\"],\"description\":\"Card number.\"},\"firstDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card first digits.\"},\"lastDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card last digits.\"},\"cvv2\":{\"type\":[\"string\",\"null\"],\"description\":\"Card verification code.\"},\"expireMonth\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration month.\"},\"expireYear\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration year.\"},\"url\":{\"type\":\"string\",\"description\":\"Payment URL.\"},\"giftCardId\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card ID.\"},\"giftCardName\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card name.\"},\"giftCardCaption\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card caption.\"},\"redemptionCode\":{\"type\":[\"string\",\"null\"],\"description\":\"Redemption code.\"},\"group\":{\"type\":\"string\",\"description\":\"Payment group.\"},\"tid\":{\"type\":[\"string\",\"null\"],\"description\":\"Payment TID.\"},\"dueDate\":{\"type\":\"string\",\"description\":\"Due date.\"},\"connectorResponses\":{\"type\":\"object\",\"description\":\"Connector responses.\"}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\"},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\"},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\"}}},\"clientPreferences\":{\"type\":\"object\",\"description\":\"Client preferences.\",\"properties\":{}},\"isToSavePersonalData\":{\"type\":\"boolean\",\"description\":\"Defines if personal data will be saved (`true`) or not (`false`).\"},\"lastUserPurchases\":{\"type\":\"array\",\"description\":\"Array with latest purchases from the client.\",\"items\":{\"type\":\"object\",\"description\":\"Purchase information.\",\"properties\":{\"creationDate\":{\"type\":\"string\",\"description\":\"Purchase date in the ISO 8601 format.\"},\"orderId\":{\"type\":\"string\",\"description\":\"Unique identifier of the order.\"},\"orderGroup\":{\"type\":\"string\",\"description\":\"Unique identifier of the order group.\"},\"value\":{\"type\":\"number\",\"description\":\"Purchase value.\"}}}},\"lastPurchasesAddressId\":{\"type\":\"string\",\"description\":\"Unique identifier of the client address.\"}}},\"meta\":{\"title\":\"Purchase information metadata.\",\"type\":\"object\",\"description\":\"Purchase information metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the purchase information version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the purchase information.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the purchase information was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the purchase information was last updated in ISO 8601 format.\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the purchase information expires in ISO 8601 format.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[POST]::/api/storage/profile-system/profiles/:profileId/purchase-info - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "a38ae60b-d626-42af-8a22-f05d5f71db04", "name": "Get purchase information", "request": { "name": "Get purchase information", "description": { "content": "Retrieves purchase information of a given client, by its `profileId`.\n\r\n\r> For security and privacy reasons, this request returns masked data. For unmasked information, see [Get unmasked purchase information](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/purchase-info/unmask).\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "purchase-info" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "cdaa8f09-c9ca-4076-b6da-91696450c4ad", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "purchase-info" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "[\n {\n \"id\": \"d9b946b8-9524-4b2d-96ec-b35d0625c0a7\",\n \"document\": {\n \"paymentData\": {\n \"availableAccounts\": [\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443333\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n }\n ],\n \"availableTokens\": [],\n \"transactions\": null,\n \"giftCards\": [],\n \"giftCardMessages\": [],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"clientPreferences\": {\n \"userId\": \"d9b946b8-9524-4b2d-96ec-b35d0625c0a7\",\n \"localeDefault\": \"pt-BR\",\n \"isNewsletterOptIn\": true\n },\n \"isToSavePersonalData\": true,\n \"lastUserPurchases\": [\n {\n \"creationDate\": \"2023-10-23T19:22:12.8989883Z\",\n \"orderId\": \"1370990595750-01\",\n \"orderGroup\": \"1370990595750\",\n \"value\": 3498\n }\n ],\n \"lastPurchasesAddressId\": \"db267dcc53c14fb2b9a985532dd287bc\"\n },\n \"meta\": {\n \"version\": \"3117771f-8ea6-4297-a487-07e9b5497bc5\",\n \"author\": \"6fd337ba-1e6c-4d3e-aceb-1d8993432193\",\n \"creationDate\": \"2023-10-23T19:22:23.6716469+00:00\",\n \"lastUpdateDate\": \"2023-10-23T19:22:25.5466348+00:00\",\n \"expirationDate\": null\n }\n }\n]", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "27be66f0-e7bb-4607-886b-54909196f591", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/purchase-info - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/purchase-info - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/purchase-info - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"type\":\"array\",\"items\":{\"title\":\"Masked purchase information response.\",\"type\":\"object\",\"description\":\"Masked purchase information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of purchase information.\"},\"document\":{\"title\":\"Purchase information.\",\"type\":\"object\",\"description\":\"Purchase information object.\",\"properties\":{\"paymentData\":{\"title\":\"paymentData\",\"type\":\"object\",\"description\":\"Payment data.\",\"properties\":{\"availableAccounts\":{\"type\":\"array\",\"description\":\"List of available payment accounts.\",\"items\":{\"type\":\"object\",\"description\":\"Information about an available payment account.\",\"properties\":{\"accountId\":{\"type\":\"string\",\"description\":\"Payment account ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\"},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\"}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\"}},\"transactions\":{\"type\":[\"array\",\"null\"],\"description\":\"List of transactions.\",\"items\":{\"type\":\"object\",\"description\":\"Transaction information.\",\"required\":[\"isActive\",\"transactionId\",\"merchantName\",\"payments\"],\"properties\":{\"isActive\":{\"type\":\"boolean\",\"description\":\"Indicates whether the transaction is active (`true`) or not (`false`).\"},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\"},\"payments\":{\"type\":\"array\",\"description\":\"List of payments information.\",\"items\":{\"title\":\"Payment\",\"required\":[\"id\",\"paymentSystem\",\"paymentSystemName\",\"value\",\"installments\",\"referenceValue\",\"cardHolder\",\"cardNumber\",\"firstDigits\",\"lastDigits\",\"cvv2\",\"expireMonth\",\"expireYear\",\"url\",\"giftCardId\",\"giftCardName\",\"giftCardCaption\",\"redemptionCode\",\"group\",\"tid\",\"dueDate\",\"connectorResponses\"],\"type\":\"object\",\"description\":\"Payment information.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Payment ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"value\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment value in cents.\"},\"installments\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment installments.\"},\"referenceValue\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Reference value for interest calculation in cents.\"},\"cardHolder\":{\"type\":[\"string\",\"null\"],\"description\":\"Card holder.\"},\"cardNumber\":{\"type\":[\"string\",\"null\"],\"description\":\"Card number.\"},\"firstDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card first digits.\"},\"lastDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card last digits.\"},\"cvv2\":{\"type\":[\"string\",\"null\"],\"description\":\"Card verification code.\"},\"expireMonth\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration month.\"},\"expireYear\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration year.\"},\"url\":{\"type\":\"string\",\"description\":\"Payment URL.\"},\"giftCardId\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card ID.\"},\"giftCardName\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card name.\"},\"giftCardCaption\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card caption.\"},\"redemptionCode\":{\"type\":[\"string\",\"null\"],\"description\":\"Redemption code.\"},\"group\":{\"type\":\"string\",\"description\":\"Payment group.\"},\"tid\":{\"type\":[\"string\",\"null\"],\"description\":\"Payment TID.\"},\"dueDate\":{\"type\":\"string\",\"description\":\"Due date.\"},\"connectorResponses\":{\"type\":\"object\",\"description\":\"Connector responses.\"}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\"},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\"},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\"}}},\"clientPreferences\":{\"type\":\"object\",\"description\":\"Client preferences.\",\"properties\":{}},\"isToSavePersonalData\":{\"type\":\"boolean\",\"description\":\"Defines if personal data will be saved (`true`) or not (`false`).\"},\"lastUserPurchases\":{\"type\":\"array\",\"description\":\"Array with latest purchases from the client.\",\"items\":{\"type\":\"object\",\"description\":\"Purchase information.\",\"properties\":{\"creationDate\":{\"type\":\"string\",\"description\":\"Purchase date in the ISO 8601 format.\"},\"orderId\":{\"type\":\"string\",\"description\":\"Unique identifier of the order.\"},\"orderGroup\":{\"type\":\"string\",\"description\":\"Unique identifier of the order group.\"},\"value\":{\"type\":\"number\",\"description\":\"Purchase value.\"}}}},\"lastPurchasesAddressId\":{\"type\":\"string\",\"description\":\"Unique identifier of the client address.\"}}},\"meta\":{\"title\":\"Purchase information metadata.\",\"type\":\"object\",\"description\":\"Purchase information metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the purchase information version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the purchase information.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the purchase information was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the purchase information was last updated in ISO 8601 format.\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the purchase information expires in ISO 8601 format.\"}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/purchase-info - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "7e0a0156-1435-419b-8a4e-df7773bdd635", "name": "Update purchase information", "request": { "name": "Update purchase information", "description": { "content": "Updates one or more fields of existing purchase information for a given client profile.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "purchase-info" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "PATCH", "body": { "mode": "raw", "raw": "{\n \"paymentData\": {\n \"availableAccounts\": [\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443334\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n }\n ],\n \"availableTokens\": [],\n \"transactions\": null,\n \"giftCards\": [],\n \"giftCardMessages\": [],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"clientPreferences\": {\n \"userId\": \"d9b946b8-9524-4b2d-96ec-b35d0625c0a7\",\n \"localeDefault\": \"pt-BR\",\n \"isNewsletterOptIn\": true\n },\n \"isToSavePersonalData\": true,\n \"lastUserPurchases\": [\n {\n \"creationDate\": \"2023-10-23T19:22:12.8989883Z\",\n \"orderId\": \"1370990595750-01\",\n \"orderGroup\": \"1370990595750\",\n \"value\": 3498\n }\n ],\n \"lastPurchasesAddressId\": \"db267dcc53c14fb2b9a985532dd287bc\"\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "42c2c1d3-e437-4f81-ad8f-5ee155896cd5", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "purchase-info" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "PATCH", "body": { "mode": "raw", "raw": "{\n \"paymentData\": {\n \"availableAccounts\": [\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443334\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n }\n ],\n \"availableTokens\": [],\n \"transactions\": null,\n \"giftCards\": [],\n \"giftCardMessages\": [],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"clientPreferences\": {\n \"userId\": \"d9b946b8-9524-4b2d-96ec-b35d0625c0a7\",\n \"localeDefault\": \"pt-BR\",\n \"isNewsletterOptIn\": true\n },\n \"isToSavePersonalData\": true,\n \"lastUserPurchases\": [\n {\n \"creationDate\": \"2023-10-23T19:22:12.8989883Z\",\n \"orderId\": \"1370990595750-01\",\n \"orderGroup\": \"1370990595750\",\n \"value\": 3498\n }\n ],\n \"lastPurchasesAddressId\": \"db267dcc53c14fb2b9a985532dd287bc\"\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"id\": \"d9b946b8-9524-4b2d-96ec-b35d0625c0a7\",\n \"document\": {\n \"paymentData\": {\n \"availableAccounts\": [\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443334\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n }\n ],\n \"availableTokens\": [],\n \"transactions\": null,\n \"giftCards\": [],\n \"giftCardMessages\": [],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"clientPreferences\": {\n \"userId\": \"d9b946b8-9524-4b2d-96ec-b35d0625c0a7\",\n \"localeDefault\": \"pt-BR\",\n \"isNewsletterOptIn\": true\n },\n \"isToSavePersonalData\": true,\n \"lastUserPurchases\": [\n {\n \"creationDate\": \"2023-10-23T19:22:12.8989883Z\",\n \"orderId\": \"1370990595750-01\",\n \"orderGroup\": \"1370990595750\",\n \"value\": 3498\n }\n ],\n \"lastPurchasesAddressId\": \"db267dcc53c14fb2b9a985532dd287bc\"\n },\n \"meta\": {\n \"version\": \"6f693feb-7354-4a44-af96-3693ed282a2e\",\n \"author\": \"7b95bb3d-b567-48b2-b6fa-48b0b6c7f112\",\n \"creationDate\": \"2023-10-23T19:22:23.6716469+00:00\",\n \"lastUpdateDate\": \"2023-10-24T16:18:25.7338837+00:00\",\n \"expirationDate\": null\n }\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "ede87c54-827c-44ae-b810-11818768c767", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PATCH]::/api/storage/profile-system/profiles/:profileId/purchase-info - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[PATCH]::/api/storage/profile-system/profiles/:profileId/purchase-info - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[PATCH]::/api/storage/profile-system/profiles/:profileId/purchase-info - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Masked purchase information response.\",\"type\":\"object\",\"description\":\"Masked purchase information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of purchase information.\"},\"document\":{\"title\":\"Purchase information.\",\"type\":\"object\",\"description\":\"Purchase information object.\",\"properties\":{\"paymentData\":{\"title\":\"paymentData\",\"type\":\"object\",\"description\":\"Payment data.\",\"properties\":{\"availableAccounts\":{\"type\":\"array\",\"description\":\"List of available payment accounts.\",\"items\":{\"type\":\"object\",\"description\":\"Information about an available payment account.\",\"properties\":{\"accountId\":{\"type\":\"string\",\"description\":\"Payment account ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\"},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\"}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\"}},\"transactions\":{\"type\":[\"array\",\"null\"],\"description\":\"List of transactions.\",\"items\":{\"type\":\"object\",\"description\":\"Transaction information.\",\"required\":[\"isActive\",\"transactionId\",\"merchantName\",\"payments\"],\"properties\":{\"isActive\":{\"type\":\"boolean\",\"description\":\"Indicates whether the transaction is active (`true`) or not (`false`).\"},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\"},\"payments\":{\"type\":\"array\",\"description\":\"List of payments information.\",\"items\":{\"title\":\"Payment\",\"required\":[\"id\",\"paymentSystem\",\"paymentSystemName\",\"value\",\"installments\",\"referenceValue\",\"cardHolder\",\"cardNumber\",\"firstDigits\",\"lastDigits\",\"cvv2\",\"expireMonth\",\"expireYear\",\"url\",\"giftCardId\",\"giftCardName\",\"giftCardCaption\",\"redemptionCode\",\"group\",\"tid\",\"dueDate\",\"connectorResponses\"],\"type\":\"object\",\"description\":\"Payment information.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Payment ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"value\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment value in cents.\"},\"installments\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment installments.\"},\"referenceValue\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Reference value for interest calculation in cents.\"},\"cardHolder\":{\"type\":[\"string\",\"null\"],\"description\":\"Card holder.\"},\"cardNumber\":{\"type\":[\"string\",\"null\"],\"description\":\"Card number.\"},\"firstDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card first digits.\"},\"lastDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card last digits.\"},\"cvv2\":{\"type\":[\"string\",\"null\"],\"description\":\"Card verification code.\"},\"expireMonth\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration month.\"},\"expireYear\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration year.\"},\"url\":{\"type\":\"string\",\"description\":\"Payment URL.\"},\"giftCardId\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card ID.\"},\"giftCardName\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card name.\"},\"giftCardCaption\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card caption.\"},\"redemptionCode\":{\"type\":[\"string\",\"null\"],\"description\":\"Redemption code.\"},\"group\":{\"type\":\"string\",\"description\":\"Payment group.\"},\"tid\":{\"type\":[\"string\",\"null\"],\"description\":\"Payment TID.\"},\"dueDate\":{\"type\":\"string\",\"description\":\"Due date.\"},\"connectorResponses\":{\"type\":\"object\",\"description\":\"Connector responses.\"}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\"},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\"},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\"}}},\"clientPreferences\":{\"type\":\"object\",\"description\":\"Client preferences.\",\"properties\":{}},\"isToSavePersonalData\":{\"type\":\"boolean\",\"description\":\"Defines if personal data will be saved (`true`) or not (`false`).\"},\"lastUserPurchases\":{\"type\":\"array\",\"description\":\"Array with latest purchases from the client.\",\"items\":{\"type\":\"object\",\"description\":\"Purchase information.\",\"properties\":{\"creationDate\":{\"type\":\"string\",\"description\":\"Purchase date in the ISO 8601 format.\"},\"orderId\":{\"type\":\"string\",\"description\":\"Unique identifier of the order.\"},\"orderGroup\":{\"type\":\"string\",\"description\":\"Unique identifier of the order group.\"},\"value\":{\"type\":\"number\",\"description\":\"Purchase value.\"}}}},\"lastPurchasesAddressId\":{\"type\":\"string\",\"description\":\"Unique identifier of the client address.\"}}},\"meta\":{\"title\":\"Purchase information metadata.\",\"type\":\"object\",\"description\":\"Purchase information metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the purchase information version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the purchase information.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the purchase information was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the purchase information was last updated in ISO 8601 format.\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the purchase information expires in ISO 8601 format.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[PATCH]::/api/storage/profile-system/profiles/:profileId/purchase-info - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "9557cb0e-fae0-4dec-a7cd-aa4e4d8ad732", "name": "Delete purchase information", "request": { "name": "Delete purchase information", "description": { "content": "Deletes purchase informaiton by `profileId`.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/). \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "purchase-info" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" } ], "method": "DELETE", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "text" }, "id": "600e7ba7-c67a-4eb8-8dcb-3c528f5477bc", "name": "No content", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "purchase-info" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": true, "description": { "content": "When using an alternative key as `profileId` value, fill this parameter with the key you wish to use as `profileId`.There are two possible values: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "DELETE", "body": {} }, "status": "No Content", "code": 204, "header": [], "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "af4efacc-1182-48ae-901a-cd82882a5b59", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[DELETE]::/api/storage/profile-system/profiles/:profileId/purchase-info - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response has empty Body \npm.test(\"[DELETE]::/api/storage/profile-system/profiles/:profileId/purchase-info - Response has empty Body\", function () {\n pm.response.to.not.be.withBody;\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "b44ecac8-5a8c-497a-a0e0-6fc22c8e2bc8", "name": "Get unmasked purchase information", "request": { "name": "Get unmasked purchase information", "description": { "content": "Retrieves unmasked purchase information of a given client, by its `profileId`.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/). \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "purchase-info", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": false, "description": { "content": "(Required) Reason for requesting unmasked data.", "type": "text/plain" }, "key": "reason", "value": "data-validation" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) There are two value options for this field: \n\n1. ID of the client's profile, as in the `id` field returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint.\n\r\n2. The value of an alternative key (`email` or `document`). When using this option, the `alternativeKey` query parameter is required, to inform which key is being used.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" } ] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "75b8924d-5fc3-4649-ae6d-575a624fb593", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "purchase-info", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": false, "description": { "content": "(Required) Reason for requesting unmasked data.", "type": "text/plain" }, "key": "reason", "value": "data-validation" } ], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "[\n {\n \"id\": \"d9b946b8-9524-4b2d-96ec-b35d0625c0a7\",\n \"document\": {\n \"paymentData\": {\n \"availableAccounts\": [\n {\n \"accountId\": \"D09F5E3F01054C959CFC4CB357961ADE\",\n \"paymentSystem\": \"2\",\n \"paymentSystemName\": \"Visa\",\n \"cardNumber\": \"************1111\",\n \"bin\": \"44443333\",\n \"availableAddresses\": [\n \"db267dcc53c14fb2b9a985532dd287bc\"\n ],\n \"expirationDate\": \"01/2032\",\n \"isExpired\": false,\n \"accountStatus\": null\n }\n ],\n \"availableTokens\": [],\n \"transactions\": null,\n \"giftCards\": [],\n \"giftCardMessages\": [],\n \"numberOfPaymentErrors\": 0,\n \"numberOfDeniedTransactions\": 0,\n \"lastDeniedTransaction\": null\n },\n \"clientPreferences\": {\n \"userId\": \"d9b946b8-9524-4b2d-96ec-b35d0625c0a7\",\n \"localeDefault\": \"pt-BR\",\n \"isNewsletterOptIn\": true\n },\n \"isToSavePersonalData\": true,\n \"lastUserPurchases\": [\n {\n \"creationDate\": \"2023-10-23T19:22:12.8989883Z\",\n \"orderId\": \"1370990595750-01\",\n \"orderGroup\": \"1370990595750\",\n \"value\": 3498\n }\n ],\n \"lastPurchasesAddressId\": \"db267dcc53c14fb2b9a985532dd287bc\"\n },\n \"meta\": {\n \"version\": \"cea5fcd2-7444-492d-9d63-1c05713e6776\",\n \"author\": \"7b95bb3d-b567-48b2-b6fa-48b0b6c7f112\",\n \"creationDate\": \"2023-10-24T16:22:55.0252384+00:00\",\n \"lastUpdateDate\": \"2023-10-24T16:22:55.0252384+00:00\",\n \"expirationDate\": null\n }\n }\n]", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "17cd9bb7-2192-4370-9cde-0802c448c221", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/purchase-info/unmask - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/purchase-info/unmask - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/purchase-info/unmask - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"type\":\"array\",\"description\":\"List of purchase information.\",\"items\":{\"title\":\"Masked purchase information response.\",\"type\":\"object\",\"description\":\"Masked purchase information.\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of purchase information.\"},\"document\":{\"title\":\"Purchase information.\",\"type\":\"object\",\"description\":\"Purchase information object.\",\"properties\":{\"paymentData\":{\"title\":\"paymentData\",\"type\":\"object\",\"description\":\"Payment data.\",\"properties\":{\"availableAccounts\":{\"type\":\"array\",\"description\":\"List of available payment accounts.\",\"items\":{\"type\":\"object\",\"description\":\"Information about an available payment account.\",\"properties\":{\"accountId\":{\"type\":\"string\",\"description\":\"Payment account ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\"},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\"}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\"}},\"transactions\":{\"type\":[\"array\",\"null\"],\"description\":\"List of transactions.\",\"items\":{\"type\":\"object\",\"description\":\"Transaction information.\",\"required\":[\"isActive\",\"transactionId\",\"merchantName\",\"payments\"],\"properties\":{\"isActive\":{\"type\":\"boolean\",\"description\":\"Indicates whether the transaction is active (`true`) or not (`false`).\"},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\"},\"payments\":{\"type\":\"array\",\"description\":\"List of payments information.\",\"items\":{\"title\":\"Payment\",\"required\":[\"id\",\"paymentSystem\",\"paymentSystemName\",\"value\",\"installments\",\"referenceValue\",\"cardHolder\",\"cardNumber\",\"firstDigits\",\"lastDigits\",\"cvv2\",\"expireMonth\",\"expireYear\",\"url\",\"giftCardId\",\"giftCardName\",\"giftCardCaption\",\"redemptionCode\",\"group\",\"tid\",\"dueDate\",\"connectorResponses\"],\"type\":\"object\",\"description\":\"Payment information.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Payment ID.\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system.\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\"},\"value\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment value in cents.\"},\"installments\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Payment installments.\"},\"referenceValue\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Reference value for interest calculation in cents.\"},\"cardHolder\":{\"type\":[\"string\",\"null\"],\"description\":\"Card holder.\"},\"cardNumber\":{\"type\":[\"string\",\"null\"],\"description\":\"Card number.\"},\"firstDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card first digits.\"},\"lastDigits\":{\"type\":[\"string\",\"null\"],\"description\":\"Card last digits.\"},\"cvv2\":{\"type\":[\"string\",\"null\"],\"description\":\"Card verification code.\"},\"expireMonth\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration month.\"},\"expireYear\":{\"type\":[\"string\",\"null\"],\"description\":\"Card expiration year.\"},\"url\":{\"type\":\"string\",\"description\":\"Payment URL.\"},\"giftCardId\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card ID.\"},\"giftCardName\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card name.\"},\"giftCardCaption\":{\"type\":[\"string\",\"null\"],\"description\":\"Gift card caption.\"},\"redemptionCode\":{\"type\":[\"string\",\"null\"],\"description\":\"Redemption code.\"},\"group\":{\"type\":\"string\",\"description\":\"Payment group.\"},\"tid\":{\"type\":[\"string\",\"null\"],\"description\":\"Payment TID.\"},\"dueDate\":{\"type\":\"string\",\"description\":\"Due date.\"},\"connectorResponses\":{\"type\":\"object\",\"description\":\"Connector responses.\"}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\"},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\"},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\"}}},\"clientPreferences\":{\"type\":\"object\",\"description\":\"Client preferences.\",\"properties\":{}},\"isToSavePersonalData\":{\"type\":\"boolean\",\"description\":\"Defines if personal data will be saved (`true`) or not (`false`).\"},\"lastUserPurchases\":{\"type\":\"array\",\"description\":\"Array with latest purchases from the client.\",\"items\":{\"type\":\"object\",\"description\":\"Purchase information.\",\"properties\":{\"creationDate\":{\"type\":\"string\",\"description\":\"Purchase date in the ISO 8601 format.\"},\"orderId\":{\"type\":\"string\",\"description\":\"Unique identifier of the order.\"},\"orderGroup\":{\"type\":\"string\",\"description\":\"Unique identifier of the order group.\"},\"value\":{\"type\":\"number\",\"description\":\"Purchase value.\"}}}},\"lastPurchasesAddressId\":{\"type\":\"string\",\"description\":\"Unique identifier of the client address.\"}}},\"meta\":{\"title\":\"Purchase information metadata.\",\"type\":\"object\",\"description\":\"Purchase information metadata.\",\"required\":[\"version\",\"author\",\"creationDate\",\"lastUpdateDate\"],\"properties\":{\"version\":{\"type\":\"string\",\"description\":\"Unique identifier of the purchase information version.\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the purchase information.\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the purchase information was created in ISO 8601 format.\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the purchase information was last updated in ISO 8601 format.\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the purchase information expires in ISO 8601 format.\"}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/profiles/:profileId/purchase-info/unmask - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } } ], "event": [] }, { "id": "eb47c417-f5f9-4b9b-b590-6f3485d27676", "name": "Schemas", "description": { "content": "", "type": "text/plain" }, "item": [ { "id": "2fa2916c-dc48-4ce2-9de2-4713a728e7f7", "name": "Get full schema", "request": { "name": "Get full schema", "description": { "content": "Retrieves the full profile schema, including custom fields.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/). \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "schemas", "profileSystem" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "23a46ea7-6c50-410e-ae3f-a826ec140400", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "schemas", "profileSystem" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"title\": \"Profile System Profile Schema\",\n \"description\": \"Schema used for integration testing with Checkout\",\n \"type\": \"object\",\n \"properties\": {\n \"firstName\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": true,\n \"pii\": true\n },\n \"lastName\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": true,\n \"pii\": true\n },\n \"email\": {\n \"type\": \"string\",\n \"sensitive\": true,\n \"pii\": true\n },\n \"corporateName\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": false,\n \"pii\": false\n },\n \"fancyName\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": false,\n \"pii\": false\n },\n \"document\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": true,\n \"pii\": true\n },\n \"businessDocument\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": false,\n \"pii\": false\n },\n \"documentType\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": false,\n \"pii\": false\n },\n \"homePhone\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": true,\n \"pii\": true\n },\n \"cellPhone\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": true,\n \"pii\": true\n },\n \"businessPhone\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": false,\n \"pii\": false\n },\n \"gender\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": true,\n \"pii\": false\n },\n \"birthdate\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": true,\n \"pii\": true\n },\n \"priceTable\": {\n \"type\": \"string\",\n \"sensitive\": false,\n \"pii\": false\n },\n \"tags\": {\n \"type\": [\n \"array\",\n \"null\"\n ],\n \"items\": {\n \"type\": \"string\",\n \"maxLength\": 50\n },\n \"sensitive\": false,\n \"pii\": false\n },\n \"customerCode\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": true,\n \"pii\": true\n }\n },\n \"required\": [\n \"email\"\n ],\n \"additionalProperties\": true,\n \"v-indexed\": [\n \"email\",\n \"document\"\n ],\n \"v-unique\": [\n \"email\"\n ]\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "9d419e12-801f-464c-91a8-f7e3e6d648ed", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/schemas/profileSystem - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/schemas/profileSystem - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/schemas/profileSystem - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Schema\",\"type\":\"object\",\"description\":\"Schema information.\",\"required\":[\"title\",\"type\",\"description\",\"required\",\"properties\"],\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"Schema title.\"},\"type\":{\"type\":\"string\",\"description\":\"Schema type.\"},\"description\":{\"type\":\"string\",\"description\":\"Schema's human readable description.\"},\"required\":{\"type\":\"array\",\"description\":\"Schema required fields.\",\"items\":{\"type\":\"string\",\"description\":\"Key of a field that is required in the schema.\"}},\"properties\":{\"type\":\"object\",\"description\":\"Object describing each field in your desired schema. In this object, each property is a new object, describing the field according to: `type` (string); `sensitive` (boolean); `pii` (boolean) and `items.type` (if field is array).\",\"properties\":{\"additionalProperties\":{\"type\":\"object\",\"description\":\"Schema of any given field described in the `properties` field.\",\"required\":[\"type\",\"sensitive\",\"pii\"],\"properties\":{\"type\":{\"type\":\"string\",\"description\":\"Schema property type.\"},\"sensitive\":{\"type\":\"boolean\",\"description\":\"Indicates whether the property is sensitive data. Set to `true` if `pii` is `true` and set to `false` if `pii` is `false`.\"},\"pii\":{\"type\":\"boolean\",\"description\":\"Indicates whether the property is Personal Identifiable Information (PII).\"},\"items\":{\"type\":\"object\",\"description\":\"Object containing the type of the items if the field is an array. Typically, arrays will contain strings and will be used for fields such as `email`.\",\"properties\":{\"type\":{\"type\":\"string\",\"description\":\"Field type.\"}}}}}}},\"documentTTL\":{\"type\":\"integer\",\"description\":\"Document time to live, in days. After this many days from its creation or update, any document cerated from this schema will be deleted.\"},\"version\":{\"type\":\"integer\",\"description\":\"Schema version.\"},\"v-indexed\":{\"type\":\"array\",\"description\":\"List of fields to be indexed.\",\"items\":{\"type\":\"string\",\"description\":\"Field to be indexed.\"}},\"v-unique\":{\"type\":\"array\",\"description\":\"List of fields that must be unique.\",\"items\":{\"type\":\"string\",\"description\":\"Field that must be unique.\"}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/schemas/profileSystem - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "aca2590b-1c64-462d-8589-c7055a1ba720", "name": "Create or delete custom fields", "request": { "name": "Create or delete custom fields", "description": { "content": "Creates or deletes custom fields in the profile schema. To create custom fields, include a request body. To delete all custom fields, pass an empty JSON. \n\r\n\r> Each account has one profile schema. Updating it with this request will substitute the previous version.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "schemas", "profileSystem", "custom" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" } ], "method": "PUT", "body": { "mode": "raw", "raw": "{\n \"customField1\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": true,\n \"pii\": true\n },\n \"customField2\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": false,\n \"pii\": false\n }\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "text" }, "id": "66aa3bd4-7a0d-4079-9755-09b986483799", "name": "Created", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "schemas", "profileSystem", "custom" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "PUT", "body": { "mode": "raw", "raw": "{\n \"customField1\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": true,\n \"pii\": true\n },\n \"customField2\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"sensitive\": false,\n \"pii\": false\n }\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } } }, "status": "Created", "code": 201, "header": [], "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "f74a086f-14b3-4e36-8161-185a651f07b8", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PUT]::/api/storage/profile-system/schemas/profileSystem/custom - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } }, { "id": "1b80fe6e-1e9c-4ac5-a6a0-f29d722cc94c", "name": "Get custom fields", "request": { "name": "Get custom fields", "description": { "content": "Retrieves all custom fields in the profile schema.\n\r\n\rLearn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\r\n\r\n>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/). \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) 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:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Profile System | Documents | **Get Item** |\r\n| Profile System | Documents | **Save and Update Item** |\r\n| Profile System | Documents | **Delete Item** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-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](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { "path": [ "api", "storage", "profile-system", "schemas", "profileSystem", "custom" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "method": "GET", "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "16637e8e-77ac-4112-a494-93541c8ab58a", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "schemas", "profileSystem", "custom" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [] }, "header": [ { "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", "value": "application/json" }, { "key": "Accept", "value": "application/json" }, { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" } ], "method": "GET", "body": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"title\": \"Client profile schema.\",\n \"type\": \"object\",\n \"description\": \"This schema describes a b2c customer profile.\",\n \"required\": [\n \"firstName\",\n \"lastName\",\n \"email\",\n \"document\",\n \"documentType\"\n ],\n \"properties\": {\n \"additionalProperties\": {\n \"type\": \"string\",\n \"sensitive\": true,\n \"pii\": true,\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"documentTTL\": 1825,\n \"version\": 1,\n \"v-indexed\": [\n \"email\",\n \"document\"\n ],\n \"v-unique\": [\n \"email\",\n \"document\"\n ]\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "3c86c386-bee7-4331-8769-9582b6b7fdde", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/storage/profile-system/schemas/profileSystem/custom - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/storage/profile-system/schemas/profileSystem/custom - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/storage/profile-system/schemas/profileSystem/custom - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", "// Response Validation\nconst schema = {\"title\":\"Schema\",\"type\":\"object\",\"description\":\"Schema information.\",\"required\":[\"title\",\"type\",\"description\",\"required\",\"properties\"],\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"Schema title.\"},\"type\":{\"type\":\"string\",\"description\":\"Schema type.\"},\"description\":{\"type\":\"string\",\"description\":\"Schema's human readable description.\"},\"required\":{\"type\":\"array\",\"description\":\"Schema required fields.\",\"items\":{\"type\":\"string\",\"description\":\"Key of a field that is required in the schema.\"}},\"properties\":{\"type\":\"object\",\"description\":\"Object describing each field in your desired schema. In this object, each property is a new object, describing the field according to: `type` (string); `sensitive` (boolean); `pii` (boolean) and `items.type` (if field is array).\",\"properties\":{\"additionalProperties\":{\"type\":\"object\",\"description\":\"Schema of any given field described in the `properties` field.\",\"required\":[\"type\",\"sensitive\",\"pii\"],\"properties\":{\"type\":{\"type\":\"string\",\"description\":\"Schema property type.\"},\"sensitive\":{\"type\":\"boolean\",\"description\":\"Indicates whether the property is sensitive data. Set to `true` if `pii` is `true` and set to `false` if `pii` is `false`.\"},\"pii\":{\"type\":\"boolean\",\"description\":\"Indicates whether the property is Personal Identifiable Information (PII).\"},\"items\":{\"type\":\"object\",\"description\":\"Object containing the type of the items if the field is an array. Typically, arrays will contain strings and will be used for fields such as `email`.\",\"properties\":{\"type\":{\"type\":\"string\",\"description\":\"Field type.\"}}}}}}},\"documentTTL\":{\"type\":\"integer\",\"description\":\"Document time to live, in days. After this many days from its creation or update, any document cerated from this schema will be deleted.\"},\"version\":{\"type\":\"integer\",\"description\":\"Schema version.\"},\"v-indexed\":{\"type\":\"array\",\"description\":\"List of fields to be indexed.\",\"items\":{\"type\":\"string\",\"description\":\"Field to be indexed.\"}},\"v-unique\":{\"type\":\"array\",\"description\":\"List of fields that must be unique.\",\"items\":{\"type\":\"string\",\"description\":\"Field that must be unique.\"}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/storage/profile-system/schemas/profileSystem/custom - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } ], "protocolProfileBehavior": { "disableBodyPruning": true } } ], "event": [] } ], "auth": { "type": "apikey", "apikey": [ { "type": "any", "value": "X-VTEX-API-AppKey", "key": "key" }, { "type": "any", "value": "{{apiKey}}", "key": "value" }, { "type": "any", "value": "header", "key": "in" } ] }, "event": [], "variable": [ { "type": "any", "value": "apiexamples", "key": "accountName" }, { "type": "any", "value": "vtexcommercestable", "key": "environment" }, { "type": "any", "value": "https://{{accountName}}.{{environment}}.com.br", "key": "baseUrl" } ], "info": { "_postman_id": "c1043b9a-592c-453e-97fa-a2fe30ec953b", "name": "Profile System - PII data architecture", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "description": { "content": ">⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.\r\n>\r\n> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/).\r\n\r\nThe **Profile System** is VTEX's single source of truth regarding shoppers' profile data for stores using the [PII data architecture](https://developers.vtex.com/docs/guides/pii-data-architecture-specifications) from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus). Other modules, such as **Checkout** and **Order Management**, can request data from the **Profile System** when necessary. Learn more at the [Profile System](https://developers.vtex.com/docs/guides/profile-system) guide.\r\n\r\n>⚠️ Data stored in the Profile System is not related to documents saved in [Master Data v1](https://developers.vtex.com/docs/api-reference/masterdata-api) or [Master Data v2](https://developers.vtex.com/docs/api-reference/master-data-api-v2). The API endpoints and features described in this article only apply to documents registered in the new Profile System designed to handle PII data architecture.\r\n\r\n## Index\r\n\r\n### Profiles\r\n\r\n- `POST` [Create client profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles)\r\n- `GET` [Get profile](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-)\r\n- `PATCH` [Update client profile](https://developers.vtex.com/docs/api-reference/profile-system#patch-/api/storage/profile-system/profiles/-profileId-)\r\n- `DELETE` [Delete client profile](https://developers.vtex.com/docs/api-reference/profile-system#delete-/api/storage/profile-system/profiles/-profileId-)\r\n- `GET` [Get unmasked profile](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/unmask)\r\n- `GET` [Get profile by version](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/versions/-profileVersionId-)\r\n- `GET` [Get unmasked profile by version](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/versions/-profileVersionId-/unmask)\r\n\r\n### Addresses\r\n\r\n- `POST` [Create client address](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles/-profileId-/addresses)\r\n- `GET` [Get client addresses](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/addresses)\r\n- `GET` [Get unmasked client addresses](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/addresses/unmask)\r\n- `GET` [Get address](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/addresses/-addressId-)\r\n- `PATCH` [Update client address](https://developers.vtex.com/docs/api-reference/profile-system#patch-/api/storage/profile-system/profiles/-profileId-/addresses/-addressId-)\r\n- `DELETE` [Delete address](https://developers.vtex.com/docs/api-reference/profile-system#delete-/api/storage/profile-system/profiles/-profileId-/addresses/-addressId-)\r\n- `GET` [Get unmasked address](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/addresses/-addressId-/unmask)\r\n- `GET` [Get address by version](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/addresses/-addressId-/versions/-addressVersionId-)\r\n- `GET` [Get unmasked address by version](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/addresses/-addressId-/versions/-addressVersionId-/unmask)\r\n\r\n### Prospects\r\n\r\n- `POST` [Create prospect](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/prospects)\r\n- `GET` [Get prospect](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/prospects/-prospectId-)\r\n- `PATCH` [Update prospect](https://developers.vtex.com/docs/api-reference/profile-system#patch-/api/storage/profile-system/prospects/-prospectId-)\r\n- `DELETE` [Delete prospect](https://developers.vtex.com/docs/api-reference/profile-system#delete-/api/storage/profile-system/prospects/-prospectId-)\r\n- `GET` [Get unmasked prospect](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/prospects/-prospectId-/unmask)\r\n\r\n### Purchase information\r\n\r\n- `POST` [Create purchase information](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles/-profileId-/purchase-info)\r\n- `GET` [Get purchase information](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/purchase-info)\r\n- `PATCH` [Update purchase information](https://developers.vtex.com/docs/api-reference/profile-system#patch-/api/storage/profile-system/profiles/-profileId-/purchase-info)\r\n- `DELETE` [Delete purchase information](https://developers.vtex.com/docs/api-reference/profile-system#delete-/api/storage/profile-system/profiles/-profileId-/purchase-info)\r\n- `GET` [Get unmasked profile information](https://developers.vtex.com/docs/api-reference/profile-system#get-/api/storage/profile-system/profiles/-profileId-/purchase-info/unmask)", "type": "text/plain" } } }