Retails API — Technical Journal – 09/02

Date: 09/02

What I did

Today I focused on tightening my understanding and control of the Retails API as a standalone system, not as a sidecar of other services.

The main concrete task was small but deliberate:

renaming a paper type from “Cotton Fibre Smooth” to “Cotton Fibre Velvet” across the entire Retails API.

That required treating the name as a system-wide contract, not just a display string:

  • Ensured the change is conceptualized as a rename, not a new option
  • Preserved all IDs, relationships, and pricing mappings
  • Considered every surface where the name exists:
    • product catalog JSON responses
    • attribute / attribute option data
    • pricing import/export (Excel)
    • tests, seeds, and any hardcoded references
  • Framed the change so existing consumers continue to work without schema or behavioral breakage

Alongside the task, I explicitly formalized the Retails API mental model:

  • It is a product catalog + pricing system
  • It owns products, print sizes, attributes, and attribute-option pricing
  • It does not own orders, payments, customers, or production flows

This separation matters more than the rename itself.


What I learned

  • Naming is part of API stability
    • In a pricing-driven system, names are not cosmetic
    • A careless rename can silently break pricing imports, staff workflows, or downstream assumptions
  • Small changes expose system boundaries
    • A simple paper-name update forces you to ask:
      • where does truth live?
      • who consumes it?
      • what must not change?
    • If you can’t answer those clearly, the system is already fragile
  • Retails API must stay boring
    • No clever logic
    • No hidden side effects
    • Predictable JSON, predictable pricing, predictable imports
    • That “boring” quality is what makes it safe to depend on
  • Being explicit prevents future leakage
    • Explicitly separating Retails API from Files, PA, or order systems avoids architectural drift
    • Once boundaries blur, cleanup becomes exponentially harder

Takeaway

Today wasn’t about adding features.

It was about respecting the Retails API as a source of truth.

A clean rename, done carefully, is a signal that the system is being treated seriously.

That discipline compounds over time — especially in catalog and pricing systems.