Skip to main content

REST API

Overview​

Four REST routes let another system read price requests, create one and upload a file for it. They are the same operations as in GraphQL. Authentication, filters and the phone and file conventions are explained in the Overview.

Method Route What it does
GET /V1/hidepricepro/request/:id Returns one request by its request_id.
GET /V1/hidepricepro/requests Returns all requests, or those matching a filter.
POST /V1/hidepricepro/request/submit Creates a request.
POST /V1/hidepricepro/request/upload Uploads a file to attach to a request you submit next.

Authentication​

Every route needs an admin user or an integration whose role or integration includes MageMe_HidePricePro::manage_requests (Sales → HidePrice → Price Requests in the role tree). An admin token works as Authorization: Bearer <token>. An integration's access token works as a Bearer token only when Magento allows it; otherwise sign each call with OAuth 1.0a using the integration's four keys. Customer tokens and calls without a token get Magento's standard 401 answer. See Overview → Authentication.

The examples on this page use an admin token.

Operations​

GET /V1/hidepricepro/request/:id​

Returns one request.

Parameter In Required Description
id path Yes The request_id of the request.
curl -X GET "https://nordic-oak.example/rest/V1/hidepricepro/request/32" \
-H "Authorization: Bearer <access_token>"

The answer is a list with one object: the request.

[
{
"request_id": "32",
"increment_id": "1000000032",
"is_admin_notified": "1",
"is_customer_notified": "1",
"start_message_id": "38",
"store_id": "1",
"customer_ip": "203.0.113.10",
"customer_email": "ingrid.dahl@fjordbygg.example",
"customer_firstname": "Ingrid",
"customer_lastname": "Dahl",
"customer_phone": "+4791234567",
"message": "Please send a price for 8 meeting tables for our new office.",
"custom_field_1": null,
"custom_field_2": null,
"custom_field_3": null,
"created_at": "2026-11-04 19:17:10",
"is_replied": "0",
"is_read": "0",
"product": {
"product_id": "2120",
"product_sku": "NO-TABLE-MEETING",
"product_name": "Meeting Table Nord",
"options": [],
"attributes": "",
"option_array": "[]"
},
"custom_field_#ID#": null
}
]

Numbers and flags come back as strings. The customer's text, such as message and the name fields, comes back as the customer typed it, not HTML-encoded, for older requests too. Treat it as data and escape it before you show it in HTML.

Field Description
request_id Internal ID.
increment_id Request number shown in Price Requests and in the emails.
is_admin_notified, is_customer_notified Whether the email to your team and the confirmation to the customer have been sent.
start_message_id ID of the first message of the request: the customer's message with its files.
store_id Store view the request was sent from.
customer_ip IP address the request was sent from.
customer_email, customer_firstname, customer_lastname, customer_phone, message What the customer entered, as typed.
custom_field_1 … custom_field_3 Values of Custom Field 1, 2 and 3. null when the field is empty.
created_at When the request was created.
is_replied, is_read Status flags shown in Price Requests.
product The requested product: ID, SKU and name from the catalog, and the options the customer chose. For a request without options, option_array is "[]", or an empty string for some requests sent from the storefront.
custom_field_#ID# Always null. Ignore it.

GET /V1/hidepricepro/requests​

Returns all requests, or the requests that match a filter.

Parameter In Required Description
filter query No A URL-encoded JSON object of column names and values. See the rules below.

Filter rules:

  • Any field from the table above can be a key, except product and custom_field_#ID#.
  • A value that contains % is matched with LIKE, for example {"customer_email": "%@fjordbygg.example"}. Any other value must match exactly.
  • created_at takes {"from": "…", "to": "…"}. Only the date counts: from starts at 00:00:00 and to ends at 23:59:59 of that day.
  • request_id and increment_id take {"from": …, "to": …} as a range.
  • Several keys must all match.
  • A filter that isn't valid JSON is ignored: the answer has all requests.

Without a filter:

curl -X GET "https://nordic-oak.example/rest/V1/hidepricepro/requests" \
-H "Authorization: Bearer <access_token>"

With a date range and unread requests only. The decoded filter is {"created_at": {"from": "2026-01-01", "to": "2026-05-09"}, "is_read": "0"}:

curl -G "https://nordic-oak.example/rest/V1/hidepricepro/requests" \
-H "Authorization: Bearer <access_token>" \
--data-urlencode 'filter={"created_at":{"from":"2026-01-01","to":"2026-05-09"},"is_read":"0"}'

The answer is a list with one object per request. Each object has one key, request_<request_id>, holding the same fields as a single request:

[
{
"request_32": {
"request_id": "32",
"increment_id": "1000000032",
"customer_email": "ingrid.dahl@fjordbygg.example",
"created_at": "2026-03-15 12:34:56",
"is_read": "0"
}
},
{
"request_33": {
"request_id": "33",
"increment_id": "1000000033",
"customer_email": "jonas.berg@fjordbygg.example",
"created_at": "2026-04-22 10:15:30",
"is_read": "0"
}
}
]

