admin-affiliate

Create a curated BOM product

Creates a bom_products record with active: true and url derived from rawUrl. A bare 10-character ASIN becomes a product URL on the country's Amazon marketplace (buildProductUrl); any other URL gets that marketplace's affiliate tag (applyRegionalTag). universal uses the de marketplace. Enum and URL validation is left to PocketBase, so violations surface as 500.

post/api/admin/bom-products

Request

  • Base URL: https://voltplan.app
  • URL: https://voltplan.app/api/admin/bom-products
  • Auth: HTTP bearer

Request body

kind'cable' | 'ring_terminal' | 'heat_shrink' | 'wire_stripper' | 'cutter' | 'crimp_tool' | 'heat_gun' | 'fuse' | 'fuse_holder' required
country'universal' | 'de' | 'us' | 'uk' | 'fr' | 'es' | 'it' | 'au' required
rawUrlstring required

10-character ASIN or product URL; stored as url after expansion.

brandstring
titlestring
gauge_mm2number

Cross-section in mm²; exact match for cable, ring_terminal, heat_shrink.

gauge_min_mm2number

Lower bound in mm² for range kinds (wire_stripper, cutter, crimp_tool).

gauge_max_mm2number

Upper bound in mm² for range kinds (wire_stripper, cutter, crimp_tool).

ampnumber

Fuse rating in amps; unset for an assortment.

fuse_type'Blade (ATC/ATO)' | 'MAXI Blade' | 'ANL' | 'Class T' | 'NH / Industrial' | ''
color'red' | 'black' | 'any' | 'set' | ''
tier'budget' | 'standard' | 'pro' | ''

Response

Record created.

successunknown required
idstring required

Id of the created bom_products record.

Changes

No recorded changes to this operation across all 1 revision of this API.