Skip to main content
POST
/
inventory
/
{id}
/
adjust
Adjust finished-good stock with a reason
curl --request POST \
  --url https://api.autoprintfarm.com/public/v1/inventory/{id}/adjust \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "adjustment": 123,
  "reason": "manual",
  "notes": "<string>"
}
'
{
  "success": true,
  "data": {
    "id": "<string>",
    "previous_stock": 123,
    "adjustment": 123,
    "new_stock": 123,
    "previous_status": "<string>",
    "new_status": "<string>",
    "is_low_stock": true,
    "reason": "<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.

Path Parameters

id
string
required

Finished-good row id.

Body

application/json
adjustment
integer
required

Signed integer delta to apply to ready_stock (positive to add, negative to remove). Rejected with 400 if the result would be negative.

reason
enum<string>
default:manual

Reason for the adjustment, recorded for audit. Internal reasons (print_completion, order_fulfillment, assembly_completed) are reserved for events emitted by other handlers and are not accepted here.

Available options:
manual,
inventory_count,
correction,
damaged,
returned
notes
string

Optional free-form note (max 500 chars).

Maximum string length: 500

Response

Stock adjusted

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