Method Material
The method material resource.
/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.
curl --request GET \
--url 'https://rest.carbon.ms/methodMaterial?select=*&limit=10' \
--header 'Authorization: Bearer <api-key>'[
{
"id": "abc123def456",
"makeMethodId": "xyz789",
"methodType": "string",
"itemType": "string",
"itemId": "xyz789",
"quantity": 10,
"unitOfMeasureCode": "string",
"companyId": "xyz789"
}
]/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}`.
curl --request GET \
--url 'https://rest.carbon.ms/methodMaterial?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'{
"id": "abc123def456",
"makeMethodId": "xyz789",
"methodType": "string",
"itemType": "string",
"itemId": "xyz789",
"quantity": 10,
"unitOfMeasureCode": "string",
"companyId": "xyz789"
}/methodMaterialCreate a method material
Create a new method material.
Body parameters
makeMethodIdstringrequiredReferences makeMethod.id
methodTypemethodTyperequiredmaterialMakeMethodIdstringReferences makeMethod.id
itemTypestringrequireditemIdstringrequiredReferences item.id
quantitynumberrequiredunitOfMeasureCodestringrequiredcompanyIdstringrequiredReferences company.id
customFieldsobjectordernumberrequiredmethodOperationIdstringReferences methodOperation.id
scrapQuantitynumberrequiredtagsarrayproductionQuantitynumberkitbooleanrequiredstorageUnitIdsobjectrequiredsourcingTypesourcingTyperequiredcurl --request POST \
--url https://rest.carbon.ms/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"}'{
"id": "abc123def456",
"makeMethodId": "xyz789",
"methodType": "string",
"itemType": "string",
"itemId": "xyz789",
"quantity": 10,
"unitOfMeasureCode": "string",
"companyId": "xyz789"
}/methodMaterialUpdate a method material
Update an existing method material, matched on `id`.
Body parameters
makeMethodIdstringrequiredReferences makeMethod.id
methodTypemethodTyperequiredmaterialMakeMethodIdstringReferences makeMethod.id
itemTypestringrequireditemIdstringrequiredReferences item.id
quantitynumberrequiredunitOfMeasureCodestringrequiredcompanyIdstringrequiredReferences company.id
customFieldsobjectordernumberrequiredmethodOperationIdstringReferences methodOperation.id
scrapQuantitynumberrequiredtagsarrayproductionQuantitynumberkitbooleanrequiredstorageUnitIdsobjectrequiredsourcingTypesourcingTyperequiredcurl --request PATCH \
--url 'https://rest.carbon.ms/methodMaterial?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"makeMethodId":"xyz789"}'{
"id": "abc123def456",
"makeMethodId": "xyz789",
"methodType": "string",
"itemType": "string",
"itemId": "xyz789",
"quantity": 10,
"unitOfMeasureCode": "string",
"companyId": "xyz789"
}/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}`.
curl --request DELETE \
--url 'https://rest.carbon.ms/methodMaterial?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'