---
title: "Get unmasked purchase information"
method: GET
path: "/api/storage/profile-system/profiles/{profileId}/purchase-info/unmask"
tags: ["Purchase information"]
---

# Get unmasked purchase information

`GET /api/storage/profile-system/profiles/{profileId}/purchase-info/unmask`

## Request

- Base URL: `https://apiexamples.vtexcommercestable.com.br`
- URL: `https://apiexamples.vtexcommercestable.com.br/api/storage/profile-system/profiles/{profileId}/purchase-info/unmask`
- Auth: one of:
  - API key in header `X-VTEX-API-AppKey` and API key in header `X-VTEX-API-AppToken`
  - API key in header `VtexIdclientAutCookie`

Retrieves unmasked purchase information of a given client, by its `profileId`.

Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.

>⚠️ The Profile System is only compatible with stores using the PII data architecture from [Data Protection Plus](https://developers.vtex.com/docs/guides/data-protection-plus), which is in closed beta phase, only available in select regions.
>
> This feature is part of [VTEX Shield](https://help.vtex.com/en/tutorial/vtex-shield--2CVk6H9eY2CBtHjtDI7BFh). If you are already a VTEX customer and want to adopt VTEX Shield for your business, please contact [Commercial Support](https://help.vtex.com/en/tracks/support-at-vtex--4AXsGdGHqExp9ZkiNq9eMy/3KQWGgkPOwbFTPfBxL7YwZ). Additional fees may apply. If you are not yet a customer but are interested in this solution, please complete our [contact form](https://vtex.com/us-en/contact/). 

## Permissions

Any user or [API key](https://developers.vtex.com/docs/guides/api-authentication-using-api-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:

| **Product** | **Category** | **Resource** |
| --------------- | ----------------- | ----------------- |
| Profile System | Documents | **Get Item** |
| Profile System | Documents | **Save and Update Item** |
| Profile System | Documents | **Delete Item** |

There 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).

>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing API keys](https://help.vtex.com/en/tutorial/best-practices-api-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.

## Path parameters

- `profileId` string, required

## Query parameters

- `reason` string, required

## Headers

- `Content-Type` string, required
- `Accept` string, required

## Response `200`

OK

- MaskedPurchaseInfoResponse[]: List of purchase information.
  - `id` string: ID of purchase information.
  - `document` PurchaseInfo: Purchase information object.
    - `paymentData` PaymentData: Payment data.
      - `availableAccounts` object[]: List of available payment accounts.
        - `accountId` string: Payment account ID.
        - `paymentSystem` string: Payment system code.
        - `paymentSystemName` string: Payment system name.
        - `cardNumber` string: Masked card number.
        - `bin` string: Card bin.
        - `availableAddresses` string[]: List of available addresses.
        - `expirationDate` string: Card expiration date, in `MM/YYYY` format.
        - `isExpired` boolean: Defines if the card is expired (`true`) or not (`false`).
        - `accountStatus` string, nullable: Account status.
      - `availableTokens` string[]: Available tokens.
      - `transactions` object[], nullable: List of transactions.
        - `isActive` boolean, required: Indicates whether the transaction is active (`true`) or not (`false`).
        - `transactionId` string, required: Transaction ID.
        - `merchantName` string, required: Merchant name.
        - `payments` Payment[], required: List of payments information.
          - `id` string, required: Payment ID.
          - `paymentSystem` string, required: Payment system.
          - `paymentSystemName` string, required: Payment system name.
          - `value` integer, required: Payment value in cents.
          - `installments` integer, required: Payment installments.
          - `referenceValue` integer, required: Reference value for interest calculation in cents.
          - `cardHolder` string, nullable, required: Card holder.
          - `cardNumber` string, nullable, required: Card number.
          - `firstDigits` string, nullable, required: Card first digits.
          - `lastDigits` string, nullable, required: Card last digits.
          - `cvv2` string, nullable, required: Card verification code.
          - `expireMonth` string, nullable, required: Card expiration month.
          - `expireYear` string, nullable, required: Card expiration year.
          - `url` string, required: Payment URL.
          - `giftCardId` string, nullable, required: Gift card ID.
          - `giftCardName` string, nullable, required: Gift card name.
          - `giftCardCaption` string, nullable, required: Gift card caption.
          - `redemptionCode` string, nullable, required: Redemption code.
          - `group` string, required: Payment group.
          - `tid` string, nullable, required: Payment TID.
          - `dueDate` string, required: Due date.
          - `connectorResponses` object, required: Connector responses.
      - `giftCards` string[]: Gift card IDs.
      - `giftCardMessages` string[]: Gift card messages.
      - `numberOfPaymentErrors` number: Amount of payment errors.
      - `numberOfDeniedTransactions` number: Amount of denied transactions.
      - `lastDeniedTransaction` string, nullable: Last denied transaction.
    - `clientPreferences` object: Client preferences.
    - `isToSavePersonalData` boolean: Defines if personal data will be saved (`true`) or not (`false`).
    - `lastUserPurchases` object[]: Array with latest purchases from the client.
      - `creationDate` string: Purchase date in the ISO 8601 format.
      - `orderId` string: Unique identifier of the order.
      - `orderGroup` string: Unique identifier of the order group.
      - `value` number: Purchase value.
    - `lastPurchasesAddressId` string: Unique identifier of the client address.
  - `meta` PurchaseInfoMeta: Purchase information metadata.
    - `version` string, required: Unique identifier of the purchase information version.
    - `author` string, required: Unique identifier of the user who created the purchase information.
    - `creationDate` string, required: Date when the purchase information was created in ISO 8601 format.
    - `lastUpdateDate` string, required: Date when the purchase information was last updated in ISO 8601 format.
    - `expirationDate` string, nullable: Date when the purchase information expires in ISO 8601 format.

## Changes

- **2023-11-01** `2ebc766ec816`: 1 breaking
  - the `items/document/paymentData/transactions` response's property type changed from `string` to `array` for status `200`
- **2023-10-26** `fb9c5ab4fd8d`: 1 breaking, 3 info
  - added the new required `query` request parameter `reason`
  - added the optional property `items/document` to the response with the `200` status
  - added the optional property `items/id` to the response with the `200` status
  - added the optional property `items/meta` to the response with the `200` status
- **2023-10-24** `882bd80cdbee`: 4 warning
  - deleted the `query` request parameter `reason`
  - removed the optional property `items/document` from the response with the `200` status
  - removed the optional property `items/id` from the response with the `200` status
  - removed the optional property `items/meta` from the response with the `200` status
- **2023-10-24** `1f5d8ff19193`: 1 breaking, 3 info
  - added the new required `query` request parameter `reason`
  - added the optional property `items/document` to the response with the `200` status
  - added the optional property `items/id` to the response with the `200` status
  - added the optional property `items/meta` to the response with the `200` status

[Operation history](https://skmtc.dev/vtex/apis/profile-system-pii-data-architecture/changes/api/storage/profile-system/profiles/:profileId/purchase-info/unmask/get.md)

---

[API](https://skmtc.dev/vtex/apis/profile-system-pii-data-architecture.md) - [All operations](https://skmtc.dev/vtex/apis/profile-system-pii-data-architecture/llms.txt) - [OpenAPI document](https://skmtc.dev/vtex/apis/profile-system-pii-data-architecture/revisions/23729fa2a727?raw)
