Skip to main content
POST
/
materials
/
components
/
check-availability
Batch availability check across components
curl --request POST \
  --url https://api.autoprintfarm.com/public/v1/materials/components/check-availability \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "components": [
    {
      "component_type": "<string>",
      "quantity_needed": 2
    }
  ]
}
'
{
  "success": true,
  "data": {
    "has_shortage": true,
    "components": [
      {
        "component_type": "<string>",
        "quantity_needed": 123,
        "quantity_available": 123,
        "has_shortage": true,
        "shortage_amount": 123,
        "component_id": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

API keys are minted in the AutoPrintFarm web app under Settings → API Keys. Send as Authorization: Bearer apf_live_.... Keys are shown exactly once at creation and can be revoked at any time.

Body

application/json
components
object[]
required
Minimum array length: 1

Response

Availability report

success
enum<boolean>
required
Available options:
true
data
object
required