Skip to main content

Welcome

This guide will help you get started with the Urban Things API in minutes. You’ll learn how to authenticate, create a tenant, and start managing your e-commerce platform.

Prerequisites

Before you begin, make sure you have:
  • A valid email address
  • An API client (cURL, Postman, or your preferred tool)
  • Basic understanding of REST APIs

Step 1: Create an Account

Register a new user account:
curl -X POST https://faisalshop.mvp-apps.ae/api/v2/admin/register \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Your Name",
    "email": "[email protected]",
    "password": "securepassword123",
    "password_confirmation": "securepassword123"
  }'

Step 2: Login

Authenticate to receive your access token:
curl -X POST https://faisalshop.mvp-apps.ae/api/v2/admin/login \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "[email protected]",
    "password": "securepassword123"
  }'
Response:
{
  "token": "322|gA24v1gzIJme72431KwUqyvPRotoRrIpMNAy3mXhe513ff48",
  "user": {
    "id": 17,
    "name": "Your Name",
    "email": "[email protected]",
    ...
  }
}
Save the token - you’ll need it for all subsequent requests!

Step 3: Create a Tenant

Create your organization (tenant):
curl -X POST https://faisalshop.mvp-apps.ae/api/v2/admin/tenants \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "My Store"
  }'
You’ll automatically be assigned as an ADMIN of the new tenant.

Step 4: Get Your Tenant ID

Check your tenants:
curl -X GET https://faisalshop.mvp-apps.ae/api/v2/admin/who_am_i \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response:
{
  "user": {...},
  "tenants": [
    {
      "id": 123,
      "name": "My Store",
      "role": "ADMIN"
    }
  ]
}
Save your tenant ID - you’ll use it in the X-Tenant-ID header!

Step 5: Create a Category

Now you can start building your catalog:
curl -X POST https://faisalshop.mvp-apps.ae/api/v2/admin/category/create \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'X-Tenant-ID: 123' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Electronics",
    "description": "Electronic devices and accessories"
  }'

Step 6: Create a Product

Add your first product:
curl -X POST https://faisalshop.mvp-apps.ae/api/v2/admin/products \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'X-Tenant-ID: 123' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Wireless Headphones",
    "description": "Premium noise-cancelling headphones",
    "price": 199.99,
    "stock": 50,
    "category_id": 1
  }'

Step 7: Add Team Members

Invite team members to your organization:
curl -X POST https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/123 \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "[email protected]",
    "role": "MEMBER"
  }'

Quick Reference

Authentication Headers

All authenticated requests need:
Authorization: Bearer YOUR_TOKEN

Tenant Context

Most endpoints need:
X-Tenant-ID: YOUR_TENANT_ID

Common Endpoints

Next Steps

1

Explore the API

Browse the API Reference for all available endpoints
2

Learn Multi-Tenancy

Understand how multi-tenancy works
3

Set Up Webhooks

Configure webhooks for real-time notifications
4

Build Your App

Start integrating the API into your application

Need Help?

Contact Support

Have questions? Reach out to our support team