Feeds  ›  Recycling Feeds

Recycling Feeds

A PriceFirst-compatible recycling feed is a CSV file hosted at a publicly accessible HTTPS URL. PriceFirst downloads it on demand (or on a recurring schedule), validates every row with the right parser for its category, and maps the results to variants in the catalogue so your prices stay in sync.

The column schema is per category. This page only documents the rules that apply to every parser. For the exact columns, attribute whitelists and sample CSV of a specific category, pick its parser page from the sidebar (Mobile Phones, iPad, …). New categories like Watches or Consoles may introduce additional columns (colour, size, …) — each parser page is the single source of truth for its own format.

How it works

  1. We register one feed URL per category on your marchant profile (feedUrl). Each URL is scoped to a single parser.
  2. PriceFirst fetches the CSV over HTTPS and routes it to the parser configured for that category.
  3. Every row is validated against the shared core rules below and the category-specific rules on the parser's page.
  4. Accepted rows become marchants price records; inactive or rejected rows are either skipped or excluded with a clear reason.

Shared rules (all parsers)

These rules are enforced by the core validation layer before any category-specific parser runs. They apply to every feed regardless of the columns the category uses.

HTTPS required

The Feed Validator and live ingest both reject plain http:// URLs. Feeds must be served over TLS with a trusted certificate.

Device ID

  • Every row must have a non-empty Device ID.
  • Length: 1–128 characters, ASCII-safe.
  • Uniqueness is enforced per marchant (compound DB index) and within a single CSV (the parser rejects duplicates at parse time with duplicate_device_id).
  • Any prefix is fine (PF-, SKU-, …) as long as you don't reuse a value for two different variants.

Status (active / inactive)

  • active — row will be imported and its price made available.
  • inactive — row is skipped and any existing marchant price for that Device ID is deleted on the next resync.
  • Any other value (or a blank column) is rejected with invalid_status.

To pause a variant without removing it from the feed, flip Status to inactive. PriceFirst will delete its price on the next resync and restore it the moment you set it back to active.

Price rules

  • Numeric, strictly greater than 0.
  • £, $, , , and whitespace are stripped before parsing.
  • Values are rounded to the nearest 50p (.00 or .50), clamped to 2 decimal places. e.g. 349.74 → 349.50, 349.75 → 350.00.
  • Non-numeric, zero or negative prices are rejected with invalid_price.

Category routing

  • The Category cell on each row must resolve to the parser you configured for that feed URL.
  • What counts as a valid category value is defined by each parser. See the parser page for the accepted aliases.
  • Rows whose category doesn't match the parser's aliases are rejected with malformed — the core validator refuses to guess at category membership.

Request

GET https://example.com/feeds/pricefirst.csv HTTP/1.1
User-Agent: PriceFirst Feed Processor
curl -H "User-Agent: PriceFirst Feed Processor" \
     https://example.com/feeds/pricefirst.csv
  • HTTPS required; HEAD must return 2xx/3xx; GET must return 200 with a CSV body.
  • Timeout: 30 s on download, 10 s on the HEAD probe.
  • Redirects are followed.
  • Ingestion cadence is configured per marchant (minimum 10 minutes). Ask your integrator to enable the recurring resync job once you've validated the feed.

Available parsers

Each parser defines its own column set, attribute whitelists, and sample CSV. They all inherit the shared rules above.

CategoryParser page
Mobile PhonesMobile Phones format →
iPadiPad format →

Watches, consoles, laptops and other hardware will each get their own page when their parser ships.

Validate before going live

The Feed Validator runs exactly the same rules as live ingest in dry-run mode, and returns per-row errors with line numbers and codes. Use it on every new feed and every significant feed change.

Frequently asked questions

How do I pause a variant?

Set Status to inactive on the row. The variant's price is deleted on the next resync; flipping Status back to active restores it.

How do I permanently remove a variant?

Remove the row from the feed. The variant will be removed on the next ingest. To clean up any stale notFound entries, contact your PriceFirst integrator.

Can I reuse a Device ID?

Only for the same variant within the same marchant. Reusing it for a different variant — or reusing it twice in the same CSV — is rejected.

Why doesn't this page list all the columns?

Because the columns can vary by category. A Mobile Phones feed needs Network, but a (future) Watches feed would need Case Size and Band Colour instead. Each parser page is the authoritative spec for its own format, so adding a new parser never invalidates this page.