addedInput schema / $schema
Added value: +"http://json-schema.org/draft-07/schema#"
addedInput schema / additionalProperties
Added value: +false
addedInput schema / properties / contact
Added value: +{
+ "description": "Supplier the bill is from — create one with freeagent_create_contact",
+ "pattern": "^(?:https:\\/\\/api\\.freeagent\\.com)?\\/v2\\/contacts\\/\\d+$",
+ "type": "string"
+}
addedInput schema / properties / contentType
Added value: +{
+ "description": "MIME type. Inferred from fileName if omitted.",
+ "type": "string"
+}
addedInput schema / properties / currency
Added value: +{
+ "description": "ISO 4217 currency (default: company currency)",
+ "pattern": "^[A-Z]{3}$",
+ "type": "string"
+}
addedInput schema / properties / datedOn
Added value: +{
+ "description": "Bill date YYYY-MM-DD",
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
+ "type": "string"
+}
addedInput schema / properties / dueOn
Added value: +{
+ "description": "Payment due date YYYY-MM-DD",
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
+ "type": "string"
+}
addedInput schema / properties / fileBase64
Added value: +{
+ "description": "Base64-encoded supplier invoice (PDF, PNG, JPEG)",
+ "maxLength": 6990000,
+ "type": "string"
+}
addedInput schema / properties / fileName
Added value: +{
+ "description": "File name (e.g. 'invoice.pdf')",
+ "type": "string"
+}
addedInput schema / properties / items
Added value: +{
+ "description": "Bill line items — at least one, at most 40",
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "categoryUrl": {
+ "description": "Spending category for this line",
+ "pattern": "^(?:https:\\/\\/api\\.freeagent\\.com)?\\/v2\\/categories\\/\\d+$",
+ "type": "string"
+ },
+ "description": {
+ "description": "Line description",
+ "maxLength": 500,
+ "type": "string"
+ },
+ "salesTaxRate": {
+ "description": "VAT rate (e.g. '20.0')",
+ "pattern": "^\\d+(\\.\\d+)?$",
+ "type": "string"
+ },
+ "totalValue": {
+ "description": "Line value INCLUDING tax (e.g. '120.00'). Must be positive — a supplier credit is a credit note, not a negative bill line.",
+ "pattern": "^\\d+(\\.\\d{1,2})?$",
+ "type": "string"
+ }
+ },
+ "required": [
+ "categoryUrl",
+ "totalValue"
+ ],
+ "type": "object"
+ },
+ "maxItems": 40,
+ "minItems": 1,
+ "type": "array"
+}
addedInput schema / properties / project
Added value: +{
+ "description": "Project to allocate this bill to",
+ "pattern": "^(?:https:\\/\\/api\\.freeagent\\.com)?\\/v2\\/projects\\/\\d+$",
+ "type": "string"
+}
addedInput schema / properties / rebillFactor
Added value: +{
+ "description": "Markup percentage or fixed price — required for markup/price",
+ "pattern": "^\\d+(\\.\\d+)?$",
+ "type": "string"
+}
addedInput schema / properties / rebillType
Added value: +{
+ "description": "How to rebill this to the client",
+ "enum": [
+ "cost",
+ "markup",
+ "price"
+ ],
+ "type": "string"
+}
addedInput schema / properties / reference
Added value: +{
+ "description": "Supplier's invoice reference (e.g. 'INV-2049')",
+ "maxLength": 100,
+ "minLength": 1,
+ "type": "string"
+}
addedInput schema / required
Added value: +[
+ "contact",
+ "reference",
+ "datedOn",
+ "dueOn",
+ "items"
+]