{
 "openapi": "3.1.0",
 "info": {
  "title": "Cash Application (Accounting)",
  "version": "20261030b",
  "description": "Bank receipts matched to the open customer invoices they pay, by the invoice number in the remittance, the customer and the amount. Those at or above the company's confidence threshold are applied when its autonomy level allows; the rest wait here with a suggestion for a person to apply or turn down."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "cash-applications": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "bank_transaction_id": {
      "type": "string",
      "format": "uuid",
      "description": "Bank transaction id",
      "readOnly": true
     },
     "ar_invoice_id": {
      "type": "string",
      "format": "uuid",
      "description": "Ar invoice id",
      "readOnly": true
     },
     "amount": {
      "type": "string",
      "format": "decimal",
      "description": "Amount",
      "readOnly": true
     },
     "confidence": {
      "type": "string",
      "format": "decimal",
      "description": "Confidence",
      "readOnly": true
     },
     "reasons": {
      "type": "object",
      "description": "Reasons",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "ar_receipt_id": {
      "type": "string",
      "format": "uuid",
      "description": "Ar receipt id",
      "readOnly": true
     },
     "applied_via": {
      "type": "string",
      "description": "Applied via",
      "readOnly": true
     },
     "applied_at": {
      "type": "string",
      "format": "date-time",
      "description": "Applied at",
      "readOnly": true
     },
     "applied_by": {
      "type": "string",
      "format": "uuid",
      "description": "Applied by",
      "readOnly": true
     },
     "decided_reason": {
      "type": "string",
      "description": "Decided reason",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "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
     },
     "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
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/accounting/cash-applications": {
   "get": {
    "summary": "list cash-applications",
    "operationId": "list_cash_applications_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post cash application",
    "operationId": "action_cash_applications_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/cash-applications/{id}": {
   "get": {
    "summary": "get cash-applications",
    "operationId": "get_cash_applications_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put cash application",
    "operationId": "action_cash_applications_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete cash application",
    "operationId": "action_cash_applications_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/cash-applications/run": {
   "post": {
    "summary": "Run",
    "operationId": "action_cash_applications_0_5",
    "description": "Body keys: bankAccountId",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/cash-applications/{id}/apply": {
   "post": {
    "summary": "Apply",
    "operationId": "action_cash_applications_0_6",
    "description": "Body keys: amount",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/cash-applications/{id}/reject": {
   "post": {
    "summary": "Reject",
    "operationId": "action_cash_applications_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/cash-applications/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_cash_applications_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"
     }
    }
   }
  }
 }
}