---
title: "Correct how much of a spool remains by applying a signed delta."
method: POST
path: "/api/Filaments/{id}/adjustments"
tags: ["Filaments"]
---

# Correct how much of a spool remains by applying a signed delta.

`POST /api/Filaments/{id}/adjustments`

## Request

- Base URL: `https://api.3dprintlog.com`
- URL: `https://api.3dprintlog.com/api/Filaments/{id}/adjustments`
- Auth: one of:
  - OAuth 2 (authorization code, authorization URL `https://3dprintlog.auth0.com/authorize`, token URL `https://3dprintlog.auth0.com/oauth/token`)
  - API key in header `X-Api-Key`
  - API key in query parameter `api_key`

Wraps the same logic as the MCP `adjust_material_remaining` tool. The result cannot go below
zero or above the spool's original capacity, and a spool with no starting amount cannot be
adjusted. `delta` must be finite, non-zero and at most 2,000,000 in magnitude (g / mm / ml).
`beforeGrams` and `afterGrams` are grams whatever unit `delta` is in.

## Path parameters

- `id` string, uuid, required

## Request body

- PrintLogApiModelsDTOsFilamentAdjustFilamentRemainingDto: A correction to how much of a spool remains, for integrations (#236).
  - `source` string, nullable: The unit of `delta`: `weight` (grams), `length` (millimeters) or `volume` (milliliters). Case-insensitive.
  - `delta` number, double: Signed amount in the unit of `source`. Positive adds, negative removes. Must be finite, not 0, and at most 2,000,000 in magnitude.
  - `notes` string, nullable: Optional note, at most 1000 characters (checked in the action so the 400 carries a `code`).

## Response `200`

The remaining weight before and after, in grams.

- PrintLogApiModelsDTOsFilamentAdjustFilamentRemainingResultDto: The spool's remaining weight around an adjustment, always in grams, whatever unit the delta was in.
  - `beforeGrams` number, double: Grams remaining before the adjustment.
  - `afterGrams` number, double: Grams remaining after the adjustment.

## Other responses

- `400`: Unknown source, zero or non-finite delta, a delta over 2,000,000 in magnitude, a length or volume delta on a spool without the density or diameter needed to convert it, untracked spool, or an out-of-range result.
- `401`: Unauthorized
- `403`: Forbidden
- `404`: The spool does not exist or belongs to someone else. Carries a problem-details body.

---

[API](https://skmtc.dev/3dprintlog/apis/3d-print-log-api.md) · [All operations](https://skmtc.dev/3dprintlog/apis/3d-print-log-api/llms.txt) · [OpenAPI document](https://skmtc.dev/3dprintlog/apis/3d-print-log-api/revisions/dfc3a4df4e38?raw)
