> Part of [WHCC Developer Documentation](https://www.whcc.com/developer/llms.txt)

# Products

The Products call allows you to easy and dynamically query our database of products to present options to your customer. You can either do this on demand or periodically, it will always return the full catalog of products offered based on your credentials.

## GET `/products`

Content-type: application/json

## curl

### Example Request

```shell
curl https://prospector.dragdrop.design/api/v1/products \
	-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.r3udhowqndkwqneoiqwndjwndei12u390912hrbfhaslkdjbqwiei21nbrhewiuornqwjkfhbaiwodnqwjkbdawuosdhowqubdfjkwbdusandbiwquebio12nedbwbaodpqwnebou12rbwkjalndawuobdnwqndfqwbdfoiwqndpiqwhfiwqnkjdlnwqdnioqwhniorqw3nfjwbaodnwdnqwopd" \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
```

### Example Response

```json
[
	{
		"_id": "benT9erT8BwHrn6Ws",
		"name": "5x7 Flat Card Horizontal",
		"editorCompatibility": "cardEditor",
		"category": {
			"id": "7sXPek95CQ6f6N5Hu",
			"name": "Press Printed Cards"
		},
		"metadata": {
			"width": 7,
			"height": 5,
			"bleed": 0.25,
			"resolution": 300
		},
		"nodes": [
			{
				"name": "Front",
				"nodeId": 10000,
				"height": 5.25,
				"width": 7.25,
				"x": 0,
				"y": 0
			},
			{
				"name": "Back",
				"nodeId": 10001,
				"height": 5.25,
				"width": 7.25,
				"x": 0,
				"y": 0
			}
		]
	},
	{
		"_id": "6aLYwjRKYk8XQ4MZk",
		"name": "Framed Print",
		"editorCompatibility": "simpleEditor",
		"category": {
			"id": "tfhysKwZafFtmGqpQ",
			"name": "Wall Displays"
		},
		"metadata": {
			"resolution": 300
		}
		"nodes": [
			{
				"name": "Main",
				"nodeId": 10000,
				"dimensionKeys": [
					"size"
				]
			}
		]
	},
	{
		"_id": "zqRtQT4NeWnoa9JPq",
		"name": "Album",
		"editorCompatibility": "albumEditor",
		"category": {
			"id": "2qNgr3zcSx9wvTAo9",
			"name": "Albums"
		},
		"metadata": {
			"resolution": 300,
			"cover_overhang": 0.125,
			"spread_bleed": 0.125
		},
		"nodes": [
			{
				"name": "Spread",
				"nodeId": 10000,
				"dimensionKeys": [
					"size"
				]
			}
		]
	}
]
```

The response object from this call returns JSON containing an array of products. The main piece of relevant data is the IDs of these items which can be used when creating an editor, but the additional data is returned to help you offer a complete selection experience on your end.

- **`_id`** (string - 32): The ID of the product. You'll pass this in to create an editor of this product.
- **`name`** (string - 255): The name of the product. This generally describes the product more specifically, and can generally be displayed to a customer who would potentially be ordering this product.
- **`editorCompatibility`** (string - 255): The type of editor that'll be presented, we currently support `cardEditor`, `simpleEditor`, and `albumEditor`.
- **`metadata`** (object): Contains additional metadata about this design, such as sizing information.
  - **`height`** (float - 4): the height of this node in inches.
  - **`width`** (float - 4): the width of this node in inches.
  - **`bleed`** (float - 4): the bleed amount this node in inches.
  - **`resolution`** (float - 4): the print resolution of this node is PPI.
- **`nodes`** (object): The array contains the nodes of this product, items which can be filled with images, or designs (if offered).
  - **`name`** (string - 255): The name for this node.
  - **`nodeId`** (int - 8): The id for this node.
  - **`height`** (float - 4): the height of this node in inches.
  - **`width`** (float - 4): the width of this node in inches.
  - **`x`** (float - 4): the x position of this node in inches.
  - **`y`** (float - 4): the y position of this node in inches.
  - **`dimensionKeys`** (object): Only present for products which don't have a definitive. attribute size. If the size of the node is determined by an attribute in the editor this key specifies which attribute does the determining.