---
title: "Record how a print ended."
method: POST
path: "/api/Prints/{id}/complete"
tags: ["Prints"]
---

# Record how a print ended.

`POST /api/Prints/{id}/complete`

## Request

- Base URL: `https://api.3dprintlog.com`
- URL: `https://api.3dprintlog.com/api/Prints/{id}/complete`
- 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`

For connectors reporting a finished job. Sets `status` (Success `3`, Cancelled `4`, Failed
`5` or PartialSuccess `6`) and `printTimeInSeconds`, and merges `filamentUsage` into the
print's rows by `filamentId`: actual values are set, estimates and notes are kept, and a
filament not yet on the print is added. Rows with no `filamentId` are matched in order
against the print's unlinked rows. `endedAt` fills in the duration from the start date, or
the start date from the duration, when one is missing. Every other field is left alone,
and repeating the call is safe: remaining filament changes by the net difference only.

## Path parameters

- `id` integer, required

## Request body

- PrintLogApiModelsDTOsPrintCompletePrintDto: What a connector knows when a job ends. Everything else on the print, including edits the user made while it ran, is left alone.
  - `status` 1 | 2 | 3 | 4 | 5 | 6: Sent as an integer: `1` = Pending, `2` = Printing, `3` = Success, `4` = Cancelled, `5` = Failed, `6` = PartialSuccess.
  - `endedAt` string, date-time, nullable: When the job ended. Fills in the start date or the duration when one is missing.
  - `printTimeInSeconds` integer, nullable: The measured print duration in seconds.
  - `filamentUsage` PrintLogApiModelsDTOsPrintCompletePrintFilamentUsageDto[], nullable: Actual usage, merged into the print's rows by filament: actual values are set, estimates and notes are kept. Rows not mentioned here are left as they are.
    - `filamentId` string, uuid, nullable: The filament used, or null when no spool is linked.
    - `slot` integer, nullable: The printer slot (tool) the material was fed from. A row with no filament is matched to the print's row for this slot.
    - `amountMg` integer, nullable: The actual weight used in milligrams.
    - `lengthInM` number, double, nullable: The actual length used in meters.
    - `volumeMl` number, double, nullable: The actual volume used in milliliters.
    - `source` 1 | 2 | 3: Which field is the user-entered "source" Sent as an integer: `1` = Weight, `2` = Length, `3` = Volume.

## Response `200`

The updated print.

- PrintLogApiModelsDTOsPrintPrintDetailDTO
  - `id` integer
  - `title` string, nullable
  - `startDate` string, date-time, nullable
  - `printerId` integer
  - `printer` PrintLogApiModelsDTOsPrinterPrinterSummary
    - `id` integer
    - `name` string, nullable
    - `make` string, nullable
    - `model` string, nullable
    - `isActive` boolean
    - `wattageW` number, double, nullable
    - `printTimeInSeconds` integer, nullable
    - `category` PrintLogApiModelsDTOsPrinterCategoryPrinterCategoryDto: The class/category/type of 3D printing technology, such as FDM, SLA, etc
      - `nickname` string, nullable: The nickname of the category
      - `name` string, nullable: The long form name of the category
      - `description` string, nullable: A description of that category
      - `materialCategory` PrintLogApiModelsDTOsMaterialCategoryMaterialCategoryDto: The category of materials, such as filament, resin, powder, etc.
        - `nickname` string, nullable: The nickname of the material category
        - `name` string, nullable: The long form name of the category
        - `description` string, nullable: A description of that category
        - `hasDiameter` boolean: Whether this material has a diameter
        - `showNozzleTemperature` boolean
        - `showBedTemperature` boolean
        - `showMeltingTemperature` boolean
        - `showRecommendedInitialLayerTimeInSeconds` boolean
        - `showRecommendedLayerTimeInSeconds` boolean
        - `showMaterialRefreshRatio` boolean: The percentage of new powder when mixing with old powder
        - `showInertGas` boolean
      - `showNozzleDiameter` boolean
      - `showFilamentDiameter` boolean
      - `showBeamDiameter` boolean
      - `showBedSize` boolean
      - `showScreenResolution` boolean
      - `showHasHeatedBed` boolean
      - `showHasHeatedChamber` boolean
  - `estimatedPrintTimeInSeconds` integer, nullable
  - `estimatedFilamentUsageMg` integer, nullable
  - `printTimeInSeconds` integer, nullable
  - `filamentUsageMg` integer, nullable: Filament usage in milligrams
  - `filamentType` string, nullable
  - `filamentUsage` PrintLogApiModelsDTOsPrintPrintFilamentSummaryDto[], nullable
    - `id` string, uuid
    - `filament` PrintLogApiModelsDTOsFilamentFilamentSummaryDto
      - `id` string, uuid
      - `spoolNumber` integer, nullable: The user's own number for this spool (1, 2, 3…), which Spoolman clients use as its id. Read-only: assigned on create, never reused, and ignored on PUT.
      - `displayName` string, nullable: Common name for the roll of filament.
      - `brand` string, nullable
      - `materialType` string, nullable: The material Type, ie PLA, PETG, ABS.
      - `materialCategory` PrintLogApiModelsDTOsMaterialCategoryMaterialCategoryDto: The category of materials, such as filament, resin, powder, etc.
        - `nickname` string, nullable: The nickname of the material category
        - `name` string, nullable: The long form name of the category
        - `description` string, nullable: A description of that category
        - `hasDiameter` boolean: Whether this material has a diameter
        - `showNozzleTemperature` boolean
        - `showBedTemperature` boolean
        - `showMeltingTemperature` boolean
        - `showRecommendedInitialLayerTimeInSeconds` boolean
        - `showRecommendedLayerTimeInSeconds` boolean
        - `showMaterialRefreshRatio` boolean: The percentage of new powder when mixing with old powder
        - `showInertGas` boolean
      - `materialDensityGramPerCubicCm` number, double: The Density of the Material
      - `colorName` string, nullable
      - `colorHex` string, nullable
      - `recommendedTemp` number, double, nullable: The user's recommended temperature
      - `isActive` boolean
      - `notes` string, nullable
      - `createdDate` string, date-time
      - `filamentRemaining` integer, nullable
      - `filamentLengthRemainingInM` number, double, nullable: Converted from FilamentRemaining rather than accumulated separately, so the list and the detail page cannot disagree. See FilamentDetailDto for why the per-usage volume and length columns are not summed. Get-only: computed on read.
      - `filamentVolumeRemainingInMl` number, double, nullable
      - `purchasePriceValue` string, nullable: Any notes about the purchase price
      - `initialNominalWeightMg` integer, nullable
      - `diameterMm` number, double, nullable
      - `loadedInPrinter` PrintLogApiModelsDTOsPrinterPrinterSummaryWithoutCategory
        - `id` integer
        - `name` string, nullable
        - `make` string, nullable
        - `model` string, nullable
        - `isActive` boolean
      - `storageLocation` string, nullable
      - `isFavorite` boolean
      - `colorPattern` 1 | 2 | 3 | 4: Sent as an integer: `1` = Solid, `2` = Multi, `3` = Gradient, `4` = Rainbow.
      - `finishType` 1 | 2 | 3: Sent as an integer: `1` = Standard, `2` = Silk, `3` = Matte.
      - `colors` string[], nullable
      - `effects` PrintLogApiEnumsFilamentEffect[], nullable
      - `defaultImageThumbnailUrl` string, nullable: Signed thumbnail URL for the default image. Populated ONLY by FilamentService's explicit hydration for the owner's filament list. Null everywhere else — including inside print responses, which are anonymous. Never populate this via AutoMapper.
    - `slot` integer, nullable: The printer slot (tool) the material was fed from, if known.
    - `estimatedAmountMg` integer, nullable
    - `amountMg` integer, nullable
    - `estimatedLengthInM` number, double, nullable: The estimated length of filament used in meters.
    - `lengthInM` number, double, nullable: The actual length of filament used in meters.
    - `estimatedVolumeMl` number, double, nullable: The estimated volume of filament used in milliliters.
    - `volumeMl` number, double, nullable: The actual volume of filament used in milliliters
    - `isEstimatedLengthSource` boolean: Determines if the user entered the length as the "source of truth", or weight. True means the user entered the filament usage as a length, while false means the user entered usage as Mg.
    - `isActualLengthSource` boolean: Determines if the user entered the length as the "source of truth", or weight. True means the user entered the filament usage as a length, while false means the user entered usage as Mg.
    - `estimatedSource` 1 | 2 | 3: Which field is the user-entered "source" Sent as an integer: `1` = Weight, `2` = Length, `3` = Volume.
    - `source` 1 | 2 | 3: Which field is the user-entered "source" Sent as an integer: `1` = Weight, `2` = Length, `3` = Volume.
    - `notes` string, nullable
  - `notes` string, nullable
  - `url` string, nullable
  - `fileName` string, nullable
  - `createdByUserId` integer
  - `allowComments` boolean
  - `allowFileDownloads` boolean
  - `status` 1 | 2 | 3 | 4 | 5 | 6: Sent as an integer: `1` = Pending, `2` = Printing, `3` = Success, `4` = Cancelled, `5` = Failed, `6` = PartialSuccess.
  - `viewStatus` 1 | 2 | 3: Sent as an integer: `1` = Public, `2` = Unlisted, `3` = Private.
  - `projectId` string, uuid, nullable
  - `images` PrintLogApiModelsDTOsPrintPrintImageDto[], nullable
    - `id` integer
    - `isDefault` boolean
    - `displayOrder` integer
  - `comments` PrintLogApiModelsDTOsCommentsCommentDetailDto[], nullable
    - `id` integer
    - `body` string, nullable
    - `createdDate` string, date-time
    - `createdById` integer
    - `createdBy` PrintLogApiModelsDTOsUserUserSummaryDto
      - `id` integer
      - `profilePicture` string, nullable: URL pointing to the user's profile picture.
      - `coverPicture` string, nullable: URL pointing to the user's cover picture.
      - `displayName` string, nullable
    - `updatedDate` string, date-time
    - `updatedById` integer
    - `updatedBy` PrintLogApiModelsDTOsUserUserSummaryDto
      - `id` integer
      - `profilePicture` string, nullable: URL pointing to the user's profile picture.
      - `coverPicture` string, nullable: URL pointing to the user's cover picture.
      - `displayName` string, nullable
  - `externalSource` string, nullable: The connector that logged this print, if any. Read-only; shown to the creator only.
  - `externalId` string, nullable: The job's id in PrintLogApi.Models.DTOs.Print.PrintDetailDTO.ExternalSource. Read-only; shown to the creator only.
  - `connectionDisplayName` string, nullable: The display name of the connection that logged this print, for "Logged automatically by …". Null when no connection logged it or it has been deleted. Shown to the creator only.

## Other responses

- `400`: The body is invalid, `endedAt` is before the start date or out of range, or a filament is not the caller's.
- `401`: Returned when no user is authenticated.
- `403`: Returned when the caller may not edit this print.
- `404`: Returned when the print does not exist.
- `409`: Overlapping requests kept finishing the print first. Retrying replays against the finished print.

---

[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)
