---
title: "List attachments that fit a firearm"
method: GET
path: "/v1/firearms/{id}/attachments"
tags: ["Compatibility"]
---

# List attachments that fit a firearm

`GET /v1/firearms/{id}/attachments`

## Request

- Base URL: `https://api.gunspec.io`
- URL: `https://api.gunspec.io/v1/firearms/{id}/attachments`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Every catalogued attachment that fits the firearm, grouped by category. A retailer embeds this on a product page with `vendor=me&only_offered=true&with_offers=true`, which answers "what fits this gun, that I stock, at what price" in one request. Full detail: each with how it fits (direct, through a named adapter, or curated), which interface satisfied it, and a confidence. `include=all` adds the candidates that do not fit with the reason they were blocked, which is how a builder shows a greyed-out part. Rated items (suppressors, magazines) pass a caliber, bore and minimum-barrel gate that no adapter can bridge.

**Requires Studio tier or higher.**

## Path parameters

- `id` string, required

## Query parameters

- `category` string
- `manufacturer` string
- `include` 'compatible' | 'all'
- `min_confidence` number
- `vendor` string
- `only_offered` boolean
- `with_offers` boolean

## Response `200`

List attachments that fit a firearm

- object
  - `success` boolean, required: Always true on a successful response. Every error carries `false` and an `error` object instead.
  - `data` object, required: The response payload.
    - `firearm` object: A firearm, identified by slug and name.
      - `id` string: Slug of the firearm.
      - `name` string: Display name, as the maker writes it.
    - `platforms` object[]: Platforms this firearm belongs to, whose interfaces it inherits.
      - `id` string: Slug of the platform.
      - `name` string: Display name, as the maker writes it.
    - `interfaces` ResolvedInterface[]: The mount interfaces resolved for this firearm, own rows first, then inherited.
      - `position` string: Where on the firearm the interface sits: `muzzle`, `rear`, `top`, `bottom`.
      - `standardId` string: Id of the interface standard, kind-prefixed, e.g. `thread:1/2x28`. Ids are never renamed; new spellings become aliases.
      - `name` string: Display name, as the maker writes it.
      - `kind` string: What sort of interface it is: `thread`, `rail`, `mag`, `stock_mount`, `optic_plate`. Not a media kind: the shared registry filled this with `silhouette`/`render` until the consistency check caught it.
      - `source` 'curated' | 'inferred' | 'inherited:parent' | 'inherited:platform': Where an interface row on a firearm came from. `curated` is a person; `inferred` is the backfill, capped at 0.6 confidence; the inherited kinds came through the parent chain or a platform.
      - `confidence` number: How well evidenced this row is, 0 to 1. **A minimum, not an average**: an inferred row caps every fit computed through it, and `min_confidence` on the endpoint hides rows below a threshold.
      - `inheritedFrom` string, nullable: The parent firearm or platform this interface came from, or null when the firearm declares it itself.
      - `notes` string, nullable: Free-text notes that do not belong in a specific field.
    - `groups` object[]: Fitting attachments grouped by category, so a builder UI renders one panel per slot.
      - `category` string: Attachment category this group holds.
      - `items` AttachmentFit[]: The rows this response carries.
        - `id` string: URL-safe slug identifying the part, e.g. `magpul-zhukov-s-stock`.
        - `name` string: Display name, as the maker writes it.
        - `category` string: What kind of part it is: `stock`, `optic`, `muzzle`, `magazine`, `grip`.
        - `manufacturer` ManufacturerRef
          - `id` string: Slug of the manufacturer.
          - `name` string: Display name, as the maker writes it.
        - `modelNumber` string, nullable: The maker's own SKU, where they publish one.
        - `weightG` number, nullable: Weight in grams.
        - `lengthMm` number, nullable: Length in millimetres.
        - `capacity` integer, nullable: Magazines only
        - `boreDiameterMm` number, nullable: Suppressors and muzzle devices
        - `requiresPosition` string, nullable: The mount position this part occupies, or null when it takes none.
        - `isFactoryPart` boolean: True when the part ships on the firearm from the factory. A factory part carries no `statMods` or `specDeltas`, because the firearm's own figures already include it.
        - `factoryFor` string, nullable: The firearm this is the factory part for, when `isFactoryPart` is true.
        - `statMods` object: Editorial adjustments to the game statistics once fitted, keyed by stat. Same status as `game_*` on a firearm: **not measured**.
        - `specDeltas` object: Specification changes once fitted, keyed by field: a folding stock changes the folded length, for example.
        - `imageUrl` string, nullable: Absolute URL of the manufacturer product photo on the assets CDN, ready to render. Null when no photo has been sourced yet.
        - `status` 'in_production' | 'discontinued' | 'limited': Production status of an attachment. `limited` corresponds to a firearm's `limited_production`.
        - `dataConfidence` number, nullable: How completely the record is specified and how well it is sourced, 0 to 1. A record-level completeness and provenance measure, **not** a per-field probability of correctness. Use it to rank and triage; use `sources` to verify an individual number.
        - `updatedAt` string: When a field we serve last changed. Maintained by the database rather than by whatever wrote the row, so it moves for a corrected specification and does not move for a re-run of the importer.
        - `version` string, nullable: Opaque fingerprint of this record. It changes when and only when a field we serve changes, so a client holding the same value already has the record and need not fetch it. Equality is the only supported operation: do not parse it, and do not assume how it is computed. Null means the record has not been written since versioning began, not that it is unchanged.
        - `provenance` Provenance: Where a record's figures came from and how far they have been checked, in one place. `sources` are the pages consulted; check a specific figure against those. `sourceKinds` says what each page is and `bestSourceKind` the strongest of them, on the hierarchy `SourceKind` defines: a maker or standards-body page is evidence for a figure, a retailer or forum page is evidence the item exists. `dataConfidence` is the 0 to 1 score set from what was actually sourced and never raised by hand. `verifiedAt` and `verifiedFields` say when a source was last read against the record and which fields it stated; null means the row is still seed knowledge. `updatedAt` and `version` are the same cache signals the record carries at the top level.
          - `sources` string[], required: The pages consulted when the record was compiled, as an array. Check a specific figure against these rather than against `dataConfidence`.
          - `sourceKinds` object[], required: What each cited page is, in `sources` order, on the `SourceKind` hierarchy. A host not in the source map is `other`, never guessed.
            - `url` string, required: Absolute, directly fetchable URL.
            - `kind` 'manufacturer' | 'standards_body' | 'government' | 'peer_reviewed' | 'reference' | 'aggregator' | 'press' | 'retailer' | 'community' | 'other', required: What kind of page a cited source is, strongest first: the maker's own page, a standards body (SAAMI, C.I.P.), a government or military document, an independent reference work, a specification aggregator, the press, a retailer or auction listing, a community site, or an unclassified page. Weigh a figure by the best kind behind it, never by how many pages were cited.
            - `archivedFrom` string, nullable, required: The original address when `url` is a Wayback Machine capture of it. A cited page that no longer answers is replaced by its last capture that answered 200, so the citation still shows what its author read; `kind` is the original page's.
            - `rank` integer, required: The kind's place in the source hierarchy: 0 is the maker, the strongest; higher is weaker.
            - `tier` 'authority' | 'classified' | 'unclassified', required: Where the site stands in the source registry (`/v1/data/sources`): an authority (the maker, a standards body, a government), a classified site, or one not yet classed.
            - `basis` 'declared' | 'maker' | 'rule' | 'unclassified', required: What the class rests on: classed by a person, a catalogued maker's own site, a .gov or .mil domain, or nothing yet.
            - `evidence` string, nullable, required: The words the site was classed on, where a person recorded them.
          - `bestSourceKind` 'manufacturer' | 'standards_body' | 'government' | 'peer_reviewed' | 'reference' | 'aggregator' | 'press' | 'retailer' | 'community' | 'other', required: What kind of page a cited source is, strongest first: the maker's own page, a standards body (SAAMI, C.I.P.), a government or military document, an independent reference work, a specification aggregator, the press, a retailer or auction listing, a community site, or an unclassified page. Weigh a figure by the best kind behind it, never by how many pages were cited.
          - `makerSource` string, nullable, required: The first cited page on the record's own manufacturer's website, or null when it cites none. A page on another maker's site does not count. Cited from the maker is not the same as checked against it: `verifiedFields` names the figures that were read against a source.
          - `evidence` 'verified' | 'maker' | 'authority' | 'secondary' | 'none', required: How far the record's figures are backed, strongest first, for a badge: `verified` when at least one figure was read against a source (`verifiedFields`), `maker` when it cites a page on its own manufacturer's site (`makerSource`), `authority` when it cites a maker, standards body or government page, `secondary` when it cites only press, retailers, references or forums, `none` when it cites nothing. Derived from the fields beside it.
          - `checks` object: The checks the record has been through, on a single record's response only: every task the data agent (Redback) or a person was given about it, what each proposed, the pages it read, and whether a person accepted it. Nothing an agent proposes reaches the record until a person accepts it, so this is the trail behind `verifiedFields`. Who reviewed is not published; an agent's instance name is.
            - `raised` integer, required: Every task ever raised on the record, answered or not.
            - `open` integer, required: Tasks still waiting to be worked.
            - `history` object[], required: The latest twenty, newest first.
              - …
          - `dataConfidence` number, nullable, required: The 0 to 1 score set from what was actually sourced, never raised by hand. See the confidence bands in the docs.
          - `verifiedAt` string, nullable, required: When a source was last read against this record. Null means the row is still seed knowledge.
          - `verifiedFields` string[], nullable, required: Which fields the source stated, as an array. Everything else on a verified row is still unverified. Null where no source has been read.
          - `specSource` string, nullable, required: Cartridges only: the page the drawing figures were taken from. Null on every other kind of record.
          - `updatedAt` string, required: When a served column last changed; the same value the record carries at the top level.
          - `version` string, nullable, required: The record's content version, equal to the top-level `version`; equal versions mean equal data.
        - `provides` string[]: Standard ids this adds to the firearm once fitted. Resolved to `{ id, name, kind }` rows on `/v1/attachments/{id}`.
        - `fits` boolean: Whether this attachment fits the firearm. False rows appear only when `include=all` was asked for, and carry `blockedBy`.
        - `fitType` 'direct' | 'adapter' | 'curated': How a fit was reached: on the firearm's own interface, through one adapter, or by a curated override.
        - `source` 'curated' | 'universal' | 'inferred' | 'inherited:parent' | 'inherited:platform': The weakest evidence behind a fit. A retailer or engineering consumer should treat `inferred` as unverified; `min_confidence` hides it.
        - `via` FitVia[]: The interfaces that satisfied the attachment requirements, with where each came from.
          - `position` string: Where on the firearm the interface sits: `muzzle`, `rear`, `top`, `bottom`.
          - `standardId` string: Id of the interface standard, kind-prefixed, e.g. `thread:1/2x28`. Ids are never renamed; new spellings become aliases.
          - `source` 'curated' | 'inferred' | 'inherited:parent' | 'inherited:platform': Where an interface row on a firearm came from. `curated` is a person; `inferred` is the backfill, capped at 0.6 confidence; the inherited kinds came through the parent chain or a platform.
          - `adapterId` string, nullable: The adapter that bridges this fit, or null when none is needed. Threads, magazine wells and the caliber gate are never bridged.
        - `adapter` AdapterRef
          - `id` string: Slug of the adapter part.
          - `name` string: Display name, as the maker writes it.
        - `confidence` number: How well evidenced this row is, 0 to 1. **A minimum, not an average**: an inferred row caps every fit computed through it, and `min_confidence` on the endpoint hides rows below a threshold.
        - `reason` string: Plain-language account of why it fits, safe to show in a UI.
        - `blockedBy` string, nullable: Why it does not fit, when `fits` is false: a missing standard, or the caliber, bore and minimum-barrel gate, which no adapter bridges. Null on a fitting row.
        - `routes` FitRoute[]: Every way it goes on, best first; the fields above are the first. Empty for a curated override, a universal fit and a row that does not fit.
          - `fitType` 'direct' | 'adapter': How it fits: `direct` on the firearm own interface, `adapter` through the part named in `adapter`, or `curated` from an override on the attachment. Null when it does not fit.
          - `adapter` AdapterRef
            - `id` string: Slug of the adapter part.
            - `name` string: Display name, as the maker writes it.
          - `via` FitVia[]: The interfaces that satisfied the attachment requirements, with where each came from.
            - `position` string: Where on the firearm the interface sits: `muzzle`, `rear`, `top`, `bottom`.
            - `standardId` string: Id of the interface standard, kind-prefixed, e.g. `thread:1/2x28`. Ids are never renamed; new spellings become aliases.
            - `source` 'curated' | 'inferred' | 'inherited:parent' | 'inherited:platform': Where an interface row on a firearm came from. `curated` is a person; `inferred` is the backfill, capped at 0.6 confidence; the inherited kinds came through the parent chain or a platform.
            - `adapterId` string, nullable: The adapter that bridges this fit, or null when none is needed. Threads, magazine wells and the caliber gate are never bridged.
          - `confidence` number: How well evidenced this row is, 0 to 1. **A minimum, not an average**: an inferred row caps every fit computed through it, and `min_confidence` on the endpoint hides rows below a threshold.
          - `source` 'curated' | 'universal' | 'inferred' | 'inherited:parent' | 'inherited:platform': The weakest evidence behind a fit. A retailer or engineering consumer should treat `inferred` as unverified; `min_confidence` hides it.
          - `adapterConfidence` number, nullable: How well the adapter's own record is sourced, 0 to 1, when the route goes through one. Beside `confidence`, which is the evidence for the mount points, rather than folded into it. Null for a direct route.
          - `caveats` string[]: What a person fitting it should know that does not stop it fitting: a sight mounted forward on a handguard rail, a scope that needs rings the catalogue does not list, a drop-in handguard cut for one gas system, receivers the maker says it does not fit.
        - `caveats` string[]: The best route's caveats.
    - `counts` object: Fitting attachments per category
    - `offers` object, nullable: With `with_offers=true`, live offers keyed by attachment id, the same rows `/v1/attachments/{id}/offers` returns; null when not requested.
    - `total` integer: Total records matching the query across every page.

