Inspection Sampling Plan
The inspection sampling plan resource.
/inspectionSamplingPlanList inspection sampling plans
Retrieve a paginated list of inspection sampling plans. 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/inspectionSamplingPlan?select=*&limit=10' \
--header 'Authorization: Bearer <api-key>'[
{
"id": "abc123def456",
"inspectionId": "xyz789",
"inspectionFeatureId": "xyz789",
"sampleSize": 0,
"acceptanceNumber": 0,
"rejectionNumber": 0,
"companyId": "xyz789",
"createdBy": "string"
}
]/inspectionSamplingPlanRetrieve a inspection sampling plan
Fetch a single inspection sampling plan by filtering on `id`.
Query parameters
idstringMatch on the inspection sampling plan's `id`, e.g. `eq.{id}`.
curl --request GET \
--url 'https://rest.carbon.ms/inspectionSamplingPlan?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'{
"id": "abc123def456",
"inspectionId": "xyz789",
"inspectionFeatureId": "xyz789",
"sampleSize": 0,
"acceptanceNumber": 0,
"rejectionNumber": 0,
"companyId": "xyz789",
"createdBy": "string"
}/inspectionSamplingPlanCreate a inspection sampling plan
Create a new inspection sampling plan.
Body parameters
inspectionIdstringrequiredReferences inspection.id
inspectionFeatureIdstringrequiredReferences inspectionFeature.id
sampleSizenumberrequiredacceptanceNumbernumberrequiredrejectionNumbernumberrequiredcodeLetterstringcompanyIdstringrequiredReferences company.id
curl --request POST \
--url https://rest.carbon.ms/inspectionSamplingPlan \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"inspectionId":"xyz789","inspectionFeatureId":"xyz789","sampleSize":0,"acceptanceNumber":0,"rejectionNumber":0,"companyId":"xyz789"}'{
"id": "abc123def456",
"inspectionId": "xyz789",
"inspectionFeatureId": "xyz789",
"sampleSize": 0,
"acceptanceNumber": 0,
"rejectionNumber": 0,
"companyId": "xyz789",
"createdBy": "string"
}/inspectionSamplingPlanUpdate a inspection sampling plan
Update an existing inspection sampling plan, matched on `id`.
Body parameters
inspectionIdstringrequiredReferences inspection.id
inspectionFeatureIdstringrequiredReferences inspectionFeature.id
sampleSizenumberrequiredacceptanceNumbernumberrequiredrejectionNumbernumberrequiredcodeLetterstringcompanyIdstringrequiredReferences company.id
curl --request PATCH \
--url 'https://rest.carbon.ms/inspectionSamplingPlan?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"inspectionId":"xyz789"}'{
"id": "abc123def456",
"inspectionId": "xyz789",
"inspectionFeatureId": "xyz789",
"sampleSize": 0,
"acceptanceNumber": 0,
"rejectionNumber": 0,
"companyId": "xyz789",
"createdBy": "string"
}/inspectionSamplingPlanDelete a inspection sampling plan
Delete a inspection sampling plan, matched on `id`. Returns 204 No Content.
Query parameters
idstringThe `id` of the inspection sampling plan to delete, e.g. `eq.{id}`.
curl --request DELETE \
--url 'https://rest.carbon.ms/inspectionSamplingPlan?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'