{
 "openapi": "3.1.0",
 "info": {
  "title": "Supplier · Financial (Supply Chain)",
  "version": "20261030b",
  "description": "Payment method, matching tolerance, withholding and the hold flag — at supplier level, or overridden per site."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "supplier-financials": {
    "type": "object",
    "required": [
     "supplier_id"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "supplier_id": {
      "type": "string",
      "format": "uuid",
      "description": "Supplier"
     },
     "site_id": {
      "type": "string",
      "format": "uuid",
      "description": "Site (empty = the whole supplier)"
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id"
     },
     "currency": {
      "type": "string",
      "description": "Currency"
     },
     "payment_terms_id": {
      "type": "string",
      "format": "uuid",
      "description": "Payment terms"
     },
     "payment_method": {
      "type": "string",
      "description": "Payment method",
      "enum": [
       "check",
       "ach",
       "wire",
       "card",
       "direct_debit",
       "cash",
       "bill_of_exchange"
      ]
     },
     "payment_priority": {
      "type": "integer",
      "description": "Payment priority"
     },
     "pay_group": {
      "type": "string",
      "description": "Pay group"
     },
     "payment_hold": {
      "type": "boolean",
      "description": "Payment on hold"
     },
     "hold_reason": {
      "type": "string",
      "description": "Hold reason"
     },
     "invoice_match_option": {
      "type": "string",
      "description": "Invoice matching",
      "enum": [
       "two_way",
       "three_way",
       "four_way",
       "none"
      ]
     },
     "price_tolerance_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Price tolerance %"
     },
     "quantity_tolerance_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Quantity tolerance %"
     },
     "allow_early_payment_discount": {
      "type": "boolean",
      "description": "Allow early payment discount"
     },
     "self_billing": {
      "type": "boolean",
      "description": "We raise the invoice (self-billing)"
     },
     "consignment": {
      "type": "boolean",
      "description": "Consignment"
     },
     "withholding_tax_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Withholding tax %"
     },
     "withholding_tax_code": {
      "type": "string",
      "description": "Withholding tax code"
     },
     "tax_registration_no": {
      "type": "string",
      "description": "Tax registration no"
     },
     "is_tax_exempt": {
      "type": "boolean",
      "description": "Is tax exempt"
     },
     "income_tax_reporting": {
      "type": "string",
      "description": "Income tax reporting"
     },
     "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
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/scm/supplier-financials": {
   "get": {
    "summary": "list supplier-financials",
    "operationId": "list_supplier_financials_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create supplier-financials",
    "operationId": "create_supplier_financials_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/supplier-financials/{id}": {
   "get": {
    "summary": "get supplier-financials",
    "operationId": "get_supplier_financials_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change supplier-financials",
    "operationId": "change_supplier_financials_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete supplier-financials",
    "operationId": "delete_supplier_financials_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/supplier-financials/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_supplier_financials_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"
     }
    }
   }
  }
 }
}