## Other responses

- `400`: Validation error
- `401`: Missing or invalid API key
- `403`: The credential is valid and the caller is not permitted. Three causes, none of which reissuing a key changes: the plan is below the endpoint's tier, the account is suspended, or the key is not attached to the thing being acted on, meaning a user account for `/v1/me` or a shop for `/v1/vendor`. Distinct from 401, which means the credential is missing, malformed or expired and a new one can work.
- `404`: Resource not found
- `429`: A limit was reached. `RATE_LIMITED` is the per-minute limit: wait `Retry-After` seconds (a minute) and retry. `DAILY_CAP_EXCEEDED` is the plan's daily limit, per key: nothing will be served until the counters return to zero at midnight UTC. `MONTHLY_CAP_EXCEEDED` is the plan's monthly allowance, for the whole account: nothing will be served until midnight UTC on the first of next month, or until the plan changes. For both, `Retry-After` is the seconds until then and `error.resetsAt` says when as an instant. Calls made after a refusal are refused too and do not spend the month, and a free key that keeps calling is paused, so stop at the first one and resume at the reset.
- `500`: Internal server error

---

[API](https://skmtc.dev/gunspec/apis/gunspec-io-api.md) · [All operations](https://skmtc.dev/gunspec/apis/gunspec-io-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gunspec/apis/gunspec-io-api/revisions/f2e974d8b05c?raw)
