Skip to main content

API Endpoints

Complete API endpoint documentation for ZÈYA API.

Base URLs

Production: https://api.zeya.app/api/v1/
Staging: https://staging-api.zeya.app/api/v1/
Local: http://localhost:8000/api/v1/

Authentication

Most endpoints require JWT authentication. Include the token in the Authorization header:

Authorization: Bearer {your-jwt-token}

Response Format

Success Response

{
"success": true,
"data": { ... },
"message": "Operation successful"
}

Error Response

{
"success": false,
"error": "Error message",
"code": "ERROR_CODE",
"errors": { ... } // For validation errors
}

Paginated Response

{
"success": true,
"data": [ ... ],
"pagination": {
"current_page": 1,
"total_pages": 5,
"total_items": 100,
"per_page": 20,
"has_next": true,
"has_prev": false
}
}

Public Endpoints

Authentication (/api/v1/)

MethodEndpointDescriptionAuth Required
POST/loginLogin userNo
POST/alternate-loginAlternate login methodNo
POST/alternate-login-appleApple Sign-InNo
POST/registerRegister new userNo
GET/logoutLogout userYes
GET/refreshRefresh JWT tokenYes
GET/check-tokenValidate tokenYes
POST/password-reset-otp-sentRequest password reset OTPNo
POST/validate-otpValidate OTPNo
POST/submit-reset-passwordReset passwordNo

Onboarding (/api/v1/onboarding/)

MethodEndpointDescriptionAuth Required
POST/send-verification-codeSend phone verification codeNo
POST/verify-codeVerify phone codeNo
POST/resend-verification-codeResend verification codeNo
POST/register-basic-infoRegister basic user infoNo
POST/send-login-otpSend login OTPNo
POST/verify-login-otpVerify login OTPNo
GET/is-completeCheck onboarding statusNo
POST/locationSave user locationYes
POST/categoriesSave categoriesYes
POST/hashtagsSave hashtagsYes
POST/preferencesSave preferencesYes
POST/swap-reasonsSave swap reasonsYes
POST/groupsSave groupsYes
GET/statusGet onboarding statusYes
GET/groups-suggestionsGet suggested groupsYes
GET/style-tagsGet style tagsYes

Authenticated Endpoints

Products (/api/v1/)

MethodEndpointDescription
GET/get-categoryGet all categories
GET/productsGet user's products
POST/add-productCreate new product
POST/update-product/{id}Update product
DELETE/product/{id}Delete product
GET/swap-productsGet products for swapping
GET/product-detailsGet product details
GET/nearby-productsGet nearby products
GET/trending-productsGet trending products
GET/dashboard-summaryGet user dashboard summary
POST/product-reportsReport a product

User Bookmarks (/api/v1/user-bookmark-item)

MethodEndpointDescription
POST/Create bookmark
GET/Get all bookmarks
GET/{id}Get bookmark details
DELETE/Delete bookmark
PATCH/Toggle bookmark

User Likes (/api/v1/user-like-item)

MethodEndpointDescription
POST/Like a product
POST/user-dislike-itemDislike a product
GET/Get liked items
GET/{id}Get like details
DELETE/Remove like
GET/user-like-recivedGet received likes
GET/user-like-recived/{id}Get received like details

Swap Transactions (/api/v1/swap-transaction)

MethodEndpointDescription
POST/add-swap-transactionCreate swap request
GET/accept-swap-transactionAccept swap request
GET/Get user swap transactions
GET/{id}/detailsGet transaction details
GET/{id}/completeComplete transaction
GET/{id}/unmatchUnmatch transaction
GET/reviewGet pending reviews
POST/reviewSubmit review
GET/{id}/unihopGet transaction for unihop

Chat (/api/v1/user-chat)

MethodEndpointDescription
GET/Get all chats
POST/user-chat-createCreate new chat
PATCH/pinPin/unpin chat
DELETE/{id}Delete chat
GET/{transaction_id}/messageGet chat messages
POST/{transaction_id}/messageSend message
POST/{transaction_id}/mediaUpload media
POST/{transaction_id}/message/{id}/statusUpdate message status
GET/restoreRestore deleted chat

Groups (/api/v1/groups)

