{
 "openapi": "3.1.0",
 "info": {
  "title": "Item · Costing (Supply Chain)",
  "version": "20261030b",
  "description": "The cost method, the elements that make up the standard, and where it posts. The elements must add up to the standard — the platform refuses a row where they do not."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "item-costing": {
    "type": "object",
    "required": [
     "item_id"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "item_id": {
      "type": "string",
      "format": "uuid",
      "description": "Item"
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Applies in"
     },
     "cost_method": {
      "type": "string",
      "description": "Cost method",
      "enum": [
       "standard",
       "average",
       "fifo",
       "lifo",
       "specific",
       "actual"
      ]
     },
     "currency": {
      "type": "string",
      "description": "Currency"
     },
     "material_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Material"
     },
     "labor_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Labor"
     },
     "overhead_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Overhead"
     },
     "subcontract_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Subcontract"
     },
     "freight_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Freight"
     },
     "standard_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Standard cost"
     },
     "average_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Average cost"
     },
     "last_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Last cost"
     },
     "inventory_account_no": {
      "type": "string",
      "description": "Inventory account"
     },
     "cogs_account_no": {
      "type": "string",
      "description": "Cost of sales account"
     },
     "variance_account_no": {
      "type": "string",
      "description": "Variance account"
     },
     "revenue_account_no": {
      "type": "string",
      "description": "Revenue account"
     },
     "cost_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Cost center"
     },
     "profit_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Profit center id"
     },
     "is_inventory_asset": {
      "type": "boolean",
      "description": "Carried as an inventory asset"
     },
     "is_capitalizable": {
      "type": "boolean",
      "description": "Capitalizable"
     },
     "asset_category": {
      "type": "string",
      "description": "Asset category"
     },
     "useful_life_months": {
      "type": "integer",
      "description": "Useful life (months)"
     },
     "tax_category_id": {
      "type": "string",
      "format": "uuid",
      "description": "Tax category id"
     },
     "tax_code": {
      "type": "string",
      "description": "Tax code"
     },
     "is_tax_exempt": {
      "type": "boolean",
      "description": "Tax exempt"
     },
     "transfer_price": {
      "type": "string",
      "format": "decimal",
      "description": "Transfer price"
     },
     "transfer_price_basis": {
      "type": "string",
      "description": "Transfer price basis",
      "enum": [
       "cost",
       "cost_plus",
       "market",
       "negotiated"
      ]
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "effective_from": {
      "type": "string",
      "format": "date",
      "description": "In force from"
     },
     "effective_to": {
      "type": "string",
      "format": "date",
      "description": "Until"
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     },
     "asset_class_id": {
      "type": "string",
      "format": "uuid",
      "description": "Asset class"
     },
     "asset_per_unit": {
      "type": "boolean",
      "description": "One asset per unit received"
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/scm/item-costing": {
   "get": {
    "summary": "list item-costing",
    "operationId": "list_item_costing_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create item-costing",
    "operationId": "create_item_costing_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/item-costing/{id}": {
   "get": {
    "summary": "get item-costing",
    "operationId": "get_item_costing_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change item-costing",
    "operationId": "change_item_costing_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete item-costing",
    "operationId": "delete_item_costing_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/item-costing/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_item_costing_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}