{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/BillPayment",
"title": "BillPayment",
"type": "object",
"x-apideck-schema-id": "BillPayment",
"x-apideck-weights": {
"id": "critical",
"downstream_id": "medium",
"currency": "critical",
"currency_rate": "medium",
"total_amount": "critical",
"reference": "medium",
"payment_method": "medium",
"payment_method_reference": "medium",
"payment_method_id": "edge-case",
"account": "critical",
"transaction_date": "critical",
"customer": "high",
"supplier": "high",
"company_id": "medium",
"reconciled": "low",
"status": "high",
"type": "high",
"allocations": "critical",
"note": "low",
"number": "medium",
"tracking_categories": "low",
"custom_fields": "medium",
"row_version": "edge-case",
"display_id": "low",
"updated_by": "edge-case",
"created_by": "edge-case",
"created_at": "medium",
"updated_at": "medium"
},
"required": [
"id",
"total_amount",
"transaction_date"
],
"x-apideck-strict-required": [
"total_amount",
"transaction_date",
"allocations"
],
"additionalProperties": false,
"properties": {
"id": {
"$ref": "#/components/schemas/Id"
},
"downstream_id": {
"$ref": "#/components/schemas/DownstreamId"
},
"currency": {
"$ref": "#/components/schemas/Currency"
},
"currency_rate": {
"$ref": "#/components/schemas/CurrencyRate"
},
"total_amount": {
"$ref": "#/components/schemas/TotalAmount"
},
"reference": {
"$ref": "#/components/schemas/TransactionReference"
},
"payment_method": {
"$ref": "#/components/schemas/PaymentMethod"
},
"payment_method_reference": {
"$ref": "#/components/schemas/PaymentMethodReference"
},
"payment_method_id": {
"$ref": "#/components/schemas/WritableId"
},
"account": {
"$ref": "#/components/schemas/LinkedLedgerAccount"
},
"transaction_date": {
"$ref": "#/components/schemas/TransactionDate"
},
"supplier": {
"$ref": "#/components/schemas/LinkedSupplier"
},
"company_id": {
"$ref": "#/components/schemas/AccountingCompanyId"
},
"reconciled": {
"$ref": "#/components/schemas/IsReconciled"
},
"status": {
"$ref": "#/components/schemas/PaymentStatus"
},
"type": {
"type": "string",
"title": "Bill payment Type",
"description": "Type of payment",
"x-apideck-enum-id": "bill-payments.type",
"enum": [
"accounts_payable_credit",
"accounts_payable_overpayment",
"accounts_payable_prepayment",
"accounts_payable"
],
"example": "accounts_payable"
},
"allocations": {
"type": "array",
"items": {
"type": "object",
"x-apideck-schema-id": "Allocation",
"x-apideck-weights": {
"id": "medium",
"type": "medium",
"code": "medium",
"amount": "medium",
"allocation_id": "medium"
},
"x-apideck-strict-any-of": [
{
"required": [
"id"
]
},
{
"required": [
"code"
]
}
],
"properties": {
"id": {
"$ref": "#/components/schemas/WritableId"
},
"type": {
"type": "string",
"title": "Allocation type",
"description": "Type of entity this payment should be attributed to.",
"example": "bill",
"x-apideck-enum-id": "bill-payments.allocations.type",
"enum": [
"bill",
"expense",
"credit_memo",
"over_payment",
"pre_payment",
"journal_entry",
"other"
]
},
"code": {
"type": "string",
"example": "N091",
"readOnly": true
},
"amount": {
"type": "number",
"title": "Amount",
"description": "Amount of payment that should be attributed to this allocation. If null, the total_amount will be used.",
"example": 49.99,
"nullable": true
},
"allocation_id": {
"type": "string",
"title": "Allocation ID",
"description": "Unique identifier of the allocation",
"example": "123456"
}
}
}
},
"note": {
"$ref": "#/components/schemas/TransactionNote"
},
"number": {
"$ref": "#/components/schemas/TransactionNumber"
},
"tracking_categories": {
"$ref": "#/components/schemas/LinkedTrackingCategories"
},
"custom_fields": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CustomField"
}
},
"row_version": {
"$ref": "#/components/schemas/RowVersion"
},
"display_id": {
"$ref": "#/components/schemas/DisplayId"
},
"custom_mappings": {
"$ref": "#/components/schemas/CustomMappings"
},
"updated_by": {
"$ref": "#/components/schemas/UpdatedBy"
},
"created_by": {
"$ref": "#/components/schemas/CreatedBy"
},
"created_at": {
"$ref": "#/components/schemas/CreatedAt"
},
"updated_at": {
"$ref": "#/components/schemas/UpdatedAt"
},
"pass_through": {
"$ref": "#/components/schemas/PassThroughBody"
}
}
}