API Reference
Complete API documentation for integrating UAPK into your applications.
Quick Start
1
Get API Key
Sign up for an account and generate your API key
2
Install SDK
Install our SDK for your preferred language
3
Make API Calls
Start building with our comprehensive API
Code Examples
Javascript Example
// Example: Create a new manifest
const response = await fetch('/api/manifests', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_TOKEN'
},
body: JSON.stringify({
name: 'E-Commerce Platform',
description: 'Complete online store automation',
category: 'retail',
operations: [
{
name: 'Inventory Management',
settings: { auto_reorder: true }
}
]
})
});
const data = await response.json();
console.log('Manifest created:', data.id);API Endpoints
Authentication
POST
/auth/login
Authenticate user and return access token
Parameters
| Name | Type | Required |
|---|---|---|
| string | Required | |
| password | string | Required |
Response
{
"token": "string",
"user": "object",
"expires": "timestamp"
}POST
/auth/refresh
Refresh access token
Parameters
| Name | Type | Required |
|---|---|---|
| refresh_token | string | Required |
Response
{
"token": "string",
"expires": "timestamp"
}Manifests
GET
/manifests
List all manifests for authenticated user
Parameters
| Name | Type | Required |
|---|---|---|
| page | integer | Optional |
| limit | integer | Optional |
| status | string | Optional |
Response
{
"manifests": "array",
"pagination": "object"
}POST
/manifests
Create a new manifest
Parameters
| Name | Type | Required |
|---|---|---|
| name | string | Required |
| description | string | Required |
| category | string | Required |
| operations | array | Required |
Response
{
"id": "string",
"status": "string",
"created_at": "timestamp"
}GET
/manifests/{id}
Get manifest details
Parameters
| Name | Type | Required |
|---|---|---|
| id | string | Required |
Response
{
"manifest": "object",
"operations": "array",
"metadata": "object"
}Marketplace
GET
/marketplace/manifests
List marketplace manifests
Parameters
| Name | Type | Required |
|---|---|---|
| category | string | Optional |
| min_price | number | Optional |
| max_price | number | Optional |
Response
{
"manifests": "array",
"filters": "object"
}POST
/marketplace/purchase
Purchase a manifest
Parameters
| Name | Type | Required |
|---|---|---|
| manifest_id | string | Required |
| payment_method | string | Required |
Response
{
"transaction_id": "string",
"status": "string",
"manifest": "object"
}Official SDKs
JavaScript
npm install @uapk/sdkimport { UAPKClient } from '@uapk/sdk';
const client = new UAPKClient({
apiKey: 'your-api-key',
environment: 'production'
});
// Create a manifest
const manifest = await client.manifests.create({
name: 'My Business',
category: 'retail',
operations: [...]
});Python
pip install uapk-sdkfrom uapk import UAPKClient
client = UAPKClient(
api_key='your-api-key',
environment='production'
)
# List marketplace manifests
manifests = client.marketplace.list(
category='retail',
min_price=0.1
)