> For the complete documentation index, see [llms.txt](https://knowledge.out-smart.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledge.out-smart.com/openapi/advanced-filters/materials-materials-token-software_token.md).

# materials \[/materials/{?token,software\_token}]

This api is used to sync materials with WorkorderApp.

Each material record can contain the following data:

| Parameter   | Required | Type (size)   |
| ----------- | -------- | ------------- |
| code        | Y        | Varchar (255) |
| description | Y        | Text (64kb)   |
| price       | Y        | Decimal       |
| unit        | Y        | Varchar (255) |
| eancode     | N        | Varchar (55)  |
| barcode     | N        | Varchar (55)  |
| freefield1  | N        | Varchar (255) |
| freefield2  | N        | Varchar (255) |
| freefield3  | N        | Varchar (255) |
| freefield4  | N        | Varchar (255) |
| freefield5  | N        | Varchar (255) |

* Parameters
  * token (string,required ,`0f24d1e07c8609c0fb111fbcc168f9aaa`) ... WorkorderApp customer token
  * software\_token (string,required , `c316c4532fa7cccdcd572491d9552f80945a51366`) ... WorkorderApp external software token

#### Add materials \[POST]

* Request Correct material data posted. `response` will contain the amount of materials synced with WorkOrderApp (application/json)
  * \[{"code":"00001","description":"Omschrijving 1","price":"4,55","unit":"M2","eancode":"","barcode":"","freefield1":"","freefield2":"","freefield3":"","freefield4":"","freefield5":""},{"code":"00012","description":"Omschrijving 2","price":"2,50","unit":"M2"}]
* Response 200 (application/json)
  * { "code": 200, "messages": \[], "response": 2 }
* Request Required value missing. (application/json)
  * \[{"description":"Omschrijving 1","price":"4,55","unit":"M2"},{"code":"00012","description":"Omschrijving 2","price":"2,50","unit":"M2"}]
* Response 200 (application/json)
  * { "code": 1201, "messages": \[ "Required field missing: code" ], "response": null }
* Request Unparsable JSON body posted (application/json)
  * \[{"code"":"00001","description":"Omschrijving 1","price":"4,55","unit":"M2"},{"code":"00012","description":"Omschrijving 2","price":"2,50","unit":"M2"}]
* Response 200 (application/json)
  * { "code": 1009, "messages": \[ "Unable to parse body" ], "response": null }
* Request Empty body posted (application/json)
  * Body
* Response 200 (application/json)
  * { "code": 1008, "messages": \[ "Unable to fetch body" ], "response": null }

#### Get materials \[GET]

* Response 200 (application/json)
  * { "code": 200, "messages": \[], "response": \[{"code":"00001","description":"Omschrijving 1","price":"4,55","unit":"M2"},{"code":"00012","description":"Omschrijving 2","price":"2,50","unit":"M2"}] }


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://knowledge.out-smart.com/openapi/advanced-filters/materials-materials-token-software_token.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