The example is shortened: each request carries all fields. In the filter, "is_read": "0", 0 and false work alike, as do "1", 1 and true.

POST /V1/hidepricepro/request/submit​

Creates a request in the store view of the call and answers with the new request, in the same shape as GET /V1/hidepricepro/request/:id. The emails go out with the module's cron job, as for the storefront form.

Field Required Description
email Yes Customer email address. Must be a valid address.
product_id Yes ID of the requested product. The request takes the product's SKU and name from the catalog, in the store view of the call. An ID that isn't in the catalog is still accepted.
firstname, lastname No Customer name.
phone When the phone field is required in Settings: Phone Number Phone number, for example +4791234567.
message No Customer message.
custom_field_1 … custom_field_3 When that field is required in Settings: Custom Field 1, 2 and 3 Field values.
product_sku, product_name No Used only when no product with product_id is found; then they are stored as you send them.
attachment No Hashes from POST /V1/hidepricepro/request/upload, separated by ;.

Send the fields as a JSON object in the body, with Content-Type: application/json. Fields in the query string are read too, and a field sent in both places takes its value from the body. Keep customer details out of the query string: URLs end up in server and proxy logs.

curl -X POST "https://nordic-oak.example/rest/V1/hidepricepro/request/submit" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"email": "ingrid.dahl@fjordbygg.example",
"firstname": "Ingrid",
"lastname": "Dahl",
"phone": "+4791234567",
"message": "Please send a price for 8 meeting tables for our new office.",
"product_id": 2120
}'

POST /V1/hidepricepro/request/upload​

Uploads one file and answers with its hash. Pass the hash in attachment when you submit the request. The file is checked against Settings: File Attachments. A file not attached to a request within about an hour is removed.

Uploads work only when Enable File Attachments is Yes in Settings: File Attachments. Otherwise the answer is {"hash": "", "error": ["File attachments are disabled."], "success": false}.

Field Required Description
filename Yes File name with its extension, for example specs.pdf.
content Yes The file as a data URI, for example data:application/pdf;base64,JVBERi0x…. Without the data: prefix, the value is saved as the file's text, not decoded from base64.
mime_type Yes MIME type of the file, for example application/pdf. Needed with a data URI too.

Like submit, the route reads these fields from a JSON body and from the query string.

curl -X POST "https://nordic-oak.example/rest/V1/hidepricepro/request/upload" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"filename": "specs.pdf",
"mime_type": "application/pdf",
"content": "data:application/pdf;base64,JVBERi0xLjQK..."
}'
{
"hash": "341YArxu2DN22RMmh9eMDLc1PQw7iZy978Gywvea",
"error": [],
"success": true
}

You can also send the file as a multipart upload in a form field named attachment. The answer is the same.

curl -X POST "https://nordic-oak.example/rest/V1/hidepricepro/request/upload" \
-H "Authorization: Bearer <access_token>" \
-F "attachment=@specs.pdf;type=application/pdf"

Errors​

Some problems come back with HTTP status 200 and a message in place of the data, the others with HTTP status 400 or 401.

Route Problem Answer
GET /request/:id No request with that ID A list with the message, for example ["Unable to find request item with ID \"999\""].
POST /request/submit Enable Extension is No HTTP 400 with the message "Module disabled."
POST /request/submit A required field is missing or the email is invalid HTTP 400. With one error, message is its text. With several, message is "One or more input exceptions have occurred." and errors lists each one. See the example below.
POST /request/submit The request could not be saved HTTP 400 with the message "Could not save request."
POST /request/upload The file is not allowed "success": false and the reasons in error, for example ["Uploading of potentially dangerous files is not allowed."] for an .exe file.
POST /request/upload Enable File Attachments is No {"hash": "", "error": ["File attachments are disabled."], "success": false}.
POST /request/upload Enable Extension is No HTTP 400 with the message "Module disabled."
POST /request/upload filename, content or mime_type is missing HTTP 400 with one of the messages "Filename is required.", "Content is required." and "MIME type not found.", in developer and production mode.
Any No token, a customer token, or a role or integration without the resource HTTP 401 with Magento's standard answer: {"message": "The consumer isn't authorized to access %resources.", "parameters": {"resources": "MageMe_HidePricePro::manage_requests"}}. An integration token sent as Bearer while Magento doesn't allow it gets the same answer.

A submit without email and product_id, for example, is answered like this:

{
"message": "One or more input exceptions have occurred.",
"errors": [
{ "message": "Email field is required.", "parameters": [] },
{ "message": "Product is required.", "parameters": [] }
]
}

In developer mode Magento also adds a trace field.

Examples​

A full run from another system: upload a file, submit a request with it, then read the unread requests.

  1. Upload the file with POST /V1/hidepricepro/request/upload and keep the hash.
  2. Submit the request with POST /V1/hidepricepro/request/submit, passing attachment=<hash>.
  3. Read new requests with GET /V1/hidepricepro/requests and the filter {"is_read": "0"}.

Last reviewed November 28, 2026