REST API Reference v2.0
Programmatic
Apparel.
Integrate Fashneva directly into your ERP. Generate tech packs, fetch live unit costs, and dispatch production orders purely via code.
{
"prompt": "Heavyweight loopback cotton hoodie, oversized fit, drop shoulder",
"color": "PANTONE 19-4052",
"gsm": 450,
"grading": "EU_MENS_M"
}
Authentication
The Fashneva API uses API keys to authenticate requests. You can view and manage your API keys in the Fashneva Dashboard under Developer Settings.
Authentication to the API is performed via HTTP Bearer Auth. Provide your API key as the bearer token value in the Authorization header.
Security Notice
Never share your secret keys. Keep them guarded and secure. Do not commit them to GitHub. If your key is compromised, roll it immediately in the dashboard.
// Authenticating a request
curl https://api.fashneva.com/v2/ping \
-H "Authorization: Bearer fv_live_xxxxxxxxxxxxx"
// Success Response (200 OK)
{
"status": "authenticated",
"tier": "enterprise",
"rate_limit_remaining": 9999
}
Core Endpoints.
/v2/generation/techpack
Synchronously generates a production-ready tech pack from a semantic text prompt. Returns a JSON object containing the BOM (Bill of Materials), Vector DXF coordinates, and simulated physics data.
// Response Schema
{
"id": "gen_88f3a9b2",
"status": "completed",
"assets": {
"dxf_url": "https://cdn.fashneva.com/assets/.../pattern.dxf",
"techpack_pdf": "https://cdn.fashneva.com/assets/.../techpack.pdf"
},
"bom": [
{ "material": "cotton_heavyweight", "consumption_meters": 1.45 },
{ "material": "ykk_zipper_5mm", "consumption_units": 1 }
]
}
/v2/costing/live
Fetches live, real-time unit economics for a generated design based on current commodity exchange rates and global node capacity. Costing is guaranteed for 24 hours.
| Parameter | Type | Description |
|---|---|---|
| design_id | string | The ID of the generated design. |
| volume | integer | Intended production volume (e.g. 5000). |
| destination | string | ISO country code for tariff calculation (e.g. "US"). |
Webhooks
Do not poll our API. Register a webhook endpoint in your dashboard to receive real-time POST payloads for asynchronous events. We fire webhooks for:
- production.node_accepted
- production.fabric_cut
- qc.scan_passed
- qc.scan_failed
- freight.vessel_departed
Enterprise SLAs
Fashneva OS guarantees a 99.999% uptime for core API endpoints. All enterprise plans include dedicated NAT gateways, static IPs for whitelisting, and a financially backed SLA.