Skip to main content
POST
/
v1
/
deposits
/
{id}
Update a deposit
curl --request POST \
  --url https://api.yorlet.com/v1/deposits/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 1,
  "assignee": "<string>",
  "description": "<string>",
  "handled_externally": true,
  "metadata": {},
  "scheme": {
    "certificate": "<string>",
    "registration_number": "<string>"
  }
}
'
{
  "id": "<string>",
  "created": 123,
  "object": "deposit",
  "amount": 123,
  "application": "<string>",
  "assignee": "<string>",
  "certificate": "<string>",
  "country": "<string>",
  "currency": "<string>",
  "customer": "<string>",
  "description": "<string>",
  "requirements": {
    "additional": [
      "<string>"
    ],
    "currently_due": [
      "<string>"
    ],
    "minimum": [
      "<string>"
    ]
  },
  "returned_at": 123,
  "scheme": {
    "certificate": "<string>",
    "registration_deadline": 123,
    "registration_number": "<string>"
  },
  "transferred_at": 123,
  "unit": "<string>",
  "account": "<string>",
  "deleted": false,
  "amount_refunded": 0,
  "handled_externally": false,
  "metadata": {},
  "returned": false,
  "transferred": false
}

Authorizations

Authorization
string
header
required

API Key authentication. Use "Bearer YOUR_API_KEY".

Path Parameters

id
string
required

The id identifier.

Body

application/json
amount
integer

The amount of the deposit.

Required range: x >= 0
assignee
string | null
description
string

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

handled_externally
boolean

Whether the deposit is handled externally or not. Usually this means the landlord or a third party has registered the deposit and will handle it.

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.

scheme
object

A hash containing details of the deposit scheme.

Response

200 - application/json

The updated deposit. Otherwise, this call throws an error.

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:
deposit
amount
number
required

The amount of the deposit, in the smallest currency unit.

application
required

The application the deposit is associated with.

assignee
string | null
required

The ID of the user the deposit is assigned to.

certificate
string | null
required

The certificate identifier for the deposit.

country
string | null
required

The ISO 3166-1 alpha-2 country code where the deposit is held.

currency
string
required

The three-letter ISO currency code of the deposit.

customer
required

The customer the deposit is associated with.

description
string | null
required

An arbitrary description attached to the deposit.

requirements
object
required

Requirements outstanding to complete the deposit.

returned_at
number | null
required

The time at which the deposit was returned to the customer.

scheme
object
required

Details of the deposit scheme the deposit is registered with.

status
enum<string> | null
required

The status of the deposit.

Available options:
pending,
active,
disputed,
pending_return,
returned,
null
transferred_at
number | null
required

The time at which the deposit was transferred to the owner.

unit
string
required

The ID of the unit the deposit is associated with.

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
number
default:0

The amount of the deposit, in the smallest currency unit, that has been refunded to the customer.

handled_externally
boolean
default:false

Whether the deposit is handled externally (e.g. by the landlord or a third party).

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.

returned
boolean
default:false

Whether the deposit has been returned to the customer.

transferred
boolean
default:false

Whether the deposit has been transferred to the owner.