{ "_": { "postman_id": "7a572b7f-6c39-4b7d-86f2-32ef7678289e" }, "item": [ { "id": "148a2873-976f-4a81-8857-0ec8a889ab67", "name": "Profiles", "description": { "content": "", "type": "text/plain" }, "item": [ { "id": "46112f65-32fb-4fa1-a35c-2c76b8f94a63", "name": "Create client profile", "request": { "name": "Create client profile", "description": { "content": "Creates new client profile.\n\r\n\r> You can send custom fields in the request body and they will be saved as part of your document. Therefore, the schema and examples presented below may differ from yours. Your integration must be adapted accordingly.\n\r\n\r> The `id` field returned by this request is the `profileId` used to retrieve information on a specific profile later.\n\r\n\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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": [ { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "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": { "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "c474609e-1f7d-4eda-a61f-946ee1b0023f", "name": "Created", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "ttl", "value": "365" } ], "variable": [ { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": "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": { "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 \"lastUpdateDate\": \"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": "126e29d0-65ef-4104-a119-0cdf85b4fb06", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the profile.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the profile was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdate\":{\"type\":\"string\",\"description\":\"Date when the profile was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}},\"document\":{\"title\":\"Profile\",\"type\":\"object\",\"description\":\"Profile schema.\",\"required\":[\"firstName\",\"lastName\",\"email\",\"document\",\"documentType\"],\"properties\":{\"firstName\":{\"type\":\"string\",\"description\":\"Client's first name.\",\"example\":\"John\"},\"lastName\":{\"type\":\"string\",\"description\":\"Client's last name.\",\"example\":\"Doe\"},\"email\":{\"type\":\"string\",\"description\":\"Client's email address.\",\"example\":\"john.doe@example.com\"},\"birthDate\":{\"type\":\"string\",\"description\":\"Client's birth date in ISO 8601 format.\",\"example\":\"1925-11-17\"},\"document\":{\"type\":\"string\",\"description\":\"Client's document.\",\"example\":\"12345678900\"},\"documentType\":{\"type\":\"string\",\"description\":\"Type of document informed in `document`.\",\"example\":\"CPF\"},\"{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.\",\"example\":\"{value}\"}}}}}\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": "21230108-5aeb-46e8-8a90-e25ef7876f36", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints. \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": "The `profileId` path parameter may be substituted by other profile fields in this request. When making this request, send the `alternativeKey` parameter with a value equal to the key of the field you wish to use as `profileId`.\n\r\n\r> Currently, there are two possible values for this parameter: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "71bce5d2-d7cc-4030-a7a0-0b26718d124e", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "5bf558f6-7a3b-4a1a-882d-299e8e8abbe9", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the profile.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the profile was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdate\":{\"type\":\"string\",\"description\":\"Date when the profile was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}},\"document\":{\"title\":\"Profile\",\"type\":\"object\",\"description\":\"Profile schema.\",\"required\":[\"firstName\",\"lastName\",\"email\",\"document\",\"documentType\"],\"properties\":{\"firstName\":{\"type\":\"string\",\"description\":\"Client's first name.\",\"example\":\"John\"},\"lastName\":{\"type\":\"string\",\"description\":\"Client's last name.\",\"example\":\"Doe\"},\"email\":{\"type\":\"string\",\"description\":\"Client's email address.\",\"example\":\"john.doe@example.com\"},\"birthDate\":{\"type\":\"string\",\"description\":\"Client's birth date in ISO 8601 format.\",\"example\":\"1925-11-17\"},\"document\":{\"type\":\"string\",\"description\":\"Client's document.\",\"example\":\"12345678900\"},\"documentType\":{\"type\":\"string\",\"description\":\"Type of document informed in `document`.\",\"example\":\"CPF\"},\"{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.\",\"example\":\"{value}\"}}}}}}\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": "e5cd2606-8f47-497f-9434-e0e129cb8e29", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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": "The `profileId` path parameter may be substituted by other profile fields in this request. When making this request, send the `alternativeKey` parameter with a value equal to the key of the field you wish to use as `profileId`.\n\r\n\r> Currently, there are two possible values for this parameter: `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) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "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": { "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "774f65ac-2c48-458b-bad2-4ff100a806f9", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "alternativeKey", "value": "email" }, { "key": "ttl", "value": "365" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": "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": { "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": "a74edac3-387f-4d0b-b033-ba5836d7cb6b", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"document\":{\"title\":\"Profile\",\"type\":\"object\",\"description\":\"Profile schema.\",\"required\":[\"firstName\",\"lastName\",\"email\",\"document\",\"documentType\"],\"properties\":{\"firstName\":{\"type\":\"string\",\"description\":\"Client's first name.\",\"example\":\"John\"},\"lastName\":{\"type\":\"string\",\"description\":\"Client's last name.\",\"example\":\"Doe\"},\"email\":{\"type\":\"string\",\"description\":\"Client's email address.\",\"example\":\"john.doe@example.com\"},\"birthDate\":{\"type\":\"string\",\"description\":\"Client's birth date in ISO 8601 format.\",\"example\":\"1925-11-17\"},\"document\":{\"type\":\"string\",\"description\":\"Client's document.\",\"example\":\"12345678900\"},\"documentType\":{\"type\":\"string\",\"description\":\"Type of document informed in `document`.\",\"example\":\"CPF\"},\"{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.\",\"example\":\"{value}\"}}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the profile.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the profile was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdate\":{\"type\":\"string\",\"description\":\"Date when the profile was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}\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": "e5ce3867-29e8-4661-90a6-0bfb1ccd3bae", "name": "Delete client profile", "request": { "name": "Delete client profile", "description": { "content": "Deletes a client profile by `profileId`.\n\r\n\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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.\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) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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" }, "response": [ { "_": { "postman_previewlanguage": "text" }, "id": "f67f6561-d957-4131-a26e-9e4e29a9745e", "name": "No content", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "status": "No Content", "code": 204, "header": [ { "key": "Content-Type", "value": "text/plain" } ], "body": "", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "e52404c3-e618-46fc-b760-6f95492966dd", "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": "f3169cb4-5054-4b3c-a280-a31650f9f6a6", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints. \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": "The `profileId` path parameter may be substituted by other profile fields in this request. When making this request, send the `alternativeKey` parameter with a value equal to the key of the field you wish to use as `profileId`.\n\r\n\r> Currently, there are two possible values for this parameter: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "2e12a0d5-9d9b-4e07-9f38-1a66281e7c3c", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "reason", "value": "data-validation" }, { "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "d14fcc1d-0c89-4545-ab06-0578181a0a80", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"document\":{\"title\":\"Profile\",\"type\":\"object\",\"description\":\"Profile schema.\",\"required\":[\"firstName\",\"lastName\",\"email\",\"document\",\"documentType\"],\"properties\":{\"firstName\":{\"type\":\"string\",\"description\":\"Client's first name.\",\"example\":\"John\"},\"lastName\":{\"type\":\"string\",\"description\":\"Client's last name.\",\"example\":\"Doe\"},\"email\":{\"type\":\"string\",\"description\":\"Client's email address.\",\"example\":\"john.doe@example.com\"},\"birthDate\":{\"type\":\"string\",\"description\":\"Client's birth date in ISO 8601 format.\",\"example\":\"1925-11-17\"},\"document\":{\"type\":\"string\",\"description\":\"Client's document.\",\"example\":\"12345678900\"},\"documentType\":{\"type\":\"string\",\"description\":\"Type of document informed in `document`.\",\"example\":\"CPF\"},\"{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.\",\"example\":\"{value}\"}}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the profile.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the profile was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdate\":{\"type\":\"string\",\"description\":\"Date when the profile was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}}\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": "6e548ea4-ae4a-4e51-b0bf-fc9e799d620a", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints. \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) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "37309d55-9119-4837-8b8c-bb4ce52a9145", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "versions", ":profileVersionId" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "0f03817d-595b-43db-98f0-f0ce31ab7651", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"document\":{\"title\":\"Profile\",\"type\":\"object\",\"description\":\"Profile schema.\",\"required\":[\"firstName\",\"lastName\",\"email\",\"document\",\"documentType\"],\"properties\":{\"firstName\":{\"type\":\"string\",\"description\":\"Client's first name.\",\"example\":\"John\"},\"lastName\":{\"type\":\"string\",\"description\":\"Client's last name.\",\"example\":\"Doe\"},\"email\":{\"type\":\"string\",\"description\":\"Client's email address.\",\"example\":\"john.doe@example.com\"},\"birthDate\":{\"type\":\"string\",\"description\":\"Client's birth date in ISO 8601 format.\",\"example\":\"1925-11-17\"},\"document\":{\"type\":\"string\",\"description\":\"Client's document.\",\"example\":\"12345678900\"},\"documentType\":{\"type\":\"string\",\"description\":\"Type of document informed in `document`.\",\"example\":\"CPF\"},\"{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.\",\"example\":\"{value}\"}}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the profile.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the profile was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdate\":{\"type\":\"string\",\"description\":\"Date when the profile was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}}\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": "f713b258-26f3-436f-93c3-52e62b6d2865", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints. \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) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "dc7541c7-c0d5-45b5-887f-22a5af724ff6", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "versions", ":profileVersionId", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "reason", "value": "data-validation" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "228ddb2d-6479-4212-8270-ca62aa9e2fe6", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"document\":{\"title\":\"Profile\",\"type\":\"object\",\"description\":\"Profile schema.\",\"required\":[\"firstName\",\"lastName\",\"email\",\"document\",\"documentType\"],\"properties\":{\"firstName\":{\"type\":\"string\",\"description\":\"Client's first name.\",\"example\":\"John\"},\"lastName\":{\"type\":\"string\",\"description\":\"Client's last name.\",\"example\":\"Doe\"},\"email\":{\"type\":\"string\",\"description\":\"Client's email address.\",\"example\":\"john.doe@example.com\"},\"birthDate\":{\"type\":\"string\",\"description\":\"Client's birth date in ISO 8601 format.\",\"example\":\"1925-11-17\"},\"document\":{\"type\":\"string\",\"description\":\"Client's document.\",\"example\":\"12345678900\"},\"documentType\":{\"type\":\"string\",\"description\":\"Type of document informed in `document`.\",\"example\":\"CPF\"},\"{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.\",\"example\":\"{value}\"}}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the profile.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the profile was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdate\":{\"type\":\"string\",\"description\":\"Date when the profile was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}}\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": "c4b848f4-fd66-43f6-88a3-e479341dbccc", "name": "Addresses", "description": { "content": "", "type": "text/plain" }, "item": [ { "id": "acdd3a04-868b-42b9-bb07-978124b65a3f", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints. \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": "The `profileId` path parameter may be substituted by other profile fields in this request. When making this request, send the `alternativeKey` parameter with a value equal to the key of the field you wish to use as `profileId`.\n\r\n\r> Currently, there are two possible values for this parameter: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "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": { "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "7d3c89e4-7850-4d5b-a588-3136d512f4a3", "name": "Created", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": "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": { "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": "23780c43-1d51-4875-9f67-9a414056a229", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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.\",\"example\":\"20200-000\"},\"countryName\":{\"type\":\"string\",\"description\":\"Name of the address country.\",\"example\":\"Brasil\"},\"countryCode\":{\"type\":\"string\",\"description\":\"Two letter country code.\",\"example\":\"BR\"},\"administrativeAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of administrative area, such as the state or province.\",\"example\":\"RJ\"},\"locality\":{\"type\":\"string\",\"description\":\"Name of address locality, such as the city.\",\"example\":\"Locality\"},\"localityAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of the address locality area, such as the neighborhood or district.\",\"example\":\"Locality area\"},\"route\":{\"type\":\"string\",\"description\":\"Address route or street name.\",\"example\":\"51\"},\"streetNumber\":{\"type\":\"string\",\"description\":\"Address street number.\",\"example\":\"999\"},\"profileId\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"contactId\":{\"type\":\"string\",\"description\":\"Contact unique identifier.\",\"example\":\"1\"}},\"example\":{\"postalCode\":\"20200-000\",\"countryName\":\"Brasil\",\"countryCode\":\"BR\",\"administrativeAreaLevel1\":\"RJ\",\"locality\":\"Locality\",\"localityAreaLevel1\":\"locality area\",\"route\":\"51\",\"streetNumber\":\"999\",\"profileId\":\"70caf394-8534-447e-a0ca-1803c669c771\",\"contactId\":\"1\"}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the address.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the address was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the address was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}\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": "fa565da1-9f85-46d3-b2ba-724e449cd043", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints. \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": "The `profileId` path parameter may be substituted by other profile fields in this request. When making this request, send the `alternativeKey` parameter with a value equal to the key of the field you wish to use as `profileId`.\n\r\n\r> Currently, there are two possible values for this parameter: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "6b648caf-1c84-430d-b5d5-d46d5e73de6a", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "a1c115f4-72c1-4bd3-904a-534ed28f0bfe", "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\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of a client's address.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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.\",\"example\":\"20200-000\"},\"countryName\":{\"type\":\"string\",\"description\":\"Name of the address country.\",\"example\":\"Brasil\"},\"countryCode\":{\"type\":\"string\",\"description\":\"Two letter country code.\",\"example\":\"BR\"},\"administrativeAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of administrative area, such as the state or province.\",\"example\":\"RJ\"},\"locality\":{\"type\":\"string\",\"description\":\"Name of address locality, such as the city.\",\"example\":\"Locality\"},\"localityAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of the address locality area, such as the neighborhood or district.\",\"example\":\"Locality area\"},\"route\":{\"type\":\"string\",\"description\":\"Address route or street name.\",\"example\":\"51\"},\"streetNumber\":{\"type\":\"string\",\"description\":\"Address street number.\",\"example\":\"999\"},\"profileId\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"contactId\":{\"type\":\"string\",\"description\":\"Contact unique identifier.\",\"example\":\"1\"}},\"example\":{\"postalCode\":\"20200-000\",\"countryName\":\"Brasil\",\"countryCode\":\"BR\",\"administrativeAreaLevel1\":\"RJ\",\"locality\":\"Locality\",\"localityAreaLevel1\":\"locality area\",\"route\":\"51\",\"streetNumber\":\"999\",\"profileId\":\"70caf394-8534-447e-a0ca-1803c669c771\",\"contactId\":\"1\"}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the address.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the address was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the address was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}}\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": "f6bbf44e-ed7e-4dcf-9400-149cff51da9c", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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": "The `profileId` path parameter may be substituted by other profile fields in this request. When making this request, send the `alternativeKey` parameter with a value equal to the key of the field you wish to use as `profileId`.\n\r\n\r> Currently, there are two possible values for this parameter: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "f35e6c41-6f48-425e-8d3c-e7572d580778", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "bc2674be-e96c-4d16-8f35-ead5d4358608", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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.\",\"example\":\"20200-000\"},\"countryName\":{\"type\":\"string\",\"description\":\"Name of the address country.\",\"example\":\"Brasil\"},\"countryCode\":{\"type\":\"string\",\"description\":\"Two letter country code.\",\"example\":\"BR\"},\"administrativeAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of administrative area, such as the state or province.\",\"example\":\"RJ\"},\"locality\":{\"type\":\"string\",\"description\":\"Name of address locality, such as the city.\",\"example\":\"Locality\"},\"localityAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of the address locality area, such as the neighborhood or district.\",\"example\":\"Locality area\"},\"route\":{\"type\":\"string\",\"description\":\"Address route or street name.\",\"example\":\"51\"},\"streetNumber\":{\"type\":\"string\",\"description\":\"Address street number.\",\"example\":\"999\"},\"profileId\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"contactId\":{\"type\":\"string\",\"description\":\"Contact unique identifier.\",\"example\":\"1\"}},\"example\":{\"postalCode\":\"20200-000\",\"countryName\":\"Brasil\",\"countryCode\":\"BR\",\"administrativeAreaLevel1\":\"RJ\",\"locality\":\"Locality\",\"localityAreaLevel1\":\"locality area\",\"route\":\"51\",\"streetNumber\":\"999\",\"profileId\":\"70caf394-8534-447e-a0ca-1803c669c771\",\"contactId\":\"1\"}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the address.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the address was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the address was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}}\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": "f2171a72-3ceb-4dd1-a588-cdc5768ac365", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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": "The `profileId` path parameter may be substituted by other profile fields in this request. When making this request, send the `alternativeKey` parameter with a value equal to the key of the field you wish to use as `profileId`.\n\r\n\r> Currently, there are two possible values for this parameter: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "742181b1-a1f7-49cc-8922-055109c6713b", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "status": "OK", "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": "{\n \"id\": \"c2cbebba-214e-40b2-b68f-98f862e755d5\",\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 \"contactId\": \"1\"\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 }\n}", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "e3f72564-b0e5-4f9e-aeee-458c2084776f", "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\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of a client's address.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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.\",\"example\":\"20200-000\"},\"countryName\":{\"type\":\"string\",\"description\":\"Name of the address country.\",\"example\":\"Brasil\"},\"countryCode\":{\"type\":\"string\",\"description\":\"Two letter country code.\",\"example\":\"BR\"},\"administrativeAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of administrative area, such as the state or province.\",\"example\":\"RJ\"},\"locality\":{\"type\":\"string\",\"description\":\"Name of address locality, such as the city.\",\"example\":\"Locality\"},\"localityAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of the address locality area, such as the neighborhood or district.\",\"example\":\"Locality area\"},\"route\":{\"type\":\"string\",\"description\":\"Address route or street name.\",\"example\":\"51\"},\"streetNumber\":{\"type\":\"string\",\"description\":\"Address street number.\",\"example\":\"999\"},\"profileId\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"contactId\":{\"type\":\"string\",\"description\":\"Contact unique identifier.\",\"example\":\"1\"}},\"example\":{\"postalCode\":\"20200-000\",\"countryName\":\"Brasil\",\"countryCode\":\"BR\",\"administrativeAreaLevel1\":\"RJ\",\"locality\":\"Locality\",\"localityAreaLevel1\":\"locality area\",\"route\":\"51\",\"streetNumber\":\"999\",\"profileId\":\"70caf394-8534-447e-a0ca-1803c669c771\",\"contactId\":\"1\"}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the address.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the address was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the address was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}\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": "9efa76ee-9713-4c51-b9af-5213ad72fda6", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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": "The `profileId` path parameter may be substituted by other profile fields in this request. When making this request, send the `alternativeKey` parameter with a value equal to the key of the field you wish to use as `profileId`.\n\r\n\r> Currently, there are two possible values for this parameter: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "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": { "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "b322216f-3cf7-4232-9d38-a9fc751ce315", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": "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": { "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": "1ab764cd-8218-42f1-babf-0118464730e9", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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.\",\"example\":\"20200-000\"},\"countryName\":{\"type\":\"string\",\"description\":\"Name of the address country.\",\"example\":\"Brasil\"},\"countryCode\":{\"type\":\"string\",\"description\":\"Two letter country code.\",\"example\":\"BR\"},\"administrativeAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of administrative area, such as the state or province.\",\"example\":\"RJ\"},\"locality\":{\"type\":\"string\",\"description\":\"Name of address locality, such as the city.\",\"example\":\"Locality\"},\"localityAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of the address locality area, such as the neighborhood or district.\",\"example\":\"Locality area\"},\"route\":{\"type\":\"string\",\"description\":\"Address route or street name.\",\"example\":\"51\"},\"streetNumber\":{\"type\":\"string\",\"description\":\"Address street number.\",\"example\":\"999\"},\"profileId\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"contactId\":{\"type\":\"string\",\"description\":\"Contact unique identifier.\",\"example\":\"1\"}},\"example\":{\"postalCode\":\"20200-000\",\"countryName\":\"Brasil\",\"countryCode\":\"BR\",\"administrativeAreaLevel1\":\"RJ\",\"locality\":\"Locality\",\"localityAreaLevel1\":\"locality area\",\"route\":\"51\",\"streetNumber\":\"999\",\"profileId\":\"70caf394-8534-447e-a0ca-1803c669c771\",\"contactId\":\"1\"}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the address.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the address was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the address was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}\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": "6489b77a-6c6a-4833-8660-6f22c51a914e", "name": "Delete address", "request": { "name": "Delete address", "description": { "content": "Deletes a client's address by `profileId` and `addressId`.\n\r\n\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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": "The `profileId` path parameter may be substituted by other profile fields in this request. When making this request, send the `alternativeKey` parameter with a value equal to the key of the field you wish to use as `profileId`.\n\r\n\r> Currently, there are two possible values for this parameter: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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" }, "response": [ { "_": { "postman_previewlanguage": "text" }, "id": "8409499a-77d2-45d7-83ec-149fbbd7ed93", "name": "No content", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "status": "No Content", "code": 204, "header": [ { "key": "Content-Type", "value": "text/plain" } ], "body": "", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "930bef36-6356-48b8-95e5-cc679f0113e1", "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": "2a04ad7f-27e0-4479-abf1-3549550092ab", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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": "The `profileId` path parameter may be substituted by other profile fields in this request. When making this request, send the `alternativeKey` parameter with a value equal to the key of the field you wish to use as `profileId`.\n\r\n\r> Currently, there are two possible values for this parameter: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "47d09230-867f-41d0-8a57-3ba405974ce6", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "reason", "value": "data-validation" }, { "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "20f35b82-4a7d-4eb0-a2bf-12d8e1ca288b", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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.\",\"example\":\"20200-000\"},\"countryName\":{\"type\":\"string\",\"description\":\"Name of the address country.\",\"example\":\"Brasil\"},\"countryCode\":{\"type\":\"string\",\"description\":\"Two letter country code.\",\"example\":\"BR\"},\"administrativeAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of administrative area, such as the state or province.\",\"example\":\"RJ\"},\"locality\":{\"type\":\"string\",\"description\":\"Name of address locality, such as the city.\",\"example\":\"Locality\"},\"localityAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of the address locality area, such as the neighborhood or district.\",\"example\":\"Locality area\"},\"route\":{\"type\":\"string\",\"description\":\"Address route or street name.\",\"example\":\"51\"},\"streetNumber\":{\"type\":\"string\",\"description\":\"Address street number.\",\"example\":\"999\"},\"profileId\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"contactId\":{\"type\":\"string\",\"description\":\"Contact unique identifier.\",\"example\":\"1\"}},\"example\":{\"postalCode\":\"20200-000\",\"countryName\":\"Brasil\",\"countryCode\":\"BR\",\"administrativeAreaLevel1\":\"RJ\",\"locality\":\"Locality\",\"localityAreaLevel1\":\"locality area\",\"route\":\"51\",\"streetNumber\":\"999\",\"profileId\":\"70caf394-8534-447e-a0ca-1803c669c771\",\"contactId\":\"1\"}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the address.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the address was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the address was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}\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": "aaa439d9-eda0-4dd3-800e-68fc60c5041d", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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": "The `profileId` path parameter may be substituted by other profile fields in this request. When making this request, send the `alternativeKey` parameter with a value equal to the key of the field you wish to use as `profileId`.\n\r\n\r> Currently, there are two possible values for this parameter: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "331716b0-ee3c-4024-88fb-efb97f8595a5", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId", "versions", ":addressVersionId" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "reason", "value": "data-validation" }, { "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "a2a8f43a-43a8-445a-9841-57faa06f9a6c", "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\",\"properties\":{\"id\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of a client's address.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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.\",\"example\":\"20200-000\"},\"countryName\":{\"type\":\"string\",\"description\":\"Name of the address country.\",\"example\":\"Brasil\"},\"countryCode\":{\"type\":\"string\",\"description\":\"Two letter country code.\",\"example\":\"BR\"},\"administrativeAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of administrative area, such as the state or province.\",\"example\":\"RJ\"},\"locality\":{\"type\":\"string\",\"description\":\"Name of address locality, such as the city.\",\"example\":\"Locality\"},\"localityAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of the address locality area, such as the neighborhood or district.\",\"example\":\"Locality area\"},\"route\":{\"type\":\"string\",\"description\":\"Address route or street name.\",\"example\":\"51\"},\"streetNumber\":{\"type\":\"string\",\"description\":\"Address street number.\",\"example\":\"999\"},\"profileId\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"contactId\":{\"type\":\"string\",\"description\":\"Contact unique identifier.\",\"example\":\"1\"}},\"example\":{\"postalCode\":\"20200-000\",\"countryName\":\"Brasil\",\"countryCode\":\"BR\",\"administrativeAreaLevel1\":\"RJ\",\"locality\":\"Locality\",\"localityAreaLevel1\":\"locality area\",\"route\":\"51\",\"streetNumber\":\"999\",\"profileId\":\"70caf394-8534-447e-a0ca-1803c669c771\",\"contactId\":\"1\"}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the address.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the address was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the address was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}\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": "7b26bad5-3bb8-4432-b8bf-6553c47ab2ff", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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": "The `profileId` path parameter may be substituted by other profile fields in this request. When making this request, send the `alternativeKey` parameter with a value equal to the key of the field you wish to use as `profileId`.\n\r\n\r> Currently, there are two possible values for this parameter: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "a405953d-8635-4544-b00c-5c16b89266ef", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "addresses", ":addressId", "versions", ":addressVersionId", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "reason", "value": "data-validation" }, { "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "95b12afa-3ec5-4796-b92e-566cc8bd9701", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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.\",\"example\":\"20200-000\"},\"countryName\":{\"type\":\"string\",\"description\":\"Name of the address country.\",\"example\":\"Brasil\"},\"countryCode\":{\"type\":\"string\",\"description\":\"Two letter country code.\",\"example\":\"BR\"},\"administrativeAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of administrative area, such as the state or province.\",\"example\":\"RJ\"},\"locality\":{\"type\":\"string\",\"description\":\"Name of address locality, such as the city.\",\"example\":\"Locality\"},\"localityAreaLevel1\":{\"type\":\"string\",\"description\":\"Name of the address locality area, such as the neighborhood or district.\",\"example\":\"Locality area\"},\"route\":{\"type\":\"string\",\"description\":\"Address route or street name.\",\"example\":\"51\"},\"streetNumber\":{\"type\":\"string\",\"description\":\"Address street number.\",\"example\":\"999\"},\"profileId\":{\"title\":\"id\",\"type\":\"string\",\"description\":\"ID of the client's profile.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"contactId\":{\"type\":\"string\",\"description\":\"Contact unique identifier.\",\"example\":\"1\"}},\"example\":{\"postalCode\":\"20200-000\",\"countryName\":\"Brasil\",\"countryCode\":\"BR\",\"administrativeAreaLevel1\":\"RJ\",\"locality\":\"Locality\",\"localityAreaLevel1\":\"locality area\",\"route\":\"51\",\"streetNumber\":\"999\",\"profileId\":\"70caf394-8534-447e-a0ca-1803c669c771\",\"contactId\":\"1\"}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the address.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the address was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the address was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}\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": "8b7376b2-cfd1-4892-8a87-c2deae594922", "name": "Prospects", "description": { "content": "", "type": "text/plain" }, "item": [ { "id": "3a83ccb7-7944-4eb7-9f6a-f40a82ce890a", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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": [ { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "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 \"dolor id\",\n \"pariatur\"\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 \"laboris anim sint labore cil\",\n \"velit cupidatat anim consectetur\"\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\": \"exercitation Lorem\",\n \"paymentSystem\": \"dolore proident adipisicing ullamco veniam\",\n \"paymentSystemName\": \"esse elit consequat irur\",\n \"value\": 67230920,\n \"installments\": -73306215,\n \"referenceValue\": 35318960,\n \"cardHolder\": \"commodo ipsum\",\n \"cardNumber\": \"mollit\",\n \"firstDigits\": \"velit amet dolore sit\",\n \"lastDigits\": \"adipisicing irure esse elit\",\n \"cvv2\": \"magna adipisicing ipsum\",\n \"expireMonth\": \"consequat\",\n \"expireYear\": \"ut aute id\",\n \"url\": \"minim do\",\n \"giftCardId\": \"Excepteur ut sed\",\n \"giftCardName\": \"nisi sed\",\n \"giftCardCaption\": \"et veniam\",\n \"redemptionCode\": \"incididunt cupidatat\",\n \"group\": \"in nulla deserunt\",\n \"tid\": \"anim \",\n \"dueDate\": \"aute nulla nostrud deserunt\",\n \"connectorResponses\": {}\n },\n {\n \"id\": \"Ut in ut cillum\",\n \"paymentSystem\": \"mollit velit laborum\",\n \"paymentSystemName\": \"in amet\",\n \"value\": -51297647,\n \"installments\": 30953966,\n \"referenceValue\": 52228905,\n \"cardHolder\": \"ex\",\n \"cardNumber\": \"qui dolor in amet\",\n \"firstDigits\": \"cillum adipisicing\",\n \"lastDigits\": \"dol\",\n \"cvv2\": \"ut amet \",\n \"expireMonth\": \"id aute adipisicing ullamco eu\",\n \"expireYear\": \"sed ad anim\",\n \"url\": \"aliquip\",\n \"giftCardId\": \"voluptate do\",\n \"giftCardName\": \"velit adipisicing proident qui\",\n \"giftCardCaption\": \"consectetur \",\n \"redemptionCode\": \"magna ad sed\",\n \"group\": \"exercitation incididunt\",\n \"tid\": \"minim magna laboris nulla dolore\",\n \"dueDate\": \"Dui\",\n \"connectorResponses\": {}\n }\n ]\n },\n {\n \"isActive\": true,\n \"transactionId\": \"418213DE29634837A63DD693A937A696\",\n \"merchantName\": \"luxstore\",\n \"payments\": [\n {\n \"id\": \"Duis\",\n \"paymentSystem\": \"dolor id\",\n \"paymentSystemName\": \"occaecat\",\n \"value\": -44988130,\n \"installments\": 8104253,\n \"referenceValue\": 70024730,\n \"cardHolder\": \"sit et in sed\",\n \"cardNumber\": \"sint enim et\",\n \"firstDigits\": \"cupidatat occaecat velit\",\n \"lastDigits\": \"cupidatat\",\n \"cvv2\": \"magna do minim\",\n \"expireMonth\": \"in reprehenderit culpa dolore\",\n \"expireYear\": \"laboris ad\",\n \"url\": \"aliqua Lorem reprehenderit\",\n \"giftCardId\": \"eiusmod consequat laboris deserunt\",\n \"giftCardName\": \"irure ut nostrud dolore\",\n \"giftCardCaption\": \"laboris deserunt\",\n \"redemptionCode\": \"anim voluptate sed amet cupidatat\",\n \"group\": \"qui sit ut officia\",\n \"tid\": \"ea\",\n \"dueDate\": \"qui fugiat\",\n \"connectorResponses\": {}\n },\n {\n \"id\": \"deserunt ex\",\n \"paymentSystem\": \"sunt dolore officia Duis\",\n \"paymentSystemName\": \"ut\",\n \"value\": -3885928,\n \"installments\": 87618352,\n \"referenceValue\": -56559181,\n \"cardHolder\": \"ex reprehenderit minim\",\n \"cardNumber\": \"ex Excepteur qui sint non\",\n \"firstDigits\": \"ut dolore\",\n \"lastDigits\": \"ut est eiusmod ipsum\",\n \"cvv2\": \"cupidatat nisi proident fugi\",\n \"expireMonth\": \"enim voluptate eu\",\n \"expireYear\": \"incididunt Ut dolor\",\n \"url\": \"laborum veniam velit molli\",\n \"giftCardId\": \"dolor et\",\n \"giftCardName\": \"eu magna velit\",\n \"giftCardCaption\": \"fugiat mollit nostrud\",\n \"redemptionCode\": \"id ea\",\n \"group\": \"id irure la\",\n \"tid\": \"cillum\",\n \"dueDate\": \"est\",\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": { "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "a4e74554-6ee1-4d48-8094-960a591a19ae", "name": "Created", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "prospects" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [ { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": "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 \"Excepteur amet magna\",\n \"in dolore exercitation nisi anim\"\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 \"in et in non\",\n \"eiusmod cillum\"\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\": \"est Lorem\",\n \"paymentSystem\": \"deserunt in\",\n \"paymentSystemName\": \"commodo sed\",\n \"value\": 58191435,\n \"installments\": -91708601,\n \"referenceValue\": -60548802,\n \"cardHolder\": \"ea laboris minim pariatur\",\n \"cardNumber\": \"sit labore adipisicing Ut\",\n \"firstDigits\": \"ut es\",\n \"lastDigits\": \"Ut Lorem sunt\",\n \"cvv2\": \"in sit exercitation Duis incididunt\",\n \"expireMonth\": \"magna tempor est\",\n \"expireYear\": \"pariatur in exercitation\",\n \"url\": \"proident nisi dolor aliquip\",\n \"giftCardId\": \"e\",\n \"giftCardName\": \"reprehenderit occaecat Excepteur\",\n \"giftCardCaption\": \"minim commodo\",\n \"redemptionCode\": \"nostrud\",\n \"group\": \"et enim\",\n \"tid\": \"aliquip nostrud ex\",\n \"dueDate\": \"Lorem consectetur ipsum ea\",\n \"connectorResponses\": {}\n },\n {\n \"id\": \"aute ut nostrud\",\n \"paymentSystem\": \"ipsum ut aliqua sunt officia\",\n \"paymentSystemName\": \"anim cupidatat sit\",\n \"value\": 80681571,\n \"installments\": 73493607,\n \"referenceValue\": 55426990,\n \"cardHolder\": \"amet reprehenderit non occaecat exercitation\",\n \"cardNumber\": \"mollit laborum Lorem\",\n \"firstDigits\": \"culpa nisi elit voluptate\",\n \"lastDigits\": \"esse Excepteur pariatur\",\n \"cvv2\": \"occaecat\",\n \"expireMonth\": \"do irure tempor occaecat Excepteur\",\n \"expireYear\": \"et Ut occaecat sed in\",\n \"url\": \"ad non\",\n \"giftCardId\": \"laboris non d\",\n \"giftCardName\": \"dolor deserunt pr\",\n \"giftCardCaption\": \"reprehenderit\",\n \"redemptionCode\": \"c\",\n \"group\": \"sit minim\",\n \"tid\": \"eiusmod magna exercitation commodo en\",\n \"dueDate\": \"officia velit ea\",\n \"connectorResponses\": {}\n }\n ]\n },\n {\n \"isActive\": true,\n \"transactionId\": \"418213DE29634837A63DD693A937A696\",\n \"merchantName\": \"luxstore\",\n \"payments\": [\n {\n \"id\": \"voluptate velit veniam\",\n \"paymentSystem\": \"Lorem dolore\",\n \"paymentSystemName\": \"comm\",\n \"value\": 26047100,\n \"installments\": 1864998,\n \"referenceValue\": 74311359,\n \"cardHolder\": \"exercitation anim culpa labore\",\n \"cardNumber\": \"veniam laboris\",\n \"firstDigits\": \"in Ut consequat e\",\n \"lastDigits\": \"exercitation\",\n \"cvv2\": \"ut nostrud in\",\n \"expireMonth\": \"sint\",\n \"expireYear\": \"qui\",\n \"url\": \"aliqua tempor voluptate\",\n \"giftCardId\": \"Excepteur Duis\",\n \"giftCardName\": \"sint nostrud\",\n \"giftCardCaption\": \"consequat minim\",\n \"redemptionCode\": \"consequat Excepteur\",\n \"group\": \"in dolor\",\n \"tid\": \"i\",\n \"dueDate\": \"veniam ut\",\n \"connectorResponses\": {}\n },\n {\n \"id\": \"esse cil\",\n \"paymentSystem\": \"ex elit\",\n \"paymentSystemName\": \"quis irure ea labore\",\n \"value\": -7677661,\n \"installments\": -30874341,\n \"referenceValue\": 61628743,\n \"cardHolder\": \"consequat\",\n \"cardNumber\": \"Ut culpa Excepteur cillum adipisicing\",\n \"firstDigits\": \"fugiat tempor dolore\",\n \"lastDigits\": \"ex in elit\",\n \"cvv2\": \"ex id\",\n \"expireMonth\": \"irure labore id\",\n \"expireYear\": \"occaecat enim\",\n \"url\": \"dolor Ut elit nulla\",\n \"giftCardId\": \"laborum nostrud minim\",\n \"giftCardName\": \"commodo sint ut sit in\",\n \"giftCardCaption\": \"id laborum dolor\",\n \"redemptionCode\": \"dolor adipisicing incididunt mollit velit\",\n \"group\": \"proident ad fugia\",\n \"tid\": \"in id aliquip exercitation dolor\",\n \"dueDate\": \"officia labore cillum\",\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": { "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": "d90ddaef-c31c-452a-b435-bc578d753817", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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`).\",\"example\":true},\"userId\":{\"type\":\"string\",\"description\":\"User unique identifier.\",\"example\":\"98478f6b-d025-4f35-a560-dd1ee7a6f26e\"},\"addressName\":{\"type\":\"string\",\"description\":\"Address name.\",\"example\":\"Home\"},\"addressType\":{\"type\":\"string\",\"description\":\"Address type.\",\"example\":\"residential\"},\"postalCode\":{\"type\":\"string\",\"description\":\"Postal code.\",\"example\":\"32137\"},\"city\":{\"type\":\"string\",\"description\":\"City.\",\"example\":\"Palm Coast\"},\"country\":{\"type\":\"string\",\"description\":\"Country code.\",\"example\":\"USA\"},\"street\":{\"type\":\"string\",\"description\":\"Street name.\",\"example\":\"Fifth St.\"},\"number\":{\"type\":\"string\",\"description\":\"Street number.\",\"example\":\"9538\"},\"complement\":{\"type\":\"string\",\"description\":\"Complement information.\",\"example\":\"Apartment 2B\"},\"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.\",\"example\":\"D09F5E3F01054C959CFC4CB357961ADE\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\",\"example\":\"2\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\",\"example\":\"Visa\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\",\"example\":\"************1111\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\",\"example\":\"44443334\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\",\"example\":\"db267dcc53c14fb2b9a985532dd287bc\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\",\"example\":\"01/2032\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\",\"example\":false},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\",\"example\":null}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\",\"example\":\"12345\"}},\"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`).\",\"example\":true},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\",\"example\":\"418213DE29634837A63DD693A937A696\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\",\"example\":\"luxstore\"},\"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.\"}},\"example\":{\"id\":\"D3DEECAB3C6C4B9EAF8EF4C1FE062FF3\",\"paymentSystem\":\"6\",\"paymentSystemName\":\"Boleto Bancário\",\"value\":4450,\"installments\":1,\"referenceValue\":4450,\"cardHolder\":null,\"cardNumber\":null,\"firstDigits\":null,\"lastDigits\":null,\"cvv2\":null,\"expireMonth\":null,\"expireYear\":null,\"url\":\"https://luxstore.vtexpayments.com.br:443/BankIssuedInvoice/Transaction/418213DE29634837A63DD693A937A696/Payment/D3DEECAB3C6C4B9EAF8EF4C1FE062FF3/Installment/{Installment}\",\"giftCardId\":null,\"giftCardName\":null,\"giftCardCaption\":null,\"redemptionCode\":null,\"group\":\"bankInvoice\",\"tid\":null,\"dueDate\":\"2019-02-02\",\"connectorResponses\":{}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\",\"example\":\"12345\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\",\"example\":\"Message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\",\"example\":0},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\",\"example\":0},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\",\"example\":null}}},\"contacts\":{\"type\":\"array\",\"description\":\"List of contacts.\",\"items\":{\"type\":\"object\",\"description\":\"Contact information.\",\"properties\":{\"contactId\":{\"type\":\"string\",\"description\":\"Contact's unique identifier.\",\"example\":\"0\"},\"email\":{\"type\":\"string\",\"description\":\"Contact's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Contact's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Contact's last name.\",\"example\":\"Doe\"},\"phone\":{\"type\":\"string\",\"description\":\"Contact's phone number.\",\"example\":\"12345678910\"},\"document\":{\"type\":\"string\",\"description\":\"Contact's document.\",\"example\":\"12345678910\"}}}},\"invoiceSubject\":{\"type\":\"object\",\"description\":\"Information about the invoice subject.\",\"properties\":{\"invoiceSubjectId\":{\"type\":\"string\",\"description\":\"Invoice subject ID.\",\"example\":\"0\"},\"email\":{\"type\":\"string\",\"description\":\"Invoice subject's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Invoice subject's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Invoice subject's last name.\",\"example\":\"Doe\"},\"phone\":{\"type\":\"string\",\"description\":\"Invoice subject's phone number.\",\"example\":\"12345678910\"}}},\"email\":{\"type\":\"string\",\"description\":\"Prospect's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Prospect's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Prospect's last name.\",\"example\":\"Doe\"},\"document\":{\"type\":\"string\",\"description\":\"Prospect's document.\",\"example\":\"5397eefef23741d4976ebdf772cc42e0\"},\"cellPhone\":{\"type\":\"string\",\"description\":\"Prospect's cellphone number.\",\"example\":\"12345678910\"},\"isPJ\":{\"type\":\"boolean\",\"description\":\"Defines if a prospect is corporate (`true`) or not (`false`).\",\"example\":false},\"customerCode\":{\"type\":\"string\",\"description\":\"Prospect's customer code.\",\"example\":\"5397eefe-f237-41d4-976e-bdf772cc42e0\"}}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the prospect.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the prospect information expires in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}\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": "53bd31b0-574e-44f8-b80a-f1d889d29705", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints. \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": [ { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "cebcf50d-f854-4f0b-92a2-5decfa67677f", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "prospects" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [ { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "23a47b75-6421-447b-aa32-a10d84fe1d76", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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`).\",\"example\":true},\"userId\":{\"type\":\"string\",\"description\":\"User unique identifier.\",\"example\":\"98478f6b-d025-4f35-a560-dd1ee7a6f26e\"},\"addressName\":{\"type\":\"string\",\"description\":\"Address name.\",\"example\":\"Home\"},\"addressType\":{\"type\":\"string\",\"description\":\"Address type.\",\"example\":\"residential\"},\"postalCode\":{\"type\":\"string\",\"description\":\"Postal code.\",\"example\":\"32137\"},\"city\":{\"type\":\"string\",\"description\":\"City.\",\"example\":\"Palm Coast\"},\"country\":{\"type\":\"string\",\"description\":\"Country code.\",\"example\":\"USA\"},\"street\":{\"type\":\"string\",\"description\":\"Street name.\",\"example\":\"Fifth St.\"},\"number\":{\"type\":\"string\",\"description\":\"Street number.\",\"example\":\"9538\"},\"complement\":{\"type\":\"string\",\"description\":\"Complement information.\",\"example\":\"Apartment 2B\"},\"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.\",\"example\":\"D09F5E3F01054C959CFC4CB357961ADE\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\",\"example\":\"2\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\",\"example\":\"Visa\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\",\"example\":\"************1111\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\",\"example\":\"44443334\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\",\"example\":\"db267dcc53c14fb2b9a985532dd287bc\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\",\"example\":\"01/2032\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\",\"example\":false},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\",\"example\":null}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\",\"example\":\"12345\"}},\"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`).\",\"example\":true},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\",\"example\":\"418213DE29634837A63DD693A937A696\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\",\"example\":\"luxstore\"},\"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.\"}},\"example\":{\"id\":\"D3DEECAB3C6C4B9EAF8EF4C1FE062FF3\",\"paymentSystem\":\"6\",\"paymentSystemName\":\"Boleto Bancário\",\"value\":4450,\"installments\":1,\"referenceValue\":4450,\"cardHolder\":null,\"cardNumber\":null,\"firstDigits\":null,\"lastDigits\":null,\"cvv2\":null,\"expireMonth\":null,\"expireYear\":null,\"url\":\"https://luxstore.vtexpayments.com.br:443/BankIssuedInvoice/Transaction/418213DE29634837A63DD693A937A696/Payment/D3DEECAB3C6C4B9EAF8EF4C1FE062FF3/Installment/{Installment}\",\"giftCardId\":null,\"giftCardName\":null,\"giftCardCaption\":null,\"redemptionCode\":null,\"group\":\"bankInvoice\",\"tid\":null,\"dueDate\":\"2019-02-02\",\"connectorResponses\":{}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\",\"example\":\"12345\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\",\"example\":\"Message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\",\"example\":0},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\",\"example\":0},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\",\"example\":null}}},\"contacts\":{\"type\":\"array\",\"description\":\"List of contacts.\",\"items\":{\"type\":\"object\",\"description\":\"Contact information.\",\"properties\":{\"contactId\":{\"type\":\"string\",\"description\":\"Contact's unique identifier.\",\"example\":\"0\"},\"email\":{\"type\":\"string\",\"description\":\"Contact's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Contact's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Contact's last name.\",\"example\":\"Doe\"},\"phone\":{\"type\":\"string\",\"description\":\"Contact's phone number.\",\"example\":\"12345678910\"},\"document\":{\"type\":\"string\",\"description\":\"Contact's document.\",\"example\":\"12345678910\"}}}},\"invoiceSubject\":{\"type\":\"object\",\"description\":\"Information about the invoice subject.\",\"properties\":{\"invoiceSubjectId\":{\"type\":\"string\",\"description\":\"Invoice subject ID.\",\"example\":\"0\"},\"email\":{\"type\":\"string\",\"description\":\"Invoice subject's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Invoice subject's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Invoice subject's last name.\",\"example\":\"Doe\"},\"phone\":{\"type\":\"string\",\"description\":\"Invoice subject's phone number.\",\"example\":\"12345678910\"}}},\"email\":{\"type\":\"string\",\"description\":\"Prospect's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Prospect's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Prospect's last name.\",\"example\":\"Doe\"},\"document\":{\"type\":\"string\",\"description\":\"Prospect's document.\",\"example\":\"5397eefef23741d4976ebdf772cc42e0\"},\"cellPhone\":{\"type\":\"string\",\"description\":\"Prospect's cellphone number.\",\"example\":\"12345678910\"},\"isPJ\":{\"type\":\"boolean\",\"description\":\"Defines if a prospect is corporate (`true`) or not (`false`).\",\"example\":false},\"customerCode\":{\"type\":\"string\",\"description\":\"Prospect's customer code.\",\"example\":\"5397eefe-f237-41d4-976e-bdf772cc42e0\"}}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the prospect.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the prospect information expires in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}}\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": "3fc80054-7813-430e-a9b1-ab5fd4b2d143", "name": "Get unmasked prospects", "request": { "name": "Get unmasked prospects", "description": { "content": "Retrieves unmasked information of all prospects.\n\r\n\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints. \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": [ { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "1f65ad10-fdb4-45f6-a90c-be0809797467", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "prospects", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [ { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "26c96b68-61c9-426b-b7f4-f54bf2f2db98", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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`).\",\"example\":true},\"userId\":{\"type\":\"string\",\"description\":\"User unique identifier.\",\"example\":\"98478f6b-d025-4f35-a560-dd1ee7a6f26e\"},\"addressName\":{\"type\":\"string\",\"description\":\"Address name.\",\"example\":\"Home\"},\"addressType\":{\"type\":\"string\",\"description\":\"Address type.\",\"example\":\"residential\"},\"postalCode\":{\"type\":\"string\",\"description\":\"Postal code.\",\"example\":\"32137\"},\"city\":{\"type\":\"string\",\"description\":\"City.\",\"example\":\"Palm Coast\"},\"country\":{\"type\":\"string\",\"description\":\"Country code.\",\"example\":\"USA\"},\"street\":{\"type\":\"string\",\"description\":\"Street name.\",\"example\":\"Fifth St.\"},\"number\":{\"type\":\"string\",\"description\":\"Street number.\",\"example\":\"9538\"},\"complement\":{\"type\":\"string\",\"description\":\"Complement information.\",\"example\":\"Apartment 2B\"},\"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.\",\"example\":\"D09F5E3F01054C959CFC4CB357961ADE\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\",\"example\":\"2\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\",\"example\":\"Visa\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\",\"example\":\"************1111\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\",\"example\":\"44443334\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\",\"example\":\"db267dcc53c14fb2b9a985532dd287bc\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\",\"example\":\"01/2032\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\",\"example\":false},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\",\"example\":null}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\",\"example\":\"12345\"}},\"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`).\",\"example\":true},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\",\"example\":\"418213DE29634837A63DD693A937A696\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\",\"example\":\"luxstore\"},\"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.\"}},\"example\":{\"id\":\"D3DEECAB3C6C4B9EAF8EF4C1FE062FF3\",\"paymentSystem\":\"6\",\"paymentSystemName\":\"Boleto Bancário\",\"value\":4450,\"installments\":1,\"referenceValue\":4450,\"cardHolder\":null,\"cardNumber\":null,\"firstDigits\":null,\"lastDigits\":null,\"cvv2\":null,\"expireMonth\":null,\"expireYear\":null,\"url\":\"https://luxstore.vtexpayments.com.br:443/BankIssuedInvoice/Transaction/418213DE29634837A63DD693A937A696/Payment/D3DEECAB3C6C4B9EAF8EF4C1FE062FF3/Installment/{Installment}\",\"giftCardId\":null,\"giftCardName\":null,\"giftCardCaption\":null,\"redemptionCode\":null,\"group\":\"bankInvoice\",\"tid\":null,\"dueDate\":\"2019-02-02\",\"connectorResponses\":{}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\",\"example\":\"12345\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\",\"example\":\"Message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\",\"example\":0},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\",\"example\":0},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\",\"example\":null}}},\"contacts\":{\"type\":\"array\",\"description\":\"List of contacts.\",\"items\":{\"type\":\"object\",\"description\":\"Contact information.\",\"properties\":{\"contactId\":{\"type\":\"string\",\"description\":\"Contact's unique identifier.\",\"example\":\"0\"},\"email\":{\"type\":\"string\",\"description\":\"Contact's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Contact's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Contact's last name.\",\"example\":\"Doe\"},\"phone\":{\"type\":\"string\",\"description\":\"Contact's phone number.\",\"example\":\"12345678910\"},\"document\":{\"type\":\"string\",\"description\":\"Contact's document.\",\"example\":\"12345678910\"}}}},\"invoiceSubject\":{\"type\":\"object\",\"description\":\"Information about the invoice subject.\",\"properties\":{\"invoiceSubjectId\":{\"type\":\"string\",\"description\":\"Invoice subject ID.\",\"example\":\"0\"},\"email\":{\"type\":\"string\",\"description\":\"Invoice subject's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Invoice subject's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Invoice subject's last name.\",\"example\":\"Doe\"},\"phone\":{\"type\":\"string\",\"description\":\"Invoice subject's phone number.\",\"example\":\"12345678910\"}}},\"email\":{\"type\":\"string\",\"description\":\"Prospect's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Prospect's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Prospect's last name.\",\"example\":\"Doe\"},\"document\":{\"type\":\"string\",\"description\":\"Prospect's document.\",\"example\":\"5397eefef23741d4976ebdf772cc42e0\"},\"cellPhone\":{\"type\":\"string\",\"description\":\"Prospect's cellphone number.\",\"example\":\"12345678910\"},\"isPJ\":{\"type\":\"boolean\",\"description\":\"Defines if a prospect is corporate (`true`) or not (`false`).\",\"example\":false},\"customerCode\":{\"type\":\"string\",\"description\":\"Prospect's customer code.\",\"example\":\"5397eefe-f237-41d4-976e-bdf772cc42e0\"}}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the prospect.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the prospect information expires in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}}\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": "4b63a2b5-b77b-4ee4-a543-d77c6cb1dbaf", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "7c6f30b8-5a2f-4203-8611-2def13d1419f", "name": "OK", "originalRequest": { "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "c0451e0b-e4a9-4e9b-86e7-8c40e48641bd", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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`).\",\"example\":true},\"userId\":{\"type\":\"string\",\"description\":\"User unique identifier.\",\"example\":\"98478f6b-d025-4f35-a560-dd1ee7a6f26e\"},\"addressName\":{\"type\":\"string\",\"description\":\"Address name.\",\"example\":\"Home\"},\"addressType\":{\"type\":\"string\",\"description\":\"Address type.\",\"example\":\"residential\"},\"postalCode\":{\"type\":\"string\",\"description\":\"Postal code.\",\"example\":\"32137\"},\"city\":{\"type\":\"string\",\"description\":\"City.\",\"example\":\"Palm Coast\"},\"country\":{\"type\":\"string\",\"description\":\"Country code.\",\"example\":\"USA\"},\"street\":{\"type\":\"string\",\"description\":\"Street name.\",\"example\":\"Fifth St.\"},\"number\":{\"type\":\"string\",\"description\":\"Street number.\",\"example\":\"9538\"},\"complement\":{\"type\":\"string\",\"description\":\"Complement information.\",\"example\":\"Apartment 2B\"},\"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.\",\"example\":\"D09F5E3F01054C959CFC4CB357961ADE\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\",\"example\":\"2\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\",\"example\":\"Visa\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\",\"example\":\"************1111\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\",\"example\":\"44443334\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\",\"example\":\"db267dcc53c14fb2b9a985532dd287bc\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\",\"example\":\"01/2032\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\",\"example\":false},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\",\"example\":null}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\",\"example\":\"12345\"}},\"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`).\",\"example\":true},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\",\"example\":\"418213DE29634837A63DD693A937A696\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\",\"example\":\"luxstore\"},\"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.\"}},\"example\":{\"id\":\"D3DEECAB3C6C4B9EAF8EF4C1FE062FF3\",\"paymentSystem\":\"6\",\"paymentSystemName\":\"Boleto Bancário\",\"value\":4450,\"installments\":1,\"referenceValue\":4450,\"cardHolder\":null,\"cardNumber\":null,\"firstDigits\":null,\"lastDigits\":null,\"cvv2\":null,\"expireMonth\":null,\"expireYear\":null,\"url\":\"https://luxstore.vtexpayments.com.br:443/BankIssuedInvoice/Transaction/418213DE29634837A63DD693A937A696/Payment/D3DEECAB3C6C4B9EAF8EF4C1FE062FF3/Installment/{Installment}\",\"giftCardId\":null,\"giftCardName\":null,\"giftCardCaption\":null,\"redemptionCode\":null,\"group\":\"bankInvoice\",\"tid\":null,\"dueDate\":\"2019-02-02\",\"connectorResponses\":{}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\",\"example\":\"12345\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\",\"example\":\"Message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\",\"example\":0},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\",\"example\":0},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\",\"example\":null}}},\"contacts\":{\"type\":\"array\",\"description\":\"List of contacts.\",\"items\":{\"type\":\"object\",\"description\":\"Contact information.\",\"properties\":{\"contactId\":{\"type\":\"string\",\"description\":\"Contact's unique identifier.\",\"example\":\"0\"},\"email\":{\"type\":\"string\",\"description\":\"Contact's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Contact's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Contact's last name.\",\"example\":\"Doe\"},\"phone\":{\"type\":\"string\",\"description\":\"Contact's phone number.\",\"example\":\"12345678910\"},\"document\":{\"type\":\"string\",\"description\":\"Contact's document.\",\"example\":\"12345678910\"}}}},\"invoiceSubject\":{\"type\":\"object\",\"description\":\"Information about the invoice subject.\",\"properties\":{\"invoiceSubjectId\":{\"type\":\"string\",\"description\":\"Invoice subject ID.\",\"example\":\"0\"},\"email\":{\"type\":\"string\",\"description\":\"Invoice subject's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Invoice subject's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Invoice subject's last name.\",\"example\":\"Doe\"},\"phone\":{\"type\":\"string\",\"description\":\"Invoice subject's phone number.\",\"example\":\"12345678910\"}}},\"email\":{\"type\":\"string\",\"description\":\"Prospect's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Prospect's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Prospect's last name.\",\"example\":\"Doe\"},\"document\":{\"type\":\"string\",\"description\":\"Prospect's document.\",\"example\":\"5397eefef23741d4976ebdf772cc42e0\"},\"cellPhone\":{\"type\":\"string\",\"description\":\"Prospect's cellphone number.\",\"example\":\"12345678910\"},\"isPJ\":{\"type\":\"boolean\",\"description\":\"Defines if a prospect is corporate (`true`) or not (`false`).\",\"example\":false},\"customerCode\":{\"type\":\"string\",\"description\":\"Prospect's customer code.\",\"example\":\"5397eefe-f237-41d4-976e-bdf772cc42e0\"}}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the prospect.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the prospect information expires in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}\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": "2a35c599-6735-4a7b-9fd0-131f3ded8789", "name": "Update prospect", "request": { "name": "Update prospect", "description": { "content": "Updates one or more fields of an existing prospect.\n\r\n\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "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 \"Excepteur amet magna\",\n \"in dolore exercitation nisi anim\"\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 \"in et in non\",\n \"eiusmod cillum\"\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\": \"est Lorem\",\n \"paymentSystem\": \"deserunt in\",\n \"paymentSystemName\": \"commodo sed\",\n \"value\": 58191435,\n \"installments\": -91708601,\n \"referenceValue\": -60548802,\n \"cardHolder\": \"ea laboris minim pariatur\",\n \"cardNumber\": \"sit labore adipisicing Ut\",\n \"firstDigits\": \"ut es\",\n \"lastDigits\": \"Ut Lorem sunt\",\n \"cvv2\": \"in sit exercitation Duis incididunt\",\n \"expireMonth\": \"magna tempor est\",\n \"expireYear\": \"pariatur in exercitation\",\n \"url\": \"proident nisi dolor aliquip\",\n \"giftCardId\": \"e\",\n \"giftCardName\": \"reprehenderit occaecat Excepteur\",\n \"giftCardCaption\": \"minim commodo\",\n \"redemptionCode\": \"nostrud\",\n \"group\": \"et enim\",\n \"tid\": \"aliquip nostrud ex\",\n \"dueDate\": \"Lorem consectetur ipsum ea\",\n \"connectorResponses\": {}\n },\n {\n \"id\": \"aute ut nostrud\",\n \"paymentSystem\": \"ipsum ut aliqua sunt officia\",\n \"paymentSystemName\": \"anim cupidatat sit\",\n \"value\": 80681571,\n \"installments\": 73493607,\n \"referenceValue\": 55426990,\n \"cardHolder\": \"amet reprehenderit non occaecat exercitation\",\n \"cardNumber\": \"mollit laborum Lorem\",\n \"firstDigits\": \"culpa nisi elit voluptate\",\n \"lastDigits\": \"esse Excepteur pariatur\",\n \"cvv2\": \"occaecat\",\n \"expireMonth\": \"do irure tempor occaecat Excepteur\",\n \"expireYear\": \"et Ut occaecat sed in\",\n \"url\": \"ad non\",\n \"giftCardId\": \"laboris non d\",\n \"giftCardName\": \"dolor deserunt pr\",\n \"giftCardCaption\": \"reprehenderit\",\n \"redemptionCode\": \"c\",\n \"group\": \"sit minim\",\n \"tid\": \"eiusmod magna exercitation commodo en\",\n \"dueDate\": \"officia velit ea\",\n \"connectorResponses\": {}\n }\n ]\n },\n {\n \"isActive\": true,\n \"transactionId\": \"418213DE29634837A63DD693A937A696\",\n \"merchantName\": \"luxstore\",\n \"payments\": [\n {\n \"id\": \"voluptate velit veniam\",\n \"paymentSystem\": \"Lorem dolore\",\n \"paymentSystemName\": \"comm\",\n \"value\": 26047100,\n \"installments\": 1864998,\n \"referenceValue\": 74311359,\n \"cardHolder\": \"exercitation anim culpa labore\",\n \"cardNumber\": \"veniam laboris\",\n \"firstDigits\": \"in Ut consequat e\",\n \"lastDigits\": \"exercitation\",\n \"cvv2\": \"ut nostrud in\",\n \"expireMonth\": \"sint\",\n \"expireYear\": \"qui\",\n \"url\": \"aliqua tempor voluptate\",\n \"giftCardId\": \"Excepteur Duis\",\n \"giftCardName\": \"sint nostrud\",\n \"giftCardCaption\": \"consequat minim\",\n \"redemptionCode\": \"consequat Excepteur\",\n \"group\": \"in dolor\",\n \"tid\": \"i\",\n \"dueDate\": \"veniam ut\",\n \"connectorResponses\": {}\n },\n {\n \"id\": \"esse cil\",\n \"paymentSystem\": \"ex elit\",\n \"paymentSystemName\": \"quis irure ea labore\",\n \"value\": -7677661,\n \"installments\": -30874341,\n \"referenceValue\": 61628743,\n \"cardHolder\": \"consequat\",\n \"cardNumber\": \"Ut culpa Excepteur cillum adipisicing\",\n \"firstDigits\": \"fugiat tempor dolore\",\n \"lastDigits\": \"ex in elit\",\n \"cvv2\": \"ex id\",\n \"expireMonth\": \"irure labore id\",\n \"expireYear\": \"occaecat enim\",\n \"url\": \"dolor Ut elit nulla\",\n \"giftCardId\": \"laborum nostrud minim\",\n \"giftCardName\": \"commodo sint ut sit in\",\n \"giftCardCaption\": \"id laborum dolor\",\n \"redemptionCode\": \"dolor adipisicing incididunt mollit velit\",\n \"group\": \"proident ad fugia\",\n \"tid\": \"in id aliquip exercitation dolor\",\n \"dueDate\": \"officia labore cillum\",\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": { "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "8448438c-b0bc-4267-83db-706010e42827", "name": "OK", "originalRequest": { "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": "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 \"Excepteur amet magna\",\n \"in dolore exercitation nisi anim\"\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 \"in et in non\",\n \"eiusmod cillum\"\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\": \"est Lorem\",\n \"paymentSystem\": \"deserunt in\",\n \"paymentSystemName\": \"commodo sed\",\n \"value\": 58191435,\n \"installments\": -91708601,\n \"referenceValue\": -60548802,\n \"cardHolder\": \"ea laboris minim pariatur\",\n \"cardNumber\": \"sit labore adipisicing Ut\",\n \"firstDigits\": \"ut es\",\n \"lastDigits\": \"Ut Lorem sunt\",\n \"cvv2\": \"in sit exercitation Duis incididunt\",\n \"expireMonth\": \"magna tempor est\",\n \"expireYear\": \"pariatur in exercitation\",\n \"url\": \"proident nisi dolor aliquip\",\n \"giftCardId\": \"e\",\n \"giftCardName\": \"reprehenderit occaecat Excepteur\",\n \"giftCardCaption\": \"minim commodo\",\n \"redemptionCode\": \"nostrud\",\n \"group\": \"et enim\",\n \"tid\": \"aliquip nostrud ex\",\n \"dueDate\": \"Lorem consectetur ipsum ea\",\n \"connectorResponses\": {}\n },\n {\n \"id\": \"aute ut nostrud\",\n \"paymentSystem\": \"ipsum ut aliqua sunt officia\",\n \"paymentSystemName\": \"anim cupidatat sit\",\n \"value\": 80681571,\n \"installments\": 73493607,\n \"referenceValue\": 55426990,\n \"cardHolder\": \"amet reprehenderit non occaecat exercitation\",\n \"cardNumber\": \"mollit laborum Lorem\",\n \"firstDigits\": \"culpa nisi elit voluptate\",\n \"lastDigits\": \"esse Excepteur pariatur\",\n \"cvv2\": \"occaecat\",\n \"expireMonth\": \"do irure tempor occaecat Excepteur\",\n \"expireYear\": \"et Ut occaecat sed in\",\n \"url\": \"ad non\",\n \"giftCardId\": \"laboris non d\",\n \"giftCardName\": \"dolor deserunt pr\",\n \"giftCardCaption\": \"reprehenderit\",\n \"redemptionCode\": \"c\",\n \"group\": \"sit minim\",\n \"tid\": \"eiusmod magna exercitation commodo en\",\n \"dueDate\": \"officia velit ea\",\n \"connectorResponses\": {}\n }\n ]\n },\n {\n \"isActive\": true,\n \"transactionId\": \"418213DE29634837A63DD693A937A696\",\n \"merchantName\": \"luxstore\",\n \"payments\": [\n {\n \"id\": \"voluptate velit veniam\",\n \"paymentSystem\": \"Lorem dolore\",\n \"paymentSystemName\": \"comm\",\n \"value\": 26047100,\n \"installments\": 1864998,\n \"referenceValue\": 74311359,\n \"cardHolder\": \"exercitation anim culpa labore\",\n \"cardNumber\": \"veniam laboris\",\n \"firstDigits\": \"in Ut consequat e\",\n \"lastDigits\": \"exercitation\",\n \"cvv2\": \"ut nostrud in\",\n \"expireMonth\": \"sint\",\n \"expireYear\": \"qui\",\n \"url\": \"aliqua tempor voluptate\",\n \"giftCardId\": \"Excepteur Duis\",\n \"giftCardName\": \"sint nostrud\",\n \"giftCardCaption\": \"consequat minim\",\n \"redemptionCode\": \"consequat Excepteur\",\n \"group\": \"in dolor\",\n \"tid\": \"i\",\n \"dueDate\": \"veniam ut\",\n \"connectorResponses\": {}\n },\n {\n \"id\": \"esse cil\",\n \"paymentSystem\": \"ex elit\",\n \"paymentSystemName\": \"quis irure ea labore\",\n \"value\": -7677661,\n \"installments\": -30874341,\n \"referenceValue\": 61628743,\n \"cardHolder\": \"consequat\",\n \"cardNumber\": \"Ut culpa Excepteur cillum adipisicing\",\n \"firstDigits\": \"fugiat tempor dolore\",\n \"lastDigits\": \"ex in elit\",\n \"cvv2\": \"ex id\",\n \"expireMonth\": \"irure labore id\",\n \"expireYear\": \"occaecat enim\",\n \"url\": \"dolor Ut elit nulla\",\n \"giftCardId\": \"laborum nostrud minim\",\n \"giftCardName\": \"commodo sint ut sit in\",\n \"giftCardCaption\": \"id laborum dolor\",\n \"redemptionCode\": \"dolor adipisicing incididunt mollit velit\",\n \"group\": \"proident ad fugia\",\n \"tid\": \"in id aliquip exercitation dolor\",\n \"dueDate\": \"officia labore cillum\",\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": { "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": "2304a8f3-2e6b-4b5c-a477-4e92ad261bbd", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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`).\",\"example\":true},\"userId\":{\"type\":\"string\",\"description\":\"User unique identifier.\",\"example\":\"98478f6b-d025-4f35-a560-dd1ee7a6f26e\"},\"addressName\":{\"type\":\"string\",\"description\":\"Address name.\",\"example\":\"Home\"},\"addressType\":{\"type\":\"string\",\"description\":\"Address type.\",\"example\":\"residential\"},\"postalCode\":{\"type\":\"string\",\"description\":\"Postal code.\",\"example\":\"32137\"},\"city\":{\"type\":\"string\",\"description\":\"City.\",\"example\":\"Palm Coast\"},\"country\":{\"type\":\"string\",\"description\":\"Country code.\",\"example\":\"USA\"},\"street\":{\"type\":\"string\",\"description\":\"Street name.\",\"example\":\"Fifth St.\"},\"number\":{\"type\":\"string\",\"description\":\"Street number.\",\"example\":\"9538\"},\"complement\":{\"type\":\"string\",\"description\":\"Complement information.\",\"example\":\"Apartment 2B\"},\"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.\",\"example\":\"D09F5E3F01054C959CFC4CB357961ADE\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\",\"example\":\"2\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\",\"example\":\"Visa\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\",\"example\":\"************1111\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\",\"example\":\"44443334\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\",\"example\":\"db267dcc53c14fb2b9a985532dd287bc\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\",\"example\":\"01/2032\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\",\"example\":false},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\",\"example\":null}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\",\"example\":\"12345\"}},\"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`).\",\"example\":true},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\",\"example\":\"418213DE29634837A63DD693A937A696\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\",\"example\":\"luxstore\"},\"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.\"}},\"example\":{\"id\":\"D3DEECAB3C6C4B9EAF8EF4C1FE062FF3\",\"paymentSystem\":\"6\",\"paymentSystemName\":\"Boleto Bancário\",\"value\":4450,\"installments\":1,\"referenceValue\":4450,\"cardHolder\":null,\"cardNumber\":null,\"firstDigits\":null,\"lastDigits\":null,\"cvv2\":null,\"expireMonth\":null,\"expireYear\":null,\"url\":\"https://luxstore.vtexpayments.com.br:443/BankIssuedInvoice/Transaction/418213DE29634837A63DD693A937A696/Payment/D3DEECAB3C6C4B9EAF8EF4C1FE062FF3/Installment/{Installment}\",\"giftCardId\":null,\"giftCardName\":null,\"giftCardCaption\":null,\"redemptionCode\":null,\"group\":\"bankInvoice\",\"tid\":null,\"dueDate\":\"2019-02-02\",\"connectorResponses\":{}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\",\"example\":\"12345\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\",\"example\":\"Message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\",\"example\":0},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\",\"example\":0},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\",\"example\":null}}},\"contacts\":{\"type\":\"array\",\"description\":\"List of contacts.\",\"items\":{\"type\":\"object\",\"description\":\"Contact information.\",\"properties\":{\"contactId\":{\"type\":\"string\",\"description\":\"Contact's unique identifier.\",\"example\":\"0\"},\"email\":{\"type\":\"string\",\"description\":\"Contact's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Contact's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Contact's last name.\",\"example\":\"Doe\"},\"phone\":{\"type\":\"string\",\"description\":\"Contact's phone number.\",\"example\":\"12345678910\"},\"document\":{\"type\":\"string\",\"description\":\"Contact's document.\",\"example\":\"12345678910\"}}}},\"invoiceSubject\":{\"type\":\"object\",\"description\":\"Information about the invoice subject.\",\"properties\":{\"invoiceSubjectId\":{\"type\":\"string\",\"description\":\"Invoice subject ID.\",\"example\":\"0\"},\"email\":{\"type\":\"string\",\"description\":\"Invoice subject's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Invoice subject's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Invoice subject's last name.\",\"example\":\"Doe\"},\"phone\":{\"type\":\"string\",\"description\":\"Invoice subject's phone number.\",\"example\":\"12345678910\"}}},\"email\":{\"type\":\"string\",\"description\":\"Prospect's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Prospect's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Prospect's last name.\",\"example\":\"Doe\"},\"document\":{\"type\":\"string\",\"description\":\"Prospect's document.\",\"example\":\"5397eefef23741d4976ebdf772cc42e0\"},\"cellPhone\":{\"type\":\"string\",\"description\":\"Prospect's cellphone number.\",\"example\":\"12345678910\"},\"isPJ\":{\"type\":\"boolean\",\"description\":\"Defines if a prospect is corporate (`true`) or not (`false`).\",\"example\":false},\"customerCode\":{\"type\":\"string\",\"description\":\"Prospect's customer code.\",\"example\":\"5397eefe-f237-41d4-976e-bdf772cc42e0\"}}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the prospect.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the prospect information expires in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}\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": "e38c89da-dec8-42ce-bd52-4f43619cbc72", "name": "Delete prospect", "request": { "name": "Delete prospect", "description": { "content": "Deletes a prospect by `prospectId`.\n\r\n\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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" }, "response": [ { "_": { "postman_previewlanguage": "text" }, "id": "06b5cbeb-2893-4558-9634-3fd5c0f6cad3", "name": "No content", "originalRequest": { "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "status": "No Content", "code": 204, "header": [ { "key": "Content-Type", "value": "text/plain" } ], "body": "", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "5b50b135-53cf-4d2b-a915-844fa7987083", "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": "62008b05-b638-4ce0-bc66-547368a8a119", "name": "Get unmasked prospect", "request": { "name": "Get unmasked prospect", "description": { "content": "Retrieves unmasked information of a specific prospect, by its `prospectId`.\n\r\n\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "75877c18-e273-4734-a8f2-3f7165d3d607", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "prospects", ":prospectId", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "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" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "4ecd1714-d88d-48b3-a5a7-362ea262b5c5", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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`).\",\"example\":true},\"userId\":{\"type\":\"string\",\"description\":\"User unique identifier.\",\"example\":\"98478f6b-d025-4f35-a560-dd1ee7a6f26e\"},\"addressName\":{\"type\":\"string\",\"description\":\"Address name.\",\"example\":\"Home\"},\"addressType\":{\"type\":\"string\",\"description\":\"Address type.\",\"example\":\"residential\"},\"postalCode\":{\"type\":\"string\",\"description\":\"Postal code.\",\"example\":\"32137\"},\"city\":{\"type\":\"string\",\"description\":\"City.\",\"example\":\"Palm Coast\"},\"country\":{\"type\":\"string\",\"description\":\"Country code.\",\"example\":\"USA\"},\"street\":{\"type\":\"string\",\"description\":\"Street name.\",\"example\":\"Fifth St.\"},\"number\":{\"type\":\"string\",\"description\":\"Street number.\",\"example\":\"9538\"},\"complement\":{\"type\":\"string\",\"description\":\"Complement information.\",\"example\":\"Apartment 2B\"},\"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.\",\"example\":\"D09F5E3F01054C959CFC4CB357961ADE\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\",\"example\":\"2\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\",\"example\":\"Visa\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\",\"example\":\"************1111\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\",\"example\":\"44443334\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\",\"example\":\"db267dcc53c14fb2b9a985532dd287bc\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\",\"example\":\"01/2032\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\",\"example\":false},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\",\"example\":null}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\",\"example\":\"12345\"}},\"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`).\",\"example\":true},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\",\"example\":\"418213DE29634837A63DD693A937A696\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\",\"example\":\"luxstore\"},\"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.\"}},\"example\":{\"id\":\"D3DEECAB3C6C4B9EAF8EF4C1FE062FF3\",\"paymentSystem\":\"6\",\"paymentSystemName\":\"Boleto Bancário\",\"value\":4450,\"installments\":1,\"referenceValue\":4450,\"cardHolder\":null,\"cardNumber\":null,\"firstDigits\":null,\"lastDigits\":null,\"cvv2\":null,\"expireMonth\":null,\"expireYear\":null,\"url\":\"https://luxstore.vtexpayments.com.br:443/BankIssuedInvoice/Transaction/418213DE29634837A63DD693A937A696/Payment/D3DEECAB3C6C4B9EAF8EF4C1FE062FF3/Installment/{Installment}\",\"giftCardId\":null,\"giftCardName\":null,\"giftCardCaption\":null,\"redemptionCode\":null,\"group\":\"bankInvoice\",\"tid\":null,\"dueDate\":\"2019-02-02\",\"connectorResponses\":{}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\",\"example\":\"12345\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\",\"example\":\"Message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\",\"example\":0},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\",\"example\":0},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\",\"example\":null}}},\"contacts\":{\"type\":\"array\",\"description\":\"List of contacts.\",\"items\":{\"type\":\"object\",\"description\":\"Contact information.\",\"properties\":{\"contactId\":{\"type\":\"string\",\"description\":\"Contact's unique identifier.\",\"example\":\"0\"},\"email\":{\"type\":\"string\",\"description\":\"Contact's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Contact's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Contact's last name.\",\"example\":\"Doe\"},\"phone\":{\"type\":\"string\",\"description\":\"Contact's phone number.\",\"example\":\"12345678910\"},\"document\":{\"type\":\"string\",\"description\":\"Contact's document.\",\"example\":\"12345678910\"}}}},\"invoiceSubject\":{\"type\":\"object\",\"description\":\"Information about the invoice subject.\",\"properties\":{\"invoiceSubjectId\":{\"type\":\"string\",\"description\":\"Invoice subject ID.\",\"example\":\"0\"},\"email\":{\"type\":\"string\",\"description\":\"Invoice subject's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Invoice subject's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Invoice subject's last name.\",\"example\":\"Doe\"},\"phone\":{\"type\":\"string\",\"description\":\"Invoice subject's phone number.\",\"example\":\"12345678910\"}}},\"email\":{\"type\":\"string\",\"description\":\"Prospect's email address.\",\"example\":\"jane@mail.com\"},\"firstName\":{\"type\":\"string\",\"description\":\"Prospect's first name.\",\"example\":\"Jane\"},\"lastName\":{\"type\":\"string\",\"description\":\"Prospect's last name.\",\"example\":\"Doe\"},\"document\":{\"type\":\"string\",\"description\":\"Prospect's document.\",\"example\":\"5397eefef23741d4976ebdf772cc42e0\"},\"cellPhone\":{\"type\":\"string\",\"description\":\"Prospect's cellphone number.\",\"example\":\"12345678910\"},\"isPJ\":{\"type\":\"boolean\",\"description\":\"Defines if a prospect is corporate (`true`) or not (`false`).\",\"example\":false},\"customerCode\":{\"type\":\"string\",\"description\":\"Prospect's customer code.\",\"example\":\"5397eefe-f237-41d4-976e-bdf772cc42e0\"}}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the prospect.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the prospect information was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the prospect information expires in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}\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": "7b1a06db-e432-49b5-b51b-6a65b6fbecaf", "name": "Purchase information", "description": { "content": "", "type": "text/plain" }, "item": [ { "id": "ce19afa1-7c29-4b7d-89e8-c59b0fc91425", "name": "Create purchase information", "request": { "name": "Create purchase information", "description": { "content": "Creates purchase information for a given client profile.\n\r\n\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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": "The `profileId` path parameter may be substituted by other profile fields in this request. When making this request, send the `alternativeKey` parameter with a value equal to the key of the field you wish to use as `profileId`.\n\r\n\r> Currently, there are two possible values for this parameter: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "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": { "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "3f668042-7f25-4113-b517-2bd8751889e4", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "purchase-info" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": "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": { "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": "227dd88c-a411-4706-894f-ce033789e585", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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.\",\"example\":\"D09F5E3F01054C959CFC4CB357961ADE\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\",\"example\":\"2\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\",\"example\":\"Visa\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\",\"example\":\"************1111\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\",\"example\":\"44443334\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\",\"example\":\"db267dcc53c14fb2b9a985532dd287bc\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\",\"example\":\"01/2032\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\",\"example\":false},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\",\"example\":null}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\",\"example\":\"12345\"}},\"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`).\",\"example\":true},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\",\"example\":\"418213DE29634837A63DD693A937A696\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\",\"example\":\"luxstore\"},\"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.\"}},\"example\":{\"id\":\"D3DEECAB3C6C4B9EAF8EF4C1FE062FF3\",\"paymentSystem\":\"6\",\"paymentSystemName\":\"Boleto Bancário\",\"value\":4450,\"installments\":1,\"referenceValue\":4450,\"cardHolder\":null,\"cardNumber\":null,\"firstDigits\":null,\"lastDigits\":null,\"cvv2\":null,\"expireMonth\":null,\"expireYear\":null,\"url\":\"https://luxstore.vtexpayments.com.br:443/BankIssuedInvoice/Transaction/418213DE29634837A63DD693A937A696/Payment/D3DEECAB3C6C4B9EAF8EF4C1FE062FF3/Installment/{Installment}\",\"giftCardId\":null,\"giftCardName\":null,\"giftCardCaption\":null,\"redemptionCode\":null,\"group\":\"bankInvoice\",\"tid\":null,\"dueDate\":\"2019-02-02\",\"connectorResponses\":{}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\",\"example\":\"12345\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\",\"example\":\"Message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\",\"example\":0},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\",\"example\":0},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\",\"example\":null}}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the purchase information.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the purchase information was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the purchase information was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the purchase information expires in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}\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": "3cf821eb-1817-47f7-935c-d9cf8f5bea49", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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": "The `profileId` path parameter may be substituted by other profile fields in this request. When making this request, send the `alternativeKey` parameter with a value equal to the key of the field you wish to use as `profileId`.\n\r\n\r> Currently, there are two possible values for this parameter: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "72dd6d25-1a05-4327-a398-31df2b3229d6", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "purchase-info" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "3eeb3acc-ec29-4e6c-9acd-8fe2f9b948fa", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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.\",\"example\":\"D09F5E3F01054C959CFC4CB357961ADE\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\",\"example\":\"2\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\",\"example\":\"Visa\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\",\"example\":\"************1111\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\",\"example\":\"44443334\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\",\"example\":\"db267dcc53c14fb2b9a985532dd287bc\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\",\"example\":\"01/2032\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\",\"example\":false},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\",\"example\":null}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\",\"example\":\"12345\"}},\"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`).\",\"example\":true},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\",\"example\":\"418213DE29634837A63DD693A937A696\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\",\"example\":\"luxstore\"},\"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.\"}},\"example\":{\"id\":\"D3DEECAB3C6C4B9EAF8EF4C1FE062FF3\",\"paymentSystem\":\"6\",\"paymentSystemName\":\"Boleto Bancário\",\"value\":4450,\"installments\":1,\"referenceValue\":4450,\"cardHolder\":null,\"cardNumber\":null,\"firstDigits\":null,\"lastDigits\":null,\"cvv2\":null,\"expireMonth\":null,\"expireYear\":null,\"url\":\"https://luxstore.vtexpayments.com.br:443/BankIssuedInvoice/Transaction/418213DE29634837A63DD693A937A696/Payment/D3DEECAB3C6C4B9EAF8EF4C1FE062FF3/Installment/{Installment}\",\"giftCardId\":null,\"giftCardName\":null,\"giftCardCaption\":null,\"redemptionCode\":null,\"group\":\"bankInvoice\",\"tid\":null,\"dueDate\":\"2019-02-02\",\"connectorResponses\":{}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\",\"example\":\"12345\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\",\"example\":\"Message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\",\"example\":0},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\",\"example\":0},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\",\"example\":null}}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the purchase information.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the purchase information was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the purchase information was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the purchase information expires in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}}\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": "4c355b62-225b-4733-a999-04d29b4e8a28", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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": "The `profileId` path parameter may be substituted by other profile fields in this request. When making this request, send the `alternativeKey` parameter with a value equal to the key of the field you wish to use as `profileId`.\n\r\n\r> Currently, there are two possible values for this parameter: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "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": { "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "ce36a8e7-352f-4b5f-a13e-15398d550180", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "purchase-info" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": "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": { "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": "101469f5-8ba5-4ab3-a3b7-78e22b92c3b1", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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.\",\"example\":\"D09F5E3F01054C959CFC4CB357961ADE\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\",\"example\":\"2\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\",\"example\":\"Visa\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\",\"example\":\"************1111\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\",\"example\":\"44443334\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\",\"example\":\"db267dcc53c14fb2b9a985532dd287bc\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\",\"example\":\"01/2032\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\",\"example\":false},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\",\"example\":null}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\",\"example\":\"12345\"}},\"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`).\",\"example\":true},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\",\"example\":\"418213DE29634837A63DD693A937A696\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\",\"example\":\"luxstore\"},\"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.\"}},\"example\":{\"id\":\"D3DEECAB3C6C4B9EAF8EF4C1FE062FF3\",\"paymentSystem\":\"6\",\"paymentSystemName\":\"Boleto Bancário\",\"value\":4450,\"installments\":1,\"referenceValue\":4450,\"cardHolder\":null,\"cardNumber\":null,\"firstDigits\":null,\"lastDigits\":null,\"cvv2\":null,\"expireMonth\":null,\"expireYear\":null,\"url\":\"https://luxstore.vtexpayments.com.br:443/BankIssuedInvoice/Transaction/418213DE29634837A63DD693A937A696/Payment/D3DEECAB3C6C4B9EAF8EF4C1FE062FF3/Installment/{Installment}\",\"giftCardId\":null,\"giftCardName\":null,\"giftCardCaption\":null,\"redemptionCode\":null,\"group\":\"bankInvoice\",\"tid\":null,\"dueDate\":\"2019-02-02\",\"connectorResponses\":{}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\",\"example\":\"12345\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\",\"example\":\"Message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\",\"example\":0},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\",\"example\":0},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\",\"example\":null}}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the purchase information.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the purchase information was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the purchase information was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the purchase information expires in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}\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": "a36d8072-f0bc-41b8-920c-8aea2e512664", "name": "Delete purchase information", "request": { "name": "Delete purchase information", "description": { "content": "Deletes purchase informaiton by `profileId`.\n\r\n\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints. \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": "The `profileId` path parameter may be substituted by other profile fields in this request. When making this request, send the `alternativeKey` parameter with a value equal to the key of the field you wish to use as `profileId`.\n\r\n\r> Currently, there are two possible values for this parameter: `email` and `document`.", "type": "text/plain" }, "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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" }, "response": [ { "_": { "postman_previewlanguage": "text" }, "id": "652e67c9-3faa-4d02-ac5f-0eb70d90b5ba", "name": "No content", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "purchase-info" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "alternativeKey", "value": "email" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "status": "No Content", "code": 204, "header": [ { "key": "Content-Type", "value": "text/plain" } ], "body": "", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "06a76b0c-f02b-4f88-9b97-93e0e6f5fa03", "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": "aa1c89fe-e442-44c3-9ae1-1b9c06da14dd", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints. \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) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "f820d9bc-c460-40c9-bdd8-718516d37ed6", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "profiles", ":profileId", "purchase-info", "unmask" ], "host": [ "{{baseUrl}}" ], "query": [ { "key": "reason", "value": "data-validation" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) ID of the client's profile as returned by the [Create profile](https://developers.vtex.com/docs/api-reference/profile-system#post-/api/storage/profile-system/profiles) endpoint's response, in the `id` field. It can also be an `alternativeKey` according to your custom profile schema. In this case, this request should also send the `alternativeKey` parameter.", "type": "text/plain" }, "type": "any", "value": "70caf394-8534-447e-a0ca-1803c669c771", "key": "profileId" }, { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "2ee929c1-c733-4429-9230-0cdfe52c1205", "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.\",\"example\":\"c2cbebba-214e-40b2-b68f-98f862e755d5\"},\"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.\",\"example\":\"D09F5E3F01054C959CFC4CB357961ADE\"},\"paymentSystem\":{\"type\":\"string\",\"description\":\"Payment system code.\",\"example\":\"2\"},\"paymentSystemName\":{\"type\":\"string\",\"description\":\"Payment system name.\",\"example\":\"Visa\"},\"cardNumber\":{\"type\":\"string\",\"description\":\"Masked card number.\",\"example\":\"************1111\"},\"bin\":{\"type\":\"string\",\"description\":\"Card bin.\",\"example\":\"44443334\"},\"availableAddresses\":{\"type\":\"array\",\"description\":\"List of available addresses.\",\"items\":{\"type\":\"string\",\"description\":\"Available address ID.\",\"example\":\"db267dcc53c14fb2b9a985532dd287bc\"}},\"expirationDate\":{\"type\":\"string\",\"description\":\"Card expiration date, in `MM/YYYY` format.\",\"example\":\"01/2032\"},\"isExpired\":{\"type\":\"boolean\",\"description\":\"Defines if the card is expired (`true`) or not (`false`).\",\"example\":false},\"accountStatus\":{\"type\":[\"string\",\"null\"],\"description\":\"Account status.\",\"example\":null}}}},\"availableTokens\":{\"type\":\"array\",\"description\":\"Available tokens.\",\"items\":{\"type\":\"string\",\"description\":\"Available token.\",\"example\":\"12345\"}},\"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`).\",\"example\":true},\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction ID.\",\"example\":\"418213DE29634837A63DD693A937A696\"},\"merchantName\":{\"type\":\"string\",\"description\":\"Merchant name.\",\"example\":\"luxstore\"},\"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.\"}},\"example\":{\"id\":\"D3DEECAB3C6C4B9EAF8EF4C1FE062FF3\",\"paymentSystem\":\"6\",\"paymentSystemName\":\"Boleto Bancário\",\"value\":4450,\"installments\":1,\"referenceValue\":4450,\"cardHolder\":null,\"cardNumber\":null,\"firstDigits\":null,\"lastDigits\":null,\"cvv2\":null,\"expireMonth\":null,\"expireYear\":null,\"url\":\"https://luxstore.vtexpayments.com.br:443/BankIssuedInvoice/Transaction/418213DE29634837A63DD693A937A696/Payment/D3DEECAB3C6C4B9EAF8EF4C1FE062FF3/Installment/{Installment}\",\"giftCardId\":null,\"giftCardName\":null,\"giftCardCaption\":null,\"redemptionCode\":null,\"group\":\"bankInvoice\",\"tid\":null,\"dueDate\":\"2019-02-02\",\"connectorResponses\":{}}}}}}},\"giftCards\":{\"type\":\"array\",\"description\":\"Gift card IDs.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card ID.\",\"example\":\"12345\"}},\"giftCardMessages\":{\"type\":\"array\",\"description\":\"Gift card messages.\",\"items\":{\"type\":\"string\",\"description\":\"Gift card message.\",\"example\":\"Message.\"}},\"numberOfPaymentErrors\":{\"type\":\"number\",\"description\":\"Amount of payment errors.\",\"example\":0},\"numberOfDeniedTransactions\":{\"type\":\"number\",\"description\":\"Amount of denied transactions.\",\"example\":0},\"lastDeniedTransaction\":{\"type\":[\"string\",\"null\"],\"description\":\"Last denied transaction.\",\"example\":null}}},\"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.\",\"example\":\"27112371-a71b-45d6-b3bc-93436a3a0b4f\"},\"author\":{\"type\":\"string\",\"description\":\"Unique identifier of the user who created the purchase information.\",\"example\":\"82a2b53d-39be-4f49-bb7c-8971b58cb7dc\"},\"creationDate\":{\"type\":\"string\",\"description\":\"Date when the purchase information was created in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"lastUpdateDate\":{\"type\":\"string\",\"description\":\"Date when the purchase information was last updated in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"},\"expirationDate\":{\"type\":[\"string\",\"null\"],\"description\":\"Date when the purchase information expires in ISO 8601 format.\",\"example\":\"2022-01-05T15:41:37.5009471+00:00\"}}}}}}\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": "d806aa35-a099-451c-8601-098fc173a74e", "name": "Schemas", "description": { "content": "", "type": "text/plain" }, "item": [ { "id": "aac8731a-6ba6-4659-b444-bc1c039d0ffa", "name": "Get full schema", "request": { "name": "Get full schema", "description": { "content": "Retrieves the full profile schema, including custom fields.\n\r\n\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints. \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": [ { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "fb37f37e-b8dd-4f52-a4ef-09183abebf82", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "schemas", "profileSystem" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [ { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "f861607e-a2f8-48ec-a366-096b528c64fa", "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.\",\"example\":\"Client profile schema.\"},\"type\":{\"type\":\"string\",\"description\":\"Schema type.\",\"example\":\"object\"},\"description\":{\"type\":\"string\",\"description\":\"Schema's human readable description.\",\"example\":\"This schema describes a b2c customer profile.\"},\"required\":{\"type\":\"array\",\"description\":\"Schema required fields.\",\"items\":{\"type\":\"string\",\"description\":\"Key of a field that is required in the schema.\"},\"example\":[\"firstName\",\"lastName\",\"email\",\"document\",\"documentType\"]},\"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.\",\"example\":\"string\"},\"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`.\",\"example\":true},\"pii\":{\"type\":\"boolean\",\"description\":\"Indicates whether the property is Personal Identifiable Information (PII).\",\"example\":true},\"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.\",\"example\":\"string\"}},\"example\":{\"type\":\"string\"}}}}}},\"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.\",\"example\":1825},\"version\":{\"type\":\"integer\",\"description\":\"Schema version.\",\"example\":1},\"v-indexed\":{\"type\":\"array\",\"description\":\"List of fields to be indexed.\",\"example\":[\"email\",\"document\"],\"items\":{\"type\":\"string\",\"description\":\"Field to be indexed.\"}},\"v-unique\":{\"type\":\"array\",\"description\":\"List of fields that must be unique.\",\"example\":[\"email\",\"document\"],\"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": "03b2d3a2-87b9-4479-9a2a-f1562399dda4", "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\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.\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": [ { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "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": { "language": "json" } } } }, "response": [ { "_": { "postman_previewlanguage": "text" }, "id": "fec4baac-740b-451b-987f-000b125a279e", "name": "Created", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "schemas", "profileSystem", "custom" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [ { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": "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": { "language": "json" } } } }, "status": "Created", "code": 201, "header": [ { "key": "Content-Type", "value": "text/plain" } ], "body": "", "cookie": [] } ], "event": [ { "listen": "test", "script": { "id": "aba84026-8eda-4275-bac5-59aa2bd0d81b", "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": "e3b097a7-b9d8-417c-99e9-39ecff6e628f", "name": "Get custom fields", "request": { "name": "Get custom fields", "description": { "content": "Retrieves all custom fields in the profile schema.\n\r\n\r> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints. \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": [ { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "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": "GET" }, "response": [ { "_": { "postman_previewlanguage": "json" }, "id": "5369d9c2-d55d-4545-8a1c-74f9caf48fad", "name": "OK", "originalRequest": { "url": { "path": [ "api", "storage", "profile-system", "schemas", "profileSystem", "custom" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [ { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "{{accountName}}", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "{{environment}}", "key": "environment" } ] }, "header": [ { "description": { "content": "Added as a part of security scheme: apikey", "type": "text/plain" }, "key": "X-VTEX-API-AppKey", "value": "" }, { "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": {} }, "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": "c3b5f1a5-c4a9-4960-9b41-3b4eba2e0d38", "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.\",\"example\":\"Client profile schema.\"},\"type\":{\"type\":\"string\",\"description\":\"Schema type.\",\"example\":\"object\"},\"description\":{\"type\":\"string\",\"description\":\"Schema's human readable description.\",\"example\":\"This schema describes a b2c customer profile.\"},\"required\":{\"type\":\"array\",\"description\":\"Schema required fields.\",\"items\":{\"type\":\"string\",\"description\":\"Key of a field that is required in the schema.\"},\"example\":[\"firstName\",\"lastName\",\"email\",\"document\",\"documentType\"]},\"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.\",\"example\":\"string\"},\"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`.\",\"example\":true},\"pii\":{\"type\":\"boolean\",\"description\":\"Indicates whether the property is Personal Identifiable Information (PII).\",\"example\":true},\"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.\",\"example\":\"string\"}},\"example\":{\"type\":\"string\"}}}}}},\"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.\",\"example\":1825},\"version\":{\"type\":\"integer\",\"description\":\"Schema version.\",\"example\":1},\"v-indexed\":{\"type\":\"array\",\"description\":\"List of fields to be indexed.\",\"example\":[\"email\",\"document\"],\"items\":{\"type\":\"string\",\"description\":\"Field to be indexed.\"}},\"v-unique\":{\"type\":\"array\",\"description\":\"List of fields that must be unique.\",\"example\":[\"email\",\"document\"],\"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": [ { "description": { "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", "value": "apiexamples", "key": "accountName" }, { "description": { "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", "type": "text/plain" }, "type": "any", "value": "vtexcommercestable", "key": "environment" }, { "type": "string", "value": "https://{{accountName}}.{{environment}}.com.br", "key": "baseUrl" } ], "info": { "_postman_id": "7a572b7f-6c39-4b7d-86f2-32ef7678289e", "name": "Profile System", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "description": { "content": ">❗ This feature is in closed beta phase, meaning we are evolving it to support all scenarios. Do not share this documentation with people outside of your company.", "type": "text/plain" } } }