Quickstart Guide¶
Overview¶
This guide will get you up and running with the Jend-Z API in under 10 minutes. You'll create an account, set up a basic profile, discover local content, and create your first post.
Prerequisites¶
- API Base URL:
https://api-dev.jendz.xyz(replace withhttps://api.jendz.xyzin production) - HTTP Client: curl, Postman, or your preferred programming language
- Basic Requirements: Valid email address
Step 1: Create Your Account (2 minutes)¶
Register a new user account to get immediate access to the platform.
Request:
curl -X POST https://api-dev.jendz.xyz/api/auth/register/ \
-H "Content-Type: application/json" \
-d '{
"email": "your.email@example.com",
"username": "your_username",
"display_name": "Your Display Name",
"password": "securepassword123"
}'
Response:
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"user": {
"id": "user-uuid",
"email": "your.email@example.com",
"username": "your_username",
"display_name": "Your Display Name",
"location": null
}
}
Save your access token - you'll need it for all subsequent requests.
Step 2: Set Your Location (1 minute)¶
Set your location to discover local content and connect with nearby users.
Request:
curl -X POST https://api-dev.jendz.xyz/api/users/update-location/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"country": "Nigeria",
"state": "Lagos State",
"city": "Lagos",
"neighbourhood": "Victoria Island",
"longitude": 3.4236,
"latitude": 6.4302
}'
Response:
{
"message": "Location updated successfully",
"location": {
"id": "location-uuid",
"name": "Victoria Island"
}
}
Tip: Use actual coordinates from your device's GPS or a map service for better local content discovery.
Step 3: Discover Local Content (1 minute)¶
Find posts and communities in your area.
Get Local Posts¶
Request:
curl -X GET "https://api-dev.jendz.xyz/api/posts/by-location/?location_id=YOUR_LOCATION_UUID" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response:
{
"location_name": "Victoria Island",
"total_posts": 45,
"posts": [
{
"id": "post-uuid",
"user": {
"username": "local_user",
"display_name": "Local User"
},
"content": "Great coffee at the new place on Ahmadu Bello Way! #coffee #vi",
"likes_count": 12,
"comments_count": 3,
"created_at": "2024-01-15T10:30:00Z"
}
]
}
Browse Communities¶
Request:
curl -X GET "https://api-dev.jendz.xyz/api/communities/communities/" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response:
{
"results": [
{
"id": "community-uuid",
"name": "Lagos Tech Hub",
"description": "Community for tech enthusiasts in Lagos",
"members_count": 1250,
"posts_count": 342
}
]
}
Step 4: Create Your First Post (2 minutes)¶
Share something with your local community.
Request:
curl -X POST https://api-dev.jendz.xyz/api/posts/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "Hello Jend-Z! Excited to connect with my neighbors in Victoria Island. #newbie #vi",
"location_id": "YOUR_LOCATION_UUID"
}'
Response:
{
"id": "new-post-uuid",
"user": {
"username": "your_username",
"display_name": "Your Display Name"
},
"content": "Hello Jend-Z! Excited to connect with my neighbors in Victoria Island. #newbie #vi",
"location_name": "Victoria Island",
"likes_count": 0,
"comments_count": 0,
"created_at": "2024-01-15T15:45:00Z"
}
Step 5: Engage with Content (1 minute)¶
Interact with posts to build connections.
Like a Post¶
Request:
curl -X POST https://api-dev.jendz.xyz/api/posts/POST_UUID/like/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response:
Add a Comment¶
Request:
curl -X POST https://api-dev.jendz.xyz/api/posts/POST_UUID/comment/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "Welcome to the neighborhood!"
}'
Join a Community¶
Request:
curl -X POST https://api-dev.jendz.xyz/api/communities/communities/COMMUNITY_UUID/join/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response:
Programming Language Examples¶
JavaScript/Node.js¶
const axios = require("axios");
const API_BASE = "https://api-dev.jendz.xyz";
let accessToken = "";
// 1. Register
async function register() {
const response = await axios.post(`${API_BASE}/api/auth/register/`, {
email: "your.email@example.com",
username: "your_username",
display_name: "Your Display Name",
password: "securepassword123",
});
accessToken = response.data.access_token;
return response.data;
}
// 2. Set location
async function setLocation() {
const response = await axios.post(
`${API_BASE}/api/users/update-location/`,
{
country: "Nigeria",
state: "Lagos State",
city: "Lagos",
neighbourhood: "Victoria Island",
longitude: 3.4236,
latitude: 6.4302,
},
{
headers: { Authorization: `Bearer ${accessToken}` },
}
);
return response.data;
}
// 3. Create post
async function createPost() {
const response = await axios.post(
`${API_BASE}/api/posts/`,
{
content: "Hello from JavaScript! #coding #vi",
},
{
headers: { Authorization: `Bearer ${accessToken}` },
}
);
return response.data;
}
Python¶
import requests
API_BASE = 'https://api-dev.jendz.xyz'
access_token = ''
# 1. Register
def register():
global access_token
response = requests.post(f'{API_BASE}/api/auth/register/', json={
'email': 'your.email@example.com',
'username': 'your_username',
'display_name': 'Your Display Name',
'password': 'securepassword123'
})
data = response.json()
access_token = data['access_token']
return data
# 2. Set location
def set_location():
response = requests.post(f'{API_BASE}/api/users/update-location/',
json={
'country': 'Nigeria',
'state': 'Lagos State',
'city': 'Lagos',
'neighbourhood': 'Victoria Island',
'longitude': 3.4236,
'latitude': 6.4302
},
headers={'Authorization': f'Bearer {access_token}'}
)
return response.json()
# 3. Create post
def create_post():
response = requests.post(f'{API_BASE}/api/posts/',
json={'content': 'Hello from Python! #python #vi'},
headers={'Authorization': f'Bearer {access_token}'}
)
return response.json()
Common Issues & Solutions¶
Authentication Errors¶
Problem: 401 Unauthorized responses
Solution: Ensure you're including the Authorization: Bearer YOUR_TOKEN header in all authenticated requests
Location Not Set¶
Problem: Empty results when getting local content Solution: Make sure you've set your location in Step 2 before trying to discover local content
Invalid Coordinates¶
Problem: Location update fails with coordinate errors Solution: Ensure longitude and latitude are valid decimal numbers within realistic ranges
Token Expiration¶
Problem: Access token stops working after some time Solution: Use the refresh token to get a new access token:
curl -X POST https://api-dev.jendz.xyz/api/auth/refresh/ \
-H "Content-Type: application/json" \
-d '{"refresh": "YOUR_REFRESH_TOKEN"}'
Next Steps¶
Now that you have the basics working, explore more advanced features:
Content & Social Features¶
- Posts Documentation - Rich media posts, advanced filtering, view tracking
- Communities - Create communities, manage memberships
- User Discovery - Find nearby users, profile management
Business Features¶
- Market Documentation - Create stores, list products, manage orders
- Locations - Advanced location features and geographic discovery
Platform Features¶
- Notifications - In-app notification system
- Onboarding - Guided user onboarding flows
Integration Guides¶
- Mobile Integration - iOS and Android SDK examples
- Web Integration - React, Vue, and vanilla JavaScript examples
- Authentication Patterns - Token management and security best practices
Support¶
If you run into issues:
- Check Error Responses - The API returns descriptive error messages
- Review Documentation - Each endpoint has detailed documentation with examples
- Test Environment - Use the provided examples to verify your setup
The Jend-Z API is designed to be intuitive and developer-friendly. You should be able to build powerful location-based social and commerce features with just a few API calls.
Happy building!