GunSpec

Favorites

The signed-in account's favourited firearms. Session-scoped: these call /v1/me/* and answer 401 without a key that belongs to a user account. A favourite is a slug, not a copy of the record, so a firearm renamed in the catalog stays favourited.

Auth RequiredExplorer+

Favourite a firearm. Idempotent: favouriting twice is one favourite.

add(firearmId: string): Promise<APIResponse<FavoriteToggle>>
POST/v1/me/favorites/{firearmId}

  • stringheaderrequired

    Your API key. Authorization: Bearer <key> is accepted in its place.

  • stringrequired

    Firearm slug

    Example

  • object

    The response payload.

  • boolean

    Always true: the firearm is in your favorites once this returns.

  • string

    Slug of the firearm this row belongs to.

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 404NOT_FOUNDResource not found
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Minimum tier
Explorer+
Monthly quota
200/mo
Rate limit
10/min
Daily cap
50

Figures shown are for this endpoint's minimum tier. Higher tiers raise every limit.