{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/devmargin-app/json-schema/devmargin-app-push-cost-body-schema.json",
  "title": "cost — a running bill",
  "description": "Upserted by `label`, so re-pushing the same bill daily updates one row\ninstead of piling up duplicates. Costs reach net margin immediately;\nno pull is needed.\n",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/devmargin-app-openapi-openapi.yml#/components/schemas/PushCostBody",
  "type": "object",
  "properties": {
    "project": {
      "type": "string",
      "format": "uuid"
    },
    "cost": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1,
          "description": "The upsert key — keep it stable across pushes."
        },
        "monthly": {
          "type": "number",
          "minimum": 0,
          "description": "A monthly amount. Divide yearly bills by twelve."
        },
        "currency": {
          "type": "string",
          "pattern": "^[A-Z]{3}$"
        }
      },
      "required": [
        "label",
        "monthly",
        "currency"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "project",
    "cost"
  ],
  "additionalProperties": false
}