Rework
The rework resource.
Basehttps://rest.carbon.ms/rework
GET
/reworkList reworks
Retrieve a paginated list of reworks. 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/rework
curl --request GET \
--url 'https://rest.carbon.ms/rework?select=*&limit=10' \
--header 'Authorization: Bearer <api-key>'Response
[
{
"id": "abc123def456",
"jobId": "xyz789",
"triggeredAtJobOperationId": "xyz789",
"targetJobOperationId": "xyz789",
"reason": "string",
"quantity": 10,
"requestedById": "xyz789",
"companyId": "xyz789"
}
]GET
/reworkRetrieve a rework
Fetch a single rework by filtering on `id`.
Query parameters
idstringMatch on the rework's `id`, e.g. `eq.{id}`.
GEThttps://rest.carbon.ms/rework
curl --request GET \
--url 'https://rest.carbon.ms/rework?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'Response
{
"id": "abc123def456",
"jobId": "xyz789",
"triggeredAtJobOperationId": "xyz789",
"targetJobOperationId": "xyz789",
"reason": "string",
"quantity": 10,
"requestedById": "xyz789",
"companyId": "xyz789"
}POST
/reworkCreate a rework
Create a new rework.
Body parameters
jobIdstringrequiredReferences job.id
triggeredAtJobOperationIdstringrequiredReferences jobOperation.id
targetJobOperationIdstringrequiredReferences jobOperation.id
reasonstringrequiredquantitynumberrequiredrequestedByIdstringrequiredReferences user.id
completedAttimestampcompanyIdstringrequiredReferences company.id
POSThttps://rest.carbon.ms/rework
curl --request POST \
--url https://rest.carbon.ms/rework \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"jobId":"xyz789","triggeredAtJobOperationId":"xyz789","targetJobOperationId":"xyz789","reason":"string","quantity":10,"requestedById":"xyz789","companyId":"xyz789"}'Response
{
"id": "abc123def456",
"jobId": "xyz789",
"triggeredAtJobOperationId": "xyz789",
"targetJobOperationId": "xyz789",
"reason": "string",
"quantity": 10,
"requestedById": "xyz789",
"companyId": "xyz789"
}PATCH
/reworkUpdate a rework
Update an existing rework, matched on `id`.
Body parameters
jobIdstringrequiredReferences job.id
triggeredAtJobOperationIdstringrequiredReferences jobOperation.id
targetJobOperationIdstringrequiredReferences jobOperation.id
reasonstringrequiredquantitynumberrequiredrequestedByIdstringrequiredReferences user.id
completedAttimestampcompanyIdstringrequiredReferences company.id
PATCHhttps://rest.carbon.ms/rework
curl --request PATCH \
--url 'https://rest.carbon.ms/rework?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"jobId":"xyz789"}'Response
{
"id": "abc123def456",
"jobId": "xyz789",
"triggeredAtJobOperationId": "xyz789",
"targetJobOperationId": "xyz789",
"reason": "string",
"quantity": 10,
"requestedById": "xyz789",
"companyId": "xyz789"
}DELETE
/reworkDelete a rework
Delete a rework, matched on `id`. Returns 204 No Content.
Query parameters
idstringThe `id` of the rework to delete, e.g. `eq.{id}`.
DELETEhttps://rest.carbon.ms/rework
curl --request DELETE \
--url 'https://rest.carbon.ms/rework?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'204 No Content