DEV3 Kilnfront REST API
Base URL /api/v1 · Authenticate with Authorization: Bearer n3k_… · OpenAPI 3.1 JSON
/api/v1/mescope: readThe store this key belongs to
/api/v1/usagescope: readUsage for the current billing period
/api/v1/productsscope: readList products
Parameters: status (query), limit (query), page (query)
/api/v1/productsscope: writeCreate a product
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"status": {
"default": "draft",
"type": "string",
"enum": [
"draft",
"active",
"archived"
]
},
"vendor": {
"default": "",
"type": "string",
"maxLength": 60
},
"type": {
"default": "",
"type": "string",
"maxLength": 60
},
"tags": {
"default": [],
"maxItems": 30,
"type": "array",
"items": {
"type": "string",
"maxLength": 40
}
},
"description": {
"default": "",
"type": "string",
"maxLength": 5000
},
"variants": {
"minItems": 1,
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"default": "Default",
"type": "string",
"maxLength": 120
},
"sku": {
"type": "string",
"maxLength": 60
},
"price": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"compareAt": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"stock": {
"default": 0,
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"title",
"price",
"stock"
],
"additionalProperties": false
}
}
},
"required": [
"title",
"status",
"vendor",
"type",
"tags",
"description",
"variants"
],
"additionalProperties": false
}/api/v1/products/{id}scope: readGet a product
Parameters: id (path)
/api/v1/products/{id}scope: writeUpdate a product
Parameters: id (path)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"status": {
"type": "string",
"enum": [
"draft",
"active",
"archived"
]
},
"vendor": {
"type": "string",
"maxLength": 60
},
"tags": {
"maxItems": 30,
"type": "array",
"items": {
"type": "string",
"maxLength": 40
}
}
},
"additionalProperties": false
}/api/v1/products/{id}scope: writeArchive a product
Parameters: id (path)
/api/v1/variants/{id}/stockscope: writeSet stock on hand for a variant
Parameters: id (path)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"stock": {
"type": "integer",
"minimum": -100000,
"maximum": 10000000
},
"locationId": {
"type": "string",
"pattern": "^[a-f0-9]{24}$"
}
},
"required": [
"stock"
],
"additionalProperties": false
}/api/v1/ordersscope: readList orders
Parameters: status (query), payment (query), limit (query), page (query)
/api/v1/orders/{id}scope: readGet an order with its lines
Parameters: id (path)
/api/v1/orders/{id}/fulfillscope: writeFulfil the remaining items of an order
Parameters: id (path)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"carrier": {
"type": "string",
"maxLength": 40
},
"tracking": {
"type": "string",
"maxLength": 80
}
},
"additionalProperties": false
}/api/v1/orders/{id}/refundscope: writeRefund an order (amount in minor units)
Parameters: id (path)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"amount": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"restock": {
"default": false,
"type": "boolean"
},
"reason": {
"type": "string",
"maxLength": 120
}
},
"required": [
"amount",
"restock"
],
"additionalProperties": false
}/api/v1/customersscope: readList customers
Parameters: limit (query), page (query)
/api/v1/discountsscope: readList discounts
/api/v1/discountsscope: writeCreate a discount code
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 3,
"maxLength": 24,
"pattern": "^[A-Za-z0-9_-]+$"
},
"kind": {
"type": "string",
"enum": [
"percent",
"fixed",
"free_shipping"
]
},
"value": {
"default": 0,
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"usageLimit": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"minSubtotal": {
"default": 0,
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"code",
"kind",
"value",
"minSubtotal"
],
"additionalProperties": false
}/api/v1/membersscope: readList staff members
Parameters: role (query)
/api/v1/suppliersscope: readList suppliers
Parameters: status (query), limit (query), page (query)
/api/v1/purchase-ordersscope: readList purchase orders
Parameters: status (query), limit (query), page (query)
/api/v1/purchase-orders/{id}scope: readGet a purchase order with its lines
Parameters: id (path)
/api/v1/metafieldsscope: readList custom field definitions
Parameters: owner (query)