GET
/api/v2/products
300 requests per minute
v2
No authentication required.
Public catalogue. No credentials required, so this endpoint is safe to call from a browser.
Full URL: https://api.acme.example/api/v2/products
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| per_page | integer | no | Results per page, 1–100. |
| page | integer | no | Page number, 1-indexed. |
| currency | string, one of USD, EUR, GBP | no | Prices are converted to this currency. |
| q | string, maxLength 120 | no | Free-text search over name and description. Replaces the v1 search endpoint. |
Responses
200 A page of products.
Example request
curl -X GET 'https://api.acme.example/api/v2/products' \
-H 'Accept: application/json'
const response = await fetch('https://api.acme.example/api/v2/products', {
method: 'GET',
headers: {
'Accept': 'application/json'
}
});
const data = await response.json();
use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'Accept' => 'application/json',
])->get('https://api.acme.example/api/v2/products');
$data = $response->json();
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('GET', 'https://api.acme.example/api/v2/products', [
'headers' => [
'Accept' => 'application/json',
],
]);
$data = json_decode((string) $response->getBody(), true);
Example response
{
"data": [
{
"id": 12,
"name": "Field Notebook",
"price": 1999,
"currency": "USD",
"in_stock": true
}
],
"meta": {
"page": 1,
"per_page": 25,
"total": 1
}
}