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

# Get Project Material Orders

GET https://api.coperniq.io/v1/projects/{project_id}/material-orders

Retrieve material orders for a specific project.

Supports:
- Pagination (`page_size`, `page`)
- Date filtering (`updated_after`, `updated_before`)
- Sorting (`order_by`)
- Archived material orders with `include_archived=true` (excluded by default)


Reference: https://docs.coperniq.io/api-reference/material-orders/get-project-material-orders

## Authentication

- `x-api-key` header (required) — API Key authentication via header

## Request

### Path parameters

- `project_id` (integer, required) — Project identifier

### Query parameters

- `page_size` (integer, optional, default: 20) — Number of items per page (max 100)
- `page` (integer, optional, default: 1) — Page number (1-based)
- `order_by` (enum, optional, default: asc) — Sort order for results
  - Allowed values: `asc`, `desc`
- `updated_after` (ProjectsProjectIdMaterialOrdersGetParametersUpdatedAfter, optional) — Filter items updated after this timestamp (ISO 8601). Also matches records whose custom property values changed within the window.
- `updated_before` (ProjectsProjectIdMaterialOrdersGetParametersUpdatedBefore, optional) — Filter items updated before this timestamp (ISO 8601). Also matches records whose custom property values changed within the window.
- `include_archived` (boolean, optional, default: false) — Whether to include archived (inactive) records in the response. By default only active records are returned.

## Response

### 200

List of material orders for the project

- `list of MaterialOrder`

## Errors

### 400 Bad Request Error

Invalid request

- `message` (string, optional)
- `code` (enum, optional)
  - Allowed values: `NOT_FOUND`
- `field` (string, optional) — Field that caused the validation error (if applicable)

### 401 Unauthorized Error

Authentication failed

- `message` (string, optional)
- `code` (enum, optional)
  - Allowed values: `NOT_FOUND`

### 404 Not Found Error

Resource not found

- `message` (string, optional)
- `code` (enum, optional)
  - Allowed values: `NOT_FOUND`

## Types

### ProjectsProjectIdMaterialOrdersGetParametersUpdatedAfter

- string
- string

### ProjectsProjectIdMaterialOrdersGetParametersUpdatedBefore

- string
- string

### MaterialOrder

