Introduction
Base URL, required headers, and authentication overview for the Cartxis REST API
Last updated: Feb 09, 2026
Introduction
The Cartxis API provides a RESTful interface for mobile applications to interact with the e-commerce platform. It supports user authentication, product browsing, shopping cart management, checkout, order tracking, and more.
Base URL
Production: https://your-domain/api/v1
Development: http://localhost:8000/api/v1
Required Headers
All requests should include:
Accept: application/json
Content-Type: application/json
For authenticated requests, add:
Authorization: Bearer {token}
Authentication
Cartxis uses Laravel Sanctum for API authentication with bearer tokens.
Obtaining a Token
- Register a new user via
POST /auth/register - Login with credentials via
POST /auth/login - Use the returned
tokenin theAuthorizationheader
Token Lifecycle
- Tokens expire after 24 hours (configurable)
- Use
POST /auth/refreshto get a new token - Use
POST /auth/logoutto revoke the current token
Token Usage
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...