> 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 Material Order

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

Retrieve a specific material order by ID. Archived material orders can be fetched by ID.

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

## Authentication

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

## Request

### Path parameters

- `material_order_id` (integer, required) — Material order identifier

## Response

### 200

Material order details

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

## Errors

### 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

### 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/material-orders/1"

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

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

print(response.json())
```

```javascript
const url = 'https://api.coperniq.io/v1/material-orders/1';
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/material-orders/1"

	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/material-orders/1")

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/material-orders/1")
  .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/material-orders/1', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.coperniq.io/v1/material-orders/1");
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/material-orders/1")! 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()
```