- `id` (integer, required) — Material order identifier
- `status` (enum, required) — Material order status. `PENDING_SUPPLIER` is set only by a connected supplier (the order is queued and waiting for the supplier's order number). It is returned as-is and can't be set through the API.
  - Allowed values: `DRAFT`, `PENDING_SUPPLIER`, `SENT`, `SCHEDULED`, `PARTIALLY_FULFILLED`, `FULFILLED`, `CANCELED`
- `amount` (double, required) — Total amount in dollars
- `createdAt` (string, required) — Creation timestamp
- `updatedAt` (string, required) — Last update timestamp
- `materialOrderNumber` (integer, optional, nullable) — Unique material order number
- `title` (string, optional) — Material order title
- `description` (string, optional, nullable) — Material order description
- `internalMemo` (string, optional, nullable) — Internal-only memo, never shown to customers or on the PDF or portal. Rich text (HTML, like the app's editor stores). On update, send null or "" to clear it; responses return null when empty.
- `vendor` (MaterialOrderVendor, optional, nullable) — The vendor the materials are ordered from
- `record` (MaterialOrderRecord, optional, nullable) — The project the material order belongs to
- `issueDate` (string, optional, nullable) — Issue date
- `dueDate` (string, optional, nullable) — Due date
- `subtotal` (double, optional) — Subtotal in dollars
- `isArchived` (boolean, optional) — Whether the material order is archived
- `deliveryMethod` (enum, optional) — How the material is delivered. Read-only: set in the app when the vendor is a connected supplier. Each supplier uses its own subset of these values. - ABC Supply: `OUR_TRUCK_ROOF`, `OUR_TRUCK_GROUND`, `OUR_TRUCK_WINDOW`, `COMMON_CARRIER`, `CUSTOMER_PICKUP`, `EXPRESS_PICKUP`, `THIRD_PARTY_CARRIER` - SRS Distribution: `GROUND_DROP`, `ROOF_LOAD`, `ROOF_EDGE`, `WILL_CALL` (a branch pickup, which carries a `pickupTime` instead of a delivery window)
  - Allowed values: `OUR_TRUCK_ROOF`, `OUR_TRUCK_GROUND`, `OUR_TRUCK_WINDOW`, `COMMON_CARRIER`, `CUSTOMER_PICKUP`, `EXPRESS_PICKUP`, `THIRD_PARTY_CARRIER`, `GROUND_DROP`, `ROOF_LOAD`, `ROOF_EDGE`, `WILL_CALL`
- `deliveryWindow` (enum, optional) — Named delivery window. The branch sets the actual times. Pickups carry a `pickupTime` instead.
  - Allowed values: `ANYTIME`, `FIRST_STOP`, `MORNING`, `AFTERNOON`
- `pickupTime` (string, optional, nullable) — Pickup time (`HH:mm`, 24-hour) for an SRS `WILL_CALL` order
- `deliveryRequestedFor` (string, optional, nullable) — Requested delivery date (`YYYY-MM-DD`)
- `deliveryInstructions` (string, optional, nullable) — Delivery instructions (up to 255 characters)
- `supplierBranchNumber` (string, optional, nullable) — Supplier branch the material is ordered from
- `supplierJobAccountNumber` (integer, optional, nullable) — Supplier job account the order bills to
- `pointOfContactUser` (MaterialOrderPointOfContactUser, optional, nullable) — Team member the supplier should contact. `null` means the client.
- `deliveryContactUser` (MaterialOrderDeliveryContactUser, optional, nullable) — Team member who receives the delivery. `null` means the point of contact.
- `lineItems` (list of MaterialOrderLineItem, optional)

### MaterialOrderVendor

The vendor the materials are ordered from

- `id` (integer, optional)
- `name` (string, optional, nullable)

### MaterialOrderRecord

The project the material order belongs to

- `id` (integer, optional)
- `title` (string, optional)
- `type` (string, optional)

### MaterialOrderPointOfContactUser

Team member the supplier should contact. `null` means the client.

- `id` (integer, optional)

### MaterialOrderDeliveryContactUser

Team member who receives the delivery. `null` means the point of contact.

- `id` (integer, optional)

### MaterialOrderLineItem

- `id` (integer, required) — Line item identifier
- `quantity` (integer, required) — Quantity
- `unitCost` (double, required) — Cost per unit. The material order's total is the sum of `unitCost` × `quantity`.
- `unitPrice` (double, required) — Selling price per unit, as carried on the project scope. It doesn't affect the material order's total.
- `totalCost` (double, optional) — Total cost
- `totalPrice` (double, optional) — Total price
- `description` (string, optional, nullable) — Line item description
- `sectionName` (string, optional, nullable) — Name of the section the line belongs to (`null` when ungrouped)
- `catalogItem` (MaterialOrderLineItemCatalogItem, optional, nullable)
- `scopeLineItemId` (integer, optional, nullable) — ID of the project scope line item (from `GET /projects/{project_id}/line-items`) this line is linked to. `null` when unlinked.

### MaterialOrderLineItemCatalogItem

- `id` (integer, optional)
- `name` (string, optional)
- `manufacturer` (string, optional, nullable)
- `sku` (string, optional, nullable)
- `type` (enum, optional)
  - Allowed values: `PRODUCT`, `SERVICE`

## Examples

**Response**

```json
[
  {
    "id": 1,
    "status": "DRAFT",
    "amount": 1.1,
    "createdAt": "2024-01-15T09:30:00Z",
    "updatedAt": "2024-01-15T09:30:00Z",
    "materialOrderNumber": 1,
    "title": "string",
    "description": "string",
    "internalMemo": "string",
    "vendor": {
      "id": 1,
      "name": "string"
    },
    "record": {
      "id": 1,
      "title": "string",
      "type": "Project"
    },
    "issueDate": "2024-01-15T09:30:00Z",
    "dueDate": "2024-01-15T09:30:00Z",
    "subtotal": 1.1,
    "isArchived": true,
    "deliveryMethod": "OUR_TRUCK_ROOF",
    "deliveryWindow": "ANYTIME",
    "pickupTime": "08:30",
    "deliveryRequestedFor": "2023-01-15",
    "deliveryInstructions": "string",
    "supplierBranchNumber": "string",
    "supplierJobAccountNumber": 1,
    "pointOfContactUser": {
      "id": 1
    },
    "deliveryContactUser": {
      "id": 1
    },
    "lineItems": [
      {
        "id": 1,
        "quantity": 1,
        "unitCost": 1.1,
        "unitPrice": 1.1,
        "totalCost": 1.1,
        "totalPrice": 1.1,
        "description": "string",
        "sectionName": "string",
        "catalogItem": {
          "id": 1,
          "name": "string",
          "manufacturer": "string",
          "sku": "string",
          "type": "PRODUCT"
        },
        "scopeLineItemId": 1
      }
    ]
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.coperniq.io/v1/projects/1/material-orders"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.coperniq.io/v1/projects/1/material-orders';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

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

```go
package main

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

func main() {

	url := "https://api.coperniq.io/v1/projects/1/material-orders"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

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

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

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

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.coperniq.io/v1/projects/1/material-orders")

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

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.coperniq.io/v1/projects/1/material-orders")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.coperniq.io/v1/projects/1/material-orders', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.coperniq.io/v1/projects/1/material-orders");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.coperniq.io/v1/projects/1/material-orders")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```