> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getply.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getply.com/_mcp/server.

# Add Material to Pick List

POST https://api.getply.com/api/v1/pick-lists/{id}/materials
Content-Type: application/json

Adds a material line item to a pick list. Returns `201 Created`.

## Identifying the material

Provide the material using one of the following combinations. All
invalid combinations and resolution failures return `400`.

* **`materialDetailsId`** (most precise) — adds that exact material
  details record. If `materialId` and/or `materialVariationId` are also
  sent, they must match the record or the request is rejected with `400`.
* **`materialId` only** — resolves the material at the pick list's source
  location (`fromLocation`). Succeeds only when the material has a single
  variation stocked there. Returns `400` if the material is not stocked
  at the source location, or if it has more than one variation stocked
  there (add `materialVariationId` to disambiguate, or pass
  `materialDetailsId`).
* **`materialId` + `materialVariationId`** — resolves the specified
  variation at the source location. Returns `400` if that variation is
  not stocked there.

`materialVariationId` must always be accompanied by `materialId`; sent on
its own it returns `400`. Sending neither `materialDetailsId` nor
`materialId` also returns `400`.

## When `materialVariationId` is required

A catalog material can have several variations (e.g. sizes or colors)
stocked at the same location, each its own material details record.
`materialId` alone cannot pick between them, so it returns `400` until you
either add `materialVariationId` or pass the specific `materialDetailsId`.
Materials with a single variation at the source location resolve from
`materialId` alone.

## Finding the materialDetailsId

If you prefer to add by `materialDetailsId`, retrieve it from
`GET /locations/{id}/materials` — each row's `materialDetailsId` is the
value to send here. Filter that endpoint with `materialIds` to find the
record(s) for a known material at the source location.

Requires scope: `pick_lists:write`

Reference: https://docs.getply.com/api-reference/api-reference/pick-lists/add-material

## Authentication

- `API_KEY` header (required) — API Key authentication via header

## Servers

- `https://api.getply.com` (production, default)
- `https://demo-api.getply.com` (demo)

## Request

### Path parameters

- `id` (UUID, required) — Pick list ID.

### Body (application/json)

This endpoint expects a PickListMaterialRequest.

