Method Material

The method material resource.

Basehttps://rest.carbon.ms/methodMaterial
GET/methodMaterial

List method materials

Retrieve a paginated list of method materials. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GEThttps://rest.carbon.ms/methodMaterial
curl --request GET \
  --url 'https://rest.carbon.ms/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/methodMaterial

Retrieve a method material

Fetch a single method material by filtering on `id`.

Query parameters

idstring

Match on the method material's `id`, e.g. `eq.{id}`.

GEThttps://rest.carbon.ms/methodMaterial
curl --request GET \
  --url 'https://rest.carbon.ms/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/methodMaterial

Create a method material

Create a new method material.

Body parameters

makeMethodIdstringrequired

References makeMethod.id

methodTypemethodTyperequired
materialMakeMethodIdstring

References makeMethod.id

itemTypestringrequired
itemIdstringrequired

References item.id

quantitynumberrequired
unitOfMeasureCodestringrequired
companyIdstringrequired

References company.id

customFieldsobject
ordernumberrequired
methodOperationIdstring

References methodOperation.id

scrapQuantitynumberrequired
tagsarray
productionQuantitynumber
kitbooleanrequired
storageUnitIdsobjectrequired
sourcingTypesourcingTyperequired
POSThttps://rest.carbon.ms/methodMaterial
curl --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"}'
Response
{
  "id": "abc123def456",
  "makeMethodId": "xyz789",
  "methodType": "string",
  "itemType": "string",
  "itemId": "xyz789",
  "quantity": 10,
  "unitOfMeasureCode": "string",
  "companyId": "xyz789"
}
PATCH/methodMaterial

Update a method material

Update an existing method material, matched on `id`.

Body parameters

makeMethodIdstringrequired

References makeMethod.id

methodTypemethodTyperequired
materialMakeMethodIdstring

References makeMethod.id

itemTypestringrequired
itemIdstringrequired

References item.id

quantitynumberrequired
unitOfMeasureCodestringrequired
companyIdstringrequired

References company.id

customFieldsobject
ordernumberrequired
methodOperationIdstring

References methodOperation.id

scrapQuantitynumberrequired
tagsarray
productionQuantitynumber
kitbooleanrequired
storageUnitIdsobjectrequired
sourcingTypesourcingTyperequired
PATCHhttps://rest.carbon.ms/methodMaterial
curl --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"}'
Response
{
  "id": "abc123def456",
  "makeMethodId": "xyz789",
  "methodType": "string",
  "itemType": "string",
  "itemId": "xyz789",
  "quantity": 10,
  "unitOfMeasureCode": "string",
  "companyId": "xyz789"
}
DELETE/methodMaterial

Delete a method material

Delete a method material, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the method material to delete, e.g. `eq.{id}`.

DELETEhttps://rest.carbon.ms/methodMaterial
curl --request DELETE \
  --url 'https://rest.carbon.ms/methodMaterial?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content