techrar docs
Home
Solutions
Solutions
  • eCommerce SaaS
  • Meals SaaS
  • Meals Marketplaces
API
API
  • Merchant APIs
  • Customer App APIs
  • Meals APIs
Techrar Connect
Home
Solutions
Solutions
  • eCommerce SaaS
  • Meals SaaS
  • Meals Marketplaces
API
API
  • Merchant APIs
  • Customer App APIs
  • Meals APIs
Techrar Connect
  1. Customer Profiles
  • Back to home
  • Techrar Meals SaaS
  • GETTING STARTED
    • Account Setup
    • Authentication
    • Webhooks
    • Meals SaaS Overview
  • Offerings & Listings
    • Plans & Versions
    • Plan Categories
    • Display Menus
  • Customer Profiles
    • Customer Profile
    • Authenticating Customers
    • Customer Location
  • Placing Orders
    • Place Subscription Order
    • Order Payment
    • Generate Invoices
  • Subscriptions
    • Subscription Lifecycle
    • Subscription Management
  • Complaints
    • Complaint Lifecycle
    • Complaint Management
  • Delivery
    • Delivery Window
  1. Customer Profiles

Customer Location

Create and manage customer delivery locations for subscription orders.

Overview#

Every subscription order requires a location_id during checkout. Customers need at least one location created in Techrar's system before they can place orders. You have two options for managing locations: simple or full management.

Location Management Options#

Option A: Simple Location Creation (Recommended for MVP)
Option B: Full Location Management (Recommended)
Use merchant API to quickly create locations with just coordinates.
Endpoint: Create Customer Location
What You Need:
customer_id: Techrar customer ID (from authentication)
lat: Location latitude
lng: Location longitude
Features:
Automatically handles duplicates (returns existing location if coordinates match)
No need for customer authentication tokens
Quick integration for basic checkout flow
Use Case: Minimal integration where you only need to enable checkout functionality.

Implementation Guide#

1
Choose Your Approach
Simple: Just need checkout to work? Use merchant API (Option A)
Full: Want customers to manage addresses? Use customer API (Option B)
2
Create Location Before Checkout
When customer is ready to checkout:
Option A:
Option B:
3
Store Location ID
Response includes id. Save this as location ID for checkout.
4
Use in Checkout
Pass location_id in Place Subscription Order

Best Practices#

Location Creation#

Create location before showing checkout page
Handle duplicate locations gracefully
Validate coordinates before sending
Cache location_id to avoid duplicate API calls

Full Management (Option B)#

Let customers name locations (Home, Work, etc.)
Support multiple delivery addresses
Show map pin for location selection
Allow setting default location
Enable location editing for address corrections

User Experience#

Pre-fill current location from GPS
Show address confirmation before creating
Display saved locations for quick selection
Indicate which location is default

Common Scenarios#

First Time Checkout#

1.
Customer selects delivery area on map
2.
Create location with coordinates
3.
Store location_id
4.
Proceed to checkout with location_id

Returning Customer#

1.
Load saved locations
2.
Let customer select existing location
3.
Use stored location_id in checkout
4.
Option to add new location

Multi-Location Customer#

1.
Display all customer locations
2.
Let customer choose delivery location
3.
Option to set default for quick checkout
4.
Allow editing/deleting old locations

Duplicate Handling#

The simple API (Option A) automatically handles duplicates:
If coordinates exist:
Returns existing location
No duplicate created
Same location_id returned
If coordinates are new:
Creates new location
Returns new location_id
Modified at 2025-12-02 13:09:27
Previous
Authenticating Customers
Next
Place Subscription Order
Built with