{"openapi":"3.1.0","info":{"title":"Axisel API","version":"1.0.0","description":"Public REST API for Axisel stores. Authenticate with a `sk_live_*` API key via the Authorization header. See /docs for full docs.","contact":{"name":"Axisel Support","email":"support@axisel.com"}},"servers":[{"url":"https://axisel.com"}],"tags":[{"name":"Store"},{"name":"Products"},{"name":"Categories"},{"name":"Orders"},{"name":"Customers"},{"name":"Inventory"},{"name":"Analytics"},{"name":"Webhooks"}],"paths":{"/api/v1/store":{"get":{"summary":"Get store profile","tags":["Store"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Store"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/v1/products":{"get":{"summary":"List products","tags":["Products"],"security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/CreatedAfter"},{"$ref":"#/components/parameters/CreatedBefore"},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["active","draft","archived"]}},{"name":"category","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"meta":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"summary":"Create a product","tags":["Products"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"price":{"type":"number"},"description":{"type":"string"},"sku":{"type":"string"},"stock":{"type":"integer"},"status":{"type":"string","enum":["active","draft","archived"]},"categoryId":{"type":"string"},"images":{"type":"array"},"variants":{"type":"array"},"tags":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}}}}}},"400":{"$ref":"#/components/responses/NotFound"},"403":{"$ref":"#/components/responses/Forbidden"}}}},"/api/v1/products/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get product","tags":["Products"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}}}}}},"404":{"$ref":"#/components/responses/NotFound"}}},"put":{"summary":"Update product","tags":["Products"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}}}}}},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"summary":"Delete product","tags":["Products"],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Deleted"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/v1/categories":{"get":{"summary":"List categories","tags":["Categories"],"security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"},{"name":"search","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"meta":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}}}}}}},"/api/v1/orders":{"get":{"summary":"List orders","tags":["Orders"],"security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/CreatedAfter"},{"$ref":"#/components/parameters/CreatedBefore"},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","confirmed","processing","shipped","delivered","cancelled"]}},{"name":"orderSource","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"meta":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}}}}}}},"/api/v1/orders/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get order","tags":["Orders"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Order"}}}}}},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"summary":"Update order status / tracking","tags":["Orders"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","confirmed","processing","shipped","delivered","cancelled"]},"trackingNumber":{"type":"string"},"shippingCarrier":{"type":"string"},"cancellationReason":{"type":"string"},"storeNotes":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Order"}}}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/v1/customers":{"get":{"summary":"List customers","tags":["Customers"],"security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"},{"name":"search","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"meta":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}}}}}}},"/api/v1/customers/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get customer","tags":["Customers"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Customer"}}}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/v1/inventory/{productId}":{"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get inventory levels","tags":["Inventory"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/InventoryLevel"}}}}}},"404":{"$ref":"#/components/responses/NotFound"}}},"put":{"summary":"Set inventory levels","tags":["Inventory"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stock":{"type":"integer"},"minStock":{"type":"integer"},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"color":{"type":"string"},"size":{"type":"string"},"stock":{"type":"integer"}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/InventoryLevel"}}}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/v1/analytics/revenue":{"get":{"summary":"Revenue rollup","tags":["Analytics"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"range","in":"query","schema":{"type":"string","enum":["today","week","month","custom"],"default":"month"}},{"name":"start","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"end","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RevenueRollup"}}}}}}}}},"/api/v1/webhooks":{"get":{"summary":"List webhook subscriptions","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"meta":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}}}}}},"post":{"summary":"Create webhook subscription","description":"Returns the signing secret ONCE in the response. Store it securely — it is not retrievable later.","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"isActive":{"type":"boolean"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"}}}}}}}}},"/api/v1/webhooks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get webhook","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"}}}}}}}},"put":{"summary":"Update webhook","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"}}}}}}}},"delete":{"summary":"Delete webhook","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Deleted"}}}},"/api/v1/webhooks/{id}/ping":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Send a test ping event","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Delivery attempted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deliveryId":{"type":"string"},"status":{"type":"string"},"statusCode":{"type":"integer","nullable":true},"error":{"type":"string"},"durationMs":{"type":"integer"}}}}}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"sk_live_*","description":"Generate API keys in your admin Developers → API Keys page. Pass as `Authorization: Bearer <key>`."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"invalid_request"},"message":{"type":"string"},"details":{"type":"object","nullable":true}},"required":["code","message"]}},"required":["error"]},"Pagination":{"type":"object","properties":{"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer"},"hasMore":{"type":"boolean"}}},"Product":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string","nullable":true},"type":{"type":"string","enum":["single","bundle"]},"productType":{"type":"string","example":"physical"},"sku":{"type":"string","nullable":true},"barcode":{"type":"string","nullable":true},"brand":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"price":{"type":"number"},"salePrice":{"type":"number","nullable":true},"costPrice":{"type":"number","nullable":true},"stock":{"type":"integer"},"reserved":{"type":"integer"},"available":{"type":"integer"},"minStock":{"type":"integer","nullable":true},"weight":{"type":"number","nullable":true},"weightUnit":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","draft","archived"]},"categoryId":{"type":"string","nullable":true},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"linkedColor":{"type":"string","nullable":true}}}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"color":{"type":"string","nullable":true},"size":{"type":"string","nullable":true},"sku":{"type":"string","nullable":true},"barcode":{"type":"string","nullable":true},"stock":{"type":"integer"},"reserved":{"type":"integer"},"available":{"type":"integer"}}}},"tags":{"type":"array","items":{"type":"string"}},"publishedToMarketplace":{"type":"boolean"},"isRefundable":{"type":"boolean"},"isGiftCard":{"type":"boolean"},"salesCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Order":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"string"},"storeOrderNumber":{"type":"string"},"displayOrderNumber":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","confirmed","processing","shipped","delivered","cancelled"]},"orderSource":{"type":"string"},"customer":{"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"}}},"shippingAddress":{"type":"object"},"items":{"type":"array","items":{"type":"object"}},"subtotal":{"type":"number"},"discount":{"type":"number"},"shipping":{"type":"number"},"tax":{"type":"number"},"total":{"type":"number"},"paymentStatus":{"type":"string"},"paymentMethod":{"type":"string","nullable":true},"trackingNumber":{"type":"string"},"shippingCarrier":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Customer":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","nullable":true},"name":{"type":"string"},"phone":{"type":"string","nullable":true},"company":{"type":"string"},"customerType":{"type":"string","enum":["online","pos"]},"status":{"type":"string"},"emailVerified":{"type":"boolean"},"addresses":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"}}},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["order.created","order.updated","order.paid","order.cancelled","order.fulfilled","product.created","product.updated","product.deleted","customer.created","customer.updated","inventory.updated","test.ping"]}},"description":{"type":"string"},"isActive":{"type":"boolean"},"failureCount":{"type":"integer"},"lastSuccessAt":{"type":"string","format":"date-time","nullable":true},"lastFailureAt":{"type":"string","format":"date-time","nullable":true},"secret":{"type":"string","description":"Only returned in the response to POST /webhooks (once). Store this securely."},"createdAt":{"type":"string","format":"date-time"}}},"Store":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"displayName":{"type":"string"},"currency":{"type":"string","example":"USD"},"timezone":{"type":"string"},"country":{"type":"string","nullable":true},"status":{"type":"string"}}},"InventoryLevel":{"type":"object","properties":{"productId":{"type":"string"},"stock":{"type":"integer"},"reserved":{"type":"integer"},"available":{"type":"integer"},"minStock":{"type":"integer","nullable":true},"variants":{"type":"array","items":{"type":"object"}}}},"RevenueRollup":{"type":"object","properties":{"range":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"label":{"type":"string"}}},"totalRevenue":{"type":"number"},"orderCount":{"type":"integer"},"unitsSold":{"type":"integer"},"averageOrderValue":{"type":"number"},"currency":{"type":"string"}}}},"parameters":{"Limit":{"name":"limit","in":"query","schema":{"type":"integer","default":50,"minimum":1,"maximum":250}},"Offset":{"name":"offset","in":"query","schema":{"type":"integer","default":0,"minimum":0}},"CreatedAfter":{"name":"createdAfter","in":"query","schema":{"type":"string","format":"date-time"}},"CreatedBefore":{"name":"createdBefore","in":"query","schema":{"type":"string","format":"date-time"}}},"responses":{"Unauthorized":{"description":"API key missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"API key lacks the required permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}