Migrate from API v1

v2 is additive. Existing v1 routes remain available while you move checkout traffic deliberately.

Compatibility promise

v1 keeps legacy address fields and order behavior. v2 uses separate /v2 routes and requires a structured address, quote, and idempotency key. Do not rewrite a live v1 checkout in place without a staged test path.

What changes

Concernv1v2
Product listsFirestore-backedVersioned cached catalogue with fallback
AddressSeparate state/LGA/area fieldsRequired version 2 object
Delivery priceCalculated during order15-minute quote before order
Retry protectionNo client idempotency contractRequired idempotency key
Order requestProduct + address + customerQuote ID + customer

Phased rollout

  1. Move reads

    Adopt v2 product endpoints and compare results against v1.

  2. Build v2 addresses

    Update address forms using state, LGA, and town endpoints.

  3. Add quotes

    Create and display delivery pricing before final confirmation.

  4. Add idempotency

    Persist a checkout reference before making order calls.

  5. Canary orders

    Send controlled test traffic, then a small live cohort.

Address migration

Do not blindly relabel legacy addresses as version 2. Ask the customer to confirm a town selected from the current catalogue. Keep the legacy address available only for the v1 fallback until the customer has saved a valid v2 replacement.

Cutover

Track success rate, quote expiry, insufficient funds, duplicate submissions, and delivery-location errors separately by API version. Promote v2 only when these metrics and support workflows are stable.

Rollback

Keep the v1 client path deployable during rollout. A rollback sends new checkouts to v1; it must not retry an uncertain v2 order as a new v1 order without first reconciling the v2 idempotency outcome.