GET
/api/public/v1/products/{productId}

Get a product

Retrieve a single product by ID. `cost` (the wholesale cost) is `null` unless the credential also holds `purchasing:costs` at that location.

Required scope

The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Dev Tools → API, to an assistant or CLI sign-in when you approve or edit it under Dev Tools, and to a teammate under Employee → Permissions.

products:read

Path Parameters

NameTypeRequiredDescription
productIdstringRequiredProduct ID.
GETExample request
curl
curl -X GET "https://www.pxb.app/api/public/v1/products/{productId}" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Product retrieved successfully!",
  "content": {
    "product": {
      "id": "prod_1",
      "name": "Annual Subscription",
      "price": 12000
    }
  }
}

In the console

The same thing done by hand, for anyone comparing the API against the screen they already use.

Inventory → Products
/inventory/products
  1. Open a product from the table.