# Batch Get Products

Get up to 50 Products in one call.

`POST https://api.drophawk.net/v1/products:batchGet`

Each identifier is resolved as in GET /v1/products/{identifier}, and results[i] answers identifiers[i]. An identifier that cannot be resolved fails only its own result, so check each result, not the HTTP status. A merged Product resolves to its survivor with is_merged set, not a redirect. The batch counts as one request against the rate limit.

Connect callers may also GET it, but should POST large batches: a GET carries the batch in its URL, which can outgrow URL limits, and its response, per-item errors included, is cached publicly for 5 minutes.

## Request body

`application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `identifiers` | array<string>, 1-50 items | yes | 1 to 50 model_slugs or model numbers. An invalid one fails only its own result, with INVALID_IDENTIFIER. |
| `identifiers[]` | string | yes |  |
| `client` | string, one of `mcp` (others may appear) | no | Set to "mcp" only by the DropHawk MCP server, to attribute the links it hands out. Leave it unset; any other value is treated as unset. |

## Responses

### 200

One result per requested identifier, in request order.

#### Headers

| Header | Type | Description |
| --- | --- | --- |
| `Cache-Control` | string | "public, max-age=300" on a successful GET; "no-store" on every other response. |
| `RateLimit-Limit` | integer | The burst a caller may make back-to-back (30). The sustained rate is 60 requests a minute. |
| `RateLimit-Remaining` | integer | Requests left in the caller's burst. Left off cacheable responses. |
| `RateLimit-Reset` | integer | Seconds until the caller's burst is full again. Left off cacheable responses. |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `results` | array<ProductResult> | yes | One result per identifier, in request order. |
| `results[]` | ProductResult | yes | ProductResult answers one identifier. Exactly one of product and error is set. |
| `results[].identifier` | string | yes | The identifier as sent. |
| `results[].product` | Product | no | The resolved Product. |
| `results[].product.model_slug` | string, pattern `^[a-z0-9]+(-[a-z0-9]+)*$` | no | The Product's stable identifier, derived by DropHawk from its model number, for example "deco-x1500-1-pack". Store and compare it as given; never derive it, since look-alike model numbers can be distinct Products ("U-PoE" and "U-PoE+"). |
| `results[].product.model_number` | string | no | The manufacturer's model number, for display. |
| `results[].product.name` | string | no | The Product's display name. |
| `results[].product.brand` | BrandRef | no | The Product's maker. |
| `results[].product.brand.slug` | string, pattern `^[a-z0-9]+(-[a-z0-9]+)*$` | no | Stable URL-safe identifier, for example "asus". |
| `results[].product.brand.name` | string | no | The Brand's display name, for example "ASUS". |
| `results[].product.component_type` | ComponentTypeRef | no | The Product's ComponentType, which declares the keys in specs. |
| `results[].product.component_type.slug` | string, pattern `^[a-z0-9]+(-[a-z0-9]+)*$` | no | Stable URL-safe identifier, for example "gpu". |
| `results[].product.component_type.name` | string | no | The ComponentType's display name, for example "Graphics Cards". |
| `results[].product.specs` | map | no | Spec values keyed by the ComponentType's spec_schema keys. A missing key means the value is unknown. |
| `results[].product.specs.{key}` | SpecValue | no | SpecValue is one Spec value. Exactly one value field is set, as the key's SpecField.type declares. |
| `results[].product.specs.{key}.string_value` | string | no | A text value, for example "RTX 4090". |
| `results[].product.specs.{key}.number_value` | number | no | A numeric value, for example 24. |
| `results[].product.specs.{key}.bool_value` | boolean | no | A yes/no value. |
| `results[].product.specs.{key}.unit` | string | no | The unit, for example "GB". Absent when the Spec has none. |
| `results[].product.images` | array<ProductImage> | no | Product images, primary first. Empty when there are none. |
| `results[].product.images[]` | ProductImage | no | ProductImage is one image of a Product. |
| `results[].product.images[].url` | string (uri) | no | Absolute URL. Its content never changes, so it can be cached indefinitely. |
| `results[].product.images[].width` | integer >= 1 | no | Width in pixels. |
| `results[].product.images[].height` | integer >= 1 | no | Height in pixels. |
| `results[].product.images[].alt_text` | string | no | Alt text for the image. Never empty. |
| `results[].product.pricing` | ProductPricing | no | Current and historical prices. |
| `results[].product.pricing.best_price` | BestPrice | no | The lowest current in-stock price. Absent when withheld. |
| `results[].product.pricing.best_price.price` | Money | no | The price. |
| `results[].product.pricing.best_price.price.amount` | string, pattern `^(0\|[1-9][0-9]*)(\.[0-9]+)?$` | no | The amount as a non-negative decimal string with a "." separator and no grouping, for example "1299.00". It usually has as many decimal places as the currency has minor units (2 for AUD, 0 for JPY), but may have fewer, or more when a price was observed more precisely: it is never rounded. Never reject an amount for its decimal places; parse it with a decimal type, not a float. |
| `results[].product.pricing.best_price.price.currency` | string, pattern `^[A-Z]{3}$` | no | ISO 4217 code, for example "AUD". |
| `results[].product.pricing.best_price.observed_at` | string (date-time) | no | When the Retailer last confirmed this price. |
| `results[].product.pricing.best_price.retailer` | RetailerRef | no | The Retailer offering this price as of observed_at. On a tie, the one best_price_url resolved to when this response was produced. The link resolves when followed, so it goes to the current BestPrice, which may since have moved to another Retailer. |
| `results[].product.pricing.best_price.retailer.slug` | string, pattern `^[a-z0-9]+(-[a-z0-9]+)*$` | no | Stable URL-safe identifier, for example "pccasegear". |
| `results[].product.pricing.best_price.retailer.name` | string | no | The Retailer's display name, for example "PC Case Gear". |
| `results[].product.pricing.best_price_withheld_reason` | string, one of `NO_DATA`, `OUT_OF_STOCK`, `MIXED_CURRENCY` (others may appear) | no | Why best_price is absent: OUT_OF_STOCK (priced, but none in stock), NO_DATA (no prices) or MIXED_CURRENCY (in-stock prices span currencies). Treat an unknown reason as no price. |
| `results[].product.pricing.in_stock_count` | integer >= 0 | no | Number of Retailers with the Product in stock. |
| `results[].product.pricing.all_time_low` | DatedPrice | no | The lowest daily low ever recorded, dated to the first day it occurred. Absent when withheld. |
| `results[].product.pricing.all_time_low.price` | Money | no | The price. |
| `results[].product.pricing.all_time_low.price.amount` | string, pattern `^(0\|[1-9][0-9]*)(\.[0-9]+)?$` | no | The amount as a non-negative decimal string with a "." separator and no grouping, for example "1299.00". It usually has as many decimal places as the currency has minor units (2 for AUD, 0 for JPY), but may have fewer, or more when a price was observed more precisely: it is never rounded. Never reject an amount for its decimal places; parse it with a decimal type, not a float. |
| `results[].product.pricing.all_time_low.price.currency` | string, pattern `^[A-Z]{3}$` | no | ISO 4217 code, for example "AUD". |
| `results[].product.pricing.all_time_low.date` | string (date) | no | The UTC calendar date. |
| `results[].product.pricing.all_time_low_withheld_reason` | string, one of `NO_DATA`, `MIXED_CURRENCY` (others may appear) | no | Why all_time_low is absent: NO_DATA or MIXED_CURRENCY (the history spans currencies). Treat an unknown reason as no price. |
| `results[].product.url` | string (uri) | no | The Product's page on drophawk.net. |
| `results[].product.best_price_url` | string (uri) | no | A DropHawk link that sends a buyer to the Retailer with the best price when it is followed, which may differ from pricing.best_price.retailer if the BestPrice has moved since, or to the Product's page when there is none. Use it unmodified. |
| `results[].is_merged` | boolean | yes | True when the identifier named a Product since merged into product. Store product.model_slug; comparing it with identifier is not a reliable signal. |
| `results[].error` | ProductResultError | no | Why the identifier did not resolve. |
| `results[].error.reason` | string, one of `PRODUCT_NOT_FOUND`, `INVALID_IDENTIFIER` (others may appear) | no | PRODUCT_NOT_FOUND or INVALID_IDENTIFIER, as GET /v1/products/{identifier} would answer. Treat an unknown reason as unresolved. |

### 400

The request cannot be served as sent. Reason INVALID_IDENTIFIER, INVALID_QUERY, INVALID_PAGE_TOKEN, INVALID_PAGE_SIZE, EMPTY_BATCH, BATCH_TOO_LARGE or INVALID_REQUEST.

#### Headers

| Header | Type | Description |
| --- | --- | --- |
| `Cache-Control` | string | "public, max-age=300" on a successful GET; "no-store" on every other response. |
| `RateLimit-Limit` | integer | The burst a caller may make back-to-back (30). The sustained rate is 60 requests a minute. |
| `RateLimit-Remaining` | integer | Requests left in the caller's burst. Left off cacheable responses. |
| `RateLimit-Reset` | integer | Seconds until the caller's burst is full again. Left off cacheable responses. |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | integer | yes | The google.rpc.Code of the error, for example 5 (NOT_FOUND) or 8 (RESOURCE_EXHAUSTED). The HTTP status carries the same information. |
| `message` | string | yes | The error code's name, such as "not_found", "resource_exhausted" or "internal". Not for display; branch on the ErrorInfo reason. |
| `details` | array<ErrorInfo or ErrorDetail> | yes | Typed error details, each identified by its "@type". An HTTP/JSON error always includes exactly one ErrorInfo naming why the request failed. Other detail types may be added within v1; skip any whose "@type" you do not recognise. |
| `details[]` | ErrorInfo | yes | Always includes one: ErrorInfo. |
| `details[].@type` | string, always `type.googleapis.com/google.rpc.ErrorInfo` | yes |  |
| `details[].reason` | string, one of `PRODUCT_NOT_FOUND`, `INVALID_IDENTIFIER`, `INVALID_QUERY`, `INVALID_PAGE_TOKEN`, `INVALID_PAGE_SIZE`, `EMPTY_BATCH`, `BATCH_TOO_LARGE`, `INVALID_REQUEST`, `NOT_FOUND`, `METHOD_NOT_ALLOWED`, `REQUEST_TOO_LARGE`, `RATE_LIMITED`, `INTERNAL`, `UNAVAILABLE` (others may appear) | yes | The reason, in UPPER_SNAKE_CASE. Treat an unrecognised reason by its HTTP status. |
| `details[].domain` | string, always `drophawk.net` | yes |  |
| `details[].metadata` | map | no | Context for the reason, as string values. |
| `details[].metadata.{key}` | string | no |  |

### 413

Reason REQUEST_TOO_LARGE. The request body is over 64 KiB; retrying it cannot succeed.

#### Headers

| Header | Type | Description |
| --- | --- | --- |
| `Cache-Control` | string | "public, max-age=300" on a successful GET; "no-store" on every other response. |
| `RateLimit-Limit` | integer | The burst a caller may make back-to-back (30). The sustained rate is 60 requests a minute. |
| `RateLimit-Remaining` | integer | Requests left in the caller's burst. Left off cacheable responses. |
| `RateLimit-Reset` | integer | Seconds until the caller's burst is full again. Left off cacheable responses. |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | integer | yes | The google.rpc.Code of the error, for example 5 (NOT_FOUND) or 8 (RESOURCE_EXHAUSTED). The HTTP status carries the same information. |
| `message` | string | yes | The error code's name, such as "not_found", "resource_exhausted" or "internal". Not for display; branch on the ErrorInfo reason. |
| `details` | array<ErrorInfo or ErrorDetail> | yes | Typed error details, each identified by its "@type". An HTTP/JSON error always includes exactly one ErrorInfo naming why the request failed. Other detail types may be added within v1; skip any whose "@type" you do not recognise. |
| `details[]` | ErrorInfo | yes | Always includes one: ErrorInfo. |
| `details[].@type` | string, always `type.googleapis.com/google.rpc.ErrorInfo` | yes |  |
| `details[].reason` | string, one of `PRODUCT_NOT_FOUND`, `INVALID_IDENTIFIER`, `INVALID_QUERY`, `INVALID_PAGE_TOKEN`, `INVALID_PAGE_SIZE`, `EMPTY_BATCH`, `BATCH_TOO_LARGE`, `INVALID_REQUEST`, `NOT_FOUND`, `METHOD_NOT_ALLOWED`, `REQUEST_TOO_LARGE`, `RATE_LIMITED`, `INTERNAL`, `UNAVAILABLE` (others may appear) | yes | The reason, in UPPER_SNAKE_CASE. Treat an unrecognised reason by its HTTP status. |
| `details[].domain` | string, always `drophawk.net` | yes |  |
| `details[].metadata` | map | no | Context for the reason, as string values. |
| `details[].metadata.{key}` | string | no |  |

### 429

Reason RATE_LIMITED. Wait Retry-After seconds before retrying.

#### Headers

| Header | Type | Description |
| --- | --- | --- |
| `Retry-After` | integer | Seconds to wait before retrying. |
| `Cache-Control` | string | "public, max-age=300" on a successful GET; "no-store" on every other response. |
| `RateLimit-Limit` | integer | The burst a caller may make back-to-back (30). The sustained rate is 60 requests a minute. |
| `RateLimit-Remaining` | integer | Requests left in the caller's burst. Left off cacheable responses. |
| `RateLimit-Reset` | integer | Seconds until the caller's burst is full again. Left off cacheable responses. |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | integer | yes | The google.rpc.Code of the error, for example 5 (NOT_FOUND) or 8 (RESOURCE_EXHAUSTED). The HTTP status carries the same information. |
| `message` | string | yes | The error code's name, such as "not_found", "resource_exhausted" or "internal". Not for display; branch on the ErrorInfo reason. |
| `details` | array<ErrorInfo or ErrorDetail> | yes | Typed error details, each identified by its "@type". An HTTP/JSON error always includes exactly one ErrorInfo naming why the request failed. Other detail types may be added within v1; skip any whose "@type" you do not recognise. |
| `details[]` | ErrorInfo | yes | Always includes one: ErrorInfo. |
| `details[].@type` | string, always `type.googleapis.com/google.rpc.ErrorInfo` | yes |  |
| `details[].reason` | string, one of `PRODUCT_NOT_FOUND`, `INVALID_IDENTIFIER`, `INVALID_QUERY`, `INVALID_PAGE_TOKEN`, `INVALID_PAGE_SIZE`, `EMPTY_BATCH`, `BATCH_TOO_LARGE`, `INVALID_REQUEST`, `NOT_FOUND`, `METHOD_NOT_ALLOWED`, `REQUEST_TOO_LARGE`, `RATE_LIMITED`, `INTERNAL`, `UNAVAILABLE` (others may appear) | yes | The reason, in UPPER_SNAKE_CASE. Treat an unrecognised reason by its HTTP status. |
| `details[].domain` | string, always `drophawk.net` | yes |  |
| `details[].metadata` | map | no | Context for the reason, as string values. |
| `details[].metadata.{key}` | string | no |  |

### Any other status

Any other error, such as 405, 500 or 503. See ErrorInfo for the reason.

#### Headers

| Header | Type | Description |
| --- | --- | --- |
| `Cache-Control` | string | "public, max-age=300" on a successful GET; "no-store" on every other response. |
| `RateLimit-Limit` | integer | The burst a caller may make back-to-back (30). The sustained rate is 60 requests a minute. |
| `RateLimit-Remaining` | integer | Requests left in the caller's burst. Left off cacheable responses. |
| `RateLimit-Reset` | integer | Seconds until the caller's burst is full again. Left off cacheable responses. |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | integer | yes | The google.rpc.Code of the error, for example 5 (NOT_FOUND) or 8 (RESOURCE_EXHAUSTED). The HTTP status carries the same information. |
| `message` | string | yes | The error code's name, such as "not_found", "resource_exhausted" or "internal". Not for display; branch on the ErrorInfo reason. |
| `details` | array<ErrorInfo or ErrorDetail> | yes | Typed error details, each identified by its "@type". An HTTP/JSON error always includes exactly one ErrorInfo naming why the request failed. Other detail types may be added within v1; skip any whose "@type" you do not recognise. |
| `details[]` | ErrorInfo | yes | Always includes one: ErrorInfo. |
| `details[].@type` | string, always `type.googleapis.com/google.rpc.ErrorInfo` | yes |  |
| `details[].reason` | string, one of `PRODUCT_NOT_FOUND`, `INVALID_IDENTIFIER`, `INVALID_QUERY`, `INVALID_PAGE_TOKEN`, `INVALID_PAGE_SIZE`, `EMPTY_BATCH`, `BATCH_TOO_LARGE`, `INVALID_REQUEST`, `NOT_FOUND`, `METHOD_NOT_ALLOWED`, `REQUEST_TOO_LARGE`, `RATE_LIMITED`, `INTERNAL`, `UNAVAILABLE` (others may appear) | yes | The reason, in UPPER_SNAKE_CASE. Treat an unrecognised reason by its HTTP status. |
| `details[].domain` | string, always `drophawk.net` | yes |  |
| `details[].metadata` | map | no | Context for the reason, as string values. |
| `details[].metadata.{key}` | string | no |  |

## Example

```sh
curl -X POST https://api.drophawk.net/v1/products:batchGet \
  -H 'Content-Type: application/json' \
  -d '{"identifiers":["prime-rtx5080-o16g","DMF-02-BK"]}'
```
