{
  "openapi": "3.0.3",
  "info": {
    "title": "Sumtracker Public API v2026-11",
    "version": "2026-11",
    "description": "Release candidate, planned for release on 30 November 2026. Its endpoints may still change until then.\n\nPublic API endpoints which can be accessed using an API key generated from Sumtracker account."
  },
  "paths": {
    "/purchases/prices/": {
      "get": {
        "operationId": "PurchaseRateList",
        "description": "List the purchase rates of the products that are not archived, newest first.",
        "summary": "List Purchase Rates",
        "parameters": [
          {
            "in": "query",
            "name": "contacts",
            "schema": {
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            "description": "Supplier ids separated by comma.",
            "explode": false,
            "style": "form"
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "The pagination cursor value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "ids",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Purchase rate ids separated by comma.",
            "explode": false,
            "style": "form"
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "products",
            "schema": {
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            "description": "Product ids separated by comma.",
            "explode": false,
            "style": "form"
          }
        ],
        "tags": [
          "Purchase Rates"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedPurchaseRateList"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "PurchaseRateCreate",
        "description": "Add a supplier to a product by creating its purchase rate, with a cost and shipping cost of 0, a pack size and\nminimum order quantity of 1 and no tax. Set its values afterwards with the update.\n\nWhen the product already has a purchase rate from the supplier, it is returned unchanged. The supplier becomes\nthe primary supplier of the product when it has none.",
        "summary": "Create Purchase Rate",
        "tags": [
          "Purchase Rates"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PurchaseRateCreate"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseRate"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/purchases/prices/{purchase_rate_id}/": {
      "put": {
        "operationId": "PurchaseRateUpdate",
        "description": "Update the cost and the purchasing terms of a purchase rate. A value left out keeps the saved one, and a null\n`tax_id` clears the tax.\n\nThe supplier becomes the primary supplier of the product when it has none.",
        "summary": "Update Purchase Rate",
        "parameters": [
          {
            "in": "path",
            "name": "purchase_rate_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "Purchase Rates"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PurchaseRateUpdate"
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseRate"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "PurchaseRateDelete",
        "description": "Delete a purchase rate, which removes its supplier from the product. When it is the primary supplier of the\nproduct, the product is left without one.",
        "summary": "Delete Purchase Rate",
        "parameters": [
          {
            "in": "path",
            "name": "purchase_rate_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "Purchase Rates"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/purchases/settings/taxes/": {
      "get": {
        "operationId": "TaxList",
        "description": "List the taxes of the account, oldest first.\n\nThe `tax_id` of a purchase order line is one of these taxes. When a product is added to a purchase order, the\nline takes the tax of the supplier's purchase rate for the product.",
        "summary": "List Taxes",
        "tags": [
          "Settings"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Tax"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/settings/warehouses/": {
      "get": {
        "operationId": "WarehouseList",
        "description": "List the warehouses of the account that are not archived, ordered by priority.\n\nSumtracker manages the inventory of the products at multiple warehouses. Stock adjustments, purchase orders\nand stock transfers take the `warehouse_id` of the warehouse they change the stock of.",
        "summary": "List Warehouses",
        "tags": [
          "Settings"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Warehouse"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/stock/levels/": {
      "get": {
        "operationId": "StockLevelList",
        "description": "List all non-bundle stock levels for given warehouse.\nStock levels have inventory information for a product at particular warehouse.\nThis API does not include bundle stock levels.\n- `in_stock` is the current stock.\n- `booked` is the stock which is reserved for unfulfilled orders.\n- `available` is the current stock minus the booked stock.\n- `incoming` is the stock which is pending to be received from purchase orders or stock transfers.\n\nRaises\n- ValidationError if either the warehouse or product is not provided.",
        "summary": "List Stock Levels",
        "parameters": [
          {
            "in": "query",
            "name": "available_max",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "available_min",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "booked_max",
            "schema": {
              "type": "integer",
              "maximum": 2147483647,
              "minimum": -2147483648
            }
          },
          {
            "in": "query",
            "name": "booked_min",
            "schema": {
              "type": "integer",
              "maximum": 2147483647,
              "minimum": -2147483648
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "The pagination cursor value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "in_stock_max",
            "schema": {
              "type": "integer",
              "maximum": 2147483647,
              "minimum": -2147483648
            }
          },
          {
            "in": "query",
            "name": "in_stock_min",
            "schema": {
              "type": "integer",
              "maximum": 2147483647,
              "minimum": -2147483648
            }
          },
          {
            "in": "query",
            "name": "incoming_max",
            "schema": {
              "type": "integer",
              "maximum": 2147483647,
              "minimum": -2147483648
            }
          },
          {
            "in": "query",
            "name": "incoming_min",
            "schema": {
              "type": "integer",
              "maximum": 2147483647,
              "minimum": -2147483648
            }
          },
          {
            "in": "query",
            "name": "is_below_threshold",
            "schema": {
              "type": "boolean"
            },
            "description": "Available + incoming stock is less than min level."
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "o",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "-available",
                  "-booked",
                  "-in_stock",
                  "-incoming",
                  "-product_id",
                  "-warehouse_id",
                  "available",
                  "booked",
                  "in_stock",
                  "incoming",
                  "product_id",
                  "warehouse_id"
                ]
              }
            },
            "description": "Ordering\n\n* `product_id` - Product id\n* `-product_id` - Product id (descending)\n* `warehouse_id` - Warehouse id\n* `-warehouse_id` - Warehouse id (descending)\n* `in_stock` - In stock\n* `-in_stock` - In stock (descending)\n* `booked` - Booked\n* `-booked` - Booked (descending)\n* `incoming` - Incoming\n* `-incoming` - Incoming (descending)\n* `available` - Available\n* `-available` - Available (descending)",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "product",
            "schema": {
              "type": "number"
            },
            "description": "Product id. Either product or warehouse is required."
          },
          {
            "in": "query",
            "name": "products",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Product ids separated by comma",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "warehouse",
            "schema": {
              "type": "number"
            },
            "description": "Warehouse id. Either warehouse or product is required."
          }
        ],
        "tags": [
          "Stock"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedStockLevelList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/stock/levels/bundles/": {
      "get": {
        "operationId": "StockLevelBundleList",
        "description": "List all bundle stock levels.\nEach bundle product has a list of component stock levels.\n\n### How is bundle available stock calculated?\nThe `available` stock of a bundle is based on the lowest available stock of its components.\nEach component in the bundle has a `component_quantity` which represents how many components are needed\nto make 1 bundle product. Based on the `available` stock of component divided by the `component_quantity`\nwe can calculate the `available` stock of the bundle.\n\nRaises\n- ValidationError if warehouse not provided.",
        "summary": "List Bundle Stock Levels",
        "parameters": [
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "The pagination cursor value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "o",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "-product_id",
                  "-warehouse_id",
                  "product_id",
                  "warehouse_id"
                ]
              }
            },
            "description": "Ordering\n\n* `product_id` - Product id\n* `-product_id` - Product id (descending)\n* `warehouse_id` - Warehouse id\n* `-warehouse_id` - Warehouse id (descending)",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "product",
            "schema": {
              "type": "number"
            },
            "description": "Product id"
          },
          {
            "in": "query",
            "name": "products",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Product ids separated by comma",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "warehouse",
            "schema": {
              "type": "number"
            },
            "description": "Warehouse id. warehouse is required."
          }
        ],
        "tags": [
          "Stock"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedStockLevelBundleList"
                }
              }
            },
            "description": ""
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PaginatedPurchaseRateList": {
        "type": "object",
        "required": [
          "results"
        ],
        "properties": {
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?cursor=cD00ODY%3D\""
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?cursor=cj0xJnA9NDg3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurchaseRate"
            }
          }
        }
      },
      "PaginatedStockLevelBundleList": {
        "type": "object",
        "required": [
          "results"
        ],
        "properties": {
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?cursor=cD00ODY%3D\""
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?cursor=cj0xJnA9NDg3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StockLevelBundle"
            }
          }
        }
      },
      "PaginatedStockLevelList": {
        "type": "object",
        "required": [
          "results"
        ],
        "properties": {
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?cursor=cD00ODY%3D\""
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?cursor=cj0xJnA9NDg3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StockLevel"
            }
          }
        }
      },
      "PurchaseRate": {
        "type": "object",
        "description": "The cost and the purchasing terms of a product from one of its suppliers. A product has at most one purchase rate\nper supplier.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "product_id": {
            "type": "integer",
            "readOnly": true,
            "description": "Id of the product."
          },
          "contact_id": {
            "type": "integer",
            "readOnly": true,
            "description": "Id of the supplier."
          },
          "tax_id": {
            "type": "integer",
            "readOnly": true,
            "nullable": true,
            "description": "Id of the tax the supplier charges, which purchase order lines take. Null when there is none."
          },
          "cost_basis": {
            "type": "string",
            "readOnly": true,
            "description": "`Per Pack` when the pack size is more than 1, and the costs are per pack, otherwise `Per Unit`."
          },
          "cost": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,10}(?:\\.\\d{0,4})?$",
            "readOnly": true,
            "description": "Cost of the product. When the pack size is greater than 1, we consider the cost to be cost per pack. For example, if the pack size is 10 and the cost value stored is 150 the actual cost per unit would be 15."
          },
          "shipping_cost": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,10}(?:\\.\\d{0,4})?$",
            "readOnly": true,
            "description": "Shipping cost of the product. The cost basis logic is applicable here too as it is for the cost per unit field."
          },
          "supplier_sku": {
            "type": "string",
            "readOnly": true,
            "description": "The supplier's own SKU of the product.",
            "maxLength": 200
          },
          "pack_size": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0,
            "readOnly": true,
            "description": "Units per pack. The costs are per pack when it is more than 1."
          },
          "moq": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "readOnly": true,
            "description": "Minimum order quantity."
          },
          "uom": {
            "type": "string",
            "readOnly": true,
            "description": "Unit of measure, such as `kg`.",
            "maxLength": 100
          },
          "notes": {
            "type": "string",
            "readOnly": true,
            "description": "Notes about the supplier's terms for the product."
          }
        },
        "required": [
          "contact_id",
          "cost",
          "cost_basis",
          "id",
          "moq",
          "notes",
          "pack_size",
          "product_id",
          "shipping_cost",
          "supplier_sku",
          "tax_id",
          "uom"
        ]
      },
      "PurchaseRateCreate": {
        "type": "object",
        "description": "Request body of the purchase rate create.",
        "properties": {
          "product_id": {
            "type": "integer",
            "description": "Id of the product, which must not be archived."
          },
          "contact_id": {
            "type": "integer",
            "description": "Id of the supplier."
          }
        },
        "required": [
          "contact_id",
          "product_id"
        ]
      },
      "PurchaseRateUpdate": {
        "type": "object",
        "description": "Request body of the purchase rate update. A value left out keeps the saved one.",
        "properties": {
          "cost": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,10}(?:\\.\\d{0,4})?$",
            "description": "Cost of the product. When the pack size is greater than 1, we consider the cost to be cost per pack. For example, if the pack size is 10 and the cost value stored is 150 the actual cost per unit would be 15."
          },
          "shipping_cost": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,10}(?:\\.\\d{0,4})?$",
            "description": "Shipping cost of the product. The cost basis logic is applicable here too as it is for the cost per unit field."
          },
          "supplier_sku": {
            "type": "string",
            "description": "The supplier's own SKU of the product.",
            "maxLength": 200
          },
          "pack_size": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0,
            "description": "Units per pack. The costs are per pack when it is more than 1."
          },
          "moq": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "Minimum order quantity."
          },
          "tax_id": {
            "type": "integer",
            "nullable": true,
            "description": "Id of a tax. Null clears the tax."
          },
          "uom": {
            "type": "string",
            "description": "Unit of measure, such as `kg`.",
            "maxLength": 100
          },
          "notes": {
            "type": "string",
            "description": "Notes about the supplier's terms for the product."
          }
        }
      },
      "StockLevel": {
        "type": "object",
        "description": "The stock of a product at a warehouse.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "updated": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "product_id": {
            "type": "integer",
            "readOnly": true
          },
          "warehouse_id": {
            "type": "integer",
            "readOnly": true
          },
          "in_stock": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "readOnly": true
          },
          "incoming": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "readOnly": true
          },
          "available": {
            "type": "integer",
            "readOnly": true
          },
          "booked": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "readOnly": true
          },
          "close_at_quantity": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "readOnly": true,
            "nullable": true
          }
        },
        "required": [
          "available",
          "booked",
          "close_at_quantity",
          "id",
          "in_stock",
          "incoming",
          "product_id",
          "updated",
          "warehouse_id"
        ]
      },
      "StockLevelBundle": {
        "type": "object",
        "description": "The stock level of a bundle, with the stock levels of its components.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "product_id": {
            "type": "integer",
            "readOnly": true
          },
          "warehouse_id": {
            "type": "integer",
            "readOnly": true
          },
          "in_stock": {
            "type": "integer",
            "readOnly": true
          },
          "booked": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "readOnly": true
          },
          "available": {
            "type": "integer",
            "readOnly": true
          },
          "components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/_Component"
            },
            "readOnly": true
          }
        },
        "required": [
          "available",
          "booked",
          "components",
          "id",
          "in_stock",
          "product_id",
          "warehouse_id"
        ]
      },
      "Tax": {
        "type": "object",
        "description": "A tax of the account. A purchase rate sets the tax a supplier charges, and a purchase order line takes the tax of\nits supplier's purchase rate.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "readOnly": true,
            "description": "Name of the tax, such as `GST`.",
            "maxLength": 50
          },
          "tax_rate": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "description": "Rate of the tax as a fraction of the cost, such as 0.18 for 18%."
          }
        },
        "required": [
          "id",
          "name",
          "tax_rate"
        ]
      },
      "Warehouse": {
        "type": "object",
        "description": "A warehouse of the account, where the stock of the products is kept.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "code": {
            "type": "string",
            "readOnly": true,
            "description": "Unique code of the warehouse in the account."
          },
          "priority": {
            "type": "integer",
            "readOnly": true,
            "description": "Display order of the warehouse, lowest first."
          },
          "is_3pl": {
            "type": "boolean",
            "readOnly": true,
            "description": "Whether a third party logistics provider manages the stock of the warehouse."
          },
          "address_id": {
            "type": "integer",
            "readOnly": true,
            "nullable": true,
            "description": "Id of the address of the warehouse, used on its purchase orders."
          }
        },
        "required": [
          "address_id",
          "code",
          "id",
          "is_3pl",
          "priority"
        ]
      },
      "_Component": {
        "type": "object",
        "description": "The stock level of a component of a bundle, with the quantity of the component in the bundle and the number of\nbundles its stock makes.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "product_id": {
            "type": "integer",
            "readOnly": true
          },
          "warehouse_id": {
            "type": "integer",
            "readOnly": true
          },
          "in_stock": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "readOnly": true
          },
          "booked": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "readOnly": true
          },
          "available": {
            "type": "integer",
            "readOnly": true
          },
          "component_quantity": {
            "type": "integer",
            "readOnly": true
          },
          "possible_bundles": {
            "type": "integer",
            "readOnly": true
          },
          "close_at_quantity": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "readOnly": true,
            "nullable": true
          }
        },
        "required": [
          "available",
          "booked",
          "close_at_quantity",
          "component_quantity",
          "id",
          "in_stock",
          "possible_bundles",
          "product_id",
          "warehouse_id"
        ]
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Api-Key based authentication with the header `Authorization: Api-Key <api-key-value>`"
      }
    }
  },
  "servers": [
    {
      "url": "https://inventory-api.sumtracker.com/api/version/2026-11",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Purchase Rates",
      "description": "\nPurchase Rates API.\n\nA purchase rate is the cost and the purchasing terms of a product from one of its suppliers. A product has at most one\npurchase rate per supplier, and the supplier of one of them can be the primary supplier of the product.\n                "
    },
    {
      "name": "Stock",
      "description": "Stock API."
    },
    {
      "name": "Settings",
      "description": "Settings API."
    }
  ]
}
