Skip to main content
POST
/
v1
/
account_collections
/
{id}
/
cancel
Cancel an account collection
curl --request POST \
  --url https://api.yorlet.com/v1/account_collections/{id}/cancel \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "id": "<string>",
  "created": 123,
  "object": "account_collection",
  "account_collection_subscription": "<string>",
  "amount": 123,
  "approved_at": 123,
  "available_on": 123,
  "building": "<string>",
  "canceled_at": 123,
  "currency": "gbp",
  "description": "<string>",
  "destination": "<string>",
  "destination_owner_payment": "<string>",
  "destination_platform_fee_owner_payment": "<string>",
  "destination_type": "<string>",
  "documents": {
    "invoice_file": "<string>"
  },
  "expense_code": "<string>",
  "fee_code": "<string>",
  "fee_discount": 123,
  "number": "<string>",
  "owner": "<string>",
  "owner_balance_transaction": "<string>",
  "owner_payment": "<string>",
  "owner_payout": "<string>",
  "paid_at": 123,
  "period": {
    "end": 123,
    "start": 123
  },
  "references": {
    "invoice_number": "<string>",
    "po_number": "<string>"
  },
  "reporting_type": "<string>",
  "unit": "<string>",
  "workspace": "<string>",
  "account": "<string>",
  "deleted": false,
  "amount_refunded": 0,
  "auto_advance": true,
  "destination_platform_fee": 0,
  "metadata": {},
  "paid": false,
  "refunded": false,
  "subtotal": 0,
  "tax": 0,
  "tax_behavior": "exclusive",
  "tax_percent": 0,
  "tax_refunded": 0,
  "total": 0
}

Authorizations

Authorization
string
header
required

API Key authentication. Use "Bearer YOUR_API_KEY".

Path Parameters

id
string
required

The id identifier.

Body

application/json

The body is of type object.

Response

200 - application/json

Returns an account collection object if a valid identifier was provided.

id
string
required

Unique identifier for the object.

created
number
required

Time at which the object was created. Measured in seconds since the Unix epoch.

object
enum<string>
required
Available options:
account_collection
account_collection_subscription
required

The subscription that this account collection was generated from, if any.

amount
integer
required

The amount of the account collection, in the smallest currency unit.

approved_at
integer | null
required

The time at which the account collection was approved.

available_on
integer | null
required

The date the account collection becomes available for collection.

building
string | null
required

The ID of the building the account collection is for.

canceled_at
integer | null
required

The time at which the account collection was canceled.

currency
enum<string>
required

Three-letter ISO currency code, in lowercase. Must be a supported currency.

Available options:
gbp,
usd,
eur,
sek
Example:

"gbp"

description
string | null
required

An arbitrary string attached to the object. Often useful for displaying to users.

destination
required

The owner the collected funds are sent to.

destination_owner_payment
required

The owner payment created for the destination owner, if any.

destination_platform_fee_owner_payment
required

The owner payment that records the destination platform fee, if any.

destination_type
string | null
required

The type of destination the collected funds are sent to.

documents
object
required

Documents attached to the account collection.

expense_code
string | null
required

The expense code for the account collection.

fee_code
string | null
required

The fee code for the account collection.

fee_discount
number | null
required

The discount applied to the fee for this collection, as a percentage.

number
string | null
required

A unique, identifying string for the account collection.

owner
required

The owner the account collection is collected from.

owner_balance_transaction
required

The owner balance transaction that records the impact of this collection.

owner_payment
required

The owner payment that records the collection of these funds.

owner_payout
required

The owner payout this collection was settled against, if any.

paid_at
integer | null
required

The time at which the account collection was paid.

period
object
required

The period this account collection covers.

references
object
required

External references for this account collection.

reporting_type
string | null
required

The reporting type used to categorize this collection.

status
enum<string>
required

The current status of the account collection.

Available options:
pending,
applied,
paid,
canceled
type
enum<string>
required

The type of the account collection.

Available options:
expense,
fee,
service_charge,
non_resident_tax
unit
string | null
required

The ID of the unit the account collection is for.

workspace
string | null
required

The workspace the account collection belongs to.

account
string

The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.

deleted
boolean
default:false

Only returned if the object has been deleted.

amount_refunded
integer
default:0

The amount that has been refunded for this account collection.

auto_advance
boolean
default:true

Whether the account collection is automatically progressed through its lifecycle.

destination_platform_fee
number
default:0

The platform fee applied to the destination payment, in the smallest currency unit.

metadata
object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

paid
boolean
default:false

Whether the account collection has been paid.

refunded
boolean
default:false

Whether the account collection has been refunded.

subtotal
integer
default:0

The subtotal of the account collection before tax.

tax
integer
default:0

The amount of tax on the account collection.

tax_behavior
enum<string>
default:exclusive

How the tax is computed in relation to the amount.

Available options:
exclusive,
inclusive
tax_percent
number
default:0

The tax percentage applied to the account collection.

tax_refunded
integer
default:0

The amount of tax that has been refunded.

total
integer
default:0

The total of the account collection including tax.