Material Grade
The material grade resource.
Basehttps://rest.carbon.ms/materialGrade
GET
/materialGradeList material grades
Retrieve a paginated list of material grades. 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.
GEThttps://rest.carbon.ms/materialGrade
curl --request GET \
--url 'https://rest.carbon.ms/materialGrade?select=*&limit=10' \
--header 'Authorization: Bearer <api-key>'Response
[
{
"id": "abc123def456",
"materialSubstanceId": "xyz789",
"name": "Example",
"companyId": "xyz789"
}
]GET
/materialGradeRetrieve a material grade
Fetch a single material grade by filtering on `id`.
Query parameters
idstringMatch on the material grade's `id`, e.g. `eq.{id}`.
GEThttps://rest.carbon.ms/materialGrade
curl --request GET \
--url 'https://rest.carbon.ms/materialGrade?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'Response
{
"id": "abc123def456",
"materialSubstanceId": "xyz789",
"name": "Example",
"companyId": "xyz789"
}POST
/materialGradeCreate a material grade
Create a new material grade.
Body parameters
materialSubstanceIdstringrequiredReferences materialSubstance.id
namestringrequiredcompanyIdstringReferences company.id
POSThttps://rest.carbon.ms/materialGrade
curl --request POST \
--url https://rest.carbon.ms/materialGrade \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"materialSubstanceId":"xyz789","name":"Example"}'Response
{
"id": "abc123def456",
"materialSubstanceId": "xyz789",
"name": "Example",
"companyId": "xyz789"
}PATCH
/materialGradeUpdate a material grade
Update an existing material grade, matched on `id`.
Body parameters
materialSubstanceIdstringrequiredReferences materialSubstance.id
namestringrequiredcompanyIdstringReferences company.id
PATCHhttps://rest.carbon.ms/materialGrade
curl --request PATCH \
--url 'https://rest.carbon.ms/materialGrade?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"materialSubstanceId":"xyz789"}'Response
{
"id": "abc123def456",
"materialSubstanceId": "xyz789",
"name": "Example",
"companyId": "xyz789"
}DELETE
/materialGradeDelete a material grade
Delete a material grade, matched on `id`. Returns 204 No Content.
Query parameters
idstringThe `id` of the material grade to delete, e.g. `eq.{id}`.
DELETEhttps://rest.carbon.ms/materialGrade
curl --request DELETE \
--url 'https://rest.carbon.ms/materialGrade?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'204 No Content