{
 "openapi": "3.1.0",
 "info": {
  "title": "Grant Claims (Accounting)",
  "version": "20261030b",
  "description": "A reimbursement claim to the grantor for what the grant has spent to the end of the period, less what was claimed before. Approved by a second person, it raises the grantor’s invoice in the grant’s fund, ready to post."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "grant-claims": {
    "type": "object",
    "required": [
     "grant_id",
     "customer_account_id",
     "period_from",
     "period_to"
    ],
    "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
     },
     "claim_no": {
      "type": "string",
      "description": "Claim no"
     },
     "grant_id": {
      "type": "string",
      "format": "uuid",
      "description": "Grant"
     },
     "customer_account_id": {
      "type": "string",
      "format": "uuid",
      "description": "Grantor (customer account invoiced)"
     },
     "claim_date": {
      "type": "string",
      "format": "date",
      "description": "Claim date"
     },
     "period_from": {
      "type": "string",
      "format": "date",
      "description": "Costs from"
     },
     "period_to": {
      "type": "string",
      "format": "date",
      "description": "Costs to"
     },
     "amount": {
      "type": "string",
      "format": "decimal",
      "description": "Amount claimed"
     },
     "revenue_account_no": {
      "type": "string",
      "description": "Grant revenue account"
     },
     "expended_to_date": {
      "type": "string",
      "format": "decimal",
      "description": "Expended to date",
      "readOnly": true
     },
     "claimed_before": {
      "type": "string",
      "format": "decimal",
      "description": "Claimed before",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "ar_invoice_id": {
      "type": "string",
      "format": "uuid",
      "description": "Ar invoice id",
      "readOnly": true
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "submitted_by": {
      "type": "string",
      "format": "uuid",
      "description": "Submitted by",
      "readOnly": true
     },
     "submitted_at": {
      "type": "string",
      "format": "date-time",
      "description": "Submitted at",
      "readOnly": true
     },
     "decided_by": {
      "type": "string",
      "format": "uuid",
      "description": "Decided by",
      "readOnly": true
     },
     "decided_at": {
      "type": "string",
      "format": "date-time",
      "description": "Decided at",
      "readOnly": true
     },
     "decision_note": {
      "type": "string",
      "description": "Decision note",
      "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/grant-claims": {
   "get": {
    "summary": "list grant-claims",
    "operationId": "list_grant_claims_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create grant-claims",
    "operationId": "create_grant_claims_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/grant-claims/{id}": {
   "get": {
    "summary": "get grant-claims",
    "operationId": "get_grant_claims_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change grant-claims",
    "operationId": "change_grant_claims_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete grant-claims",
    "operationId": "delete_grant_claims_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/grant-claims/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_grant_claims_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"
     }
    }
   }
  },
  "/api/accounting/grant-claims/{id}/submit": {
   "post": {
    "summary": "Submit",
    "operationId": "action_grant_claims_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/grant-claims/{id}/reject": {
   "post": {
    "summary": "Reject",
    "operationId": "action_grant_claims_0_6",
    "description": "Body keys: note, reason",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/grant-claims/{id}/cancel": {
   "post": {
    "summary": "Cancel",
    "operationId": "action_grant_claims_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/grant-claims/{id}/approve": {
   "post": {
    "summary": "Approve",
    "operationId": "action_grant_claims_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}