{
 "openapi": "3.1.0",
 "info": {
  "title": "Item · Sales (Supply Chain)",
  "version": "20261030b",
  "description": "What may be ordered, at what price, promised how, and invoiced when."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "item-sales": {
    "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"
     },
     "is_orderable": {
      "type": "boolean",
      "description": "Orderable"
     },
     "sales_uom": {
      "type": "string",
      "description": "Sales unit of measure"
     },
     "sales_uom_conversion": {
      "type": "string",
      "format": "decimal",
      "description": "Conversion to stock unit"
     },
     "minimum_order_qty": {
      "type": "string",
      "format": "decimal",
      "description": "Minimum order quantity"
     },
     "maximum_order_qty": {
      "type": "string",
      "format": "decimal",
      "description": "Maximum order qty"
     },
     "order_multiple": {
      "type": "string",
      "format": "decimal",
      "description": "Order multiple"
     },
     "list_price": {
      "type": "string",
      "format": "decimal",
      "description": "List price"
     },
     "minimum_price": {
      "type": "string",
      "format": "decimal",
      "description": "Minimum price"
     },
     "max_discount_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Maximum discount %"
     },
     "price_list_id": {
      "type": "string",
      "format": "uuid",
      "description": "Price list id"
     },
     "atp_rule": {
      "type": "string",
      "description": "How a date is promised",
      "enum": [
       "none",
       "on_hand",
       "on_hand_plus_supply",
       "infinite",
       "capable_to_promise"
      ]
     },
     "allow_backorder": {
      "type": "boolean",
      "description": "Allow back-order"
     },
     "allow_partial_ship": {
      "type": "boolean",
      "description": "Allow partial shipment"
     },
     "ship_lead_days": {
      "type": "integer",
      "description": "Shipping lead days"
     },
     "sales_description": {
      "type": "string",
      "description": "Description on the order"
     },
     "is_shippable": {
      "type": "boolean",
      "description": "Is shippable"
     },
     "is_invoiceable": {
      "type": "boolean",
      "description": "Is invoiceable"
     },
     "invoicing_rule": {
      "type": "string",
      "description": "Invoiced",
      "enum": [
       "on_shipment",
       "on_order",
       "on_delivery",
       "milestone",
       "subscription"
      ]
     },
     "returnable_days": {
      "type": "integer",
      "description": "Returnable within days"
     },
     "warranty_months": {
      "type": "integer",
      "description": "Warranty months"
     },
     "is_configurable": {
      "type": "boolean",
      "description": "Configurable product"
     },
     "is_kit": {
      "type": "boolean",
      "description": "Kit"
     },
     "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
     },
     "gst_tax_code": {
      "type": "string",
      "description": "GST tax code (sales)"
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/scm/item-sales": {
   "get": {
    "summary": "list item-sales",
    "operationId": "list_item_sales_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-sales",
    "operationId": "create_item_sales_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/item-sales/{id}": {
   "get": {
    "summary": "get item-sales",
    "operationId": "get_item_sales_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-sales",
    "operationId": "change_item_sales_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-sales",
    "operationId": "delete_item_sales_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/item-sales/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_item_sales_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"
     }
    }
   }
  }
 }
}