Prices are calculated entirely server-side using theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/akibanks/api-tienda-vinilos/llms.txt
Use this file to discover all available pages before exploring further.
calcularPrecio(anio, have, want) function. Clients never supply prices — any precio field included in a request body is silently ignored. The backend fetches live have and want community statistics from the Discogs API, combines them with the release year, and computes the final price at request time.
Base Price by Release Year
The first input to pricing is the record’s release year, pulled from the Discogs release object. This determines the starting base price before any popularity adjustment is applied.| Release Year | Base Price |
|---|---|
| 2000 or later | $19.99 |
| 1980 – 1999 | $29.99 |
| 1960 – 1979 | $34.99 |
| Before 1960 | $39.99 |
| Unknown / missing year | $24.99 |
Popularity Adjustment
After the base price is set,calcularPrecio fetches the Discogs community stats for the release — specifically num_have (how many users own it) and num_want (how many users want it). These are combined into a want/have ratio:
| Ratio | Condition | Adjustment | Cap |
|---|---|---|---|
>= 1.5 | Highly desired | +40% | Maximum +$15.00 |
>= 0.8 | Popular | +20% | Maximum +$8.00 |
<= 0.1 | Low demand | −15% | Maximum −$5.00 |
| Between 0.1 and 0.8 | Moderate | No adjustment | — |
Worked Examples
Example 1 — Classic rock pressing, high demand- Album released in 1973 → base price $34.99
- Discogs stats:
have = 5,000,want = 8,500→ ratio = 1.7 - Ratio ≥ 1.5 → apply +40%, capped at +$15:
34.99 × 1.4 = 48.986, but cap is34.99 + 15 = 49.99 48.986 < 49.99, so cap does not apply → Final price: $48.99
- Album released in 2018 → base price $19.99
- Discogs stats:
have = 1,200,want = 700→ ratio = 0.583 - Ratio is between 0.1 and 0.8 → no adjustment
- Final price: $19.99
- Album released in 1957 → base price $39.99
- Discogs stats:
have = 80,want = 4→ ratio = 0.05 - Ratio ≤ 0.1 → apply −15%, capped at −$5:
39.99 × 0.85 = 33.99, and39.99 − 5 = 34.99 33.99 < 34.99, so cap applies → Final price: $34.99
Where Prices Appear
Theprecio field is included in every response that returns record data:
GET /buscar— each item in theresultadosarray containsprecioGET /genero/:genero— each item in theresultadosarray containsprecioGET /recientes— each item in the array containsprecioGET /disco/:id— the detail object containsprecio, alongsidehaveandwant
linea_venta table at checkout time, locking in the price at the moment of purchase.