- `quantity` (double, required) — Quantity to pick. Required. Must be greater than zero.
- `materialDetailsId` (UUID, optional) — ID of the specific material details record (a material's presence at a location) to add. The most precise identifier. Retrieve it from `GET /locations/{id}/materials` (the `materialDetailsId` field). If provided, `materialId`/`materialVariationId` are optional and, when present, are validated against this record. Required unless `materialId` is provided.
- `materialId` (UUID, optional) — ID of the catalog material to add. The material is resolved to a material details record at the pick list's source location (`fromLocation`). Required unless `materialDetailsId` is provided.
- `materialVariationId` (UUID, optional) — ID of the material variation. Must be provided together with `materialId` (it is rejected on its own). Use it to disambiguate when the material has more than one variation stocked at the source location.
- `note` (string, optional) — Optional note for this line item.

## Response

### 201

- `id` (UUID, required) — Unique identifier for this pick list material record.
- `quantity` (double, required) — Quantity to be picked.
- `material` (ResourceRef, optional) — Reference to the parent material.
- `variation` (ResourceRef, optional) — Reference to the material variation, if applicable.
- `note` (string, optional) — Optional note for this material line item.

## Errors

### 400 Bad Request Error

The request was malformed or failed validation. Check the `message` field for details on which fields are invalid.

- `code` (string, required) — Machine-readable error code (e.g. `NOT_FOUND`, `VALIDATION_ERROR`).
- `message` (string, required) — Human-readable description of what went wrong.
- `status` (integer, required) — HTTP status code.
- `timestamp` (string, required) — ISO 8601 timestamp when the error occurred (e.g. `2026-03-20T14:30:00`).
- `path` (string, required) — The request path that triggered the error.

### 401 Unauthorized Error

The `API_KEY` header is missing or the key is invalid. Verify your API key in the Ply dashboard under Settings > Workspace > API Keys.

- `code` (string, required) — Machine-readable error code (e.g. `NOT_FOUND`, `VALIDATION_ERROR`).
- `message` (string, required) — Human-readable description of what went wrong.
- `status` (integer, required) — HTTP status code.
- `timestamp` (string, required) — ISO 8601 timestamp when the error occurred (e.g. `2026-03-20T14:30:00`).
- `path` (string, required) — The request path that triggered the error.

### 403 Forbidden Error

The authenticated API key does not have permission to perform this action.

- `code` (string, required) — Machine-readable error code (e.g. `NOT_FOUND`, `VALIDATION_ERROR`).
- `message` (string, required) — Human-readable description of what went wrong.
- `status` (integer, required) — HTTP status code.
- `timestamp` (string, required) — ISO 8601 timestamp when the error occurred (e.g. `2026-03-20T14:30:00`).
- `path` (string, required) — The request path that triggered the error.

### 404 Not Found Error

The requested resource does not exist or has been deleted.

- `code` (string, required) — Machine-readable error code (e.g. `NOT_FOUND`, `VALIDATION_ERROR`).
- `message` (string, required) — Human-readable description of what went wrong.
- `status` (integer, required) — HTTP status code.
- `timestamp` (string, required) — ISO 8601 timestamp when the error occurred (e.g. `2026-03-20T14:30:00`).
- `path` (string, required) — The request path that triggered the error.

### 429 Rate Limit Error

You have exceeded the rate limit. Two limits apply, both pooled per business — creating additional API keys does not raise either: - 60 requests per minute - 10,000 requests per day Any response that passes authentication carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`; requests rejected earlier, such as a missing key or a missing scope, carry none of them. On a `429`, wait the number of seconds given in `Retry-After` before retrying, and back off further if you get a second one.

- `code` (string, required) — Machine-readable error code (e.g. `NOT_FOUND`, `VALIDATION_ERROR`).
- `message` (string, required) — Human-readable description of what went wrong.
- `status` (integer, required) — HTTP status code.
- `timestamp` (string, required) — ISO 8601 timestamp when the error occurred (e.g. `2026-03-20T14:30:00`).
- `path` (string, required) — The request path that triggered the error.

## Types

### ResourceRef

A reference to a related resource, containing its ID and display name.

- `id` (UUID, required) — Unique identifier of the referenced resource.
- `name` (string, optional) — Human-readable display name.

## Examples

### By material details ID

**Request**

```json
{
  "quantity": 10,
  "materialDetailsId": "b8c9d0e1-f2a3-4567-bcde-678901234567",
  "note": "Double-check dimensions before picking"
}
```

**Response**

```json
{
  "id": "e7f8a9b0-c1d2-3456-efab-789012345678",
  "quantity": 10,
  "material": {
    "id": "e5f6a7b8-c9d0-1234-efab-345678901234",
    "name": "3/4 inch PVC Pipe (10ft)"
  },
  "variation": null,
  "note": "Double-check dimensions before picking"
}
```

**SDK Code**

```python By material details ID
import requests

url = "https://api.getply.com/api/v1/pick-lists/c5d6e7f8-a9b0-1234-cdef-567890123456/materials"

payload = {
    "quantity": 10,
    "materialDetailsId": "b8c9d0e1-f2a3-4567-bcde-678901234567",
    "note": "Double-check dimensions before picking"
}
headers = {
    "API_KEY": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript By material details ID
const url = 'https://api.getply.com/api/v1/pick-lists/c5d6e7f8-a9b0-1234-cdef-567890123456/materials';
const options = {
  method: 'POST',
  headers: {API_KEY: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"quantity":10,"materialDetailsId":"b8c9d0e1-f2a3-4567-bcde-678901234567","note":"Double-check dimensions before picking"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go By material details ID
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getply.com/api/v1/pick-lists/c5d6e7f8-a9b0-1234-cdef-567890123456/materials"

	payload := strings.NewReader("{\n  \"quantity\": 10,\n  \"materialDetailsId\": \"b8c9d0e1-f2a3-4567-bcde-678901234567\",\n  \"note\": \"Double-check dimensions before picking\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("API_KEY", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby By material details ID
require 'uri'
require 'net/http'

url = URI("https://api.getply.com/api/v1/pick-lists/c5d6e7f8-a9b0-1234-cdef-567890123456/materials")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["API_KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"quantity\": 10,\n  \"materialDetailsId\": \"b8c9d0e1-f2a3-4567-bcde-678901234567\",\n  \"note\": \"Double-check dimensions before picking\"\n}"

response = http.request(request)
puts response.read_body
```

```java By material details ID
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getply.com/api/v1/pick-lists/c5d6e7f8-a9b0-1234-cdef-567890123456/materials")
  .header("API_KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"quantity\": 10,\n  \"materialDetailsId\": \"b8c9d0e1-f2a3-4567-bcde-678901234567\",\n  \"note\": \"Double-check dimensions before picking\"\n}")
  .asString();
```

```php By material details ID
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getply.com/api/v1/pick-lists/c5d6e7f8-a9b0-1234-cdef-567890123456/materials', [
  'body' => '{
  "quantity": 10,
  "materialDetailsId": "b8c9d0e1-f2a3-4567-bcde-678901234567",
  "note": "Double-check dimensions before picking"
}',
  'headers' => [
    'API_KEY' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp By material details ID
using RestSharp;

var client = new RestClient("https://api.getply.com/api/v1/pick-lists/c5d6e7f8-a9b0-1234-cdef-567890123456/materials");
var request = new RestRequest(Method.POST);
request.AddHeader("API_KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"quantity\": 10,\n  \"materialDetailsId\": \"b8c9d0e1-f2a3-4567-bcde-678901234567\",\n  \"note\": \"Double-check dimensions before picking\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift By material details ID
import Foundation

let headers = [
  "API_KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "quantity": 10,
  "materialDetailsId": "b8c9d0e1-f2a3-4567-bcde-678901234567",
  "note": "Double-check dimensions before picking"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getply.com/api/v1/pick-lists/c5d6e7f8-a9b0-1234-cdef-567890123456/materials")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### By material ID and variation ID

**Request**

```json
{
  "quantity": 10,
  "materialId": "e5f6a7b8-c9d0-1234-efab-345678901234",
  "materialVariationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
```

**Response**

```json
{
  "id": "e7f8a9b0-c1d2-3456-efab-789012345678",
  "quantity": 10,
  "material": {
    "id": "e5f6a7b8-c9d0-1234-efab-345678901234",
    "name": "3/4 inch PVC Pipe (10ft)"
  },
  "variation": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "White"
  },
  "note": null
}
```

**SDK Code**

```python By material ID and variation ID
import requests

url = "https://api.getply.com/api/v1/pick-lists/c5d6e7f8-a9b0-1234-cdef-567890123456/materials"

payload = {
    "quantity": 10,
    "materialId": "e5f6a7b8-c9d0-1234-efab-345678901234",
    "materialVariationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
headers = {
    "API_KEY": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript By material ID and variation ID
const url = 'https://api.getply.com/api/v1/pick-lists/c5d6e7f8-a9b0-1234-cdef-567890123456/materials';
const options = {
  method: 'POST',
  headers: {API_KEY: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"quantity":10,"materialId":"e5f6a7b8-c9d0-1234-efab-345678901234","materialVariationId":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go By material ID and variation ID
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getply.com/api/v1/pick-lists/c5d6e7f8-a9b0-1234-cdef-567890123456/materials"

	payload := strings.NewReader("{\n  \"quantity\": 10,\n  \"materialId\": \"e5f6a7b8-c9d0-1234-efab-345678901234\",\n  \"materialVariationId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("API_KEY", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby By material ID and variation ID
require 'uri'
require 'net/http'

url = URI("https://api.getply.com/api/v1/pick-lists/c5d6e7f8-a9b0-1234-cdef-567890123456/materials")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["API_KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"quantity\": 10,\n  \"materialId\": \"e5f6a7b8-c9d0-1234-efab-345678901234\",\n  \"materialVariationId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n}"

response = http.request(request)
puts response.read_body
```

```java By material ID and variation ID
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getply.com/api/v1/pick-lists/c5d6e7f8-a9b0-1234-cdef-567890123456/materials")
  .header("API_KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"quantity\": 10,\n  \"materialId\": \"e5f6a7b8-c9d0-1234-efab-345678901234\",\n  \"materialVariationId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n}")
  .asString();
```

```php By material ID and variation ID
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getply.com/api/v1/pick-lists/c5d6e7f8-a9b0-1234-cdef-567890123456/materials', [
  'body' => '{
  "quantity": 10,
  "materialId": "e5f6a7b8-c9d0-1234-efab-345678901234",
  "materialVariationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}',
  'headers' => [
    'API_KEY' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp By material ID and variation ID
using RestSharp;

var client = new RestClient("https://api.getply.com/api/v1/pick-lists/c5d6e7f8-a9b0-1234-cdef-567890123456/materials");
var request = new RestRequest(Method.POST);
request.AddHeader("API_KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"quantity\": 10,\n  \"materialId\": \"e5f6a7b8-c9d0-1234-efab-345678901234\",\n  \"materialVariationId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift By material ID and variation ID
import Foundation

let headers = [
  "API_KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "quantity": 10,
  "materialId": "e5f6a7b8-c9d0-1234-efab-345678901234",
  "materialVariationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getply.com/api/v1/pick-lists/c5d6e7f8-a9b0-1234-cdef-567890123456/materials")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```