MethodEndpointDescription
GET/Get all groups
GET/my-groupsGet user's groups
POST/Create group
POST/{id}Update group
DELETE/{id}Delete group
GET/{id}/detailsGet group details
GET/{uid}/infoGet group info by UID
GET/{id}/membersGet group members
GET/{id}/members/imagesGet member images
GET/{id}/leaveLeave group
GET/{id}/inviteGet invite link
POST/{id}/inviteCreate invite
POST/group/accept-inviteAccept invite
POST/group-joinJoin group from app
GET/{id}/requestsGet join requests
POST/{id}/requestsRequest to join
POST/{id}/requests/{req_id}/actionApprove/reject request
GET/my-groups-requestsGet user's requests
GET/{id}/productsGet group products
POST/{id}/productsAdd product to group
DELETE/{id}/products/{prod_id}Remove product from group
GET/{id}/products/{prod_id}/exclusiveToggle exclusive
GET/{id}/products/{prod_id}/pinPin product
GET/preview-groupsPreview groups
GET/preview-groups-dataPreview group data
PATCH/{id}/featuredUpdate featured status

Users (/api/v1/)

MethodEndpointDescription
GET/user-profileGet current user profile
GET/profile/{id}Get user profile by ID
GET/email-availabilityCheck email availability
POST/check-usernameCheck username availability
PATCH/update-phoneUpdate phone number
POST/validate-phoneValidate phone number
POST/user-addressSave user address
DELETE/delete-userDelete user account
POST/user-updateUpdate user profile
POST/user-update-passwordUpdate password
POST/user-update-imageUpdate profile image
GET/user-ratingGet user rating
GET/usersGet users list

Addresses (/api/v1/addresses)

MethodEndpointDescription
GET/Get all addresses
GET/{id}Get address details
POST/Create address
PUT/{id}Update address
DELETE/{id}Delete address
PATCH/{id}/defaultSet default address

Notifications (/api/v1/)

MethodEndpointDescription
GET/user-sessionsSave user session
POST/save-device-tokenSave device token
GET/unopen-notificationGet unread notifications
PATCH/read-notificationMark all as read
GET/user-notificationGet user notifications
GET/notification/{id}/readMark notification as read

Subscriptions (/api/v1/)

MethodEndpointDescription
GET/subscription-plansGet subscription plans
GET/user-subscriptionGet user subscriptions
GET/user-subscription/historyGet subscription history

Referrals (/api/v1/referral)

MethodEndpointDescription
GET/Get referral info
POST/updateUpdate referral code
POST/track-shareTrack share
POST/track-downloadTrack download
POST/source-platformUpdate source platform
GET/user-referralGet users with referrals
GET/referred-users-listGet referred users

Version Control (/api/v1/)

MethodEndpointDescription
POST/check-versionCheck app version
GET/version-detailsGet version details

Advertisements (/api/v1/)

MethodEndpointDescription
GET/fetch-adsGet advertisements
POST/ads-activityTrack ad activity
GET/fetch-batch-adsGet batch advertisements
POST/advertisement-reportReport advertisement
GET/advertisement-reportGet reports
PATCH/advertisement-reportUpdate report status

Admin Endpoints (/api/admin/v1/)

All admin endpoints require auth.admin middleware.

Authentication

MethodEndpointDescription
POST/loginAdmin login
GET/logoutAdmin logout
GET/refreshRefresh token
GET/check-tokenValidate token

Users

MethodEndpointDescription
GET/usersList users
GET/users/{id}/ipsGet user IPs
GET/user-profileGet user profile
PATCH/user-updateUpdate user
POST/user-editEdit user
GET/user-countGet user count
POST/user-blacklistBlacklist user
POST/user-unblacklistUnblacklist user
GET/users-exportExport users

Products

MethodEndpointDescription
GET/productsList products
PATCH/product-updateUpdate product
GET/product-countGet product count
POST/add-demo-productCreate demo product
POST/admin/create-productCreate product
POST/admin/update-productUpdate product
DELETE/product/{id}Delete product

Groups

MethodEndpointDescription
GET/groupsList groups
GET/groups/{id}/detailsGet group details
GET/groups/{id}/membersGet members
GET/groups/{id}/productsGet group products

Reports

MethodEndpointDescription
GET/report/transactionTransaction report
GET/report/transaction/allAll transactions
GET/report/transaction/{id}Transaction details
GET/report/subscriptionSubscription report
GET/report/user/{id}User detail report
GET/report/reported-product/allAll reported products
GET/report/reported-product/{id}Report details
PATCH/report/report-status-updateUpdate report status

Analytics & Insights

See Features for detailed analytics endpoints.

Service API (/api/service/)

Authentication

MethodEndpointDescription
POST/create-service-tokenCreate service token

Protected Endpoints (auth:service)

MethodEndpointDescription
GET/verify-product/{id}Get product for verification
POST/mark-product-verified/{id}Mark as verified
POST/classify-product/{id}Classify product
POST/log-processing-stepLog processing step
GET/processing-statsGet processing stats