Method Material
The method material resource.
Base/methodMaterial
GET
/methodMaterialList method materials
Retrieve a paginated list of method materials. Filter, order, and select columns with PostgREST query parameters.
Query parameters
selectstringComma-separated columns to return. Defaults to all.
orderstringColumn to sort by, e.g. `createdAt.desc`.
limitintegerMaximum rows to return.
offsetintegerRows to skip, for pagination.
GET/methodMaterial
curl --request GET \
--url '<your-host>/methodMaterial?select=*&limit=10' \
--header 'Authorization: Bearer <api-key>'Response
[
{
"id": "abc123def456",
"makeMethodId": "xyz789",
"methodType": "string",
"itemType": "string",
"itemId": "xyz789",
"quantity": 10,
"unitOfMeasureCode": "string",
"companyId": "xyz789"
}
]GET
/methodMaterialRetrieve a method material
Fetch a single method material by filtering on `id`.
Query parameters
idstringMatch on the method material's `id`, e.g. `eq.{id}`.
GET/methodMaterial
curl --request GET \
--url '<your-host>/methodMaterial?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'Response
{
"id": "abc123def456",
"makeMethodId": "xyz789",
"methodType": "string",
"itemType": "string",
"itemId": "xyz789",
"quantity": 10,
"unitOfMeasureCode": "string",
"companyId": "xyz789"
}POST
/methodMaterialCreate a method material
Create a new method material.
Body parameters
makeMethodIdstringrequiredmethodTypemethodTyperequiredmaterialMakeMethodIdstringitemTypestringrequireditemIdstringrequiredquantitynumberrequiredunitOfMeasureCodestringrequiredcompanyIdstringrequiredReferences company.id
customFieldsobjectordernumberrequiredmethodOperationIdstringReferences methodOperation.id
scrapQuantitynumberrequiredtagsarrayproductionQuantitynumberkitbooleanrequiredstorageUnitIdsobjectrequiredsourcingTypesourcingTyperequiredPOST/methodMaterial
curl --request POST \
--url <your-host>/methodMaterial \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"makeMethodId":"xyz789","methodType":"string","itemType":"string","itemId":"xyz789","quantity":10,"unitOfMeasureCode":"string","companyId":"xyz789","order":0,"scrapQuantity":10,"kit":true,"storageUnitIds":"string","sourcingType":"string"}'Response
{
"id": "abc123def456",
"makeMethodId": "xyz789",
"methodType": "string",
"itemType": "string",
"itemId": "xyz789",
"quantity": 10,
"unitOfMeasureCode": "string",
"companyId": "xyz789"
}PATCH
/methodMaterialUpdate a method material
Update an existing method material, matched on `id`.
Body parameters
makeMethodIdstringrequiredmethodTypemethodTyperequiredmaterialMakeMethodIdstringitemTypestringrequireditemIdstringrequiredquantitynumberrequiredunitOfMeasureCodestringrequiredcompanyIdstringrequiredReferences company.id
customFieldsobjectordernumberrequiredmethodOperationIdstringReferences methodOperation.id
scrapQuantitynumberrequiredtagsarrayproductionQuantitynumberkitbooleanrequiredstorageUnitIdsobjectrequiredsourcingTypesourcingTyperequiredPATCH/methodMaterial
curl --request PATCH \
--url '<your-host>/methodMaterial?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"makeMethodId":"xyz789"}'Response
{
"id": "abc123def456",
"makeMethodId": "xyz789",
"methodType": "string",
"itemType": "string",
"itemId": "xyz789",
"quantity": 10,
"unitOfMeasureCode": "string",
"companyId": "xyz789"
}DELETE
/methodMaterialDelete a method material
Delete a method material, matched on `id`. Returns 204 No Content.
Query parameters
idstringThe `id` of the method material to delete, e.g. `eq.{id}`.
DELETE/methodMaterial
curl --request DELETE \
--url '<your-host>/methodMaterial?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'204 No Content