DEV3 Kilnfront
Sign inStart free

DEV3 Kilnfront REST API

Base URL /api/v1 · Authenticate with Authorization: Bearer n3k_… · OpenAPI 3.1 JSON

get/api/v1/mescope: read

The store this key belongs to

get/api/v1/usagescope: read

Usage for the current billing period

get/api/v1/productsscope: read

List products

Parameters: status (query), limit (query), page (query)

post/api/v1/productsscope: write

Create 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
}
get/api/v1/products/{id}scope: read

Get a product

Parameters: id (path)

patch/api/v1/products/{id}scope: write

Update 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
}
delete/api/v1/products/{id}scope: write

Archive a product

Parameters: id (path)

patch/api/v1/variants/{id}/stockscope: write

Set 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
}
get/api/v1/ordersscope: read

List orders

Parameters: status (query), payment (query), limit (query), page (query)

get/api/v1/orders/{id}scope: read

Get an order with its lines

Parameters: id (path)

post/api/v1/orders/{id}/fulfillscope: write

Fulfil 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
}
post/api/v1/orders/{id}/refundscope: write

Refund 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
}
get/api/v1/customersscope: read

List customers

Parameters: limit (query), page (query)

get/api/v1/discountsscope: read

List discounts

post/api/v1/discountsscope: write

Create 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
}
get/api/v1/membersscope: read

List staff members

Parameters: role (query)

get/api/v1/suppliersscope: read

List suppliers

Parameters: status (query), limit (query), page (query)

get/api/v1/purchase-ordersscope: read

List purchase orders

Parameters: status (query), limit (query), page (query)

get/api/v1/purchase-orders/{id}scope: read

Get a purchase order with its lines

Parameters: id (path)

get/api/v1/metafieldsscope: read

List custom field definitions

Parameters: owner (query)