Introduction
Welcome to the Yorlet API Reference. The API is designed to use standard HTTP protocols and return JSON payloads in response to HTTP requests, and are internally implemented based on the RESTful principles.
Welcome to the Yorlet API Reference. The API is designed to use standard HTTP protocols and return JSON payloads in response to HTTP requests, and are internally implemented based on the RESTful principles.
Our API and Dashboard are available in two environments:
Name | API URL | Dashboard URL |
---|---|---|
Sandbox | https://api.yorlet.io | https://dashboard.yorlet.io |
Production | https://api.yorlet.com | https://dashboard.yorlet.com |
Authenticated request
curl https://api.yorlet.com/v1/applications \
-H "Authorization: Bearer {API_KEY}" \
To use the API you must authenticate a request using your API key. You can find the key in the Dashboard. There are two API keys in the dashboard: Publishable and Secret. You can find out more about the differences here.
The API key should be included in all API requests to the server in a header that looks like the following:
Authorization: Bearer {API_KEY}
The error object
{
"error": {
"message": "The supplied customer was not found.",
"param": "customer",
"type": "invalid_request"
},
"status": 404
}
Yorlet uses conventional HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx
range indicate success. Codes in the 4xx
range indicate an error that failed given the information provided. Codes in the 5xx
range indicate an error with Yorlet's servers.
Error code | Meaning |
---|---|
400 Bad Request |
The request was unacceptable, often due to missing a required parameter. |
401 Unauthorized |
No valid API key was provided. |
403 Forbidden |
The API key doesn't have permissions to perform the request. |
404 Not Found |
The requested resource doesn't exist. |
429 Too Many Requests |
Too many requests hit the API too quickly. |
5XX Server Error |
We had a problem with our server. Try again later. |
Application with expanded unit
curl https://api.yorlet.com/v1/applications/app_ki8ufmnsFtvwQmmL \
-H "Authorization: Bearer {access_token}" \
-d "expand[]"=unit \
-G
Many objects contain the ID of a related object in their response properties. For example, an Application may have an associated Unit ID. Those objects can be expanded inline with the expand request parameter. Objects that can be expanded are noted in this documentation. This parameter is available on all API requests, and applies to the response of that request only.
You can expand multiple objects at once by identifying multiple items in the expand array.
Endpoints
POST /v1/applications
Application objects allow you to create new leases, accept move-in payments and set up contracts. The API allows you to create, delete, and update your applications. You can retrieve individual applications as well as a list of all your applications.
The application object
{
"id": "app_test",
"object": "application",
"created": 1627210800,
"account_collection_data": null,
"applicant_requests": null,
"auto_apply_unit_fees": false,
"break_clause": {
"notification_date": null,
"terms": null
},
"building": null,
"building_snapshot": {},
"cancel_reason": null,
"cancel_reason_description": null,
"contract": null,
"checkin_time": null,
"checkout_time": null,
"completed_at": null,
"contract_address": null,
"contract_legal_entity": null,
"contract_template": null,
"create_contract_on_accept": false,
"currency": "gbp",
"customer_emails": [],
"customers": [],
"date_end": null,
"date_start": null,
"deposit": {},
"description": null,
"end_behavior": null,
"enquiry": null,
"has_owner": false,
"holding_fee_required": false,
"metadata": {},
"move_in_date": null,
"move_out_date": null,
"open": false,
"owner_signature_required": false,
"post_application_payment_session": null,
"renewal_intent": null,
"rent_term": null,
"send_owner_contract": false,
"subscription_data": null,
"status": null,
"tenancy_created": false,
"tenancy_timestamp": null,
"type": "standard",
"unit": null,
"unit_snapshot": {
"epc_file": null,
"name": null
}
}
application
.complete
or roll
.POST /v1/applications
curl https://api.yorlet.com/v1/applications \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]"
}'
Example Response
{
"id": "cus_test",
"object": "customer",
"created": 1627210800,
"archived": false,
"default_payment_method": null,
"delinquent": false,
"description": null,
"email": "[email protected]",
"invoice_prefix": null,
"metadata": {},
"invoicing": {
"arrears_emails": true,
"email_to": null,
"email_cc": []
},
"next_invoice_sequence": 1,
"legal_completed": false,
"legal": {},
"name": "Jane Doe",
"resident": false
}
Creates a new application.
canopy
.null
the tenancy will roll periodically.charge_automatically
or send_invoice
.month
, week
, custom
or upfront
.rent
, charge
or product
.20
.create_prorations
or none
.20
.automatic
, owner
or none
.owner
.type=rent
you must provide a unit IDcollection_method=send_invoice
.complete
price_data
.rent
, charge
or product
.20
.create_prorations
or none
.20
.automatic
, owner
or none
.owner
.type=rent
you must provide a unit IDinterval=custom
.price_data
.rent
, charge
or product
.20
.create_prorations
or none
.20
.automatic
, owner
or none
.owner
.type=rent
you must provide a unit IDscheduled
standard
, active_tenancy
, renewal
or let_only
.true
to attempt to accept this application immediately. The parameter defaults to false
and is only allowed when type=active_tenancy
.automatic
or manual
.dps
, mydeposits
or tds
.custodial
or insured
.complete
will ensure that the tenancy is marked as complete, roll
will ensure that the tenancy starts to roll periodically. Only allowed if end_date
is set.alan_boswell
.charge
. Can be advance_rent
, charge
, deposit
, holding_fee
or rent
.Returns the customer object if the request succeeded.
Endpoints
POST /v1/buildings
GET /v1/buildings/:id
POST /v1/buildings/:id
DELETE /v1/buildings/:id
GET /v1/buildings
Building objects are a core resource and allow you to create units. The API allows you to create, delete, and update your buildings. You can retrieve individual buildings as well as a list of all your buildings.
The building object
{
"id": "build_test",
"object": "building",
"created": 1627210800,
"accounting_code": null,
"currency": "gbp",
"description": null,
"metadata": {},
"name": null,
"single_unit": false,
"type": null,
"unit_fees": {
"management_fee": null,
"management_fee_amount": null,
"management_fee_type": "percentage",
"renewal_fee": null,
"tax": null,
"tax_behavior": "exclusive",
"tenant_find_fee": null
}
}
building
.block_management
, commercial
, residential
or student
.percentage
or fixed
.exclusive
or inclusive
. Can be exclusive
or inclusive
.POST /v1/buildings
curl https://api.yorlet.com/v1/buildings \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "build_test",
"object": "building",
"created": 1627210800,
"accounting_code": null,
"currency": "gbp",
"description": null,
"metadata": {},
"name": null,
"single_unit": false,
"type": null,
"unit_fees": {
"management_fee": null,
"management_fee_amount": null,
"management_fee_type": "percentage",
"renewal_fee": null,
"tax": null,
"tax_behavior": "exclusive",
"tenant_find_fee": null
}
}
Creates a new building.
eur
, gbp
, sek
or usd
.block_management
, commercial
, residential
or student
.percentage
or fixed
.inclusive
or exclusive
.Returns the building object if the request succeeded.
GET /v1/buildings/:id
curl https://api.yorlet.com/v1/buildings/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "build_test",
"object": "building",
"created": 1627210800,
"accounting_code": null,
"currency": "gbp",
"description": null,
"metadata": {},
"name": null,
"single_unit": false,
"type": null,
"unit_fees": {
"management_fee": null,
"management_fee_amount": null,
"management_fee_type": "percentage",
"renewal_fee": null,
"tax": null,
"tax_behavior": "exclusive",
"tenant_find_fee": null
}
}
Retrieves the building with the given ID.
Returns a building object if a valid identifier was provided.
POST /v1/buildings/:id
curl https://api.yorlet.com/v1/buildings/:id \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "build_test",
"object": "building",
"created": 1627210800,
"accounting_code": null,
"currency": "gbp",
"description": null,
"metadata": {},
"name": null,
"single_unit": false,
"type": null,
"unit_fees": {
"management_fee": null,
"management_fee_amount": null,
"management_fee_type": "percentage",
"renewal_fee": null,
"tax": null,
"tax_behavior": "exclusive",
"tenant_find_fee": null
}
}
Updates the specified building by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
block_management
, commercial
, residential
or student
.percentage
or fixed
.inclusive
or exclusive
.Returns the building object if the update succeeded.
DELETE /v1/buildings/:id
curl https://api.yorlet.com/v1/buildings/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "build_test",
"object": "building",
"deleted": true
}
Permanently deletes a buidling. This cannot be undone.
Returns an object with a deleted parameter on success. If the building ID does not exist, this call throws an error.
GET /v1/buildings
curl https://api.yorlet.com/v1/buildings \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"object": "list",
"data": [
{
"id": "build_test",
"object": "building",
"created": 1627210800,
"accounting_code": null,
"currency": "gbp",
"description": null,
"metadata": {},
"name": null,
"single_unit": false,
"type": null,
"unit_fees": {
"management_fee": null,
"management_fee_amount": null,
"management_fee_type": "percentage",
"renewal_fee": null,
"tax": null,
"tax_behavior": "exclusive",
"tenant_find_fee": null
}
}
],
"count": 1,
"has_more": false
}
Returns a list of buildings. The buildings are returned sorted by creation date, with the most recent buildings appearing first.
A object with a data property that contains an array of buildings.
Endpoints
POST /v1/customers
GET /v1/customers/:id
POST /v1/customers/:id
DELETE /v1/customers/:id
GET /v1/customers
Customer objects allow you to create applications, accept payments and manage subscriptions. The API allows you to create, delete, and update your customers. You can retrieve individual customers as well as a list of all your customers.
The customer object
{
"id": "cus_test",
"object": "customer",
"created": 1627210800,
"archived": false,
"default_payment_method": null,
"delinquent": false,
"description": null,
"email": "[email protected]",
"invoice_prefix": null,
"metadata": {},
"invoicing": {
"arrears_emails": true,
"email_to": null,
"email_cc": []
},
"next_invoice_sequence": 1,
"legal_completed": false,
"legal": {},
"name": "Jane Doe",
"resident": false
}
customer
.POST /v1/customers
curl https://api.yorlet.com/v1/customers \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]"
}'
Example Response
{
"id": "cus_test",
"object": "customer",
"created": 1627210800,
"archived": false,
"default_payment_method": null,
"delinquent": false,
"description": null,
"email": "[email protected]",
"invoice_prefix": null,
"metadata": {},
"invoicing": {
"arrears_emails": true,
"email_to": null,
"email_cc": []
},
"next_invoice_sequence": 1,
"legal_completed": false,
"legal": {},
"name": "Jane Doe",
"resident": false
}
Creates a new customer.
Returns the customer object if the request succeeded.
GET /v1/customers/:id
curl https://api.yorlet.com/v1/customers/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "cus_test",
"object": "customer",
"created": 1627210800,
"archived": false,
"default_payment_method": null,
"delinquent": false,
"description": null,
"email": "[email protected]",
"invoice_prefix": null,
"metadata": {},
"invoicing": {
"arrears_emails": true,
"email_to": null,
"email_cc": []
},
"next_invoice_sequence": 1,
"legal_completed": false,
"legal": {},
"name": "Jane Doe",
"resident": false
}
Retrieves the customer with the given ID.
Returns a customer object if a valid identifier was provided.
POST /v1/customers/:id
curl https://api.yorlet.com/v1/customers/:id \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "cus_test",
"object": "customer",
"created": 1627210800,
"archived": false,
"default_payment_method": null,
"delinquent": false,
"description": null,
"email": "[email protected]",
"invoice_prefix": null,
"metadata": {},
"invoicing": {
"arrears_emails": true,
"email_to": null,
"email_cc": []
},
"next_invoice_sequence": 1,
"legal_completed": false,
"legal": {},
"name": "Jane Doe",
"resident": false
}
Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Returns the customer object if the update succeeded.
DELETE /v1/customers/:id
curl https://api.yorlet.com/v1/customers/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "cus_test",
"object": "customer",
"deleted": true
}
Permanently deletes a customer. This cannot be undone.
Returns an object with a deleted parameter on success. If the customer ID does not exist, this call throws an error.
GET /v1/customers
curl https://api.yorlet.com/v1/customers \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"object": "list",
"data": [
{
"id": "cus_test",
"object": "customer",
"created": 1627210800,
"archived": false,
"default_payment_method": null,
"delinquent": false,
"description": null,
"email": "[email protected]",
"invoice_prefix": null,
"metadata": {},
"invoicing": {
"arrears_emails": true,
"email_to": null,
"email_cc": []
},
"next_invoice_sequence": 1,
"legal_completed": false,
"legal": {},
"name": "Jane Doe",
"resident": false
}
],
"count": 1,
"has_more": false
}
Returns a list of customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
A object with a data property that contains an array of customers.
Endpoints
POST /v1/enquiries/
The enquiry object
{
"id": "enq_test",
"object": "enquiry",
"created": 1627210800,
"assignee": null,
"building": null,
"customer": null,
"declined_reason": 0,
"declined_reason_description": null,
"description": null,
"email": null,
"follow_up": null,
"metadata": {},
"name": null,
"phone": null,
"referral": {},
"requirements": {
"bedrooms": null,
"budget_min": null,
"budget_max": null,
"move_in": null,
"length_of_stay": null,
"right_to_rent": null,
"type": null
},
"selected_unit": null,
"source": null,
"status_transitions": {
"application_completed_at": null,
"application_created_at": null,
"declined_at": null,
"first_response_at": null,
"viewing_created_at": null
},
"type": "lead"
}
enquiry
.POST /v1/enquiries/
curl https://api.yorlet.com/v1/enquiries/ \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "enq_test",
"object": "enquiry",
"created": 1627210800,
"assignee": null,
"building": null,
"customer": null,
"declined_reason": 0,
"declined_reason_description": null,
"description": null,
"email": null,
"follow_up": null,
"metadata": {},
"name": null,
"phone": null,
"referral": {},
"requirements": {
"bedrooms": null,
"budget_min": null,
"budget_max": null,
"move_in": null,
"length_of_stay": null,
"right_to_rent": null,
"type": null
},
"selected_unit": null,
"source": null,
"status_transitions": {
"application_completed_at": null,
"application_created_at": null,
"declined_at": null,
"first_response_at": null,
"viewing_created_at": null
},
"type": "lead"
}
Creates a new enquiry.
asap
, january
, february
, march
, april
, may
, june
, july
, august
, september
, october
, november
or december
.not_provided
, provided
or certified
.commercial
, residential
or student
.Returns a enquiry object.
Endpoints
GET /v1/events/:id
GET /v1/events
Events let you know when something happens in your account.
The event object
{
"id": "evt_test",
"object": "event",
"created": 1627210800,
"account": null,
"data": {},
"request": {},
"type": null
}
event
.GET /v1/events/:id
curl https://api.yorlet.com/v1/events/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "evt_test",
"object": "event",
"created": 1627210800,
"account": null,
"data": {},
"request": {},
"type": null
}
Retrieves the details of the event that has previously been created. Supply the unique event ID.
Returns an event if a valid identifier was provided, and returns an error otherwise.
GET /v1/events
curl https://api.yorlet.com/v1/events \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"object": "list",
"data": [
{
"id": "evt_test",
"object": "event",
"created": 1627210800,
"account": null,
"data": {},
"request": {},
"type": null
}
],
"count": 1,
"has_more": false
}
Returns a list of events previously created. The events are returned in sorted order, with the most recent events appearing first.
Returns a list of events if a valid identifier was provided, and returns an error otherwise.
This is a list of all the types of events we currently send. We may add more at any time, so your code should handle unexpected event types.
Endpoints
POST /v1/references
GET /v1/references/:id
POST /v1/references/:id
GET /v1/references
The reference object
{
"id": "ref_test",
"object": "reference",
"created": 1627210800,
"application": null,
"automatic_reference": {
"enabled": false,
"last_error": null,
"outcome": null,
"provider": null,
"status": null
},
"completed_at": null,
"customer": null,
"description": null,
"metadata": {},
"outcome": null,
"reference_pdf": null,
"status": "pending",
"type": "customer"
}
reference
.instant
or full
.canopy
.accept
, consider
or high_risk
.pending
, processing
or complete
.customer
.POST /v1/references
curl https://api.yorlet.com/v1/references \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"customer": "{CUSTOMER_ID}",
"type": "customer"
}'
Example Response
{
"id": "ref_test",
"object": "reference",
"created": 1627210800,
"application": null,
"automatic_reference": {
"enabled": false,
"last_error": null,
"outcome": null,
"provider": null,
"status": null
},
"completed_at": null,
"customer": null,
"description": null,
"metadata": {},
"outcome": null,
"reference_pdf": null,
"status": "pending",
"type": "customer"
}
Creates a new reference.
customer
.canopy
, homelet
or let_alliance
.full
, instant
, pre_qualification
or priority
.renter_screening
or guarantor_screening
.Returns the Reference object if the request succeeded.
GET /v1/references/:id
curl https://api.yorlet.com/v1/references/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "ref_test",
"object": "reference",
"created": 1627210800,
"application": null,
"automatic_reference": {
"enabled": false,
"last_error": null,
"outcome": null,
"provider": null,
"status": null
},
"completed_at": null,
"customer": null,
"description": null,
"metadata": {},
"outcome": null,
"reference_pdf": null,
"status": "pending",
"type": "customer"
}
Retrieves the reference with the given ID.
A Reference object if a valid identifier was provided.
POST /v1/references/:id
curl https://api.yorlet.com/v1/references/:id \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "ref_test",
"object": "reference",
"created": 1627210800,
"application": null,
"automatic_reference": {
"enabled": false,
"last_error": null,
"outcome": null,
"provider": null,
"status": null
},
"completed_at": null,
"customer": null,
"description": null,
"metadata": {},
"outcome": null,
"reference_pdf": null,
"status": "pending",
"type": "customer"
}
Updates the reference with the given ID.
accept
, consider
or high_risk
.The updated reference. Otherwise, this call throws an error.
GET /v1/references
curl https://api.yorlet.com/v1/references \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"object": "list",
"data": [
{
"id": "ref_test",
"object": "reference",
"created": 1627210800,
"application": null,
"automatic_reference": {
"enabled": false,
"last_error": null,
"outcome": null,
"provider": null,
"status": null
},
"completed_at": null,
"customer": null,
"description": null,
"metadata": {},
"outcome": null,
"reference_pdf": null,
"status": "pending",
"type": "customer"
}
],
"count": 1,
"has_more": false
}
A list of references. The references are returned sorted by creation date, with the most recent references appearing first.
A object with a data property that contains an array of references.
Endpoints
POST /v1/renewal_intents
GET /v1/renewal_intents/:id
POST /v1/renewal_intents/:id
POST /v1/renewal_intents/:id/cancel
POST /v1/renewal_intents/:id/complete
GET /v1/renewal_intents
A Renewal Intent describes the stage of a potential renewal all the way to completing a renewal application or the customer leaving the tenancy.
The renewal intent object
{
"id": "ri_test",
"object": "renewal_intent",
"created": 1627210800,
"application": null,
"canceled_at": null,
"completed_at": null,
"source_application": "app_test",
"status": "pending",
"type": null,
"unit": null
}
renewal_intent
.affordability
, circumstance_change
, relocating
, unit_issue
or other
.pending
, renewing
, leaving
or complete
.null
until the type
is set. Can be null
, renewal
or no_renewal
.POST /v1/renewal_intents
curl https://api.yorlet.com/v1/renewal_intents \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "ri_test",
"object": "renewal_intent",
"created": 1627210800,
"application": null,
"canceled_at": null,
"completed_at": null,
"source_application": "app_test",
"status": "pending",
"type": null,
"unit": null
}
Creates a new renewal intent.
affordability
, circumstance_change
, relocating
, unit_issue
or other
.renewal
or no_renewal
.Returns the x object if the request succeeded.
GET /v1/renewal_intents/:id
curl https://api.yorlet.com/v1/renewal_intents/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "ri_test",
"object": "renewal_intent",
"created": 1627210800,
"application": null,
"canceled_at": null,
"completed_at": null,
"source_application": "app_test",
"status": "pending",
"type": null,
"unit": null
}
Retrieves the renewal intent with the given ID.
Returns a renewal intent object if a valid identifier was provided.
POST /v1/renewal_intents/:id
curl https://api.yorlet.com/v1/renewal_intents/:id \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "ri_test",
"object": "renewal_intent",
"created": 1627210800,
"application": null,
"canceled_at": null,
"completed_at": null,
"source_application": "app_test",
"status": "pending",
"type": null,
"unit": null
}
Updates the specified renewal intent by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
affordability
, circumstance_change
, relocating
, unit_issue
or other
.renewal
or no_renewal
.Returns the renewal intent object if the update succeeded.
POST /v1/renewal_intents/:id/cancel
curl https://api.yorlet.com/v1/renewal_intents/:id/cancel \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "ri_test",
"object": "renewal_intent",
"created": 1627210800,
"application": null,
"canceled_at": null,
"completed_at": null,
"source_application": "app_test",
"status": "pending",
"type": null,
"unit": null
}
Permanently cancel a renewal intent. This cannot be undone.
Returns a canceled object on success. If the renewal intent ID does not exist, this call throws an error.
POST /v1/renewal_intents/:id/complete
curl https://api.yorlet.com/v1/renewal_intents/:id/complete \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "ri_test",
"object": "renewal_intent",
"created": 1627210800,
"application": null,
"canceled_at": null,
"completed_at": null,
"source_application": "app_test",
"status": "pending",
"type": null,
"unit": null
}
Permanently complete a renewal intent. This cannot be undone.
Returns a completed object on success. If the renewal intent ID does not exist, this call throws an error.
GET /v1/renewal_intents
curl https://api.yorlet.com/v1/renewal_intents \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"object": "list",
"data": [
{
"id": "ri_test",
"object": "renewal_intent",
"created": 1627210800,
"application": null,
"canceled_at": null,
"completed_at": null,
"source_application": "app_test",
"status": "pending",
"type": null,
"unit": null
}
],
"count": 1,
"has_more": false
}
Returns a list of renewal intents. The renewal intents are returned sorted by creation date, with the most recent renewal intent appearing first.
A object with a data property that contains an array of renewal intents.
Endpoints
POST /v1/units
GET /v1/units/:id
POST /v1/units/:id
DELETE /v1/units/:id
GET /v1/units
Unit objects are a core resource. The API allows you to create, delete, and update your units. You can retrieve individual units as well as a list of all your units.
The unit object
{
"id": "unit_test",
"object": "unit",
"created": 1627210800,
"active_tenancy": null,
"active_tenancy_end": null,
"archived": false,
"archived_at": null,
"available_from": null,
"bathrooms": null,
"bedrooms": null,
"building": "build_test",
"completion_date": null,
"compliance": {
"electric_safety_expires_at": null,
"electric_safety": null,
"epc_expires_at": null,
"epc": null,
"gas_safety_expires_at": null,
"gas_safety": null,
"gas_safety_required": true
},
"currency": "gbp",
"currency_options": null,
"default_deposit": null,
"default_price": 150000,
"description": null,
"features": {},
"fees": {
"management_fee_discount": null,
"management_fee_type": "percentage",
"tax_behavior": "exclusive",
"updated_at": null
},
"floor": null,
"furnished": false,
"has_owner": false,
"maintenance_threshold": null,
"management_type": null,
"metadata": {},
"name": "Apartment 101",
"offline_reason": null,
"owner_ids": [],
"plot_number": null,
"reference": null,
"rent": {
"default": 150000,
"maximum": null,
"minimum": null
},
"sales": {
"last_purchase_price": null
},
"square_foot": null,
"under_offer": false
}
unit
.percentage
or fixed
.exclusive
or inclusive
.fully_managed
or let_only
.active
, occupied
, offline
, maintenance
or unmanaged
.POST /v1/units
curl https://api.yorlet.com/v1/units \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "unit_test",
"object": "unit",
"created": 1627210800,
"active_tenancy": null,
"active_tenancy_end": null,
"archived": false,
"archived_at": null,
"available_from": null,
"bathrooms": null,
"bedrooms": null,
"building": "build_test",
"completion_date": null,
"compliance": {
"electric_safety_expires_at": null,
"electric_safety": null,
"epc_expires_at": null,
"epc": null,
"gas_safety_expires_at": null,
"gas_safety": null,
"gas_safety_required": true
},
"currency": "gbp",
"currency_options": null,
"default_deposit": null,
"default_price": 150000,
"description": null,
"features": {},
"fees": {
"management_fee_discount": null,
"management_fee_type": "percentage",
"tax_behavior": "exclusive",
"updated_at": null
},
"floor": null,
"furnished": false,
"has_owner": false,
"maintenance_threshold": null,
"management_type": null,
"metadata": {},
"name": "Apartment 101",
"offline_reason": null,
"owner_ids": [],
"plot_number": null,
"reference": null,
"rent": {
"default": 150000,
"maximum": null,
"minimum": null
},
"sales": {
"last_purchase_price": null
},
"square_foot": null,
"under_offer": false
}
Creates a unit.
eur
, gbp
, sek
or usd
.eur
, gbp
, sek
or usd
.block_management
, commercial
, residential
or student
.percentage
or fixed
.inclusive
or exclusive
.n
, s
, e
, w
, ne
, nw
, se
, sw
or corner
.percentage
or fixed
.inclusive
or exclusive
.fully_managed
, let_only
or rent_collection
.contacted
, no_details
, not_likely
, not_responding
, ready_to_sign
or undecided
.available
, offline
, maintenance
or unmanaged
.Returns the unit object if the request succeeded.
GET /v1/units/:id
curl https://api.yorlet.com/v1/units/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "unit_test",
"object": "unit",
"created": 1627210800,
"active_tenancy": null,
"active_tenancy_end": null,
"archived": false,
"archived_at": null,
"available_from": null,
"bathrooms": null,
"bedrooms": null,
"building": "build_test",
"completion_date": null,
"compliance": {
"electric_safety_expires_at": null,
"electric_safety": null,
"epc_expires_at": null,
"epc": null,
"gas_safety_expires_at": null,
"gas_safety": null,
"gas_safety_required": true
},
"currency": "gbp",
"currency_options": null,
"default_deposit": null,
"default_price": 150000,
"description": null,
"features": {},
"fees": {
"management_fee_discount": null,
"management_fee_type": "percentage",
"tax_behavior": "exclusive",
"updated_at": null
},
"floor": null,
"furnished": false,
"has_owner": false,
"maintenance_threshold": null,
"management_type": null,
"metadata": {},
"name": "Apartment 101",
"offline_reason": null,
"owner_ids": [],
"plot_number": null,
"reference": null,
"rent": {
"default": 150000,
"maximum": null,
"minimum": null
},
"sales": {
"last_purchase_price": null
},
"square_foot": null,
"under_offer": false
}
Retrieves the unit with the given ID.
Returns a unit object if a valid identifier was provided.
POST /v1/units/:id
curl https://api.yorlet.com/v1/units/:id \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "unit_test",
"object": "unit",
"created": 1627210800,
"active_tenancy": null,
"active_tenancy_end": null,
"archived": false,
"archived_at": null,
"available_from": null,
"bathrooms": null,
"bedrooms": null,
"building": "build_test",
"completion_date": null,
"compliance": {
"electric_safety_expires_at": null,
"electric_safety": null,
"epc_expires_at": null,
"epc": null,
"gas_safety_expires_at": null,
"gas_safety": null,
"gas_safety_required": true
},
"currency": "gbp",
"currency_options": null,
"default_deposit": null,
"default_price": 150000,
"description": null,
"features": {},
"fees": {
"management_fee_discount": null,
"management_fee_type": "percentage",
"tax_behavior": "exclusive",
"updated_at": null
},
"floor": null,
"furnished": false,
"has_owner": false,
"maintenance_threshold": null,
"management_type": null,
"metadata": {},
"name": "Apartment 101",
"offline_reason": null,
"owner_ids": [],
"plot_number": null,
"reference": null,
"rent": {
"default": 150000,
"maximum": null,
"minimum": null
},
"sales": {
"last_purchase_price": null
},
"square_foot": null,
"under_offer": false
}
Updates the specified unit by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
n
, s
, e
, w
, ne
, nw
, se
, sw
or corner
.percentage
or fixed
.inclusive
or exclusive
.fully_managed
, let_only
or rent_collection
.contacted
, no_details
, not_likely
, not_responding
, ready_to_sign
or undecided
.available
, offline
, maintenance
or unmanaged
.Returns the unit object if the update succeeded.
DELETE /v1/units/:id
curl https://api.yorlet.com/v1/units/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "unit_test",
"object": "unit",
"deleted": true
}
Permanently deletes a unit. This cannot be undone.
Returns an object with a deleted parameter on success. If the unit ID does not exist, this call throws an error.
GET /v1/units
curl https://api.yorlet.com/v1/units \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"object": "list",
"data": [
{
"id": "unit_test",
"object": "unit",
"created": 1627210800,
"active_tenancy": null,
"active_tenancy_end": null,
"archived": false,
"archived_at": null,
"available_from": null,
"bathrooms": null,
"bedrooms": null,
"building": "build_test",
"completion_date": null,
"compliance": {
"electric_safety_expires_at": null,
"electric_safety": null,
"epc_expires_at": null,
"epc": null,
"gas_safety_expires_at": null,
"gas_safety": null,
"gas_safety_required": true
},
"currency": "gbp",
"currency_options": null,
"default_deposit": null,
"default_price": 150000,
"description": null,
"features": {},
"fees": {
"management_fee_discount": null,
"management_fee_type": "percentage",
"tax_behavior": "exclusive",
"updated_at": null
},
"floor": null,
"furnished": false,
"has_owner": false,
"maintenance_threshold": null,
"management_type": null,
"metadata": {},
"name": "Apartment 101",
"offline_reason": null,
"owner_ids": [],
"plot_number": null,
"reference": null,
"rent": {
"default": 150000,
"maximum": null,
"minimum": null
},
"sales": {
"last_purchase_price": null
},
"square_foot": null,
"under_offer": false
}
],
"count": 1,
"has_more": false
}
Returns a list of units. The units are returned sorted by creation date, with the most recent units appearing first.
A object with a data property that contains an array of units.
Endpoints
GET /v1/balance
GET /v1/balance/owners
The balance object
{
"object": "balance",
"available": [
{
"amount": 19592,
"currency": "gbp"
}
],
"in_transit": [
{
"amount": 0,
"currency": "gbp"
}
],
"pending": [
{
"amount": -19592,
"currency": "gbp"
}
],
"treasury": {
"available": [
{
"amount": 5140000,
"currency": "gbp"
}
],
"in_transit": [
{
"amount": 0,
"currency": "gbp"
}
],
"pending": [
{
"amount": 0,
"currency": "gbp"
}
]
}
}
balance
.GET /v1/balance
curl https://api.yorlet.com/v1/balance \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"object": "balance",
"available": [
{
"amount": 19592,
"currency": "gbp"
}
],
"in_transit": [
{
"amount": 0,
"currency": "gbp"
}
],
"pending": [
{
"amount": -19592,
"currency": "gbp"
}
],
"treasury": {
"available": [
{
"amount": 5140000,
"currency": "gbp"
}
],
"in_transit": [
{
"amount": 0,
"currency": "gbp"
}
],
"pending": [
{
"amount": 0,
"currency": "gbp"
}
]
}
}
Returns balance object.
GET /v1/balance/owners
curl https://api.yorlet.com/v1/balance/owners \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"object": "balance",
"available": [
{
"amount": 19592,
"currency": "gbp"
}
],
"in_transit": [
{
"amount": 0,
"currency": "gbp"
}
],
"pending": [
{
"amount": -19592,
"currency": "gbp"
}
],
"treasury": {
"available": [
{
"amount": 5140000,
"currency": "gbp"
}
],
"in_transit": [
{
"amount": 0,
"currency": "gbp"
}
],
"pending": [
{
"amount": 0,
"currency": "gbp"
}
]
}
}
Returns owner balance object.
Endpoints
GET /v1/balance_transactions
The balance transaction object
{
"id": "btxn_test",
"object": "balance_transaction",
"created": 1627210800,
"amount": 10000,
"available_on": null,
"fee": 1000,
"fee_details": [],
"net": 9000,
"payout": null,
"source_object": null,
"source": null,
"status": null,
"type": "payment"
}
balance_transaction
.GET /v1/balance_transactions
curl https://api.yorlet.com/v1/balance_transactions \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"object": "list",
"data": [
{
"id": "btxn_test",
"object": "balance_transaction",
"created": 1627210800,
"amount": 10000,
"available_on": null,
"fee": 1000,
"fee_details": [],
"net": 9000,
"payout": null,
"source_object": null,
"source": null,
"status": null,
"type": "payment"
}
],
"count": 1,
"has_more": false
}
List
Endpoints
POST /v1/payment_initiations
GET /v1/payment_initiations/:id
POST /v1/payment_initiations/:id/tokens
GET /v1/payment_initiations
Payment Initiations allow you to initiate a payment from a bank account with Open Banking. Yorlet supports Payment Initiation using Plaid.
The payment initiation object
{
"id": "py_init_test",
"object": "payment_initiation",
"created": 1627210800,
"amount": 40000,
"currency": "gbp",
"customer": "cus_l34bx7zoNY2w1tv8",
"external_account": null,
"failure_code": null,
"failure_message": null,
"invoice": null,
"payment_method": "pm_l34dl7phkOVU7wcI",
"reconciliation": null,
"reference": "REF001",
"status": "requires_action",
"type": "customer_payment"
}
payment_initiation
.application
or invoice
.holding_fee
, deposit
or advance_rent
.requires_action
, processing
, succeeded
, failed
or unknown
.account_payment
or customer_payment
.The payment initiation object
{
"object": "payment_initiation_token",
"token": "link-33792986-2b9c-4b80-b1f2-518caaac6183",
"type": "plaid"
}
payment_initiation_token
.plaid
.POST /v1/payment_initiations
curl https://api.yorlet.com/v1/payment_initiations \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "py_init_test",
"object": "payment_initiation",
"created": 1627210800,
"amount": 40000,
"currency": "gbp",
"customer": "cus_l34bx7zoNY2w1tv8",
"external_account": null,
"failure_code": null,
"failure_message": null,
"invoice": null,
"payment_method": "pm_l34dl7phkOVU7wcI",
"reconciliation": null,
"reference": "REF001",
"status": "requires_action",
"type": "customer_payment"
}
Create a payment initiation request. Yorlet supports two types of payment initiation: type=inbound_payment
initiates a payment from a bank account to your account’s bank account, and type=outbound_payment
initiates a payment from your bank account to the supplied customer’s bank transfer payment method.
inbound_payment
or outbound_payment
.funding_instruction
.funding_instruction_payment
type.outbound_payment
type.owner_payout
.owner_payout
type.Returns the payment initiation object if the request succeeded.
GET /v1/payment_initiations/:id
curl https://api.yorlet.com/v1/payment_initiations/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"object": "payment_initiation_token",
"token": "link-33792986-2b9c-4b80-b1f2-518caaac6183",
"type": "plaid"
}
Retrieves a Payment Initiation.
The single-use token object is returned upon success. Otherwise, this call returns an error.
POST /v1/payment_initiations/:id/tokens
curl https://api.yorlet.com/v1/payment_initiations/:id/tokens \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"object": "payment_initiation_token",
"token": "link-33792986-2b9c-4b80-b1f2-518caaac6183",
"type": "plaid"
}
Creates a single-use token that can be used to initiate a payment. Yorlet supports Payment Initiation using Plaid, you will need to launch the Payment Initiation flow in Plaid Link with the token returned by this endpoint.
The single-use token object is returned upon success. Otherwise, this call returns an error.
GET /v1/payment_initiations
curl https://api.yorlet.com/v1/payment_initiations \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"object": "list",
"data": [
{
"id": "py_init_test",
"object": "payment_initiation",
"created": 1627210800,
"amount": 40000,
"currency": "gbp",
"customer": "cus_l34bx7zoNY2w1tv8",
"external_account": null,
"failure_code": null,
"failure_message": null,
"invoice": null,
"payment_method": "pm_l34dl7phkOVU7wcI",
"reconciliation": null,
"reference": "REF001",
"status": "requires_action",
"type": "customer_payment"
}
],
"count": 1,
"has_more": false
}
Returns a list of your payment initiations. The payment initiations are returned sorted by creation date, with the most recently created payment initiations appearing first.
A object with a data property that contains an array of payment initiations.
Endpoints
POST /v1/payment_sessions
GET /v1/payment_sessions/:id
POST /v1/payment_sessions/:id/cancel
GET /v1/payment_sessions
To create an payment session, you create a payment session object.
The payment session object
{
"id": "py_sess_test",
"object": "payment_session",
"created": 1627210800,
"amount": 100000,
"currency": "gbp",
"customer": "cus_test",
"description": null,
"metadata": {},
"mode": "payment",
"payment_method_types": [
"card"
],
"reporting_type": "deposit",
"return_url": null,
"status": "succeeded",
"transaction": null,
"url": "https://pay.yorlet.com/session/py_sess_test"
}
payment_session
.payment
.paid
or unpaid
.POST /v1/payment_sessions
curl https://api.yorlet.com/v1/payment_sessions \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"amount": 100000,
"currency": "gbp",
"customer": "cus_test",
"mode": "payment",
"payment_method_types": [
"card"
]
}'
Example Response
{
"id": "py_sess_test",
"object": "payment_session",
"created": 1627210800,
"amount": 100000,
"currency": "gbp",
"customer": "cus_test",
"description": null,
"metadata": {},
"mode": "payment",
"payment_method_types": [
"card"
],
"reporting_type": "deposit",
"return_url": null,
"status": "succeeded",
"transaction": null,
"url": "https://pay.yorlet.com/session/py_sess_test"
}
Creates a new payment session.
eur
, gbp
, sek
or usd
.payment
.autogiro
, bacs_debit
, bank_transfer
, card
, direct_transfer
, pay_by_bank
or sepa_debit
.charge
. Can be advance_rent
, charge
, deposit
, holding_fee
or rent
.Returns the payment session object if the request succeeded.
GET /v1/payment_sessions/:id
curl https://api.yorlet.com/v1/payment_sessions/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "py_sess_test",
"object": "payment_session",
"created": 1627210800,
"amount": 100000,
"currency": "gbp",
"customer": "cus_test",
"description": null,
"metadata": {},
"mode": "payment",
"payment_method_types": [
"card"
],
"reporting_type": "deposit",
"return_url": null,
"status": "succeeded",
"transaction": null,
"url": "https://pay.yorlet.com/session/py_sess_test"
}
Retrieves the payment session with the given ID.
Returns a payment session object if a valid identifier was provided.
POST /v1/payment_sessions/:id/cancel
curl https://api.yorlet.com/v1/payment_sessions/:id/cancel \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "py_sess_test",
"object": "payment_session",
"created": 1627210800,
"amount": 100000,
"currency": "gbp",
"customer": "cus_test",
"description": null,
"metadata": {},
"mode": "payment",
"payment_method_types": [
"card"
],
"reporting_type": "deposit",
"return_url": null,
"status": "succeeded",
"transaction": null,
"url": "https://pay.yorlet.com/session/py_sess_test"
}
Cancels the payment session with the given ID.
Returns a canceled payment session object if a valid identifier was provided.
GET /v1/payment_sessions
curl https://api.yorlet.com/v1/payment_sessions \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"object": "list",
"data": [
{
"id": "py_sess_test",
"object": "payment_session",
"created": 1627210800,
"amount": 100000,
"currency": "gbp",
"customer": "cus_test",
"description": null,
"metadata": {},
"mode": "payment",
"payment_method_types": [
"card"
],
"reporting_type": "deposit",
"return_url": null,
"status": "succeeded",
"transaction": null,
"url": "https://pay.yorlet.com/session/py_sess_test"
}
],
"count": 1,
"has_more": false
}
Returns a list of payment sessions. The payment sessions are returned sorted by creation date, with the most recent payment sessions appearing first.
A object with a data property that contains an array of payment sessions.
Endpoints
POST /v1/transactions
GET /v1/transactions/:id
POST /v1/transactions/:id
POST /v1/transactions/:id/capture
POST /v1/transactions/:id/confirm
POST /v1/transactions/:id/cancel
POST /v1/transactions/:id/resend_receipt
GET /v1/transactions
The API allows you to retrieve and list transactions.
The transaction object
{
"id": "txn_test",
"object": "transaction",
"created": 1627210800,
"amount": 100000,
"amount_refunded": 0,
"application": null,
"balance_transaction": null,
"capture_method": null,
"confirmed_at": null,
"cross_border": {
"amount": null,
"enabled": false
},
"currency_conversion": null,
"currency": "gbp",
"customer": null,
"description": null,
"dispute": null,
"disputed": false,
"invoice": null,
"last_payment_error": null,
"metadata": {},
"next_action": null,
"owner_payout": null,
"paid_at": null,
"payment_method": null,
"payment_method_types": [],
"payment_session": null,
"processing": null,
"refunded": false,
"reporting_type": "deposit",
"status": "succeeded",
"transfer": null,
"transfer_data": {
"transfers": null,
"use_unit_ownership": false
},
"transfer_group": null
}
transaction
.automatic
or manual
.refunded
or not.requires_payment_method
, requires_confirmation
, requires_action
, processing
, canceled
or succeeded
.POST /v1/transactions
curl https://api.yorlet.com/v1/transactions \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "txn_test",
"object": "transaction",
"created": 1627210800,
"amount": 100000,
"amount_refunded": 0,
"application": null,
"balance_transaction": null,
"capture_method": null,
"confirmed_at": null,
"cross_border": {
"amount": null,
"enabled": false
},
"currency_conversion": null,
"currency": "gbp",
"customer": null,
"description": null,
"dispute": null,
"disputed": false,
"invoice": null,
"last_payment_error": null,
"metadata": {},
"next_action": null,
"owner_payout": null,
"paid_at": null,
"payment_method": null,
"payment_method_types": [],
"payment_session": null,
"processing": null,
"refunded": false,
"reporting_type": "deposit",
"status": "succeeded",
"transfer": null,
"transfer_data": {
"transfers": null,
"use_unit_ownership": false
},
"transfer_group": null
}
Creates a transaction.
autogiro
, bacs_debit
, card
, card_present
, bank_transfer
, direct_transfer
, gbp_credit_transfer
, pay_by_bank
or sepa_debit
.application
and application_payment_type
.advance_rent
, deposit
or holding_fee
.automatic
or manual
.eur
, gbp
, sek
or usd
.advance_rent
, charge
, deposit
or holding_fee
.Returns a transaction object if successful.
GET /v1/transactions/:id
curl https://api.yorlet.com/v1/transactions/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "txn_test",
"object": "transaction",
"created": 1627210800,
"amount": 100000,
"amount_refunded": 0,
"application": null,
"balance_transaction": null,
"capture_method": null,
"confirmed_at": null,
"cross_border": {
"amount": null,
"enabled": false
},
"currency_conversion": null,
"currency": "gbp",
"customer": null,
"description": null,
"dispute": null,
"disputed": false,
"invoice": null,
"last_payment_error": null,
"metadata": {},
"next_action": null,
"owner_payout": null,
"paid_at": null,
"payment_method": null,
"payment_method_types": [],
"payment_session": null,
"processing": null,
"refunded": false,
"reporting_type": "deposit",
"status": "succeeded",
"transfer": null,
"transfer_data": {
"transfers": null,
"use_unit_ownership": false
},
"transfer_group": null
}
Retrieves the transaction with the given ID.
Returns a transaction object if a valid identifier was provided.
POST /v1/transactions/:id
curl https://api.yorlet.com/v1/transactions/:id \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "txn_test",
"object": "transaction",
"created": 1627210800,
"amount": 100000,
"amount_refunded": 0,
"application": null,
"balance_transaction": null,
"capture_method": null,
"confirmed_at": null,
"cross_border": {
"amount": null,
"enabled": false
},
"currency_conversion": null,
"currency": "gbp",
"customer": null,
"description": null,
"dispute": null,
"disputed": false,
"invoice": null,
"last_payment_error": null,
"metadata": {},
"next_action": null,
"owner_payout": null,
"paid_at": null,
"payment_method": null,
"payment_method_types": [],
"payment_session": null,
"processing": null,
"refunded": false,
"reporting_type": "deposit",
"status": "succeeded",
"transfer": null,
"transfer_data": {
"transfers": null,
"use_unit_ownership": false
},
"transfer_group": null
}
Updates the transaction with the given ID.
autogiro
, bacs_debit
, card
, card_present
, bank_transfer
, direct_transfer
, gbp_credit_transfer
, pay_by_bank
or sepa_debit
.Returns the updated transaction object if a valid identifier was provided.
POST /v1/transactions/:id/capture
curl https://api.yorlet.com/v1/transactions/:id/capture \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "txn_test",
"object": "transaction",
"created": 1627210800,
"amount": 100000,
"amount_refunded": 0,
"application": null,
"balance_transaction": null,
"capture_method": null,
"confirmed_at": null,
"cross_border": {
"amount": null,
"enabled": false
},
"currency_conversion": null,
"currency": "gbp",
"customer": null,
"description": null,
"dispute": null,
"disputed": false,
"invoice": null,
"last_payment_error": null,
"metadata": {},
"next_action": null,
"owner_payout": null,
"paid_at": null,
"payment_method": null,
"payment_method_types": [],
"payment_session": null,
"processing": null,
"refunded": false,
"reporting_type": "deposit",
"status": "succeeded",
"transfer": null,
"transfer_data": {
"transfers": null,
"use_unit_ownership": false
},
"transfer_group": null
}
Captures the transaction.
Returns a transaction object if successful.
POST /v1/transactions/:id/confirm
curl https://api.yorlet.com/v1/transactions/:id/confirm \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "txn_test",
"object": "transaction",
"created": 1627210800,
"amount": 100000,
"amount_refunded": 0,
"application": null,
"balance_transaction": null,
"capture_method": null,
"confirmed_at": null,
"cross_border": {
"amount": null,
"enabled": false
},
"currency_conversion": null,
"currency": "gbp",
"customer": null,
"description": null,
"dispute": null,
"disputed": false,
"invoice": null,
"last_payment_error": null,
"metadata": {},
"next_action": null,
"owner_payout": null,
"paid_at": null,
"payment_method": null,
"payment_method_types": [],
"payment_session": null,
"processing": null,
"refunded": false,
"reporting_type": "deposit",
"status": "succeeded",
"transfer": null,
"transfer_data": {
"transfers": null,
"use_unit_ownership": false
},
"transfer_group": null
}
Confirms the transaction.
autogiro
, bacs_debit
, card
, card_present
, bank_transfer
, direct_transfer
, gbp_credit_transfer
, pay_by_bank
or sepa_debit
.Returns a transaction object if successful.
POST /v1/transactions/:id/cancel
curl https://api.yorlet.com/v1/transactions/:id/cancel \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "txn_test",
"object": "transaction",
"created": 1627210800,
"amount": 100000,
"amount_refunded": 0,
"application": null,
"balance_transaction": null,
"capture_method": null,
"confirmed_at": null,
"cross_border": {
"amount": null,
"enabled": false
},
"currency_conversion": null,
"currency": "gbp",
"customer": null,
"description": null,
"dispute": null,
"disputed": false,
"invoice": null,
"last_payment_error": null,
"metadata": {},
"next_action": null,
"owner_payout": null,
"paid_at": null,
"payment_method": null,
"payment_method_types": [],
"payment_session": null,
"processing": null,
"refunded": false,
"reporting_type": "deposit",
"status": "succeeded",
"transfer": null,
"transfer_data": {
"transfers": null,
"use_unit_ownership": false
},
"transfer_group": null
}
Cancels the transaction.
Returns a transaction object if successful.
POST /v1/transactions/:id/resend_receipt
curl https://api.yorlet.com/v1/transactions/:id/resend_receipt \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "txn_test",
"object": "transaction",
"created": 1627210800,
"amount": 100000,
"amount_refunded": 0,
"application": null,
"balance_transaction": null,
"capture_method": null,
"confirmed_at": null,
"cross_border": {
"amount": null,
"enabled": false
},
"currency_conversion": null,
"currency": "gbp",
"customer": null,
"description": null,
"dispute": null,
"disputed": false,
"invoice": null,
"last_payment_error": null,
"metadata": {},
"next_action": null,
"owner_payout": null,
"paid_at": null,
"payment_method": null,
"payment_method_types": [],
"payment_session": null,
"processing": null,
"refunded": false,
"reporting_type": "deposit",
"status": "succeeded",
"transfer": null,
"transfer_data": {
"transfers": null,
"use_unit_ownership": false
},
"transfer_group": null
}
Resends the transaction receipt.
Returns a transaction object if successful.
GET /v1/transactions
curl https://api.yorlet.com/v1/transactions \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"object": "list",
"data": [
{
"id": "txn_test",
"object": "transaction",
"created": 1627210800,
"amount": 100000,
"amount_refunded": 0,
"application": null,
"balance_transaction": null,
"capture_method": null,
"confirmed_at": null,
"cross_border": {
"amount": null,
"enabled": false
},
"currency_conversion": null,
"currency": "gbp",
"customer": null,
"description": null,
"dispute": null,
"disputed": false,
"invoice": null,
"last_payment_error": null,
"metadata": {},
"next_action": null,
"owner_payout": null,
"paid_at": null,
"payment_method": null,
"payment_method_types": [],
"payment_session": null,
"processing": null,
"refunded": false,
"reporting_type": "deposit",
"status": "succeeded",
"transfer": null,
"transfer_data": {
"transfers": null,
"use_unit_ownership": false
},
"transfer_group": null
}
],
"count": 1,
"has_more": false
}
Returns a list of transactions. The transactions are returned sorted by creation date, with the most recent transactions appearing first.
A object with a data property that contains an array of transactions.
Endpoints
POST /v1/external_accounts
GET /v1/external_accounts/:id
POST /v1/external_accounts/:id
DELETE /v1/external_accounts/:id
GET /v1/external_accounts
External Accounts are transfer destinations for your Account or Owner objects. They can be bank accounts.
The external account object
{
"id": "ext_acct_test",
"object": "external_account",
"created": 1627210800,
"available_payout_methods": [],
"bank_account": {
"account_holder_name": "Jane Doe",
"account_holder_type": "individual",
"bank_name": null,
"country": "GB",
"currency": "gbp",
"last4": "1234",
"routing_number": "101010",
"swift_bic": null
},
"metadata": {},
"status": "new",
"type": "bank_account"
}
external_account
.individual
or company
.errored
and payouts will be stopped until the account details are updated. Can be new
or errored
.bank_account
.POST /v1/external_accounts
curl https://api.yorlet.com/v1/external_accounts \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "ext_acct_test",
"object": "external_account",
"created": 1627210800,
"available_payout_methods": [],
"bank_account": {
"account_holder_name": "Jane Doe",
"account_holder_type": "individual",
"bank_name": null,
"country": "GB",
"currency": "gbp",
"last4": "1234",
"routing_number": "101010",
"swift_bic": null
},
"metadata": {},
"status": "new",
"type": "bank_account"
}
Create a new external account.
company
or individual
.bank_account
.Returns the external account object if the request succeeded.
GET /v1/external_accounts/:id
curl https://api.yorlet.com/v1/external_accounts/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "ext_acct_test",
"object": "external_account",
"created": 1627210800,
"available_payout_methods": [],
"bank_account": {
"account_holder_name": "Jane Doe",
"account_holder_type": "individual",
"bank_name": null,
"country": "GB",
"currency": "gbp",
"last4": "1234",
"routing_number": "101010",
"swift_bic": null
},
"metadata": {},
"status": "new",
"type": "bank_account"
}
Retrieve the details about a specific external account.
Returns the external account object.
POST /v1/external_accounts/:id
curl https://api.yorlet.com/v1/external_accounts/:id \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "ext_acct_test",
"object": "external_account",
"created": 1627210800,
"available_payout_methods": [],
"bank_account": {
"account_holder_name": "Jane Doe",
"account_holder_type": "individual",
"bank_name": null,
"country": "GB",
"currency": "gbp",
"last4": "1234",
"routing_number": "101010",
"swift_bic": null
},
"metadata": {},
"status": "new",
"type": "bank_account"
}
Updates the metadata. Other bank account details are not editable by design.
Returns the updated external account object.
DELETE /v1/external_accounts/:id
curl https://api.yorlet.com/v1/external_accounts/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "ext_acct_test",
"object": "external_account",
"deleted": true
}
Deletes the external account.
Returns the deleted external account object.
GET /v1/external_accounts
curl https://api.yorlet.com/v1/external_accounts \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"object": "list",
"data": [
{
"id": "ext_acct_test",
"object": "external_account",
"created": 1627210800,
"available_payout_methods": [],
"bank_account": {
"account_holder_name": "Jane Doe",
"account_holder_type": "individual",
"bank_name": null,
"country": "GB",
"currency": "gbp",
"last4": "1234",
"routing_number": "101010",
"swift_bic": null
},
"metadata": {},
"status": "new",
"type": "bank_account"
}
],
"count": 1,
"has_more": false
}
Returns a list of external accounts. The external accounts are returned sorted by creation date, with the most recently created external accounts appearing first.
A object with a data property that contains an array of external accounts.
Endpoints
POST /v1/payment_methods
POST /v1/payment_methods/:id/fund_bank_transfer
GET /v1/payment_methods
Payment method objects represent customer’s payment instruments. They can be used with Subscriptions, Invoices and Transactions to collect payments or be saved to Customer objects for future use.
The payment method object
{
"id": "pm_test",
"object": "payment_method",
"created": 1627210800,
"bank_transfer": {
"balance": 0,
"account_number": "00000000",
"bank_name": "Barclays Bank UK PLC",
"sort_code": "230000",
"reconciliation_deadline": null
},
"billing_details": {
"email": "[email protected]",
"name": "Jane Doe"
},
"customer": null,
"mandate": null,
"receiver": null,
"status": "pending",
"type": "bank_transfer"
}
payment_method
.POST /v1/payment_methods
curl https://api.yorlet.com/v1/payment_methods \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "pm_test",
"object": "payment_method",
"created": 1627210800,
"bank_transfer": {
"balance": 0,
"account_number": "00000000",
"bank_name": "Barclays Bank UK PLC",
"sort_code": "230000",
"reconciliation_deadline": null
},
"billing_details": {
"email": "[email protected]",
"name": "Jane Doe"
},
"customer": null,
"mandate": null,
"receiver": null,
"status": "pending",
"type": "bank_transfer"
}
You can only create alipay
, bank_transfer
, and fronted
payment methods using this API. To remain compliant with scheme requirements, use the Payment Method Session API to create other payment methods.
alipay
, bank_transfer
, direct_transfer
or pay_by_bank
.bank_transfer
payment method, this object contains details about the Bank Transfer payment method.eur
or gbp
.GB
or IE
.Returns a payment method object if successful.
POST /v1/payment_methods/:id/fund_bank_transfer
curl https://api.yorlet.com/v1/payment_methods/:id/fund_bank_transfer \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "pm_test",
"object": "payment_method",
"created": 1627210800,
"bank_transfer": {
"balance": 0,
"account_number": "00000000",
"bank_name": "Barclays Bank UK PLC",
"sort_code": "230000",
"reconciliation_deadline": null
},
"billing_details": {
"email": "[email protected]",
"name": "Jane Doe"
},
"customer": null,
"mandate": null,
"receiver": null,
"status": "pending",
"type": "bank_transfer"
}
Simulates an external bank transfer and adds funds to a the payment method's balance. This method can only be called in test mode.
Returns a payment method object if successful.
GET /v1/payment_methods
curl https://api.yorlet.com/v1/payment_methods \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"object": "list",
"data": [
{
"id": "pm_test",
"object": "payment_method",
"created": 1627210800,
"bank_transfer": {
"balance": 0,
"account_number": "00000000",
"bank_name": "Barclays Bank UK PLC",
"sort_code": "230000",
"reconciliation_deadline": null
},
"billing_details": {
"email": "[email protected]",
"name": "Jane Doe"
},
"customer": null,
"mandate": null,
"receiver": null,
"status": "pending",
"type": "bank_transfer"
}
],
"count": 1,
"has_more": false
}
Returns a list of payment methods.
A object with a data property that contains an array of payment methods.
Endpoints
POST /v1/payment_method_sessions
GET /v1/payment_method_sessions/:id
To create an payment method session, you create a payment method session object.
The payment method session object
{
"id": "pmsess_test",
"object": "payment_method_session",
"created": 1627210800,
"customer": null,
"metadata": {},
"payment_method": null,
"payment_method_types": [],
"return_url": null,
"subscription": null,
"url": "https://pay.yorlet.com/payment_methods/pmsess_kfls092pPQalaj2"
}
payment_method_session
.paid
or unpaid
.POST /v1/payment_method_sessions
curl https://api.yorlet.com/v1/payment_method_sessions \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "pmsess_test",
"object": "payment_method_session",
"created": 1627210800,
"customer": null,
"metadata": {},
"payment_method": null,
"payment_method_types": [],
"return_url": null,
"subscription": null,
"url": "https://pay.yorlet.com/payment_methods/pmsess_kfls092pPQalaj2"
}
autogiro
, bacs_debit
, card
or sepa_debit
.Returns the payment method session object if the request succeeded.
GET /v1/payment_method_sessions/:id
curl https://api.yorlet.com/v1/payment_method_sessions/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "pmsess_test",
"object": "payment_method_session",
"created": 1627210800,
"customer": null,
"metadata": {},
"payment_method": null,
"payment_method_types": [],
"return_url": null,
"subscription": null,
"url": "https://pay.yorlet.com/payment_methods/pmsess_kfls092pPQalaj2"
}
Returns a payment method session object if a valid identifier was provided.
Endpoints
POST /v1/prices
GET /v1/prices/:id
POST /v1/prices/:id
DELETE /v1/prices/:id
GET /v1/prices
Prices are used to define the cost and currency of a product.
The price object
{
"id": "product_id",
"object": "price",
"created": 1627210800,
"description": null,
"recurring": null
}
price
.POST /v1/prices
curl https://api.yorlet.com/v1/prices \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "product_id",
"object": "price",
"created": 1627210800,
"description": null,
"recurring": null
}
Create a price. You can create a product to immediately associate with a price.
one_time
or recurring
.exclusive
, inclusive
or unspecified
.Returns the price object if the request succeeded.
GET /v1/prices/:id
curl https://api.yorlet.com/v1/prices/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "product_id",
"object": "price",
"created": 1627210800,
"description": null,
"recurring": null
}
Returns a price object if a valid identifier was provided.
POST /v1/prices/:id
curl https://api.yorlet.com/v1/prices/:id \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "product_id",
"object": "price",
"created": 1627210800,
"description": null,
"recurring": null
}
exclusive
, inclusive
or unspecified
.Returns the price object if the request succeeded.
DELETE /v1/prices/:id
curl https://api.yorlet.com/v1/prices/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "product_id",
"object": "price",
"deleted": true
}
Returns the price object if the request succeeded.
GET /v1/prices
curl https://api.yorlet.com/v1/prices \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "product_id",
"object": "price",
"created": 1627210800,
"description": null,
"recurring": null
}
Returns a list of prices if the request succeeded.
Endpoints
POST /v1/products
GET /v1/products/:id
POST /v1/products/:id
DELETE /v1/products/:id
GET /v1/products
Products describe specific goods or services you offer to your customer. These can be attached to subscriptions and invoices.
The product object
{
"id": "product_id",
"object": "product",
"accounting_code": null,
"active": true,
"created": 1627210800,
"default_price": null,
"description": "Product 1 description",
"name": "Product 1",
"statement_descriptor": "Product 1 statement descriptor"
}
product
.POST /v1/products
curl https://api.yorlet.com/v1/products \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "product_id",
"object": "product",
"accounting_code": null,
"active": true,
"created": 1627210800,
"default_price": null,
"description": "Product 1 description",
"name": "Product 1",
"statement_descriptor": "Product 1 statement descriptor"
}
Create a product. You can create products for subscriptions and invoices.
month
or week
.one_time
or recurring
.Returns the product object if the request succeeded.
GET /v1/products/:id
curl https://api.yorlet.com/v1/products/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "product_id",
"object": "product",
"accounting_code": null,
"active": true,
"created": 1627210800,
"default_price": null,
"description": "Product 1 description",
"name": "Product 1",
"statement_descriptor": "Product 1 statement descriptor"
}
Returns a product object if a valid identifier was provided.
POST /v1/products/:id
curl https://api.yorlet.com/v1/products/:id \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "product_id",
"object": "product",
"accounting_code": null,
"active": true,
"created": 1627210800,
"default_price": null,
"description": "Product 1 description",
"name": "Product 1",
"statement_descriptor": "Product 1 statement descriptor"
}
Returns the product object if the update succeeded.
DELETE /v1/products/:id
curl https://api.yorlet.com/v1/products/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "product_id",
"object": "product",
"deleted": true
}
If the subscription ID does not exist, this call throws an error.
GET /v1/products
curl https://api.yorlet.com/v1/products \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"object": "list",
"data": [
{
"id": "product_id",
"object": "product",
"accounting_code": null,
"active": true,
"created": 1627210800,
"default_price": null,
"description": "Product 1 description",
"name": "Product 1",
"statement_descriptor": "Product 1 statement descriptor"
}
],
"count": 1,
"has_more": false
}
Returns a list of products.
Endpoints
POST /v1/tax_rates
GET /v1/tax_rates/:id
POST /v1/tax_rates/:id
DELETE /v1/tax_rates/:id
GET /v1/tax_rates
Tax rates are used to calculate the tax amount for a given subscription or invoice.
The tax rate object
{
"id": "tax_rate_id",
"object": "tax_rate",
"active": true,
"country": "US",
"created": 1627210800,
"description": "Tax rate description",
"inclusive": true,
"jurisdiction": "jurisdiction",
"name": "Tax rate name",
"percentage": 0.1,
"state": "CA"
}
tax_rate
.POST /v1/tax_rates
curl https://api.yorlet.com/v1/tax_rates \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "tax_rate_id",
"object": "tax_rate",
"active": true,
"country": "US",
"created": 1627210800,
"description": "Tax rate description",
"inclusive": true,
"jurisdiction": "jurisdiction",
"name": "Tax rate name",
"percentage": 0.1,
"state": "CA"
}
Create a tax rate. You can create tax rates for subscriptions and invoices.
Returns the tax rate object if the request succeeded.
GET /v1/tax_rates/:id
curl https://api.yorlet.com/v1/tax_rates/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "tax_rate_id",
"object": "tax_rate",
"active": true,
"country": "US",
"created": 1627210800,
"description": "Tax rate description",
"inclusive": true,
"jurisdiction": "jurisdiction",
"name": "Tax rate name",
"percentage": 0.1,
"state": "CA"
}
Returns a tax rate object if a valid identifier was provided.
POST /v1/tax_rates/:id
curl https://api.yorlet.com/v1/tax_rates/:id \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
Example Response
{
"id": "tax_rate_id",
"object": "tax_rate",
"active": true,
"country": "US",
"created": 1627210800,
"description": "Tax rate description",
"inclusive": true,
"jurisdiction": "jurisdiction",
"name": "Tax rate name",
"percentage": 0.1,
"state": "CA"
}
Returns a tax rate object if a valid identifier was provided.
DELETE /v1/tax_rates/:id
curl https://api.yorlet.com/v1/tax_rates/:id \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "tax_rate_id",
"object": "tax_rate",
"deleted": true
}
Returns the tax rate object if the request succeeded.
GET /v1/tax_rates
curl https://api.yorlet.com/v1/tax_rates \
-H "Authorization: Bearer {API_KEY}" \
Example Response
{
"id": "tax_rate_id",
"object": "tax_rate",
"active": true,
"country": "US",
"created": 1627210800,
"description": "Tax rate description",
"inclusive": true,
"jurisdiction": "jurisdiction",
"name": "Tax rate name",
"percentage": 0.1,
"state": "CA"
}
Returns a list of tax rates if the request succeeded.
Endpoints
POST /v1/credit_notes
POST /v1/credit_notes/preview
GET /v1/credit_notes/:id
POST /v1/credit_notes/:id
GET /v1/credit_notes/:id/lines
POST /v1/credit_notes/:id/void
GET /v1/credit_notes/
Issue a credit note to adjust an invoice's amount after the invoice is finalized.
The credit note object
{
"id": "cn_lc9bfxsv9EsTVzzJ",
"object": "credit_note",
"created": 1627210800,
"amount": 100000,
"currency": "gbp",
"customer": "cus_ku6643te7OcjFIGh",
"description": null,
"discount_amount": 0,
"invoice": "inv_lc933wkpuBDjS0TO",
"memo": "Credit note for duplicate charge",
"metadata": {},
"number": "NZ47LVB3-0001-CN-01",
"out_of_band_amount": 0,
"reason": "duplicate",
"subtotal": 100000,
"subtotal_excluding_tax": 100000,
"status": "issued",
"tax_amounts": [],