Skip to main content

Overview

The short answer​

HidePrice Pro has a small API for price requests: read one request, list requests with a filter, submit a request and upload a file for it. The same four operations exist in REST and in GraphQL. Only admin users and integrations may call them, and only with the Price Requests access resource. Customer and guest tokens are refused.

The module also changes what Magento's own product, search and cart APIs return when a price is hidden. That part needs no setup. It is described in Price visibility in standard APIs.

How it works​

Authentication​

Every price request operation, REST and GraphQL alike, checks two things:

  1. Who is calling. The caller is an admin user with an admin token, or an integration with its access token. A customer token or no token is refused.
  2. What the caller may do. The admin user's role, or the integration, must include the access resource MageMe_HidePricePro::manage_requests. In the role tree of System → Permissions → User Roles it is Sales → HidePrice → Price Requests. How to grant it is on Roles and permissions.

Get an admin token from Magento's standard POST /V1/integration/admin/token route and send it as Authorization: Bearer <token>.

For an integration, create it in System → Extensions → Integrations. Magento 2.4.9 doesn't accept an integration's access token as a Bearer token by default: the call gets HTTP 401. You have two ways:

  • Sign the calls with OAuth 1.0a using the integration's consumer key, consumer secret, access token and access token secret. This works for REST only. GraphQL treats a signed call as a guest and answers "The current customer isn't authorized."
  • Allow the access token as a Bearer token. In Stores → Configuration → Services → OAuth → Consumer Settings, set Allow OAuth Access Tokens to be used as standalone Bearer tokens to Yes. Then send the access token as Authorization: Bearer <token> over REST and GraphQL. Magento's default is No.

HidePrice Pro must be turned on (Enable Extension in Settings: General) for the store the call runs in. When it is off, submitting and uploading over REST, and every GraphQL operation, answer with "Module disabled." The REST read routes (GET /V1/hidepricepro/request/:id and GET /V1/hidepricepro/requests) still answer. The REST store is the one in the URL (/rest/<store_code>/V1/…) or the default store view. GraphQL uses the Store header.

Conventions​

  • Filters. The list operations take one filter argument: a JSON object of column names and values, for example {"is_read": false}. A value with % is matched with LIKE; any other value must match exactly. created_at takes {"from": "…", "to": "…"} and compares dates only: from starts at 00:00:00 and to ends at 23:59:59 of the given day. request_id and increment_id take from and to as a numeric range. A filter that isn't valid JSON is ignored over REST, which then returns all requests; GraphQL answers "Incorrect filter format." The full list of columns is in REST API.
  • Request numbers. request_id is the internal ID. increment_id is the number shown in Price Requests and in the emails, for example 1000000123. Use request_id to read one request.
  • Phone numbers. The storefront form stores the phone number in international format without spaces, for example +12015550123. The API stores the value you send as it is. Send the same format, so requests from both sources look alike in the grid and the export.
  • Files. A file is uploaded first, on its own. The upload answers with a hash. Pass that hash in attachment when you submit the request; separate several hashes with ;. Each file is checked against Settings: File Attachments: allowed extensions and size. At submit, hashes beyond Maximum Files In Dropzone are dropped without an error. A file that is never attached to a request is removed after about an hour.
  • Store view. A submitted request belongs to the store view the call runs in. Its emails follow that store view's notification settings and go out with the module's cron job, as for the storefront form.
  • Answers to mistakes. Over REST, a missing request and a refused file come back with HTTP 200 and a message in the body; submit and upload answer other mistakes with HTTP 400; each reference page lists the cases. GraphQL reports them in errors. Each reference page lists the messages.

Where to find what​

You want to Page
Call the price request operations over REST REST API
Call them over GraphQL GraphQL
Know what product, search and cart APIs return for a hidden price Price visibility in standard APIs
Let your module add a product with a hidden Add to Cart button to the cart Cart exemptions and free gifts
Place the replacements in a custom Luma or Hyvä theme Theme integration

What this means for you​

  • Use an integration with only the Price Requests resource for a system that reads or creates price requests. It needs no admin user and no other access.
  • A headless storefront can't call these operations with a customer token. Send price requests from your own server with an integration token.
  • Upload the files first, then submit the request with their hashes.
  • Check the response body even when the HTTP status is 200: a REST error comes back as a message in place of the request data.

What's next​

Last reviewed November 28, 2026