NAV navbar
bash

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.

Environments

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

Authentication

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}

Errors

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.

Attributes

  • error object
    The error object.
    error.message string
    A human-readable message providing more details about the error.
    error.param string
    If the error is parameter-specific, the parameter related to the error.
    error.type string
    The type of error returned.
  • status integer
    The status code.
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.

Expanding Objects

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.

Idempotency

Request with idempotency

curl https://api.yorlet.com/v1/customers
  -H "Authorization: Bearer {access_token}"
  -H "Idempotency-Key: {unique_key}"

The Yorlet API supports idempotency for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. For example, if a request to create a new enquiry does not respond due to a network connection error, you can retry the request with the same idempotency key to guarantee that no more than one enquiry is created.

To perform an idempotent request, provide an additional Idempotency-Key element to the request header.

Yorlet's idempotency architecture works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors.

An idempotency key is a unique value generated by the client which the server uses to recognise subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions.

Keys expire after 24 hours, so a new request is generated if a key is reused outside of that time frame. The idempotency layer compares incoming parameters to those of the original request and errors unless they're the same to prevent accidental misuse.

Results are only saved if an API endpoint started executing. If incoming parameters failed validation, or the request conflicted with another that was executing concurrently, no idempotent result is saved because no API endpoint began execution. It is safe to retry these requests.

All POST requests accept idempotency keys. Sending idempotency keys in GET and DELETE requests has no effect and should be avoided, as these requests are idempotent by definition.

Core Resources

Applications

Endpoints

POST    /v1/applications
GET     /v1/applications/:id
POST    /v1/applications/:id
POST    /v1/applications/:id/accept
POST    /v1/applications/:id/cancel
POST    /v1/applications/:id/complete
GET     /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

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,
  "completion_behavior": "automatic",
  "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
  }
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be application.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • account_collection_data object
    The account collection data for the application.
  • advance_rent integer
    The amount of advance rent to be paid.
  • applicant_requests string
    The applicant requests on the application.
  • auto_apply_unit_fees string
    Whether or not to apply unit fees to owner records after the application completes.
  • break_clause object
    The break clause for the application.
  • building stringexpandable
    The building the application is for.
  • building_snapshot object
    The snapshot of the building at the time of application.
  • cancel_reason string
    The reason for cancelling the application.
  • cancel_reason_description string
    The description for cancelling the application.
  • contract stringexpandable
    The contract for the application.
  • checkin_time string
    The checkin time for the application.
  • checkout_time string
    The checkout time for the application.
  • completed_at timestamp
    Measured in seconds since the Unix epoch.
  • completion_behavior string
    The completion behavior for the application.
  • contract_address string
    The address of the contract for the application.
  • contract_legal_entity string
    The legal entity for the contract, if provided this replaces the owner.
  • contract_template stringexpandable
    The contract template for the application.
  • create_contract_on_accept boolean
    Whether or not to create a contract on acceptance.
  • currency string
    The currency for the application.
  • customer_emails array
    The customer emails for the application.
  • customers array
    The customers for the application.
  • date_end timestamp
    Measured in seconds since the Unix epoch.
  • date_start timestamp
    Measured in seconds since the Unix epoch.
  • deposit object
    The deposit for the application.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • end_behavior string
    The end behavior for the application. Can be complete or roll.
  • enquiry string
    The enquiry for the application.
  • has_owner boolean
    Whether or not the application has an owner.
  • holding_fee object
    The amount of holding fee to be paid.
  • holding_fee_required boolean
    Whether or not the application requires a holding fee.
  • metadata string
    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.
  • move_in_date timestamp
    The date the tenant is expected to move in. Useful for short term lets where the actual move in date may differ from the contractual move in date. Measured in seconds since the Unix epoch.
  • move_out_date timestamp
    The date the tenant is expected to move out. Useful for short term lets where the actual move out date may differ from the contractual move out date. Measured in seconds since the Unix epoch.
  • open boolean
    Whether or not the application is open.
  • owner_signature_required boolean
    Whether or not the owner signature is required.
  • post_application_payment_session object
    The payment session data for the application. If set this creates a payment session after the contract is signed.
  • renewal_intent stringexpandable
    The renewal intent for the application.
  • rent_term string
    The rent term for the application.
  • send_owner_contract boolean
    Whether or not to send the owner contract.
  • subscription_data object
    The subscription data for the application.
  • status string
    The status of the application.
  • tenancy_created boolean
    Whether or not the tenancy has been created.
  • tenancy_timestamp timestamp
    Measured in seconds since the Unix epoch.
  • type string
    The type of the application.
  • unit stringexpandable
    The unit for the application.
  • unit_snapshot object
    The unit snapshot at the time of application.
    unit_snapshot.epc_file string
    The EPC file for the unit.
    unit_snapshot.name string
    The name of the unit.

Create an application

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": "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,
  "completion_behavior": "automatic",
  "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
  }
}

Creates a new application.

Parameters

  • applicants required  array of objects
    The applicants.
    applicants.share_of_rent required  number
    The applicant's share of the rent.
    applicants.create_reference boolean
    Whether to create a reference for the applicant.
    applicants.customer string
    The customer ID of the applicant.
    applicants.customer_data object
    The customer data of the applicant. Must be supplied if customer ID is not provided.
    applicants.customer_data.email required  string
    The email address of the customer.
    applicants.customer_data.legal object
    The customer's legal information. Used for generating contracts.
    applicants.customer_data.legal.first_name required  string
    The customer's full legal firstname.
    applicants.customer_data.legal.last_name required  string
    The customer's full legal lastname.
    applicants.customer_data.legal.dob object
    The customer's date of birth
    applicants.customer_data.legal.dob.day required  integer
    The customer's day of birth
    applicants.customer_data.legal.dob.month required  integer
    The customer's month of birth
    applicants.customer_data.legal.dob.year required  integer
    The customer's year of birth
    applicants.customer_data.name string
    The customer's full name.
    applicants.customer_data.phone string
    The customer's phone number.
    applicants.lead_tenant boolean
    Whether the applicant is the lead tenant.
    applicants.permitted_occupier boolean
    Whether the applicant is a permitted occupier.
    applicants.reference_data object
    The applicant's reference data.
    applicants.reference_data.automatic_reference object
    applicants.reference_data.automatic_reference.enabled required  boolean
    Whether to enable automatic references.
    applicants.reference_data.automatic_reference.provider required  string
    The reference provider. Can be canopy.
  • end_date required  timestamp
    The end date of the tenancy. When null the tenancy will roll periodically.
  • start_date required  timestamp
    The start date of the tenancy.
  • subscription_data required  object
    The subscription data for the subscription.
    subscription_data.collection_method required  string
    The collection method for the subscription. Can be charge_automatically or send_invoice.
    subscription_data.interval required  string
    The interval of the subscription. Can be month, week, custom or upfront.
    subscription_data.interval_count required  integer
    The interval count of the subscription.
    subscription_data.add_invoice_items array of objects
    A list of up to 10 invoice items that will be appended to the next invoice for this subscription.
    subscription_data.add_invoice_items.type required  string
    The type of subscription item. Can be rent, charge or product.
    subscription_data.add_invoice_items.description string
    Description for the subscription item.
    subscription_data.add_invoice_items.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.
    subscription_data.add_invoice_items.price string
    The ID of the price object.
    subscription_data.add_invoice_items.price_data object
    The price data for the subscription item.
    subscription_data.add_invoice_items.price_data.amount required  integer
    A positive integer in pence representing how much to charge.
    subscription_data.add_invoice_items.price_data.currency required  string
    Three-letter ISO currency code, in lowercase.
    subscription_data.add_invoice_items.price_data.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    subscription_data.add_invoice_items.proration_behavior string
    Can be create_prorations or none.
    subscription_data.add_invoice_items.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    subscription_data.add_invoice_items.transfer_behavior string
    Can be automatic, owner or none.
    subscription_data.add_invoice_items.transfer_destination string
    ID of the owner that will be the transfer destination. Only allowed when the subscription item transfer behavior is owner.
    subscription_data.add_invoice_items.unit string
    The ID of the unit. If type=rent you must provide a unit ID
    subscription_data.billing_anchor timestamp
    The date to anchor the subscription to.
    subscription_data.coupon string
    The ID of the coupon to apply to the subscription.
    subscription_data.days_before_collection integer
    The number of days to create the invoice before the subscription's next billing date. Useful if you want to send the customer the upcoming invoice a few days before the subscription's next billing date. Only applies to subscriptions with collection_method=send_invoice.
    subscription_data.days_until_due integer
    The number of days before the invoice is due.
    subscription_data.end_date timestamp
    The date this subscription should end. When a subscription ends the status will change to complete
    subscription_data.items array of objects
    A list of up to 10 subscription items, each with attached price_data.
    subscription_data.items.type required  string
    The type of subscription item. Can be rent, charge or product.
    subscription_data.items.description string
    Description for the subscription item.
    subscription_data.items.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.
    subscription_data.items.price string
    The ID of the price object.
    subscription_data.items.price_data object
    The price data for the subscription item.
    subscription_data.items.price_data.amount required  integer
    A positive integer in pence representing how much to charge.
    subscription_data.items.price_data.currency required  string
    Three-letter ISO currency code, in lowercase.
    subscription_data.items.price_data.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    subscription_data.items.proration_behavior string
    Can be create_prorations or none.
    subscription_data.items.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    subscription_data.items.transfer_behavior string
    Can be automatic, owner or none.
    subscription_data.items.transfer_destination string
    ID of the owner that will be the transfer destination. Only allowed when the subscription item transfer behavior is owner.
    subscription_data.items.unit string
    The ID of the unit. If type=rent you must provide a unit ID
    subscription_data.phases array of objects
    The phases of the subscription. Only allowed when interval=custom.
    subscription_data.phases.start_date required  timestamp
    The date on which the phase starts.
    subscription_data.phases.items array of objects
    A list of up to 10 subscription items, each with attached price_data.
    subscription_data.phases.items.type required  string
    The type of subscription item. Can be rent, charge or product.
    subscription_data.phases.items.description string
    Description for the subscription item.
    subscription_data.phases.items.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.
    subscription_data.phases.items.price string
    The ID of the price object.
    subscription_data.phases.items.price_data object
    The price data for the subscription item.
    subscription_data.phases.items.price_data.amount required  integer
    A positive integer in pence representing how much to charge.
    subscription_data.phases.items.price_data.currency required  string
    Three-letter ISO currency code, in lowercase.
    subscription_data.phases.items.price_data.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    subscription_data.phases.items.proration_behavior string
    Can be create_prorations or none.
    subscription_data.phases.items.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    subscription_data.phases.items.transfer_behavior string
    Can be automatic, owner or none.
    subscription_data.phases.items.transfer_destination string
    ID of the owner that will be the transfer destination. Only allowed when the subscription item transfer behavior is owner.
    subscription_data.phases.items.unit string
    The ID of the unit. If type=rent you must provide a unit ID
    subscription_data.start_date timestamp
    The date this subscription should begin. Start dates in the future will cause the initial status of the sunscription to be scheduled
  • type required  string
    The application type. Can be standard, active_tenancy, renewal or let_only.
  • unit required  string
    The unit ID.
  • accept boolean
    Set to true to attempt to accept this application immediately. The parameter defaults to false and is only allowed when type=active_tenancy.
  • account_collection_data object
    The account collection data, this overwrites any existing unit fees.
    account_collection_data.amount required  integer
    The amount to charge.
  • advance_rent integer
    The amount of advance rent to charge.
  • applicant_requests string
    The applicant special requests.
  • auto_apply_unit_fees boolean
    Whether to automatically apply the unit's fees.
  • automatic_deposit_registration object
    automatic_deposit_registration.branch_id string
    automatic_deposit_registration.scheme string
    automatic_deposit_registration.scheme_type string
  • break_clause object
    The break clause data.
    break_clause.notification_date timestamp
    The break clause notification date.
    break_clause.terms string
    The break clause terms.
  • checkin_time string
    The checkin time.
  • checkout_time string
    The checkout time.
  • completion_behavior string
    The completion behavior for the application. Can be automatic or manual.
  • contract string
    The contract's ID.
  • contract_address string
    The contract address. Passing this field will update the contract address on the selected unit record.
  • contract_legal_entity string
    The legal entity for the contract, if provided this replaces the owner legal details.
  • create_contract_on_accept boolean
    Whether to create a contract when the application is accepted.
  • create_deposit boolean
    Whether to create a deposit object when the deposit payments have been collected.
  • currency string
    Three-letter ISO currency code, in lowercase.
  • deposit integer
    The deposit amount.
  • deposit_data object
    The deposit data for the application.
    deposit_data.automatic_deposit object
    The automatic deposit hash.
    deposit_data.automatic_deposit.branch_id string
    The ID of the branch to use for the deposit.
    deposit_data.automatic_deposit.enabled boolean
    Whether to enable automatic deposits.
    deposit_data.handled_externally boolean
    Whether the deposit is handled externally or not. Usually this means the landlord or a thrid party has registered the deposit and will handle it.
    deposit_data.scheme object
    The deposit scheme information.
    deposit_data.scheme.provider required  string
    The deposit provider. Can be dps, mydeposits or tds.
    deposit_data.scheme.type required  string
    The deposit type. Can be custodial or insured.
  • end_behavior string
    The end behavior for the application. If there is a end date set at the end of the tenancy, 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.
  • enquiry string
    The enquiry's ID.
  • holding_fee integer
    The holding fee amount.
  • insurance object
    insurance.rent_protection object
    insurance.rent_protection.automatic boolean
    Whether to enable automatic rent protection.
    insurance.rent_protection.provider string
    The rent protection provider. Can be alan_boswell.
  • 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.
  • move_in_date timestamp
    The date the tenant is expected to move in. Useful for short term lets where the actual move in date may differ from the contractual move in date.
  • move_out_date timestamp
    The date the tenant is expected to move out. Useful for short term lets where the actual move out date may differ from the contractual move out date.
  • owner_signature_required boolean
    Whether the owner signature is required.
  • post_application_payment_session object
    The payment session data for the application.
    post_application_payment_session.amount required  integer
    The amount to charge.
    post_application_payment_session.description required  string
    The description of the payment session.
    post_application_payment_session.payment_method_types required  array of strings
    Can be one or many of autogiro, bacs_debit, bank_transfer, card, direct_transfer, pay_by_bank or sepa_debit.
    post_application_payment_session.reporting_type string
    The reporting type of the transaction. Defaults to charge. Can be advance_rent, charge, deposit, holding_fee or rent.
  • renewal_days_before_end integer
    The number of days before the end of the tenancy to renew it.
  • renewal_intent string
    The renewal intent to create this application with.
  • send_email boolean
    Whether to send emails to the applicants.
  • send_owner_contract boolean
    Whether to send the owner the contract on completion.

Returns

Returns the application object if the request succeeded.

Retrieve an application

GET /v1/applications/:id

curl https://api.yorlet.com/v1/applications/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "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,
  "completion_behavior": "automatic",
  "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
  }
}

Retrieves the application with the given ID.

Parameters

  • No parameters

Returns

Returns an application object if a valid identifier was provided.

Update an application

POST /v1/applications/:id

curl https://api.yorlet.com/v1/applications/:id \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "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,
  "completion_behavior": "automatic",
  "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
  }
}

Updates the specified application by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Parameters

  • account_collection_data object
    The account collection data, this overwrites any existing unit fees.
    account_collection_data.amount required  integer
    The amount to charge.
  • advance_rent integer
    The amount of advance rent to charge.
  • applicant_requests string
    The applicant special requests.
  • auto_apply_unit_fees boolean
    Whether to automatically apply the unit's fees.
  • automatic_deposit_registration object
    automatic_deposit_registration.branch_id string
    automatic_deposit_registration.scheme string
    automatic_deposit_registration.scheme_type string
  • break_clause object
    The break clause data.
    break_clause.notification_date timestamp
    The break clause notification date.
    break_clause.terms string
    The break clause terms.
  • checkin_time string
    The checkin time.
  • checkout_time string
    The checkout time.
  • contract_address string
    The contract address. Passing this field will update the contract address on the selected unit record.
  • contract_legal_entity string
    The legal entity for the contract, if provided this replaces the owner legal details.
  • contract_template string
    The ID of the contract template.
  • create_deposit boolean
    Whether to create a deposit object when the deposit payments have been collected.
  • currency string
    Three-letter ISO currency code, in lowercase.
  • deposit integer
    The deposit amount.
  • deposit_data object
    The deposit data for the application.
    deposit_data.automatic_deposit object
    The automatic deposit hash.
    deposit_data.automatic_deposit.branch_id string
    The ID of the branch to use for the deposit.
    deposit_data.automatic_deposit.enabled boolean
    Whether to enable automatic deposits.
    deposit_data.handled_externally boolean
    Whether the deposit is handled externally or not. Usually this means the landlord or a thrid party has registered the deposit and will handle it.
    deposit_data.scheme object
    The deposit scheme information.
    deposit_data.scheme.provider required  string
    The deposit provider. Can be dps, mydeposits or tds.
    deposit_data.scheme.type required  string
    The deposit type. Can be custodial or insured.
  • end_behavior string
    The end behavior for the application. If there is a end date set at the end of the tenancy, 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.
  • end_date timestamp
    The end date of the tenancy. When null the tenancy will roll periodically.
  • insurance object
    insurance.rent_protection object
    insurance.rent_protection.automatic boolean
    Whether to enable automatic rent protection.
    insurance.rent_protection.provider string
    The rent protection provider. Can be alan_boswell.
  • 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.
  • move_in_date timestamp
    The date the tenant is expected to move in. Useful for short term lets where the actual move in date may differ from the contractual move in date.
  • move_out_date timestamp
    The date the tenant is expected to move out. Useful for short term lets where the actual move out date may differ from the contractual move out date.
  • owner_signature_required boolean
    Whether the owner signature is required.
  • post_application_payment_session object
    The payment session data for the application.
    post_application_payment_session.amount required  integer
    The amount to charge.
    post_application_payment_session.description required  string
    The description of the payment session.
    post_application_payment_session.payment_method_types required  array of strings
    Can be one or many of autogiro, bacs_debit, bank_transfer, card, direct_transfer, pay_by_bank or sepa_debit.
    post_application_payment_session.reporting_type string
    The reporting type of the transaction. Defaults to charge. Can be advance_rent, charge, deposit, holding_fee or rent.
  • renewal_days_before_end integer
    The number of days before the end of the tenancy to renew it.
  • renewal_intent string
    The renewal intent to create this application with.
  • send_owner_contract boolean
    Whether to send the owner the contract on completion.
  • share_of_rent array of objects
    share_of_rent.applicant required  string
    share_of_rent.guarantor_required required  boolean
    share_of_rent.lead_tenant required  boolean
    share_of_rent.percentage required  number
    share_of_rent.permitted_occupier required  boolean
  • start_date timestamp
    The start date of the tenancy.
  • status string
    Sometimes it is useful to change the status to generate a contract. This is only allowed if the application does not already have a contract. Can be pending_contract_generation.
  • subscription_data object
    The subscription data for the subscription.
    subscription_data.collection_method required  string
    The collection method for the subscription. Can be charge_automatically or send_invoice.
    subscription_data.interval required  string
    The interval of the subscription. Can be month, week, custom or upfront.
    subscription_data.interval_count required  integer
    The interval count of the subscription.
    subscription_data.add_invoice_items array of objects
    A list of up to 10 invoice items that will be appended to the next invoice for this subscription.
    subscription_data.add_invoice_items.type required  string
    The type of subscription item. Can be rent, charge or product.
    subscription_data.add_invoice_items.description string
    Description for the subscription item.
    subscription_data.add_invoice_items.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.
    subscription_data.add_invoice_items.price string
    The ID of the price object.
    subscription_data.add_invoice_items.price_data object
    The price data for the subscription item.
    subscription_data.add_invoice_items.price_data.amount required  integer
    A positive integer in pence representing how much to charge.
    subscription_data.add_invoice_items.price_data.currency required  string
    Three-letter ISO currency code, in lowercase.
    subscription_data.add_invoice_items.price_data.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    subscription_data.add_invoice_items.proration_behavior string
    Can be create_prorations or none.
    subscription_data.add_invoice_items.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    subscription_data.add_invoice_items.transfer_behavior string
    Can be automatic, owner or none.
    subscription_data.add_invoice_items.transfer_destination string
    ID of the owner that will be the transfer destination. Only allowed when the subscription item transfer behavior is owner.
    subscription_data.add_invoice_items.unit string
    The ID of the unit. If type=rent you must provide a unit ID
    subscription_data.billing_anchor timestamp
    The date to anchor the subscription to.
    subscription_data.coupon string
    The ID of the coupon to apply to the subscription.
    subscription_data.days_before_collection integer
    The number of days to create the invoice before the subscription's next billing date. Useful if you want to send the customer the upcoming invoice a few days before the subscription's next billing date. Only applies to subscriptions with collection_method=send_invoice.
    subscription_data.days_until_due integer
    The number of days before the invoice is due.
    subscription_data.end_date timestamp
    The date this subscription should end. When a subscription ends the status will change to complete
    subscription_data.items array of objects
    A list of up to 10 subscription items, each with attached price_data.
    subscription_data.items.type required  string
    The type of subscription item. Can be rent, charge or product.
    subscription_data.items.description string
    Description for the subscription item.
    subscription_data.items.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.
    subscription_data.items.price string
    The ID of the price object.
    subscription_data.items.price_data object
    The price data for the subscription item.
    subscription_data.items.price_data.amount required  integer
    A positive integer in pence representing how much to charge.
    subscription_data.items.price_data.currency required  string
    Three-letter ISO currency code, in lowercase.
    subscription_data.items.price_data.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    subscription_data.items.proration_behavior string
    Can be create_prorations or none.
    subscription_data.items.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    subscription_data.items.transfer_behavior string
    Can be automatic, owner or none.
    subscription_data.items.transfer_destination string
    ID of the owner that will be the transfer destination. Only allowed when the subscription item transfer behavior is owner.
    subscription_data.items.unit string
    The ID of the unit. If type=rent you must provide a unit ID
    subscription_data.phases array of objects
    The phases of the subscription. Only allowed when interval=custom.
    subscription_data.phases.start_date required  timestamp
    The date on which the phase starts.
    subscription_data.phases.items array of objects
    A list of up to 10 subscription items, each with attached price_data.
    subscription_data.phases.items.type required  string
    The type of subscription item. Can be rent, charge or product.
    subscription_data.phases.items.description string
    Description for the subscription item.
    subscription_data.phases.items.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.
    subscription_data.phases.items.price string
    The ID of the price object.
    subscription_data.phases.items.price_data object
    The price data for the subscription item.
    subscription_data.phases.items.price_data.amount required  integer
    A positive integer in pence representing how much to charge.
    subscription_data.phases.items.price_data.currency required  string
    Three-letter ISO currency code, in lowercase.
    subscription_data.phases.items.price_data.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    subscription_data.phases.items.proration_behavior string
    Can be create_prorations or none.
    subscription_data.phases.items.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    subscription_data.phases.items.transfer_behavior string
    Can be automatic, owner or none.
    subscription_data.phases.items.transfer_destination string
    ID of the owner that will be the transfer destination. Only allowed when the subscription item transfer behavior is owner.
    subscription_data.phases.items.unit string
    The ID of the unit. If type=rent you must provide a unit ID
    subscription_data.start_date timestamp
    The date this subscription should begin. Start dates in the future will cause the initial status of the sunscription to be scheduled
  • unit string
    The unit ID.

Returns

Returns the application object if the update succeeded.

Accept an application

POST /v1/applications/:id/accept

curl https://api.yorlet.com/v1/applications/:id/accept \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "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,
  "completion_behavior": "automatic",
  "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
  }
}

Accepts the specified application.

Parameters

  • No parameters

Returns

Returns the updated application object.

Cancel an application

POST /v1/applications/:id/cancel

curl https://api.yorlet.com/v1/applications/:id/cancel \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "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,
  "completion_behavior": "automatic",
  "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
  }
}

Cancels the specified application.

Parameters

  • advance_rent_behavior required  string
    Can be none or refund.
  • cancel_reason required  string
    Can be requested_by_customer, incorrect_details, reference_failed, right_to_rent, not_suitable, no_units, timing or other.
  • deposit_behavior required  string
    Can be none or refund.
  • holding_fee_behavior required  string
    Can be recognize_revenue or refund.
  • cancel_reason_description string

Returns

Returns the updated application object.

Complete an application

POST /v1/applications/:id/complete

curl https://api.yorlet.com/v1/applications/:id/complete \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "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,
  "completion_behavior": "automatic",
  "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
  }
}

Marks the specified application as complete.

Parameters

  • No parameters

Returns

Returns the updated application object.

List all applications

GET /v1/applications

curl https://api.yorlet.com/v1/applications \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "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,
      "completion_behavior": "automatic",
      "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
      }
    }
  ],
  "count": 1,
  "has_more": false
}

Returns a list of applications. The applications are returned sorted by creation date, with the most recent applications appearing first.

Parameters

  • building string
    The building ID.
  • customer string
    The customer ID.
  • customers array of strings
    The customers IDs.
  • enquiry string
    The enquiry ID.
  • open string
    Whether the application is open.
  • status string or array of strings
    The status of the application. Can be one or many of pending, pending_payment_method, pending_acceptance, pending_deposit, pending_guarantor, pending_guarantor_approval, pending_guarantor_contract, pending_guarantor_contract_landlord, pending_contract_generation, pending_contract, pending_contract_landlord, complete, canceled, expired or declined.
  • type string
    The type of the application.
  • unit string
    The unit ID.

Returns

A object with a data property that contains an array of applications.

Buildings

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

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
  }
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be building.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • accounting_code string
    The accounting code to be used with invoice items associated with this building.
  • active boolean
    Whether the building is currently available for use.
  • address integer
    The building's address.
  • currency string
    Three-letter ISO currency code, in lowercase. Must be a supported currency.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • 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.
  • name string
    The building's name.
  • single_unit boolean
    Whether the building can only have a single unit.
  • type string
    The building's type. Can be block_management, commercial, residential or student.
  • unit_fees object
    unit_fees.management_fee float
    The default management fee to apply to units. Maximum decimal precision of 2.
    unit_fees.management_fee_amount integer
    The default management fee fixed amount, represented as a whole integer in the smallest currency unit.
    unit_fees.management_fee_type string
    The management fee type. Can be percentage or fixed.
    unit_fees.renewal_fee integer
    The default renewal fee to apply to units, represented as a whole integer in the smallest currency unit.
    unit_fees.tax float
    The default tax to apply to units. Maximum decimal precision of 2.
    unit_fees.tax_behavior string
    The default tax behavior to apply to units. One of exclusive or inclusive. Can be exclusive or inclusive.
    unit_fees.tenant_find_fee integer
    The default tenant find fee to apply to units, represented as a whole integer in the smallest currency unit.

Create a building

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.

Parameters

  • address required  object
    The building's address.
    address.country required  string
    Two-letter country code (ISO 3166-1 alpha-2).
    address.line1 required  string
    Address line 1 (e.g., street, PO Box, or company name).
    address.city string
    City, district, suburb, town, or village.
    address.line2 string
    Address line 2 (e.g., apartment, suite, unit, or building).
    address.postal_code string
    Postal code.
    address.state string
    State, county, province, or region.
  • name required  string
    The building's name.
  • accounting_code string
  • active boolean
  • currency string
    The default currency for the building and any units associated with the building. Can be eur, gbp, sek or usd.
  • description string
  • 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.
  • single_unit boolean
  • type string
    Can be block_management, commercial, residential or student.
  • unit_fees object
    unit_fees.management_fee number
    The unit's management fee percentage amount.
    unit_fees.management_fee_amount integer
    The unit's management fee fixed amount.
    unit_fees.management_fee_type string
    Can be percentage or fixed.
    unit_fees.renewal_fee integer
    The unit's renewal fee.
    unit_fees.tax number
    The tax to apply to the unit fees.
    unit_fees.tax_behavior string
    Whether the tax is included or excluded from the fees. Can be inclusive or exclusive.
    unit_fees.tenant_find_fee integer
    The unit's tenant find fee.

Returns

Returns the building object if the request succeeded.

Retrieve a building

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.

Parameters

  • No parameters

Returns

Returns a building object if a valid identifier was provided.

Update a building

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.

Parameters

  • accounting_code string
  • active boolean
  • address object
    The building's address.
    address.country required  string
    Two-letter country code (ISO 3166-1 alpha-2).
    address.line1 required  string
    Address line 1 (e.g., street, PO Box, or company name).
    address.city string
    City, district, suburb, town, or village.
    address.line2 string
    Address line 2 (e.g., apartment, suite, unit, or building).
    address.postal_code string
    Postal code.
    address.state string
    State, county, province, or region.
  • description string
  • 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.
  • name string
    The building's name.
  • type string
    Can be block_management, commercial, residential or student.
  • unit_fees object
    unit_fees.management_fee number
    The unit's management fee percentage amount.
    unit_fees.management_fee_amount integer
    The unit's management fee fixed amount.
    unit_fees.management_fee_type string
    Can be percentage or fixed.
    unit_fees.renewal_fee integer
    The unit's renewal fee.
    unit_fees.tax number
    The tax to apply to the unit fees.
    unit_fees.tax_behavior string
    Whether the tax is included or excluded from the fees. Can be inclusive or exclusive.
    unit_fees.tenant_find_fee integer
    The unit's tenant find fee.

Returns

Returns the building object if the update succeeded.

Delete a building

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.

Parameters

  • No parameters

Returns

Returns an object with a deleted parameter on success. If the building ID does not exist, this call throws an error.

List all buildings

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.

Parameters

  • active boolean
    Whether to return active buildings.
  • ids array of strings
    The IDs of the buildings to return.

Returns

A object with a data property that contains an array of buildings.

Contract Templates

Endpoints

POST    /v1/contract_templates
GET     /v1/contract_templates/:id
POST    /v1/contract_templates/:id
DELETE  /v1/contract_templates/:id
GET     /v1/contract_templates

Contract template objects allow you to manage document templates for different types of contracts. The API allows you to create, delete, and update your templates. You can retrieve individual templates as well as a list of all your templates.

The contract template object

The contract template object

{
  "id": "ct_test",
  "object": "contract_template",
  "created": 1627210800,
  "custom_title": null,
  "file": "file_test",
  "file_version": "v1",
  "name": "Default AST",
  "type": "ast"
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be contract_template.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • custom_title string
    The custom title for the contract template.
  • created_by string
    ID of the user that created the contract template.
  • file string
    The file for the contract template.
  • file_version string
    The version of the file for the contract template.
  • name string
    The name of the contract template.
  • type string
    The type of the contract template.
  • versions array
    The versions of the contract template.

Create a contract template

POST /v1/contract_templates

curl https://api.yorlet.com/v1/contract_templates \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "ct_test",
  "object": "contract_template",
  "created": 1627210800,
  "custom_title": null,
  "file": "file_test",
  "file_version": "v1",
  "name": "Default AST",
  "type": "ast"
}

Creates a new contract template.

Parameters

  • file required  string
    The file for the contract template.
  • name required  string
    The name of the contract template.
  • type required  string
    The type of the contract template. Can be addendum, ast, ast_agent, custom, guarantor, licence or property_management_agreement.
  • custom_title string
    The custom title for the contract template.
  • default boolean
    Whether the contract template is the default template for the account.

Returns

Returns the contract template object if the request succeeded.

Retrieve a contract template

GET /v1/contract_templates/:id

curl https://api.yorlet.com/v1/contract_templates/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "ct_test",
  "object": "contract_template",
  "created": 1627210800,
  "custom_title": null,
  "file": "file_test",
  "file_version": "v1",
  "name": "Default AST",
  "type": "ast"
}

Retrieves the contract template with the given ID.

Parameters

  • No parameters

Returns

Returns a contract template object if a valid identifier was provided.

Update a contract template

POST /v1/contract_templates/:id

curl https://api.yorlet.com/v1/contract_templates/:id \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "ct_test",
  "object": "contract_template",
  "created": 1627210800,
  "custom_title": null,
  "file": "file_test",
  "file_version": "v1",
  "name": "Default AST",
  "type": "ast"
}

Updates the specified contract template by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Parameters

  • name required  string
    The name of the contract template.

Returns

Returns the contract template object if the update succeeded.

Delete a contract template

DELETE /v1/contract_templates/:id

curl https://api.yorlet.com/v1/contract_templates/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "ct_test",
  "object": "contract_template",
  "deleted": true
}

Permanently deletes a contract template. This cannot be undone.

Parameters

  • No parameters

Returns

Returns an object with a deleted parameter on success. If the template ID does not exist, this call throws an error.

List all contract templates

GET /v1/contract_templates

curl https://api.yorlet.com/v1/contract_templates \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "ct_test",
      "object": "contract_template",
      "created": 1627210800,
      "custom_title": null,
      "file": "file_test",
      "file_version": "v1",
      "name": "Default AST",
      "type": "ast"
    }
  ],
  "count": 1,
  "has_more": false
}

Returns a list of contract templates. The templates are returned sorted by creation date, with the most recent templates appearing first.

Parameters

  • type string
    The type of the contract template. Can be addendum, ast, ast_agent, custom, guarantor, licence or property_management_agreement.

Returns

A object with a data property that contains an array of contract templates.

Customers

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

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
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be customer.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • address object
    The customer’s address.
  • archived boolean
    Whether the customer is archived. An archived customer cannot have applications, invoices, subscriptions, or payments create against them.
  • default_payment_method stringexpandable
    ID of the default payment method for the customer.
  • delinquent boolean
    A boolean to indicate whether the customer has any outstanding invoices.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • email string
    The customer’s email address.
  • invoice_prefix string
    The prefix for the customer used to generate unique invoice numbers.
  • metadata string
    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.
  • invoicing object
    The customer’s invoicing settings.
    invoicing.email_to string
    The email address to send invoices to.
    invoicing.email_cc array
    List of emails to CC in the invoice email.
  • next_invoice_sequence string
    The suffix of the customer’s next invoice number, e.g., 0001.
  • legal_completed boolean
    Whether the customer's legal information is completed.
  • legal object
    The customer's legal information.
  • name string
    The customer's name.
  • phone string
    The customer's phone number.
  • resident boolean
    Whether the customer is currently an active resident.

Create a 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.

Parameters

  • email required  string
    The customer's email address.
  • address object
    The customer's address.
    address.country required  string
    Two-letter country code (ISO 3166-1 alpha-2).
    address.line1 required  string
    Address line 1 (e.g., street, PO Box, or company name).
    address.city string
    City, district, suburb, town, or village.
    address.line2 string
    Address line 2 (e.g., apartment, suite, unit, or building).
    address.postal_code string
    Postal code.
    address.state string
    State, county, province, or region.
  • description string
    An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
  • invoice_prefix string
    The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
  • invoicing object
    The customer’s invoicing settings.
    invoicing.arrears_emails boolean
    Whether to send arrears emails to the customer.
    invoicing.email_cc array of strings
    List of emails to CC in the invoice email.
    invoicing.email_to string
    The email address to send invoices to.
  • legal object
    The customer's legal information. Used for generating contracts.
    legal.dob object
    legal.dob.day required  integer
    legal.dob.month required  integer
    legal.dob.year required  integer
    legal.first_name string
    The customer's full legal firstname.
    legal.last_name string
    The customer's full legal lastname.
    legal.previous_addresses array of objects
    The customer's previous addresses.
    legal.previous_addresses.country required  string
    Two-letter country code (ISO 3166-1 alpha-2).
    legal.previous_addresses.line1 required  string
    Address line 1 (e.g., street, PO Box, or company name).
    legal.previous_addresses.city string
    City, district, suburb, town, or village.
    legal.previous_addresses.line2 string
    Address line 2 (e.g., apartment, suite, unit, or building).
    legal.previous_addresses.postal_code string
    Postal code.
    legal.previous_addresses.state string
    State, county, province, or region.
  • 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.
  • name string
    The customer's name.
  • next_invoice_sequence integer
    The sequence to be used on the customer’s next invoice. Defaults to 1.
  • phone string
    The customer's phone number.

Returns

Returns the customer object if the request succeeded.

Retrieve a customer

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.

Parameters

  • No parameters

Returns

Returns a customer object if a valid identifier was provided.

Update a customer

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.

Parameters

  • address object
    The customer's address.
    address.country required  string
    Two-letter country code (ISO 3166-1 alpha-2).
    address.line1 required  string
    Address line 1 (e.g., street, PO Box, or company name).
    address.city string
    City, district, suburb, town, or village.
    address.line2 string
    Address line 2 (e.g., apartment, suite, unit, or building).
    address.postal_code string
    Postal code.
    address.state string
    State, county, province, or region.
  • archived boolean
  • description string
    An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
  • email string
    The customer's email address.
  • invoice_prefix string
    The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
  • invoicing object
    The customer’s invoicing settings.
    invoicing.arrears_emails boolean
    Whether to send arrears emails to the customer.
    invoicing.email_cc array of strings
    List of emails to CC in the invoice email.
    invoicing.email_to string
    The email address to send invoices to.
  • legal object
    The customer's legal information. Used for generating contracts.
    legal.dob object
    legal.dob.day required  integer
    legal.dob.month required  integer
    legal.dob.year required  integer
    legal.first_name string
    The customer's full legal firstname.
    legal.last_name string
    The customer's full legal lastname.
    legal.previous_addresses array of objects
    The customer's previous addresses.
    legal.previous_addresses.country required  string
    Two-letter country code (ISO 3166-1 alpha-2).
    legal.previous_addresses.line1 required  string
    Address line 1 (e.g., street, PO Box, or company name).
    legal.previous_addresses.city string
    City, district, suburb, town, or village.
    legal.previous_addresses.line2 string
    Address line 2 (e.g., apartment, suite, unit, or building).
    legal.previous_addresses.postal_code string
    Postal code.
    legal.previous_addresses.state string
    State, county, province, or region.
  • 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.
  • name string
    The customer's name.
  • next_invoice_sequence integer
    The sequence to be used on the customer’s next invoice. Defaults to 1.
  • phone string
    The customer's phone number.

Returns

Returns the customer object if the update succeeded.

Delete a customer

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.

Parameters

  • No parameters

Returns

Returns an object with a deleted parameter on success. If the customer ID does not exist, this call throws an error.

List all customers

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.

Parameters

  • active_tenancy string
    The ID of the active tenancy to filter results.
  • archived boolean
    Whether to return archived customers.
  • delinquent boolean
    Whether to return delinquent customers.
  • email string
    A case-sensitive filter on the list based on the customer’s email field. The value must be a string.
  • resident boolean
    Whether to return resident customers.
  • risk_level string or array of strings
    The risk level to filter results. Can be one or many of elevated or highest.
  • type string
    The type of customer to filter results.

Returns

A object with a data property that contains an array of customers.

Deposits

Endpoints

POST    /v1/deposits
GET     /v1/deposits/:id
POST    /v1/deposits/:id
POST    /v1/deposits/:id/activate
POST    /v1/deposits/:id/return
POST    /v1/deposits/:id/mark_returned
POST    /v1/deposits/:id/transfer
DELETE  /v1/deposits/:id
GET     /v1/deposits

The deposit object

The deposit object

{
  "id": "deposit_test",
  "object": "deposit",
  "created": 1627210800,
  "amount": 100000,
  "amount_charged": 0,
  "amount_returned": 0,
  "application": null,
  "automatic_deposit": {
    "branch_id": null,
    "enabled": false,
    "last_error": null,
    "status": null
  },
  "country": null,
  "currency": "gbp",
  "handled_externally": false,
  "metadata": {},
  "requires_external_transfer": false,
  "requirements": {},
  "returned_at": null,
  "returned": false,
  "scheme": {
    "certificate": null,
    "provider": null,
    "registration_deadline": null,
    "registration_number": null,
    "type": null
  },
  "status": null,
  "transferred": false,
  "unit": null
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be deposit.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • amount integer
    The deposit amount.
  • amount_charged integer
    The amount charged for the deposit.
  • amount_returned integer
    The amount returned for the deposit.
  • application stringexpandable
    The identifier of the application for the deposit.
  • automatic_deposit object
    The automatic deposit settings for this deposit.
  • country string
    The country of the deposit.
  • currency string
    Three-letter ISO currency code, in lowercase. Must be a supported currency.
  • customer_ids array
    Array of customer IDs this deposit is for.
  • description string
    The description of the deposit.
  • handled_externally boolean
    Whether the deposit is handled externally.
  • 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.
  • requires_external_transfer boolean
    Whether the deposit requires transfer to an external scheme.
  • requirements object
    The requirements for the deposit.
  • returned_at timestamp
    The date the deposit was returned.
  • returned boolean
    Whether the deposit has been returned.
  • scheme object
    A hash containing details of the deposit scheme.
  • source_transactions object
    The source transactions for the deposit.
  • status string
    The status of the deposit.
  • transferred boolean
    Whether the deposit has been transferred.
  • unit stringexpandable
    ID of the unit associated with this deposit.

Create a deposit

POST /v1/deposits

curl https://api.yorlet.com/v1/deposits \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "deposit_test",
  "object": "deposit",
  "created": 1627210800,
  "amount": 100000,
  "amount_charged": 0,
  "amount_returned": 0,
  "application": null,
  "automatic_deposit": {
    "branch_id": null,
    "enabled": false,
    "last_error": null,
    "status": null
  },
  "country": null,
  "currency": "gbp",
  "handled_externally": false,
  "metadata": {},
  "requires_external_transfer": false,
  "requirements": {},
  "returned_at": null,
  "returned": false,
  "scheme": {
    "certificate": null,
    "provider": null,
    "registration_deadline": null,
    "registration_number": null,
    "type": null
  },
  "status": null,
  "transferred": false,
  "unit": null
}

Creates a new deposit.

Parameters

  • application required  string
    The ID of the application this deposit is for.
  • amount integer
    The amount of the deposit.
  • automatic_deposit object
    A hash containing details of the automatic deposit.
    automatic_deposit.enabled required  boolean
    Whether to automatically deposit the funds.
    automatic_deposit.branch_id string
    The ID of the branch to automatically deposit the funds to.
  • country string
    The ISO 3166-1 alpha-2 country code of the deposit.
  • 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 thrid 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.
    scheme.certificate string
    The certificate ID of the deposit scheme.
    scheme.provider string
    The provider of the deposit scheme. Can be dps, mydeposits or tds.
    scheme.registration_number string
    The registration number of the deposit scheme.
    scheme.type string
    The type of deposit scheme. Can be custodial or insured.

Returns

Returns the Deposit object if the request succeeded.

Retrieve a deposit

GET /v1/deposits/:id

curl https://api.yorlet.com/v1/deposits/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "deposit_test",
  "object": "deposit",
  "created": 1627210800,
  "amount": 100000,
  "amount_charged": 0,
  "amount_returned": 0,
  "application": null,
  "automatic_deposit": {
    "branch_id": null,
    "enabled": false,
    "last_error": null,
    "status": null
  },
  "country": null,
  "currency": "gbp",
  "handled_externally": false,
  "metadata": {},
  "requires_external_transfer": false,
  "requirements": {},
  "returned_at": null,
  "returned": false,
  "scheme": {
    "certificate": null,
    "provider": null,
    "registration_deadline": null,
    "registration_number": null,
    "type": null
  },
  "status": null,
  "transferred": false,
  "unit": null
}

Retrieves the deposit with the given ID.

Parameters

  • No parameters

Returns

A Deposit object if a valid identifier was provided.

Update a deposit

POST /v1/deposits/:id

curl https://api.yorlet.com/v1/deposits/:id \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "deposit_test",
  "object": "deposit",
  "created": 1627210800,
  "amount": 100000,
  "amount_charged": 0,
  "amount_returned": 0,
  "application": null,
  "automatic_deposit": {
    "branch_id": null,
    "enabled": false,
    "last_error": null,
    "status": null
  },
  "country": null,
  "currency": "gbp",
  "handled_externally": false,
  "metadata": {},
  "requires_external_transfer": false,
  "requirements": {},
  "returned_at": null,
  "returned": false,
  "scheme": {
    "certificate": null,
    "provider": null,
    "registration_deadline": null,
    "registration_number": null,
    "type": null
  },
  "status": null,
  "transferred": false,
  "unit": null
}

Updates the deposit with the given ID.

Parameters

  • amount integer
    The amount of the deposit.
  • 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 thrid 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.
    scheme.certificate string
    The certificate ID of the deposit scheme.
    scheme.provider string
    The provider of the deposit scheme. Can be dps, mydeposits or tds.
    scheme.registration_number string
    The registration number of the deposit scheme.
    scheme.type string
    The type of deposit scheme. Can be custodial or insured.

Returns

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

Activate a deposit

POST /v1/deposits/:id/activate

curl https://api.yorlet.com/v1/deposits/:id/activate \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "deposit_test",
  "object": "deposit",
  "created": 1627210800,
  "amount": 100000,
  "amount_charged": 0,
  "amount_returned": 0,
  "application": null,
  "automatic_deposit": {
    "branch_id": null,
    "enabled": false,
    "last_error": null,
    "status": null
  },
  "country": null,
  "currency": "gbp",
  "handled_externally": false,
  "metadata": {},
  "requires_external_transfer": false,
  "requirements": {},
  "returned_at": null,
  "returned": false,
  "scheme": {
    "certificate": null,
    "provider": null,
    "registration_deadline": null,
    "registration_number": null,
    "type": null
  },
  "status": null,
  "transferred": false,
  "unit": null
}

Activate a deposit.

Parameters

  • amount integer
    The amount of the deposit.
  • automatic_deposit object
    A hash containing details of the automatic deposit.
    automatic_deposit.enabled required  boolean
    Whether to automatically deposit the funds.
    automatic_deposit.branch_id string
    The ID of the branch to automatically deposit the funds to.
  • automatic_transfers boolean
    Whether to automatically transfer the deposit to the owner accounts.
  • 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 thrid 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.
    scheme.certificate string
    The certificate ID of the deposit scheme.
    scheme.provider string
    The provider of the deposit scheme. Can be dps, mydeposits or tds.
    scheme.registration_number string
    The registration number of the deposit scheme.
    scheme.type string
    The type of deposit scheme. Can be custodial or insured.
  • send_email boolean
    Whether to send an email to the tenant.

Returns

Returns the Deposit object if the request succeeded.

Return a deposit

POST /v1/deposits/:id/return

curl https://api.yorlet.com/v1/deposits/:id/return \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "deposit_test",
  "object": "deposit",
  "created": 1627210800,
  "amount": 100000,
  "amount_charged": 0,
  "amount_returned": 0,
  "application": null,
  "automatic_deposit": {
    "branch_id": null,
    "enabled": false,
    "last_error": null,
    "status": null
  },
  "country": null,
  "currency": "gbp",
  "handled_externally": false,
  "metadata": {},
  "requires_external_transfer": false,
  "requirements": {},
  "returned_at": null,
  "returned": false,
  "scheme": {
    "certificate": null,
    "provider": null,
    "registration_deadline": null,
    "registration_number": null,
    "type": null
  },
  "status": null,
  "transferred": false,
  "unit": null
}

Return a deposit.

Parameters

  • automatic_transfers boolean
    Whether to automatically transfer the deposit to the owner accounts.

Returns

A Deposit object if the request succeeded.

Mark a deposit as returned

POST /v1/deposits/:id/mark_returned

curl https://api.yorlet.com/v1/deposits/:id/mark_returned \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "deposit_test",
  "object": "deposit",
  "created": 1627210800,
  "amount": 100000,
  "amount_charged": 0,
  "amount_returned": 0,
  "application": null,
  "automatic_deposit": {
    "branch_id": null,
    "enabled": false,
    "last_error": null,
    "status": null
  },
  "country": null,
  "currency": "gbp",
  "handled_externally": false,
  "metadata": {},
  "requires_external_transfer": false,
  "requirements": {},
  "returned_at": null,
  "returned": false,
  "scheme": {
    "certificate": null,
    "provider": null,
    "registration_deadline": null,
    "registration_number": null,
    "type": null
  },
  "status": null,
  "transferred": false,
  "unit": null
}

Marking a deposit as returned is the final step in returning a deposit.

Parameters

  • returned_at timestamp
    The date the deposit was returned.

Returns

A Deposit object if the request succeeded.

Mark a deposit as transferred

POST /v1/deposits/:id/transfer

curl https://api.yorlet.com/v1/deposits/:id/transfer \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "deposit_test",
  "object": "deposit",
  "created": 1627210800,
  "amount": 100000,
  "amount_charged": 0,
  "amount_returned": 0,
  "application": null,
  "automatic_deposit": {
    "branch_id": null,
    "enabled": false,
    "last_error": null,
    "status": null
  },
  "country": null,
  "currency": "gbp",
  "handled_externally": false,
  "metadata": {},
  "requires_external_transfer": false,
  "requirements": {},
  "returned_at": null,
  "returned": false,
  "scheme": {
    "certificate": null,
    "provider": null,
    "registration_deadline": null,
    "registration_number": null,
    "type": null
  },
  "status": null,
  "transferred": false,
  "unit": null
}

Marking a deposit as transferred is the final step in activating certain deposits.

Parameters

  • transferred_at timestamp
    The date the deposit was transferred.

Returns

A Deposit object if the request succeeded.

Delete a deposit

DELETE /v1/deposits/:id

curl https://api.yorlet.com/v1/deposits/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "deposit_test",
  "object": "deposit",
  "deleted": true
}

Deletes the deposit with the given ID.

Parameters

  • No parameters

Returns

An object with the deleted deposit’s ID and a deleted flag upon success.

List all deposits

GET /v1/deposits

curl https://api.yorlet.com/v1/deposits \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "deposit_test",
      "object": "deposit",
      "created": 1627210800,
      "amount": 100000,
      "amount_charged": 0,
      "amount_returned": 0,
      "application": null,
      "automatic_deposit": {
        "branch_id": null,
        "enabled": false,
        "last_error": null,
        "status": null
      },
      "country": null,
      "currency": "gbp",
      "handled_externally": false,
      "metadata": {},
      "requires_external_transfer": false,
      "requirements": {},
      "returned_at": null,
      "returned": false,
      "scheme": {
        "certificate": null,
        "provider": null,
        "registration_deadline": null,
        "registration_number": null,
        "type": null
      },
      "status": null,
      "transferred": false,
      "unit": null
    }
  ],
  "count": 1,
  "has_more": false
}

A list of deposits. The deposits are returned sorted by creation date, with the most recent deposits appearing first.

Parameters

  • No parameters

Returns

A object with a data property that contains an array of deposits.

Deposit Charges

Endpoints

POST    /v1/deposits/:id/charges
GET     /v1/deposits/:id/charges/:id
POST    /v1/deposits/:id/charges/:id/accept
POST    /v1/deposits/:id/charges/:id/cancel
POST    /v1/deposits/:id/charges/:id/dispute
DELETE  /v1/deposits/:id/charges/:id
POST    /v1/deposits/:id/charges/:id
GET     /v1/deposits/:id/charges

The deposit charge object

The deposit charge object

{
  "id": "deposit_ch_test",
  "object": "deposit_charge",
  "created": 1627210800,
  "amount": 100000,
  "currency": "gbp",
  "deposit": null,
  "description": null,
  "destination": null,
  "dispute": null,
  "disputed": false,
  "metadata": {},
  "original_amount": 0
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be deposit_charge.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • amount integer
    The deposit charge amount.
  • currency string
    Three-letter ISO currency code, in lowercase. Must be a supported currency.
  • deposit stringexpandable
  • description string
  • destination stringexpandable
    The ID of an owner account to allocate the collection funds to.
  • dispute object
  • disputed boolean
  • 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.
  • original_amount integer
    The original deposit charge amount.
  • status string
    The status of the deposit charge.
  • type string
    The type of the deposit charge.

Create a deposit charge

POST /v1/deposits/:id/charges

curl https://api.yorlet.com/v1/deposits/:id/charges \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "deposit_ch_test",
  "object": "deposit_charge",
  "created": 1627210800,
  "amount": 100000,
  "currency": "gbp",
  "deposit": null,
  "description": null,
  "destination": null,
  "dispute": null,
  "disputed": false,
  "metadata": {},
  "original_amount": 0
}

Creates a new deposit charge.

Parameters

  • amount required  integer
    The amount of the deposit charge.
  • type required  string
    The type of the deposit charge. Can be arrears, charge, dilapidation or other.
  • accept boolean
  • description string
    The description of the deposit charge.
  • destination string
    The destination of the deposit charge.
  • 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.

Returns

The Deposit Charge object if the request succeeded.

Retrieve a deposit charge

GET /v1/deposits/:id/charges/:id

curl https://api.yorlet.com/v1/deposits/:id/charges/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "deposit_ch_test",
  "object": "deposit_charge",
  "created": 1627210800,
  "amount": 100000,
  "currency": "gbp",
  "deposit": null,
  "description": null,
  "destination": null,
  "dispute": null,
  "disputed": false,
  "metadata": {},
  "original_amount": 0
}

Retrieves the deposit charge with the given ID.

Parameters

  • No parameters

Returns

A Deposit Charge object if a valid identifier was provided.

Accept a deposit charge

POST /v1/deposits/:id/charges/:id/accept

curl https://api.yorlet.com/v1/deposits/:id/charges/:id/accept \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "deposit_ch_test",
  "object": "deposit_charge",
  "created": 1627210800,
  "amount": 100000,
  "currency": "gbp",
  "deposit": null,
  "description": null,
  "destination": null,
  "dispute": null,
  "disputed": false,
  "metadata": {},
  "original_amount": 0
}

Accept the deposit charge with the given ID.

Parameters

  • customer_declaration required  object
    The customer declaration hash.
    customer_declaration.date required  timestamp
    The date of the customer declaration.
    customer_declaration.ip required  string
    The IP address of the customer declaration.

Returns

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

Cancel a deposit charge

POST /v1/deposits/:id/charges/:id/cancel

curl https://api.yorlet.com/v1/deposits/:id/charges/:id/cancel \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "deposit_ch_test",
  "object": "deposit_charge",
  "created": 1627210800,
  "amount": 100000,
  "currency": "gbp",
  "deposit": null,
  "description": null,
  "destination": null,
  "dispute": null,
  "disputed": false,
  "metadata": {},
  "original_amount": 0
}

Cancel the deposit charge with the given ID.

Parameters

  • No parameters

Returns

An object with the deleted deposit charge’s ID

Dispute a deposit charge

POST /v1/deposits/:id/charges/:id/dispute

curl https://api.yorlet.com/v1/deposits/:id/charges/:id/dispute \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "deposit_ch_test",
  "object": "deposit_charge",
  "created": 1627210800,
  "amount": 100000,
  "currency": "gbp",
  "deposit": null,
  "description": null,
  "destination": null,
  "dispute": null,
  "disputed": false,
  "metadata": {},
  "original_amount": 0
}

Dispute the deposit charge with the given ID.

Parameters

  • comments required  string
    The comments of the deposit charge.
  • counter_amount required  integer
    The counter amount of the deposit charge.

Returns

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

Delete a deposit charge

DELETE /v1/deposits/:id/charges/:id

curl https://api.yorlet.com/v1/deposits/:id/charges/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "deposit_ch_test",
  "object": "deposit_charge",
  "deleted": true
}

Deletes the deposit charge with the given ID.

Parameters

  • No parameters

Returns

An object with the deleted deposit charge’s ID and a deleted flag upon success.

Update a deposit charge

POST /v1/deposits/:id/charges/:id

curl https://api.yorlet.com/v1/deposits/:id/charges/:id \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "deposit_ch_test",
  "object": "deposit_charge",
  "created": 1627210800,
  "amount": 100000,
  "currency": "gbp",
  "deposit": null,
  "description": null,
  "destination": null,
  "dispute": null,
  "disputed": false,
  "metadata": {},
  "original_amount": 0
}

Updates the deposit charge with the given ID.

Parameters

  • No parameters

Returns

An object with the deleted deposit charge’s ID

List all deposit charges

GET /v1/deposits/:id/charges

curl https://api.yorlet.com/v1/deposits/:id/charges \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "deposit_ch_test",
      "object": "deposit_charge",
      "created": 1627210800,
      "amount": 100000,
      "currency": "gbp",
      "deposit": null,
      "description": null,
      "destination": null,
      "dispute": null,
      "disputed": false,
      "metadata": {},
      "original_amount": 0
    }
  ],
  "count": 1,
  "has_more": false
}

A list of deposit charges. The deposit charges are returned sorted by creation date, with the most recent deposit charges appearing first.

Parameters

  • No parameters

Returns

A object with a data property that contains an array of Deposit Charge objects.

Enquiries

Endpoints

POST    /v1/enquiries/

Enquiries help you track the status of a enquiry request.

The enquiry object

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"
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be enquiry.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • building stringexpandable
    The identifier of the building for the enquiry.
  • customer string
    The identifier of the customer for the enquiry.
  • declined_reason string
    The reason for declining the enquiry.
  • declined_reason_description string
    The description of the reason for declining the enquiry.
  • description string
    The description of the enquiry.
  • email string
    The email address of the customer for the enquiry.
  • follow_up timestamp
    The time at which the enquiry should be followed up.
  • 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.
  • name string
    The name of the customer for the enquiry.
  • phone string
    The phone number of the customer for the enquiry.
  • referral object
    The referral information for the enquiry.
  • requirements object
  • selected_unit string
    The identifier of the selected unit for the enquiry.
  • source string
    The source of the enquiry.
  • status string
    The status of the enquiry.
  • status_transitions object
    The status transitions for the enquiry.
  • type object
    The type of the enquiry.

Create an 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.

Parameters

  • building string
  • customer string
  • description string
  • email string
  • follow_up timestamp
  • 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.
  • name string
  • phone string
  • referral object
    referral.campaign string
    referral.heard_from string
    referral.medium string
    referral.source string
  • requirements object
    requirements.balcony boolean
    requirements.bedrooms integer
    requirements.budget_max integer
    requirements.budget_min integer
    requirements.furnished boolean
    requirements.length_of_stay string
    requirements.move_in string
    Can be asap, january, february, march, april, may, june, july, august, september, october, november or december.
    requirements.parking boolean
    requirements.pet_friendly boolean
    requirements.right_to_rent string
    Can be not_provided, provided or certified.
    requirements.type string
    Can be commercial, residential or student.
  • selected_unit string
  • type string

Returns

Returns a enquiry object.

Events

Endpoints

GET     /v1/events/:id
GET     /v1/events

Events let you know when something happens in your account.

The event object

The event object

{
  "id": "evt_test",
  "object": "event",
  "created": 1627210800,
  "account": null,
  "data": {},
  "request": {},
  "type": null
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be event.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • account string
  • data object
  • request object
  • type string

Retrieve an 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.

Parameters

  • No parameters

Returns

Returns an event if a valid identifier was provided, and returns an error otherwise.

List all events

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.

Parameters

  • No parameters

Returns

Returns a list of events if a valid identifier was provided, and returns an error otherwise.

Types of events

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.

Event

  • account.updated data.object of account
    Occurs whenever an account is updated.
  • application.accepted data.object of application
    Occurs whenever an application is accepted.
    application.canceled data.object of application
    Occurs whenever an application is canceled.
    application.created data.object of application
    Occurs whenever an application is created.
    application.completed data.object of application
    Occurs whenever an application is completed.
    application.updated data.object of application
    Occurs whenever an application is updated.
  • building.created data.object of building
    Occurs whenever a building is created.
    building.deleted data.object of building
    Occurs whenever a building is deleted.
    building.updated data.object of building
    Occurs whenever a building is updated.
  • contract.created data.object of contract
    Occurs whenever a contract is created.
    contract.completed data.object of contract
    Occurs whenever a contract is completed.
    contract.out_for_signature data.object of contract
    Occurs whenever a contract is sent out for signature.
  • customer.created data.object of customer
    Occurs whenever a customer is created.
    customer.deleted data.object of customer
    Occurs whenever a customer is deleted.
    customer.updated data.object of customer
    Occurs whenever a customer is updated.
  • dispute.created data.object of dispute
    Occurs whenever a dispute is created.
    dispute.resolved data.object of dispute
    Occurs whenever a dispute is resolved.
  • invoice.created data.object of invoice
    Occurs whenever a invoice is created.
    invoice.finalization_failed data.object of invoice
    Occurs whenever a invoice fails finalization.
    invoice.finalized data.object of invoice
    Occurs whenever a invoice is finalized and marked as open.
    invoice.paid data.object of invoice
    Occurs whenever a invoice is paid.
    invoice.payment_failed data.object of invoice
    Occurs whenever a invoice payment fails.
    invoice.sent data.object of invoice
    Occurs whenever an invoice email is sent.
    invoice.voided data.object of invoice
    Occurs whenever a invoice is voided.
  • owner.created data.object of owners
    Occurs whenever an owner is created.
    owner.updated data.object of owners
    Occurs whenever an owner us updated.
  • payment_method.chargeable data.object of payment method
    Occurs whenever a payment method becomes chargeable.
    payment_method.created data.object of payment method
    Occurs whenever a payment method is created.
    payment_method.failed data.object of payment method
    Occurs whenever a payment method fails.
  • payment_method_transaction.created data.object of payment method transaction
    Occurs whenever a payment method transaction is created.
  • payment_session.created data.object of payment session
    Occurs whenever a payment session is created.
    payment_session.paid data.object of payment session
    Occurs whenever a payment session is paid.
  • renewal_intent.canceled data.object of renewal intent
    Occurs whenever an renewal intent is canceled.
    renewal_intent.created data.object of renewal intent
    Occurs whenever an renewal intent is created.
    renewal_intent.completed data.object of renewal intent
    Occurs whenever an renewal intent is completed.
    renewal_intent.updated data.object of renewal intent
    Occurs whenever an renewal intent is updated.
  • subscription.canceled data.object of subscription
    Occurs whenever a subscription is canceled.
    subscription.completed data.object of subscription
    Occurs whenever a subscription is completed.
    subscription.created data.object of subscription
    Occurs whenever a subscription is created.
    subscription.updated data.object of subscription
    Occurs whenever a subscription is updated.
  • tenancy.activated data.object of tenancy
    Occurs whenever an tenancy is activated.
    tenancy.canceled data.object of tenancy
    Occurs whenever an tenancy is canceled.
    tenancy.created data.object of tenancy
    Occurs whenever an tenancy is created.
    tenancy.completed data.object of tenancy
    Occurs whenever an tenancy is completed.
    tenancy.updated data.object of tenancy
    Occurs whenever an tenancy is updated.
  • transaction.canceled data.object of transaction
    Occurs whenever a transaction is canceled.
    transaction.created data.object of transaction
    Occurs whenever a transaction is created.
    transaction.payment_failed data.object of transaction
    Occurs whenever a transaction fails.
    transaction.processing data.object of transaction
    Occurs whenever a transaction is processing.
    transaction.succeeded data.object of transaction
    Occurs whenever a transaction has succeeded.
  • unit.archived data.object of unit
    Occurs whenever a unit is archived.
    unit.created data.object of unit
    Occurs whenever a unit is created.
    unit.deleted data.object of unit
    Occurs whenever a unit is deleted.
    unit.updated data.object of unit
    Occurs whenever a unit is updated.
  • viewing.created data.object of viewing
    Occurs whenever a viewing is created.

References

Endpoints

POST    /v1/references
GET     /v1/references/:id
POST    /v1/references/:id
GET     /v1/references

References help you track the status of a reference request.

The reference object

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"
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be reference.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • application stringexpandable
    The identifier of the application for the reference.
  • automatic_reference object
    Automatic reference settings for this reference.
    automatic_reference.canopy object
    The automtic reference settings for Canopy.
    automatic_reference.canopy.type string
    The reference type. Can be instant or full.
    automatic_reference.enabled boolean
    Controls whether Yorlet will automatically reference the customer with the supplied provider.
    automatic_reference.last_error object
    The error encountered during the previous attempt to process the reference. This field is cleared when the reference is successfully completed.
    automatic_reference.last_error.message string
    A human-readable message providing more details about the error.
    automatic_reference.last_error.type string
    The type of error returned.
    automatic_reference.outcome string
    The provider outcome for the automatic reference.
    automatic_reference.provider string
    The provider to use with automatic referencing. Can be canopy, homelet or let_alliance.
    automatic_reference.status string
    The provider status for the automatic reference.
  • completed_at timestamp
    Time at which the object was completed. Measured in seconds since the Unix epoch.
  • customer stringexpandable
    The identifier of the customer to reference.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • 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.
  • outcome string
    The outcome of the reference. Can be accept, consider or high_risk.
  • reference_pdf string
    (ID of a file upload) The completed reference PDF.
  • status string
    The status of this reference. Can be pending, processing or complete.
  • type string
    The type of the reference. Can be customer.

Create a reference

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.

Parameters

  • customer required  string
    The identifier of the customer to reference.
  • type required  string
    The reference type. Can be customer.
  • application string
    The identifier of the application for the reference.
  • automatic_reference object
    Automatic reference settings for this reference.
    automatic_reference.enabled required  boolean
    Enabled automatic reference will automatically reference the customer with a provider.
    automatic_reference.provider required  string
    The provider to use with automatic referencing. Can be canopy, homelet or let_alliance.
    automatic_reference.canopy object
    The automtic reference settings for Canopy.
    automatic_reference.canopy.is_guarantor_needed boolean
    Whether a guarantor is needed for the reference.
    automatic_reference.canopy.item_type string
    The reference type. Can be full, instant, pre_qualification or priority.
    automatic_reference.canopy.request_type string
    The request type. Can be renter_screening or guarantor_screening.
  • 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.

Returns

Returns the Reference object if the request succeeded.

Retrieve a reference

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.

Parameters

  • No parameters

Returns

A Reference object if a valid identifier was provided.

Update a reference

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.

Parameters

  • 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.
  • outcome string
    The outcome of the reference. Can be accept, consider or high_risk.
  • reference_pdf string
    The file of the completed reference PDF.

Returns

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

List all references

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.

Parameters

  • No parameters

Returns

A object with a data property that contains an array of references.

Renewal Intents

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

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
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be renewal_intent.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • application stringexpandable
    The ID of the renewal application this renewal intent created.
  • canceled_at timestamp
    Time at which the renewal intent was canceled. Measured in seconds since the Unix epoch.
  • completed_at timestamp
    Time at which the renewal intent was completed. Measured in seconds since the Unix epoch.
  • no_renewal object
    A hash of the no_renewal data.
    no_renewal.reason string
    The reason code why the renewal intent was not renewed. Can be affordability, circumstance_change, relocating, unit_issue or other.
    no_renewal.reason_description string
    A description of why the renewal intent was not renewed.
  • renewal object
    A hash of the renewal data.
    renewal.end_date integer
    The end date of the renewal.
    renewal.start_date integer
    The start date of the renewal.
  • source_application stringexpandable
    The ID of the application this renewal intent is was created from.
  • status string
    The status of the renewal intent. Can be pending, renewing, leaving or complete.
  • type string
    The type of renewal intent. Will be null until the type is set. Can be null, renewal or no_renewal.
  • unit stringexpandable
    The ID of the unit the source application was for.

Create a renewal intent

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.

Parameters

  • source_application required  string
    The ID of the application this renewal intent is for.
  • 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.
  • no_renewal object
    no_renewal.reason string
    The reason code why the renewal intent was not renewed. Can be affordability, circumstance_change, relocating, unit_issue or other.
    no_renewal.reason_description string
    A description of why the renewal intent was not renewed.
  • renewal object
    renewal.end_date timestamp
    The end date of the renewal.
    renewal.start_date timestamp
    The start date of the renewal.
  • type string
    The type of renewal intent. Can be renewal or no_renewal.

Returns

Returns the x object if the request succeeded.

Retrieve a renewal intent

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.

Parameters

  • No parameters

Returns

Returns a renewal intent object if a valid identifier was provided.

Update a renewal intent

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.

Parameters

  • 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.
  • no_renewal object
    no_renewal.reason string
    The reason code why the renewal intent was not renewed. Can be affordability, circumstance_change, relocating, unit_issue or other.
    no_renewal.reason_description string
    A description of why the renewal intent was not renewed.
  • renewal object
    renewal.end_date timestamp
    The end date of the renewal.
    renewal.start_date timestamp
    The start date of the renewal.
  • type string
    The type of renewal intent. Can be renewal or no_renewal.

Returns

Returns the renewal intent object if the update succeeded.

Cancel a renewal intent

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.

Parameters

  • No parameters

Returns

Returns a canceled object on success. If the renewal intent ID does not exist, this call throws an error.

Complete a renewal intent

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.

Parameters

  • No parameters

Returns

Returns a completed object on success. If the renewal intent ID does not exist, this call throws an error.

List all renewal intents

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.

Parameters

  • No parameters

Returns

A object with a data property that contains an array of renewal intents.

Units

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

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
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be unit.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • active_tenancy stringexpandable
    The unit's active tenancy.
  • active_tenancy_end timestamp
    The unit's active tenancy end date.
  • address object
    The unit's address.
  • archived boolean
    Whether the unit is archived.
  • archived_at timestamp
    Time at which the unit was archived.
  • available_from timestamp
    The date the unit is available from. Measured in seconds since the Unix epoch.
  • bathrooms integer
    The number of bathrooms this unit has.
  • bedrooms integer
    The number of bedrooms this unit has.
  • building stringexpandable
    The ID of the building this unit is associated with.
  • completion_date timestamp
    The date the unit was completed. Measured in seconds since the Unix epoch.
  • compliance object
    compliance.electric_safety_expires_at integer
    The date the unit’s electric safety certificate expires. Measured in seconds since the Unix epoch.
    compliance.electric_safety string
    (ID of a file upload) The unit’s electric safety certificate.
    compliance.epc_expires_at integer
    The date the unit’s EPC expires. Measured in seconds since the Unix epoch.
    compliance.epc string
    (ID of a file upload) The unit’s EPC.
    compliance.gas_safety_expires_at integer
    The date the unit’s gas safety certificate expires. Measured in seconds since the Unix epoch.
    compliance.gas_safety string
    (ID of a file upload) The unit’s gas safety certificate.
    compliance.gas_safety_required boolean
    Whether the unit requires a gas safety certificate.
  • contract_address string
    The address that will be used when generating the contract.
  • currency string
    Three-letter ISO currency code, in lowercase.
  • currency_options object
  • default_deposit integer
    The unit's default deposit amount.
  • default_price integer
    The unit's default price amount.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • features object
    The unit's features.
  • fees object
    The unit fees.
    fees.management_fee float
    The default management fee percentage. Maximum decimal precision of 2.
    fees.management_fee_amount integer
    The default management fee fixed amount, represented as a whole integer in the smallest currency unit.
    fees.management_fee_discount object
    The default management fee discount.
    fees.management_fee_discount.percent_off integer
    The default management fee discount percent off.
    fees.management_fee_type string
    The management fee type. Can be percentage or fixed.
    fees.renewal_fee integer
    The default renewal fee, represented as a whole integer in the smallest currency unit.
    fees.tax float
    The default tax. Maximum decimal precision of 2.
    fees.tax_behavior string
    The tax behavior. Can be exclusive or inclusive.
    fees.tenant_find_fee integer
    The default tenant find fee, represented as a whole integer in the smallest currency unit.
    fees.updated_at integer
    The date the unit's fees were last updated. Measured in seconds since the Unix epoch.
  • floor integer
    The unit's floor number.
  • furnished boolean
    Whether the unit is furnished.
  • has_owner boolean
    Whether the unit is owned by a third-party. This is true only if the unit has active unit owners.
  • maintenance_threshold integer
    The threshold you are authorised to charge without the owners consent.
  • management_type string
    The type of management the unit is under. Can be fully_managed or let_only.
  • 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.
  • name string
    The unit's name.
  • offline_reason string
    The reason the unit is offline.
  • owner_ids array
    An array of the IDs of the unit's owners.
  • plot_number string
    The unit's plot number.
  • reference string
    An internal reference for the unit, useful for tracking units between mulitple systems.
  • rent object
    rent.default integer
    The default rental amount per month. Represented as a whole integer in the smallest currency unit.
    rent.maximum integer
    The maximum rental amount per month. Represented as a whole integer in the smallest currency unit.
    rent.minimum integer
    The minimum rental amount per month. Represented as a whole integer in the smallest currency unit.
  • sales object
    sales.last_purchase_price integer
    The last sale purchase price, useful for calculating yields. Represented as a whole integer in the smallest currency unit.
  • status string
    The unit's status. Can be active, occupied, offline, maintenance or unmanaged.
  • square_foot integer
    The unit's square foot.
  • under_offer boolean
    Whether the unit is currently under offer.

Create a unit

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.

Parameters

  • currency required  string
    Three-letter ISO currency code, in lowercase. Must be a supported currency. Can be eur, gbp, sek or usd.
  • name required  string
    The unit's name.
  • address object
    The unit's address. Defaults to the associated building's address.
    address.country required  string
    Two-letter country code (ISO 3166-1 alpha-2).
    address.line1 required  string
    Address line 1 (e.g., street, PO Box, or company name).
    address.city string
    City, district, suburb, town, or village.
    address.line2 string
    Address line 2 (e.g., apartment, suite, unit, or building).
    address.postal_code string
    Postal code.
    address.state string
    State, county, province, or region.
  • alternate_postal_code string
    Some units in large multi-unit buildings have difference postcodes. You can supply an alternate postal code which overrides the default building postal code.
  • archived boolean
    Whether the unit is archived.
  • available_from timestamp
    The date the unit is available from.
  • bathrooms integer
    The number of bathrooms.
  • bedrooms integer
    The number of bedrooms.
  • building string
    The ID of the building this unit is in.
  • building_data object
    building_data.address required  object
    The building's address.
    building_data.address.country required  string
    Two-letter country code (ISO 3166-1 alpha-2).
    building_data.address.line1 required  string
    Address line 1 (e.g., street, PO Box, or company name).
    building_data.address.city string
    City, district, suburb, town, or village.
    building_data.address.line2 string
    Address line 2 (e.g., apartment, suite, unit, or building).
    building_data.address.postal_code string
    Postal code.
    building_data.address.state string
    State, county, province, or region.
    building_data.name required  string
    The building's name.
    building_data.accounting_code string
    building_data.active boolean
    building_data.assignee string
    building_data.currency string
    The default currency for the building and any units associated with the building. Can be eur, gbp, sek or usd.
    building_data.description string
    building_data.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.
    building_data.single_unit boolean
    building_data.type string
    Can be block_management, commercial, residential or student.
    building_data.unit_fees object
    building_data.unit_fees.management_fee number
    The unit's management fee percentage amount.
    building_data.unit_fees.management_fee_amount integer
    The unit's management fee fixed amount.
    building_data.unit_fees.management_fee_type string
    Can be percentage or fixed.
    building_data.unit_fees.renewal_fee integer
    The unit's renewal fee.
    building_data.unit_fees.tax number
    The tax to apply to the unit fees.
    building_data.unit_fees.tax_behavior string
    Whether the tax is included or excluded from the fees. Can be inclusive or exclusive.
    building_data.unit_fees.tenant_find_fee integer
    The unit's tenant find fee.
    building_data.workspace string
  • completion_date timestamp
    The date this unit completes.
  • compliance object
    compliance.electric_safety string
    (ID of a file upload) The unit’s electric safety certificate.
    compliance.electric_safety_expires_at timestamp
    The date this unit’s electric safety certificate expires.
    compliance.epc string
    (ID of a file upload) The unit’s EPC.
    compliance.epc_expires_at timestamp
    The date this unit's EPC expires.
    compliance.gas_safety string
    (ID of a file upload) The unit’s gas safety certificate.
    compliance.gas_safety_expires_at timestamp
    The date this unit’s gas safety certificate expires.
    compliance.gas_safety_required boolean
    compliance.send_email boolean
    Whether to send an email to the tenant.
  • contract_address string
    The contract address of the unit.
  • currency_options object
  • default_deposit integer
    The default deposit amount to charge.
  • default_price integer
    The default rental price per month.
  • features object
    features.aspect string
    The unit's aspect. Can be n, s, e, w, ne, nw, se, sw or corner.
    features.balcony boolean
    Whether the unit has a balcony.
    features.min_term string
    The minimum rental term.
    features.pet_friendly boolean
    Whether the unit is pet friendly.
    features.view string
  • fees object
    fees.management_fee number
    The unit's management fee percentage amount.
    fees.management_fee_amount integer
    The unit's management fee fixed amount.
    fees.management_fee_discount object
    fees.management_fee_discount.end timestamp
    The date the discount ends.
    fees.management_fee_discount.percent_off number
    The discount percent to apply to the management fee.
    fees.management_fee_type string
    Can be percentage or fixed.
    fees.renewal_fee integer
    The unit's renewal fee.
    fees.send_update_email boolean
    Whether to send an email to active unit owners with the updated fees.
    fees.tax number
    The tax to apply to the unit fees.
    fees.tax_behavior string
    Whether the tax is included or excluded from the fees. Can be inclusive or exclusive.
    fees.tenant_find_fee integer
    The unit's tenant find fee.
  • floor integer
    The unit's floor number.
  • furnished boolean
    Whether the unit is furnished.
  • maintenance_threshold integer
    The threshold you are authorised to charge without the owners consent.
  • management_type string
    The type of management. Can be fully_managed, let_only or rent_collection.
  • 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.
  • offline_reason string
    The reason the unit is offline.
  • owners array of objects
    owners.owner required  string
    owners.assignee string
    owners.contract string
    owners.description string
    owners.follow_up timestamp
    owners.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.
    owners.negotiating_status string
    Can be contacted, no_details, not_likely, not_responding, ready_to_sign or undecided.
    owners.percent_ownership number
  • plot_number string
    The unit's plot number.
  • reference string
    An internal reference for the unit, useful for tracking units between mulitple systems.
  • rent object
    rent.default integer
    The default rental amount per month.
    rent.maximum integer
    The maximum rental amount per month.
    rent.minimum integer
    The minimum rental amount per month.
    rent.tax_percent number
    The tax percent to apply to the rent.
  • sales object
    sales.last_purchase_price integer
    The unit's last purchase price.
  • square_foot number
    The unit's square foot.
  • square_metre number
  • status string
    The unit's status. Can be available, offline, maintenance or unmanaged.

Returns

Returns the unit object if the request succeeded.

Retrieve a unit

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.

Parameters

  • No parameters

Returns

Returns a unit object if a valid identifier was provided.

Update a unit

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.

Parameters

  • address object
    The unit's address. Defaults to the associated building's address.
    address.country required  string
    Two-letter country code (ISO 3166-1 alpha-2).
    address.line1 required  string
    Address line 1 (e.g., street, PO Box, or company name).
    address.city string
    City, district, suburb, town, or village.
    address.line2 string
    Address line 2 (e.g., apartment, suite, unit, or building).
    address.postal_code string
    Postal code.
    address.state string
    State, county, province, or region.
  • alternate_postal_code string
    Some units in large multi-unit buildings have difference postcodes. You can supply an alternate postal code which overrides the default building postal code.
  • archived boolean
    Whether the unit is archived.
  • available_from timestamp
    The date the unit is available from.
  • bathrooms integer
    The number of bathrooms.
  • bedrooms integer
    The number of bedrooms.
  • completion_date timestamp
    The date this unit completes.
  • compliance object
    compliance.electric_safety string
    (ID of a file upload) The unit’s electric safety certificate.
    compliance.electric_safety_expires_at timestamp
    The date this unit’s electric safety certificate expires.
    compliance.epc string
    (ID of a file upload) The unit’s EPC.
    compliance.epc_expires_at timestamp
    The date this unit's EPC expires.
    compliance.gas_safety string
    (ID of a file upload) The unit’s gas safety certificate.
    compliance.gas_safety_expires_at timestamp
    The date this unit’s gas safety certificate expires.
    compliance.gas_safety_required boolean
    compliance.send_email boolean
    Whether to send an email to the tenant.
  • contract_address string
    The contract address of the unit.
  • currency_options object
  • default_deposit integer
    The default deposit amount to charge.
  • default_price integer
    The default rental price per month.
  • features object
    features.aspect string
    The unit's aspect. Can be n, s, e, w, ne, nw, se, sw or corner.
    features.balcony boolean
    Whether the unit has a balcony.
    features.min_term string
    The minimum rental term.
    features.pet_friendly boolean
    Whether the unit is pet friendly.
    features.view string
  • fees object
    fees.management_fee number
    The unit's management fee percentage amount.
    fees.management_fee_amount integer
    The unit's management fee fixed amount.
    fees.management_fee_discount object
    fees.management_fee_discount.end timestamp
    The date the discount ends.
    fees.management_fee_discount.percent_off number
    The discount percent to apply to the management fee.
    fees.management_fee_type string
    Can be percentage or fixed.
    fees.renewal_fee integer
    The unit's renewal fee.
    fees.send_update_email boolean
    Whether to send an email to active unit owners with the updated fees.
    fees.tax number
    The tax to apply to the unit fees.
    fees.tax_behavior string
    Whether the tax is included or excluded from the fees. Can be inclusive or exclusive.
    fees.tenant_find_fee integer
    The unit's tenant find fee.
  • floor integer
    The unit's floor number.
  • furnished boolean
    Whether the unit is furnished.
  • maintenance_threshold integer
    The threshold you are authorised to charge without the owners consent.
  • management_type string
    The type of management. Can be fully_managed, let_only or rent_collection.
  • 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.
  • name string
    The unit's name.
  • offline_reason string
    The reason the unit is offline.
  • owners array of objects
    owners.owner required  string
    owners.assignee string
    owners.contract string
    owners.description string
    owners.follow_up timestamp
    owners.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.
    owners.negotiating_status string
    Can be contacted, no_details, not_likely, not_responding, ready_to_sign or undecided.
    owners.percent_ownership number
  • ownership_ended_at timestamp
    The date the current unit ownership ended.
  • ownership_ended_description string
    A description of the reason.
  • ownership_ended_reason string
    The reason the unit ownership ended. Can be lost_instruction, sold_unit, moved_in, lost_negotiation or other.
  • ownership_send_notice boolean
    Whether to send an email to the owner regarding their ownership ending.
  • plot_number string
    The unit's plot number.
  • reference string
    An internal reference for the unit, useful for tracking units between mulitple systems.
  • rent object
    rent.default integer
    The default rental amount per month.
    rent.maximum integer
    The maximum rental amount per month.
    rent.minimum integer
    The minimum rental amount per month.
    rent.tax_percent number
    The tax percent to apply to the rent.
  • sales object
    sales.last_purchase_price integer
    The unit's last purchase price.
  • square_foot number
    The unit's square foot.
  • square_metre number
  • status string
    The unit's status. Can be available, offline, maintenance or unmanaged.

Returns

Returns the unit object if the update succeeded.

Delete a unit

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.

Parameters

  • No parameters

Returns

Returns an object with a deleted parameter on success. If the unit ID does not exist, this call throws an error.

List all units

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.

Parameters

  • No parameters

Returns

A object with a data property that contains an array of units.

Payments Resources

Balance

Endpoints

GET     /v1/balance
GET     /v1/balance/owners

The balance object

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"
      }
    ]
  }
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be balance.
  • available array
  • in_transit array
  • pending array
  • treasury array

Retrieve 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"
      }
    ]
  }
}

Parameters

  • No parameters

Returns

Returns balance object.

Retrieve owner balance

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"
      }
    ]
  }
}

Parameters

  • No parameters

Returns

Returns owner balance object.

Balance Transactions

Endpoints

GET     /v1/balance_transactions

The balance transaction object

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"
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be balance_transaction.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • amount integer
  • available_on timestamp
    The time at which the balance transaction will become available.
  • currency string
  • description string
  • fee integer
  • fee_details array
  • net integer
  • payout string
  • source_object string
  • source string
  • status string
  • type string

List all balance transactions

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
}

Parameters

  • No parameters

Returns

List

Payment Initiations (beta)

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

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,
  "inbound_payment": {
    "customer": "cus_l34bx7zoNY2w1tv8",
    "type": "customer"
  },
  "invoice": null,
  "payment_method": "pm_l34dl7phkOVU7wcI",
  "reconciliation": null,
  "reference": "REF001",
  "status": "requires_action",
  "type": "inbound_payment"
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be payment_initiation.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • amount integer
    Amount intended to be collected by this payment. This must be a positive integer in the smallest currency unit (e.g., 100 pennies for a charge of £1.00).
  • currency string
    Three-letter ISO currency code, in lowercase. Must be a supported currency.
  • customer string
    ID of the customer this payment initiation belongs to.
  • external_account stringexpandable
    ID of the external account this payment initiation belongs to, if one exists.
  • failure_code string
    The failure code for the payment initiation.
  • failure_message string
    The reason for the payment initiation failure, if one exists.
  • inbound_payment object
    The inbound payment details for this payment initiation.
    inbound_payment.customer string
    The customer ID for this inbound payment.
    inbound_payment.funding_instruction string
    The funding instruction ID for this inbound payment.
    inbound_payment.type string
    The type of inbound payment for this payment initiation. Can be customer or funding_instruction.
  • invoice string
    ID of the invoice this payment initiation belongs to, if one exists.
  • outbound_payment object
    The outbound payment details for this payment initiation.
    outbound_payment.owner_payout string
    The owner payout ID for this outbound payment.
    outbound_payment.type string
    The type of outbound payment for this payment initiation. Can be owner_payout.
  • payment_method string
    ID of the payment method this payment initiation belongs to, if one exists.
  • reconciliation object
    The reconciliation options for this payment initiation.
    reconciliation.type string
    The type of reconciliation for this payment initiation. Can be application or invoice.
    reconciliation.application object
    The application reconciliation details for this payment initiation.
    reconciliation.application.id string
    The ID of the application to reconcile for.
    reconciliation.application.payment_type string
    The application payment type to reconcile for. Can be holding_fee, deposit or advance_rent.
    reconciliation.invoice object
    The invoice reconciliation details for this payment initiation.
    reconciliation.invoice.id string
    The ID of the invoice to reconcile for.
  • reference string
    A reference for the payment. This should not contain special characters since not all institutions support them.
  • status undefined
    The status of the payment initiation. Can be requires_action, processing, succeeded, failed or unknown.
  • type undefined
    The type of the payment initiation. Can be inbound_payment or outbound_payment.

The payment initiation token object

The payment initiation object

{
  "object": "payment_initiation_token",
  "token": "link-33792986-2b9c-4b80-b1f2-518caaac6183",
  "type": "plaid"
}

Attributes

  • object string
    String representing the object's type. Objects of the same type share the same value. Can be payment_initiation_token.
  • token string
    The token to be used with the Plaid API to initiate a payment.
  • type undefined
    The type of token. Can be plaid.

Create a payment initiation

POST /v1/payment_initiations

curl https://api.yorlet.com/v1/payment_initiations \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-d '{
  "amount": 40000,
  "currency": "gbp",
  "type": "inbound_payment",
  "inbound_payment": {
    "customer": "cus_l34bx7zoNY2w1tv8",
    "type": "customer"
  }
}'

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,
  "inbound_payment": {
    "customer": "cus_l34bx7zoNY2w1tv8",
    "type": "customer"
  },
  "invoice": null,
  "payment_method": "pm_l34dl7phkOVU7wcI",
  "reconciliation": null,
  "reference": "REF001",
  "status": "requires_action",
  "type": "inbound_payment"
}

Create a payment initiation request. Yorlet supports two types of payment initiation: type=inbound_payment initiates a payment from an external bank account to a bank account in Yorlet, and type=outbound_payment initiates a payment from your bank account to an external bank account.

Parameters

  • amount required  integer
    The amount to charge. Should be a positive integer in the smallest currency unit (e.g. 100 for £1.00).
  • currency required  string
    Three-letter ISO currency code, in lowercase. Must be a supported currency. Can be gbp or sek.
  • type required  string
    The type of payment initiation. Can be inbound_payment or outbound_payment.
  • inbound_payment object
    The inbound payment hash. Required for inbound_payment type.
    inbound_payment.type required  string
    The type of payment initiation. Can be customer or funding_instruction.
    inbound_payment.customer string
    The ID of the customer this payment initiation belongs to.
    inbound_payment.funding_instruction string
    The ID of the funding instruction this payment initiation belongs to. Only allowed for funding_instruction_payment type.
  • 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.
  • outbound_payment object
    The outbound payment hash. Required for outbound_payment type.
    outbound_payment.type required  string
    The type of payment initiation. Can be owner_payout.
    outbound_payment.owner_payout string
    The ID of the owner payout this payment initiation belongs to. Only allowed for owner_payout type.
  • reference string
    The reference for this payment initiation. This must be an alphanumeric string with at most 18 characters and must not contain any special characters (since not all institutions support them).

Returns

Returns the payment initiation object if the request succeeded.

Retrieves a payment initiation token

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.

Parameters

  • No parameters

Returns

The single-use token object is returned upon success. Otherwise, this call returns an error.

Create a payment initiation token

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.

Parameters

  • brand_name string
    The name you wish to display to users in Plaid Link. Maximum length of 30 characters.

Returns

The single-use token object is returned upon success. Otherwise, this call returns an error.

List all payment initiations

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,
      "inbound_payment": {
        "customer": "cus_l34bx7zoNY2w1tv8",
        "type": "customer"
      },
      "invoice": null,
      "payment_method": "pm_l34dl7phkOVU7wcI",
      "reconciliation": null,
      "reference": "REF001",
      "status": "requires_action",
      "type": "inbound_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.

Parameters

  • No parameters

Returns

A object with a data property that contains an array of payment initiations.

Payment Sessions

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

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"
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be payment_session.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • amount integer
    The transaction amount, which will be reflected in your balance. This amount is in your currency and in the smallest currency unit.
  • currency string
    Three-letter ISO currency code, in lowercase. Must be a supported currency.
  • customer stringexpandable
    ID of the customer associated with this transaction.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • 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.
  • mode object
    The payment session mode. Can be payment.
  • payment_method_types array
    The payment method types allowed to be used to create the transaction.
  • reporting_type string
    The reporting type.
  • return_url string
    The url to redirect the customer to after the payment completes.
  • status string
    The transactions status of the payment session. Can be paid or unpaid.
  • transaction stringexpandable
    The transaction ID for the payment session.
  • url string
    The URL to redirect the user to complete the payment session.

Create a payment session

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.

Parameters

  • amount required  integer
    The amount to charge. Should be a positive integer in the smallest currency unit (e.g. 100 for £1.00).
  • currency required  string
    Three-letter ISO currency code, in lowercase. Must be a supported currency. Can be eur, gbp, sek or usd.
  • customer required  string
    The ID of the customer the transaction is for.
  • mode required  string
    Can be payment.
  • payment_method_types required  array of strings
    Can be one or many of autogiro, bacs_debit, bank_transfer, card, direct_transfer, pay_by_bank or sepa_debit.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • 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.
  • payment_method_options object
    Payment method configuration options.
  • reporting_type string
    The reporting type of the transaction. Defaults to charge. Can be advance_rent, charge, deposit, holding_fee or rent.
  • return_url string
    The URL to redirect the user to after the transaction is complete.
  • send_email boolean
    Send the URL to the customer email address.
  • statement_descriptor string
    The statement descriptor that will appear on customers bank statement.
  • transaction_data object
    A subset of parameters to be passed to transaction creation.
    transaction_data.customer_balance object
    A hash containing information about the customer balance options.
    transaction_data.customer_balance.apply boolean
    Whether to apply the transaction amount to the customer’s balance.
    transaction_data.customer_balance.description string
    A description of the transaction to be applied to the customer’s balance.
    transaction_data.transfer_data object
    transaction_data.transfer_data.use_unit_ownership boolean
    If a unit ID is supplied, transfers will be created based on the unit's ownership.
    transaction_data.unit string
    The ID of the unit.

Returns

Returns the payment session object if the request succeeded.

Retrieve a payment session

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.

Parameters

  • No parameters

Returns

Returns a payment session object if a valid identifier was provided.

Cancel a payment session

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.

Parameters

  • No parameters

Returns

Returns a canceled payment session object if a valid identifier was provided.

List all payment sessions

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.

Parameters

  • No parameters

Returns

A object with a data property that contains an array of payment sessions.

Transactions

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

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
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be transaction.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • amount integer
    The transaction amount, which will be reflected in your balance. This amount is in your currency and in the smallest currency unit.
  • amount_refunded integer
    The amount refunded.
  • application string
    ID of the application associated with this transaction.
  • balance_transaction stringexpandable
    ID of the balance transaction associated with this transaction.
  • capture_method string
    The capture method for this transaction. Can be automatic or manual.
  • confirmed_at timestamp
    Time at which the transaction was confirmed. Measured in seconds since the Unix epoch.
  • cross_border array
    The cross border payment data.
  • currency_conversion object
    The currency conversion data.
  • currency string
    Three-letter ISO currency code, in lowercase. Must be a supported currency.
  • customer stringexpandable
    ID of the customer associated with this transaction.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • dispute stringexpandable
    If the transaction ha been disputed, the ID of the dispute.
  • disputed boolean
    Boolean value to indicate whether transaction has been disputed or not.
  • invoice stringexpandable
    ID of the invoice associated with this transaction.
  • last_payment_error object
    An object containing, if any, the last error the occured when attempting this payment.
  • 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.
  • next_action object
    An object with the next actions to take to complete the payment.
  • owner_payout stringexpandable
    ID of the owner payout associated with this transaction.
  • paid_at timestamp
    Time at which the transaction was paid. Measured in seconds since the Unix epoch.
  • payment_method stringexpandable
    Payment method for the transaction. It must belong to the customer associated with the transaction.
  • payment_method_types array
    The payment method types allowed to be used to create the transaction.
  • payment_session stringexpandable
    Payment session for the transaction.
  • processing object
    If present, this property tells you about the processing state of the payment.
  • refunded boolean
    Boolean value to indicate whether funds has been refunded or not.
  • reporting_type string
    The reporting type.
  • status string
    The transactions status. Can be requires_payment_method, requires_confirmation, requires_action, processing, canceled or succeeded.
  • transfer string
    The transfer ID for the transaction.
  • transfer_data object
    The data with which to automatically create a Transfer when the transaction is paid.
  • transfer_group string
    The transfer group for the transaction.

Create a transaction

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.

Parameters

  • customer required  string
    The ID of the customer the transaction is for.
  • payment_method_types required  array of strings
    Can be one or many of autogiro, bacs_debit, card, card_present, bank_transfer, direct_transfer, gbp_credit_transfer, pay_by_bank or sepa_debit.
  • amount integer
    The amount to charge. Should be a positive integer in the smallest currency unit (e.g. 100 for £1.00). The amount is required if you do not supply an application and application_payment_type.
  • application string
    The ID of the application the transaction is for.
  • application_payment_type string
    The application payment type. Only allowed if the supplied application is open. Can be advance_rent, deposit or holding_fee.
  • capture_method string
    Can be automatic or manual.
  • confirm boolean
  • currency string
    Three-letter ISO currency code, in lowercase. Must be a supported currency. Can be eur, gbp, sek or usd.
  • customer_balance object
    A hash containing information about the customer balance options.
    customer_balance.apply boolean
    Whether to apply the transaction amount to the customer’s balance.
    customer_balance.description string
    A description of the transaction to be applied to the customer’s balance.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • invoice string
  • 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.
  • off_session boolean
  • payment_method string
  • reporting_type string
    The reporting type of the transaction. Only allowed if you don't supply an application ID. Can be advance_rent, charge, deposit or holding_fee.
  • return_url string
    The URL to redirect the user to if the transaction requires additional action to complete.
  • send_receipt_email boolean
  • statement_descriptor string
    The statement descriptor that will appear on customers bank statement. Only allowed if you don't supply an application payment type.
  • transfer_data object
    transfer_data.use_unit_ownership or
    If a unit ID is supplied, transfers will be created based on the unit's ownership.
  • unit string
    The ID of the unit. Only allowed if you don't supply an application ID.

Returns

Returns a transaction object if successful.

Retrieve a transaction

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.

Parameters

  • No parameters

Returns

Returns a transaction object if a valid identifier was provided.

Update a transaction

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.

Parameters

  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • 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.
  • payment_method_types array of strings
    Can be one or many of autogiro, bacs_debit, card, card_present, bank_transfer, direct_transfer, gbp_credit_transfer, pay_by_bank or sepa_debit.

Returns

Returns the updated transaction object if a valid identifier was provided.

Capture a transaction

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.

Parameters

Returns

Returns a transaction object if successful.

Confirm a transaction

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.

Parameters

  • off_session boolean
  • payment_method string
  • payment_method_types array of strings
    Can be one or many of autogiro, bacs_debit, card, card_present, bank_transfer, direct_transfer, gbp_credit_transfer, pay_by_bank or sepa_debit.
  • return_url string

Returns

Returns a transaction object if successful.

Cancel a transaction

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.

Parameters

  • No parameters

Returns

Returns a transaction object if successful.

Resend a transaction receipt

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.

Parameters

  • No parameters

Returns

Returns a transaction object if successful.

List all transactions

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.

Parameters

  • No parameters

Returns

A object with a data property that contains an array of transactions.

Payment Methods Resources

External Accounts

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

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"
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be external_account.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • available_payout_methods array
    The available payout methods for this external account.
  • bank_account object
    The bank account details.
    bank_account.account_holder_name string
    The name of the account holder.
    bank_account.account_holder_type string
    The type of account holder. Can be individual or company.
    bank_account.bank_name string
    Name of the bank associated with the account number.
    bank_account.country string
    The country in which the bank account is located.
    bank_account.currency string
    Three-letter ISO currency code, in lowercase. Must be a supported currency.
    bank_account.last4 string
    The last four digits of the bank account number.
    bank_account.routing_number string
    The routing number, sort code, or other country-appropriate institution number for the bank account.
    bank_account.swift_bic string
    The SWIFT of the bank associated with the bank account.
  • metadata string
    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.
  • status string
    The status of the external account. If a payout fails, the status is updated to errored and payouts will be stopped until the account details are updated. Can be new or errored.
  • type string
    The type of external account. Can be bank_account.

Create an external 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.

Parameters

  • bank_account required  object
    The bank account details.
    bank_account.account_holder_name required  string
    The name of the account holder.
    bank_account.account_holder_type required  string
    The type of account holder. Can be company or individual.
    bank_account.account_number required  string
    The bank account number.
    bank_account.country required  string
    The country in which the bank account is located.
    bank_account.currency required  string
    The currency the bank account is in.
    bank_account.routing_number string
    The routing number, sort code, or other country-appropriate institution number for the bank account.
    bank_account.swift_bic string
    The SWIFT of the bank associated with the bank account.
  • type required  string
    The type of external account. Can be bank_account.
  • 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.

Returns

Returns the external account object if the request succeeded.

Retrieve an external account

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.

Parameters

  • No parameters

Returns

Returns the external account object.

Update an external account

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.

Parameters

  • 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.

Returns

Returns the updated external account object.

Delete an external account

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.

Parameters

  • No parameters

Returns

Returns the deleted external account object.

List all external accounts

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.

Parameters

  • No parameters

Returns

A object with a data property that contains an array of external accounts.

Payment Methods

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

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"
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be payment_method.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • alipay object
    This object contains details about the Alipay method.
  • autogiro object
    This object contains details about the Autogiro method.
  • bacs_debit object
    This object contains details about the Bacs Direct Debit method.
  • bank_transfer string
    This object contains details about the bank transfer method.
  • billing_details object
    Billing information for the payment method.
  • card object
    This object contains details about the Card method.
  • currency string
  • customer stringexpandable
    ID of the customer associated with this payment method.
  • direct_transfer object
    This object contains details about the direct transfer.
  • fronted object
    This object contains details about the Fronted payment method.
  • gbp_credit_transfer object
    This object contains details about the UK Bank Account.
  • mandate object
    Information related to the mandate for the payment method.
  • receiver object
    Information related to the amount received and charged from the payment method.
  • sepa_debit object
    This object contains details about the SEPA Direct Debit method.
  • status string
    The status of the payment method.
  • type string
    The type of the payment method.
  • wechat_pay object
    This object contains details about the WeChat Pay method.

Create a 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.

Parameters

  • customer required  string
    The ID of customer you wish to create a payment method for.
  • type required  string
    The type of payment method to create. Can be alipay, bank_transfer, direct_transfer or pay_by_bank.
  • bank_transfer object
    If this is a bank_transfer payment method, this object contains details about the Bank Transfer payment method.
    bank_transfer.currency required  string
    Can be eur or gbp.
    bank_transfer.country string
    Can be GB or IE.

Returns

Returns a payment method object if successful.

Simulate a bank transfer

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.

Parameters

  • amount required  integer
  • reference required  string

Returns

Returns a payment method object if successful.

List all payment methods

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.

Parameters

  • No parameters

Returns

A object with a data property that contains an array of payment methods.

Payment Method Sessions

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

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"
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be payment_method_session.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • customer stringexpandable
    ID of the customer associated with this transaction.
  • 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.
  • payment_method string
    The ID of the payment method created by this session.
  • payment_method_types array
    The payment method types allowed to be used to create the transaction.
  • return_url string
    The url to redirect the customer to after the payment completes.
  • status string
    The transactions status of the payment session. Can be paid or unpaid.
  • subscription stringexpandable
    The ID of the subscription to collect the payment method for.
  • url string
    The URL to redirect the user to complete the payment method session.

Create a payment method session

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"
}

Parameters

  • customer required  string
    The ID of customer you wish to collect a payment method for.
  • payment_method_types required  array of strings
    The type of payment method you wish to collect. Can be one or many of autogiro, bacs_debit, card or sepa_debit.
  • return_url string
    The URL to redirect the user to after the payment method is collected.
  • send_email boolean
    Send the URL to the customer email address.
  • subscription string
    The ID of the subscription to collect the payment method for.

Returns

Returns the payment method session object if the request succeeded.

Retrieve a payment method session

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"
}

Parameters

  • No parameters

Returns

Returns a payment method session object if a valid identifier was provided.

Products Resources

Prices

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

The price object

{
  "id": "product_id",
  "object": "price",
  "created": 1627210800,
  "description": null,
  "recurring": null
}

Attributes

  • id string
    Unique identifier for the price
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be price.
  • active boolean
    Whether the price is active or not.
  • amount integer
    The amount to be charged, represented as a whole integer.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • currency string
    The currency of the price.
  • description string
    The description of the price.
  • name string
    The name of the price.
  • product stringexpandable
    The product the price belongs to.
  • recurring object
    An object describing the recurring schedule of the price.
    recurring.interval string
    The frequency of the recurring schedule.
    recurring.interval_count integer
    The number of intervals between each charge.
  • type string
    The type of the price.

Create a 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.

Parameters

  • amount required  integer
  • currency required  string
  • type required  string
    Can be one_time or recurring.
  • active boolean
  • description string
  • product string
  • product_data object
    product_data.description required  string
    product_data.name required  string
    product_data.active boolean
    product_data.statement_descriptor string
  • recurring object
    recurring.interval required  string
    recurring.interval_count integer
  • tax_behavior string
    Can be exclusive, inclusive or unspecified.

Returns

Returns the price object if the request succeeded.

Retrieve a price

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
}

Parameters

  • No parameters

Returns

Returns a price object if a valid identifier was provided.

Update a price

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
}

Parameters

  • active boolean
  • description string
  • tax_behavior string
    Can be exclusive, inclusive or unspecified.

Returns

Returns the price object if the request succeeded.

Delete a price

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
}

Parameters

  • No parameters

Returns

Returns the price object if the request succeeded.

List prices

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
}

Parameters

  • No parameters

Returns

Returns a list of prices if the request succeeded.

Products

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

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"
}

Attributes

  • id string
    Unique identifier for the product
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be product.
  • accounting_code string
    The accounting code to use for the product.
  • active boolean
    Whether the product is active or not.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • default_price stringexpandable
    The default price for the product.
  • description string
    The description of the product.
  • name string
    The name of the product.
  • statement_descriptor string
    The statement descriptor of the product.

Create a 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.

Parameters

  • name required  string
  • accounting_code string
  • active boolean
  • default_price string
  • default_price_data object
    default_price_data.amount required  number
    default_price_data.currency required  string
    default_price_data.description string
    default_price_data.recurring object
    default_price_data.recurring.interval required  string
    Can be month or week.
    default_price_data.recurring.interval_count number
    default_price_data.type string
    Can be one_time or recurring.
  • description string
  • statement_descriptor string

Returns

Returns the product object if the request succeeded.

Retrieve a product

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"
}

Parameters

  • No parameters

Returns

Returns a product object if a valid identifier was provided.

Update a product

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"
}

Parameters

  • accounting_code string
  • active boolean
  • default_price string
  • description string
  • name string
  • statement_descriptor string

Returns

Returns the product object if the update succeeded.

Delete a product

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
}

Parameters

  • No parameters

Returns

If the subscription ID does not exist, this call throws an error.

List products

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
}

Parameters

  • No parameters

Returns

Returns a list of products.

Tax Rates

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

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"
}

Attributes

  • id string
    Unique identifier for the tax rate
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be tax_rate.
  • active boolean
    Whether the tax rate is active or not.
  • country string
    The country the tax rate applies to.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • description string
    The description of the tax rate.
  • inclusive boolean
    Whether the tax rate is inclusive or exclusive.
  • jurisdiction string
    The jurisdiction for the tax rate.
  • name string
    The name of the tax rate.
  • percentage number
    The percentage of the tax rate.
  • state string
    The state the tax rate applies to.

Create a 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.

Parameters

  • name required  string
  • percentage required  number
  • active boolean
  • country string
  • description string
  • inclusive boolean
  • jurisdiction string
  • state string

Returns

Returns the tax rate object if the request succeeded.

Retrieve a tax rate

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"
}

Parameters

  • No parameters

Returns

Returns a tax rate object if a valid identifier was provided.

Update a tax rate

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"
}

Parameters

  • active boolean
  • country string
  • description string
  • jurisdiction string
  • name string
  • state string

Returns

Returns a tax rate object if a valid identifier was provided.

Delete a tax rate

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
}

Parameters

  • No parameters

Returns

Returns the tax rate object if the request succeeded.

List tax rates

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"
}

Parameters

  • No parameters

Returns

Returns a list of tax rates if the request succeeded.

Billing Resources

Credit Notes

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

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": [],
  "total": 100000,
  "total_excluding_tax": 100000,
  "type": "pre_payment",
  "voided_at": null
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be credit_note.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • amount integer
    The credit note amount.
  • currency string
    Three-letter ISO currency code, in lowercase.
  • customer stringexpandable
    The ID of the customer.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • discount_amount integer
    The credit note discount amount.
  • invoice stringexpandable
    The ID of the invoice.
  • memo string
    The credit note’s memo appears on the credit note PDF.
  • 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.
  • number string
    A unique number that identifies this part payment.
  • out_of_band_amount integer
    The credit note amount that was paid out of band.
  • reason string
    Reason for issuing this credit note. Can be duplicate, fraudulent, order_change, product_unsatisfactory or other.
  • subtotal integer
    The credit note subtotal.
  • subtotal_excluding_tax integer
    The credit note subtotal excluding tax.
  • status string
    The credit note status. Can be issued or voided.
  • tax_amounts array
    The credit note tax amounts.
  • total integer
    The credit note total.
  • total_excluding_tax integer
    The credit note total excluding tax, but including discounts.
  • type string
    The type of credit note. Can be pre_payment or post_payment.
  • voided_at timestamp
    The date this credit note was voided. Measured in seconds since the Unix epoch.

The credit note line item object

The credit note object

{
  "id": "cnli_test",
  "object": "credit_note_line_item",
  "created": 1627210800,
  "amount": 100000,
  "amount_excluding_tax": 100000,
  "credit_note": "cn_test",
  "currency": "gbp",
  "description": null,
  "invoice_item": "ii_test",
  "tax_amounts": [],
  "type": "invoice_item"
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be credit_note_line_item.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • amount integer
    The amount.
  • amount_excluding_tax integer
    The amount excluding tax.
  • credit_note string
    The ID of the credit note.
  • currency string
    Three-letter ISO currency code, in lowercase.
  • description string
    The credit note line item description.
  • invoice_item string
    The ID of the invoice item.
  • tax_amounts array
    The tax amounts.
  • type string
    The part payment line item type. Can be invoice_item.

Create a credit note

POST /v1/credit_notes

curl https://api.yorlet.com/v1/credit_notes \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "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": [],
  "total": 100000,
  "total_excluding_tax": 100000,
  "type": "pre_payment",
  "voided_at": null
}

Parameters

  • invoice required  string
    ID of the invoice.
  • lines required  array of objects
    A list of up to 10 line items to issue credit for.
    lines.amount required  integer
    The amount of credit to apply to the line item.
    lines.invoice_item required  string
    The invoice item to credit.
    lines.type required  string
    Type of the credit note line item. Can be invoice_item.
  • memo string
    The credit note’s memo appears on the credit note PDF.
  • 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.
  • out_of_band_amount integer
    The amount credited outside of Yorlet.
  • reason string
    The reason for issuing the credit note. Can be duplicate, fraudulent, order_change, product_unsatisfactory or other.

Returns

Returns a credit note object if successful.

Preview a credit note

POST /v1/credit_notes/preview

curl https://api.yorlet.com/v1/credit_notes/preview \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "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": [],
  "total": 100000,
  "total_excluding_tax": 100000,
  "type": "pre_payment",
  "voided_at": null
}

Parameters

  • invoice required  string
    ID of the invoice.
  • lines required  array of objects
    A list of up to 10 line items to issue credit for.
    lines.amount required  integer
    The amount of credit to apply to the line item.
    lines.invoice_item required  string
    The invoice item to credit.
    lines.type required  string
    Type of the credit note line item. Can be invoice_item.
  • memo string
    The credit note’s memo appears on the credit note PDF.
  • 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.
  • out_of_band_amount integer
    The amount credited outside of Yorlet.
  • reason string
    The reason for issuing the credit note. Can be duplicate, fraudulent, order_change, product_unsatisfactory or other.

Returns

Returns a credit note preview object if successful.

Retrieve a credit note

GET /v1/credit_notes/:id

curl https://api.yorlet.com/v1/credit_notes/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "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": [],
  "total": 100000,
  "total_excluding_tax": 100000,
  "type": "pre_payment",
  "voided_at": null
}

Parameters

  • No parameters

Returns

Returns a credit note object if a valid identifier was provided.

Update a credit note

POST /v1/credit_notes/:id

curl https://api.yorlet.com/v1/credit_notes/:id \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "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": [],
  "total": 100000,
  "total_excluding_tax": 100000,
  "type": "pre_payment",
  "voided_at": null
}

Parameters

  • memo string
    The credit note’s memo appears on the credit note PDF.
  • 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.

Returns

Returns an updated credit note object if a valid identifier was provided.

Retrieve a credit note's line items

GET /v1/credit_notes/:id/lines

curl https://api.yorlet.com/v1/credit_notes/:id/lines \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "cnli_test",
      "object": "credit_note_line_item",
      "created": 1627210800,
      "amount": 100000,
      "amount_excluding_tax": 100000,
      "credit_note": "cn_test",
      "currency": "gbp",
      "description": null,
      "invoice_item": "ii_test",
      "tax_amounts": [],
      "type": "invoice_item"
    }
  ],
  "count": 1,
  "has_more": false
}

Parameters

  • No parameters

Returns

A object with a data property that contains an array of credit note line items.

Void a credit note

POST /v1/credit_notes/:id/void

curl https://api.yorlet.com/v1/credit_notes/:id/void \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "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": [],
  "total": 100000,
  "total_excluding_tax": 100000,
  "type": "pre_payment",
  "voided_at": null
}

Parameters

  • No parameters

Returns

Returns a voided credit note object if successful.

List all credit notes

GET /v1/credit_notes/

curl https://api.yorlet.com/v1/credit_notes/ \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "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": [],
      "total": 100000,
      "total_excluding_tax": 100000,
      "type": "pre_payment",
      "voided_at": null
    }
  ],
  "count": 1,
  "has_more": false
}

Parameters

  • No parameters

Returns

A object with a data property that contains an array of credit notes.

Invoices

Endpoints

POST    /v1/invoices
GET     /v1/invoices/upcoming
GET     /v1/invoices/:id
POST    /v1/invoices/:id
DELETE  /v1/invoices/:id
POST    /v1/invoices/:id/finalize
POST    /v1/invoices/:id/pay
POST    /v1/invoices/:id/send
POST    /v1/invoices/:id/mark_uncollectible
POST    /v1/invoices/:id/void
GET     /v1/invoices

The invoice object

The invoice object

{
  "id": "inv_test",
  "object": "invoice",
  "created": 1627210800,
  "amount_due": 40000,
  "amount_paid": 0,
  "amount_remaining": 40000,
  "application": null,
  "applied_balance": 0,
  "apply_customer_balance": false,
  "attempt_count": 0,
  "attempted": false,
  "auto_advance": false,
  "billing_reason": null,
  "collection_method": null,
  "currency": null,
  "custom_fields": null,
  "customer": null,
  "customer_address": null,
  "customer_email": null,
  "customer_name": null,
  "default_payment_method": null,
  "description": null,
  "discount": null,
  "discount_amount": 0,
  "due_date": null,
  "ending_balance": 0,
  "finalized_at": null,
  "footer": null,
  "from_invoice": {
    "action": null,
    "invoice": null
  },
  "hosted_invoice_url": null,
  "last_finalization_error": null,
  "late_payment_failure_invoice": null,
  "late_payment_failure": false,
  "lateset_revision": null,
  "marked_uncollectible_at": null,
  "metadata": {},
  "next_payment_attempt": null,
  "number_transfer_reference": null,
  "off_platform_reference": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "paid_at": null,
  "paid_off_platform": false,
  "paid": false,
  "part_payment_amount": 0,
  "payment_settings": {
    "payment_method_types": null
  },
  "pending_part_payment": false,
  "pending_transaction": false,
  "period_end": null,
  "period_start": null,
  "post_payment_credit_notes_amount": 0,
  "pre_payment_credit_notes_amount": 0,
  "source_dispute": null,
  "starting_balance": 0,
  "status": "open",
  "subscription": null,
  "subtotal": 0,
  "tax": 0,
  "total": 0,
  "total_tax_amounts": [],
  "transaction": null,
  "transfer_data": [],
  "voided_at": null
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be invoice.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • amount_due integer
    Final amount due at this time for this invoice.
  • amount_paid integer
    The amount that was paid.
  • amount_remaining integer
    The amount remaining that is due.
  • application stringexpandable
  • applied_balance integer
    The customer balance applied to this invoice.
  • apply_customer_balance boolean
    Whether the customer balance will be applied to this invoice.
  • attempt_count integer
    Number of payment attempts made for this invoice.
  • attempted boolean
    Whether an attempt has been made to pay the invoice.
  • auto_advance boolean
  • billing_reason string
    The reason why billing for this invoice was initiated.
  • collection_method string
    When charging automatically, Yorlet will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Yorlet will email this invoice to the customer with payment instructions. Can be charge_automatically or send_invoice.
  • currency string
    Three-letter ISO currency code, in lowercase.
  • custom_fields array
    Custom fields displayed on the invoice.
  • customer stringexpandable
    The ID of the customer who will be billed.
  • customer_address string
    The address of the customer at the time the invoice was finalized.
  • customer_email string
    The email of the customer at the time the invoice was finalized.
  • customer_name string
    The name of the customer at the time the invoice was finalized.
  • default_payment_method stringexpandable
    ID of the default payment method for the invoice. It must belong to the customer associated with the invoice.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • discount object
    Describes the current discount applied to this invoice, if there is one.
  • discount_amount integer
    The amount that has been discounted for this invoice.
  • due_date timestamp
    The date on which payment for this invoice is due. Measured in seconds since the Unix epoch.
  • ending_balance integer
    Ending customer balance after the invoice is finalized.
  • finalized_at timestamp
    The date this invoice was finalized. Measured in seconds since the Unix epoch.
  • footer string
    Footer displayed on the invoice.
  • from_invoice object
    Details of the invoice which was revised.
  • hosted_invoice_url string
    The URL for the hosted invoice page, which allows customers to view and pay an invoice.
  • last_finalization_error string
    The last finalization error on this invoice.
  • late_payment_failure_invoice string
    The ID of the invoice generated by a late payment failure.
  • late_payment_failure boolean
    Whether this invoice's payment failed after succeeding.
  • lateset_revision stringexpandable
    The ID of the latest non-draft revision of this invoice.
  • marked_uncollectible_at timestamp
    The date this invoice was marked as uncollectible. Measured in seconds since the Unix epoch.
  • 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.
  • next_payment_attempt timestamp
    The date a payment will be attempted for this invoice. Measured in seconds since the Unix epoch.
  • number string
    The invoice number.
  • number_transfer_reference string
    The invoice number used for automatic reconciliation with manual bank transfers.
  • off_platform_reference string
    The reference for a payment made off platform.
  • optimized_collection_date timestamp
    The date this invoice was optimized. Measured in seconds since the Unix epoch.
  • optimized_collection_reason string
    The reason why a optimized_collection_date was applied. Can be bacs_debit.
  • paid_at timestamp
    The date this invoice was paid. Measured in seconds since the Unix epoch.
  • paid_off_platform boolean
    Whether this invoice was paid off platform.
  • paid boolean
    Whether this invoice has been paid.
  • part_payment_amount integer
    The total part payment amount for this invoice.
  • payment_settings object
    The payment settings for this invoice.
  • pending_part_payment boolean
    Whether this invoice has a part payment that is currently unpaid.
  • pending_transaction boolean
    Whether this invoice has a payment that is currently processing.
  • period_end timestamp
    End of the billing period of this invoice. Measured in seconds since the Unix epoch.
  • period_start timestamp
    Start of the billing period of this invoice. Measured in seconds since the Unix epoch.
  • post_payment_credit_notes_amount integer
    Total amount of all post-payment credit notes issued for this invoice.
  • pre_payment_credit_notes_amount integer
    Total amount of all pre-payment credit notes issued for this invoice.
  • source_dispute string
    The dispute that created this invoice after a late payment failure.
  • starting_balance integer
    Starting customer balance before the invoice is finalized.
  • status string
    The status of the invoice. Can be draft, open, paid, uncollectible or void.
  • subscription string
    The subscription that this invoice was prepared for, if any.
  • subtotal integer
    The subtotal of this invoice.
  • tax integer
    The amount of tax on this invoice.
  • total integer
    Total after discounts and taxes.
  • total_tax_amounts array
    The amount of tax applied to this invoice.
  • transaction stringexpandable
    The ID of the transaction associated with this invoice.
  • transfer_data array
    Array describing where funds from the payment will be transferred to for the invoice.
  • voided_at timestamp
    The date this invoice was voided. Measured in seconds since the Unix epoch.

Create an invoice

POST /v1/invoices

curl https://api.yorlet.com/v1/invoices \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "inv_test",
  "object": "invoice",
  "created": 1627210800,
  "amount_due": 40000,
  "amount_paid": 0,
  "amount_remaining": 40000,
  "application": null,
  "applied_balance": 0,
  "apply_customer_balance": false,
  "attempt_count": 0,
  "attempted": false,
  "auto_advance": false,
  "billing_reason": null,
  "collection_method": null,
  "currency": null,
  "custom_fields": null,
  "customer": null,
  "customer_address": null,
  "customer_email": null,
  "customer_name": null,
  "default_payment_method": null,
  "description": null,
  "discount": null,
  "discount_amount": 0,
  "due_date": null,
  "ending_balance": 0,
  "finalized_at": null,
  "footer": null,
  "from_invoice": {
    "action": null,
    "invoice": null
  },
  "hosted_invoice_url": null,
  "last_finalization_error": null,
  "late_payment_failure_invoice": null,
  "late_payment_failure": false,
  "lateset_revision": null,
  "marked_uncollectible_at": null,
  "metadata": {},
  "next_payment_attempt": null,
  "number_transfer_reference": null,
  "off_platform_reference": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "paid_at": null,
  "paid_off_platform": false,
  "paid": false,
  "part_payment_amount": 0,
  "payment_settings": {
    "payment_method_types": null
  },
  "pending_part_payment": false,
  "pending_transaction": false,
  "period_end": null,
  "period_start": null,
  "post_payment_credit_notes_amount": 0,
  "pre_payment_credit_notes_amount": 0,
  "source_dispute": null,
  "starting_balance": 0,
  "status": "open",
  "subscription": null,
  "subtotal": 0,
  "tax": 0,
  "total": 0,
  "total_tax_amounts": [],
  "transaction": null,
  "transfer_data": [],
  "voided_at": null
}

Parameters

  • application string
    The application ID this invoice is for.
  • apply_customer_balance boolean
    Whether or not to apply the customers current balance when the invoice is finalized. Defaults to true.
  • collection_method string
    Can be charge_automatically or send_invoice.
  • coupon string
    The ID of the coupon to apply to the invoice. To clear the current discount, pass an empty string.
  • currency string
    Three-letter ISO currency code, in lowercase. Must be a supported currency. Can be eur, gbp, sek or usd.
  • custom_fields array of objects
    custom_fields.name required  string
    custom_fields.value required  string
  • customer string
    The ID of the customer.
  • days_until_due integer
  • default_payment_method string
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • due_date timestamp
    The date on which payment for this invoice is due.
  • from_invoice object
    from_invoice.action required  string
    Can be revision.
    from_invoice.invoice required  string
  • payment_settings object
    Payment settings for the transaction that is generated when the invoice is finalized.
    payment_settings.payment_method_types array of strings
    Can be one or many of autogiro, bacs_debit, bank_transfer, card, direct_transfer, pay_by_bank or sepa_debit.
  • period_end timestamp
    The date this invoice period ends.
  • period_start timestamp
    The date this invoice period starts.
  • send_finalization_email boolean
    Whether or not to send an email to the customer when the invoice is finalized. Defaults to true.

Returns

Returns

Retrieve an upcoming invoice

GET /v1/invoices/upcoming

curl https://api.yorlet.com/v1/invoices/upcoming \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "inv_test",
  "object": "invoice",
  "created": 1627210800,
  "amount_due": 40000,
  "amount_paid": 0,
  "amount_remaining": 40000,
  "application": null,
  "applied_balance": 0,
  "apply_customer_balance": false,
  "attempt_count": 0,
  "attempted": false,
  "auto_advance": false,
  "billing_reason": null,
  "collection_method": null,
  "currency": null,
  "custom_fields": null,
  "customer": null,
  "customer_address": null,
  "customer_email": null,
  "customer_name": null,
  "default_payment_method": null,
  "description": null,
  "discount": null,
  "discount_amount": 0,
  "due_date": null,
  "ending_balance": 0,
  "finalized_at": null,
  "footer": null,
  "from_invoice": {
    "action": null,
    "invoice": null
  },
  "hosted_invoice_url": null,
  "last_finalization_error": null,
  "late_payment_failure_invoice": null,
  "late_payment_failure": false,
  "lateset_revision": null,
  "marked_uncollectible_at": null,
  "metadata": {},
  "next_payment_attempt": null,
  "number_transfer_reference": null,
  "off_platform_reference": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "paid_at": null,
  "paid_off_platform": false,
  "paid": false,
  "part_payment_amount": 0,
  "payment_settings": {
    "payment_method_types": null
  },
  "pending_part_payment": false,
  "pending_transaction": false,
  "period_end": null,
  "period_start": null,
  "post_payment_credit_notes_amount": 0,
  "pre_payment_credit_notes_amount": 0,
  "source_dispute": null,
  "starting_balance": 0,
  "status": "open",
  "subscription": null,
  "subtotal": 0,
  "tax": 0,
  "total": 0,
  "total_tax_amounts": [],
  "transaction": null,
  "transfer_data": [],
  "voided_at": null
}

Parameters

  • No parameters

Returns

Returns

Retrieve an invoice

GET /v1/invoices/:id

curl https://api.yorlet.com/v1/invoices/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "inv_test",
  "object": "invoice",
  "created": 1627210800,
  "amount_due": 40000,
  "amount_paid": 0,
  "amount_remaining": 40000,
  "application": null,
  "applied_balance": 0,
  "apply_customer_balance": false,
  "attempt_count": 0,
  "attempted": false,
  "auto_advance": false,
  "billing_reason": null,
  "collection_method": null,
  "currency": null,
  "custom_fields": null,
  "customer": null,
  "customer_address": null,
  "customer_email": null,
  "customer_name": null,
  "default_payment_method": null,
  "description": null,
  "discount": null,
  "discount_amount": 0,
  "due_date": null,
  "ending_balance": 0,
  "finalized_at": null,
  "footer": null,
  "from_invoice": {
    "action": null,
    "invoice": null
  },
  "hosted_invoice_url": null,
  "last_finalization_error": null,
  "late_payment_failure_invoice": null,
  "late_payment_failure": false,
  "lateset_revision": null,
  "marked_uncollectible_at": null,
  "metadata": {},
  "next_payment_attempt": null,
  "number_transfer_reference": null,
  "off_platform_reference": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "paid_at": null,
  "paid_off_platform": false,
  "paid": false,
  "part_payment_amount": 0,
  "payment_settings": {
    "payment_method_types": null
  },
  "pending_part_payment": false,
  "pending_transaction": false,
  "period_end": null,
  "period_start": null,
  "post_payment_credit_notes_amount": 0,
  "pre_payment_credit_notes_amount": 0,
  "source_dispute": null,
  "starting_balance": 0,
  "status": "open",
  "subscription": null,
  "subtotal": 0,
  "tax": 0,
  "total": 0,
  "total_tax_amounts": [],
  "transaction": null,
  "transfer_data": [],
  "voided_at": null
}

Parameters

  • No parameters

Returns

Returns

Update an invoice

POST /v1/invoices/:id

curl https://api.yorlet.com/v1/invoices/:id \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "inv_test",
  "object": "invoice",
  "created": 1627210800,
  "amount_due": 40000,
  "amount_paid": 0,
  "amount_remaining": 40000,
  "application": null,
  "applied_balance": 0,
  "apply_customer_balance": false,
  "attempt_count": 0,
  "attempted": false,
  "auto_advance": false,
  "billing_reason": null,
  "collection_method": null,
  "currency": null,
  "custom_fields": null,
  "customer": null,
  "customer_address": null,
  "customer_email": null,
  "customer_name": null,
  "default_payment_method": null,
  "description": null,
  "discount": null,
  "discount_amount": 0,
  "due_date": null,
  "ending_balance": 0,
  "finalized_at": null,
  "footer": null,
  "from_invoice": {
    "action": null,
    "invoice": null
  },
  "hosted_invoice_url": null,
  "last_finalization_error": null,
  "late_payment_failure_invoice": null,
  "late_payment_failure": false,
  "lateset_revision": null,
  "marked_uncollectible_at": null,
  "metadata": {},
  "next_payment_attempt": null,
  "number_transfer_reference": null,
  "off_platform_reference": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "paid_at": null,
  "paid_off_platform": false,
  "paid": false,
  "part_payment_amount": 0,
  "payment_settings": {
    "payment_method_types": null
  },
  "pending_part_payment": false,
  "pending_transaction": false,
  "period_end": null,
  "period_start": null,
  "post_payment_credit_notes_amount": 0,
  "pre_payment_credit_notes_amount": 0,
  "source_dispute": null,
  "starting_balance": 0,
  "status": "open",
  "subscription": null,
  "subtotal": 0,
  "tax": 0,
  "total": 0,
  "total_tax_amounts": [],
  "transaction": null,
  "transfer_data": [],
  "voided_at": null
}

Parameters

  • apply_customer_balance boolean
    Whether or not to apply the customers current balance when the invoice is finalized. Defaults to true.
  • collection_method string
    Can be charge_automatically or send_invoice.
  • coupon string
    The ID of the coupon to apply to the invoice. To clear the current discount, pass an empty string.
  • custom_fields array of objects
    custom_fields.name required  string
    custom_fields.value required  string
  • days_until_due integer
  • default_payment_method string
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • due_date timestamp
    The date on which payment for this invoice is due.
  • payment_settings object
    Payment settings for the transaction that is generated when the invoice is finalized.
    payment_settings.payment_method_types array of strings
    Can be one or many of autogiro, bacs_debit, bank_transfer, card, direct_transfer, pay_by_bank or sepa_debit.

Returns

Returns

Delete an invoice

DELETE /v1/invoices/:id

curl https://api.yorlet.com/v1/invoices/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "inv_test",
  "object": "invoice",
  "deleted": true
}

Parameters

  • No parameters

Returns

Returns

Finalize an invoice

POST /v1/invoices/:id/finalize

curl https://api.yorlet.com/v1/invoices/:id/finalize \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "inv_test",
  "object": "invoice",
  "created": 1627210800,
  "amount_due": 40000,
  "amount_paid": 0,
  "amount_remaining": 40000,
  "application": null,
  "applied_balance": 0,
  "apply_customer_balance": false,
  "attempt_count": 0,
  "attempted": false,
  "auto_advance": false,
  "billing_reason": null,
  "collection_method": null,
  "currency": null,
  "custom_fields": null,
  "customer": null,
  "customer_address": null,
  "customer_email": null,
  "customer_name": null,
  "default_payment_method": null,
  "description": null,
  "discount": null,
  "discount_amount": 0,
  "due_date": null,
  "ending_balance": 0,
  "finalized_at": null,
  "footer": null,
  "from_invoice": {
    "action": null,
    "invoice": null
  },
  "hosted_invoice_url": null,
  "last_finalization_error": null,
  "late_payment_failure_invoice": null,
  "late_payment_failure": false,
  "lateset_revision": null,
  "marked_uncollectible_at": null,
  "metadata": {},
  "next_payment_attempt": null,
  "number_transfer_reference": null,
  "off_platform_reference": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "paid_at": null,
  "paid_off_platform": false,
  "paid": false,
  "part_payment_amount": 0,
  "payment_settings": {
    "payment_method_types": null
  },
  "pending_part_payment": false,
  "pending_transaction": false,
  "period_end": null,
  "period_start": null,
  "post_payment_credit_notes_amount": 0,
  "pre_payment_credit_notes_amount": 0,
  "source_dispute": null,
  "starting_balance": 0,
  "status": "open",
  "subscription": null,
  "subtotal": 0,
  "tax": 0,
  "total": 0,
  "total_tax_amounts": [],
  "transaction": null,
  "transfer_data": [],
  "voided_at": null
}

Parameters

  • send_finalization_email boolean
    Whether or not to send an email to the customer when the invoice is finalized. Defaults to true.

Returns

Returns

Pay an invoice

POST /v1/invoices/:id/pay

curl https://api.yorlet.com/v1/invoices/:id/pay \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "inv_test",
  "object": "invoice",
  "created": 1627210800,
  "amount_due": 40000,
  "amount_paid": 0,
  "amount_remaining": 40000,
  "application": null,
  "applied_balance": 0,
  "apply_customer_balance": false,
  "attempt_count": 0,
  "attempted": false,
  "auto_advance": false,
  "billing_reason": null,
  "collection_method": null,
  "currency": null,
  "custom_fields": null,
  "customer": null,
  "customer_address": null,
  "customer_email": null,
  "customer_name": null,
  "default_payment_method": null,
  "description": null,
  "discount": null,
  "discount_amount": 0,
  "due_date": null,
  "ending_balance": 0,
  "finalized_at": null,
  "footer": null,
  "from_invoice": {
    "action": null,
    "invoice": null
  },
  "hosted_invoice_url": null,
  "last_finalization_error": null,
  "late_payment_failure_invoice": null,
  "late_payment_failure": false,
  "lateset_revision": null,
  "marked_uncollectible_at": null,
  "metadata": {},
  "next_payment_attempt": null,
  "number_transfer_reference": null,
  "off_platform_reference": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "paid_at": null,
  "paid_off_platform": false,
  "paid": false,
  "part_payment_amount": 0,
  "payment_settings": {
    "payment_method_types": null
  },
  "pending_part_payment": false,
  "pending_transaction": false,
  "period_end": null,
  "period_start": null,
  "post_payment_credit_notes_amount": 0,
  "pre_payment_credit_notes_amount": 0,
  "source_dispute": null,
  "starting_balance": 0,
  "status": "open",
  "subscription": null,
  "subtotal": 0,
  "tax": 0,
  "total": 0,
  "total_tax_amounts": [],
  "transaction": null,
  "transfer_data": [],
  "voided_at": null
}

Parameters

  • internal_reference string
    An internal reference useful for tracking a payment made off-platform.
  • off_session boolean
  • paid_off_platform boolean
  • paid_off_platform_at timestamp
    The date the payment was made off-platform.
  • payment_method string
    The ID of a payment method to be used. It must belong to the customer associated with the invoice being paid.

Returns

Returns

Send an invoice

POST /v1/invoices/:id/send

curl https://api.yorlet.com/v1/invoices/:id/send \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "inv_test",
  "object": "invoice",
  "created": 1627210800,
  "amount_due": 40000,
  "amount_paid": 0,
  "amount_remaining": 40000,
  "application": null,
  "applied_balance": 0,
  "apply_customer_balance": false,
  "attempt_count": 0,
  "attempted": false,
  "auto_advance": false,
  "billing_reason": null,
  "collection_method": null,
  "currency": null,
  "custom_fields": null,
  "customer": null,
  "customer_address": null,
  "customer_email": null,
  "customer_name": null,
  "default_payment_method": null,
  "description": null,
  "discount": null,
  "discount_amount": 0,
  "due_date": null,
  "ending_balance": 0,
  "finalized_at": null,
  "footer": null,
  "from_invoice": {
    "action": null,
    "invoice": null
  },
  "hosted_invoice_url": null,
  "last_finalization_error": null,
  "late_payment_failure_invoice": null,
  "late_payment_failure": false,
  "lateset_revision": null,
  "marked_uncollectible_at": null,
  "metadata": {},
  "next_payment_attempt": null,
  "number_transfer_reference": null,
  "off_platform_reference": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "paid_at": null,
  "paid_off_platform": false,
  "paid": false,
  "part_payment_amount": 0,
  "payment_settings": {
    "payment_method_types": null
  },
  "pending_part_payment": false,
  "pending_transaction": false,
  "period_end": null,
  "period_start": null,
  "post_payment_credit_notes_amount": 0,
  "pre_payment_credit_notes_amount": 0,
  "source_dispute": null,
  "starting_balance": 0,
  "status": "open",
  "subscription": null,
  "subtotal": 0,
  "tax": 0,
  "total": 0,
  "total_tax_amounts": [],
  "transaction": null,
  "transfer_data": [],
  "voided_at": null
}

Parameters

  • No parameters

Returns

Returns

Mark an invoice as uncollectible

POST /v1/invoices/:id/mark_uncollectible

curl https://api.yorlet.com/v1/invoices/:id/mark_uncollectible \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "inv_test",
  "object": "invoice",
  "created": 1627210800,
  "amount_due": 40000,
  "amount_paid": 0,
  "amount_remaining": 40000,
  "application": null,
  "applied_balance": 0,
  "apply_customer_balance": false,
  "attempt_count": 0,
  "attempted": false,
  "auto_advance": false,
  "billing_reason": null,
  "collection_method": null,
  "currency": null,
  "custom_fields": null,
  "customer": null,
  "customer_address": null,
  "customer_email": null,
  "customer_name": null,
  "default_payment_method": null,
  "description": null,
  "discount": null,
  "discount_amount": 0,
  "due_date": null,
  "ending_balance": 0,
  "finalized_at": null,
  "footer": null,
  "from_invoice": {
    "action": null,
    "invoice": null
  },
  "hosted_invoice_url": null,
  "last_finalization_error": null,
  "late_payment_failure_invoice": null,
  "late_payment_failure": false,
  "lateset_revision": null,
  "marked_uncollectible_at": null,
  "metadata": {},
  "next_payment_attempt": null,
  "number_transfer_reference": null,
  "off_platform_reference": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "paid_at": null,
  "paid_off_platform": false,
  "paid": false,
  "part_payment_amount": 0,
  "payment_settings": {
    "payment_method_types": null
  },
  "pending_part_payment": false,
  "pending_transaction": false,
  "period_end": null,
  "period_start": null,
  "post_payment_credit_notes_amount": 0,
  "pre_payment_credit_notes_amount": 0,
  "source_dispute": null,
  "starting_balance": 0,
  "status": "open",
  "subscription": null,
  "subtotal": 0,
  "tax": 0,
  "total": 0,
  "total_tax_amounts": [],
  "transaction": null,
  "transfer_data": [],
  "voided_at": null
}

Parameters

  • No parameters

Returns

Returns

Void an invoice

POST /v1/invoices/:id/void

curl https://api.yorlet.com/v1/invoices/:id/void \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "inv_test",
  "object": "invoice",
  "created": 1627210800,
  "amount_due": 40000,
  "amount_paid": 0,
  "amount_remaining": 40000,
  "application": null,
  "applied_balance": 0,
  "apply_customer_balance": false,
  "attempt_count": 0,
  "attempted": false,
  "auto_advance": false,
  "billing_reason": null,
  "collection_method": null,
  "currency": null,
  "custom_fields": null,
  "customer": null,
  "customer_address": null,
  "customer_email": null,
  "customer_name": null,
  "default_payment_method": null,
  "description": null,
  "discount": null,
  "discount_amount": 0,
  "due_date": null,
  "ending_balance": 0,
  "finalized_at": null,
  "footer": null,
  "from_invoice": {
    "action": null,
    "invoice": null
  },
  "hosted_invoice_url": null,
  "last_finalization_error": null,
  "late_payment_failure_invoice": null,
  "late_payment_failure": false,
  "lateset_revision": null,
  "marked_uncollectible_at": null,
  "metadata": {},
  "next_payment_attempt": null,
  "number_transfer_reference": null,
  "off_platform_reference": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "paid_at": null,
  "paid_off_platform": false,
  "paid": false,
  "part_payment_amount": 0,
  "payment_settings": {
    "payment_method_types": null
  },
  "pending_part_payment": false,
  "pending_transaction": false,
  "period_end": null,
  "period_start": null,
  "post_payment_credit_notes_amount": 0,
  "pre_payment_credit_notes_amount": 0,
  "source_dispute": null,
  "starting_balance": 0,
  "status": "open",
  "subscription": null,
  "subtotal": 0,
  "tax": 0,
  "total": 0,
  "total_tax_amounts": [],
  "transaction": null,
  "transfer_data": [],
  "voided_at": null
}

Parameters

  • No parameters

Returns

Returns

List all invoices

GET /v1/invoices

curl https://api.yorlet.com/v1/invoices \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "inv_test",
      "object": "invoice",
      "created": 1627210800,
      "amount_due": 40000,
      "amount_paid": 0,
      "amount_remaining": 40000,
      "application": null,
      "applied_balance": 0,
      "apply_customer_balance": false,
      "attempt_count": 0,
      "attempted": false,
      "auto_advance": false,
      "billing_reason": null,
      "collection_method": null,
      "currency": null,
      "custom_fields": null,
      "customer": null,
      "customer_address": null,
      "customer_email": null,
      "customer_name": null,
      "default_payment_method": null,
      "description": null,
      "discount": null,
      "discount_amount": 0,
      "due_date": null,
      "ending_balance": 0,
      "finalized_at": null,
      "footer": null,
      "from_invoice": {
        "action": null,
        "invoice": null
      },
      "hosted_invoice_url": null,
      "last_finalization_error": null,
      "late_payment_failure_invoice": null,
      "late_payment_failure": false,
      "lateset_revision": null,
      "marked_uncollectible_at": null,
      "metadata": {},
      "next_payment_attempt": null,
      "number_transfer_reference": null,
      "off_platform_reference": null,
      "optimized_collection_date": null,
      "optimized_collection_reason": null,
      "paid_at": null,
      "paid_off_platform": false,
      "paid": false,
      "part_payment_amount": 0,
      "payment_settings": {
        "payment_method_types": null
      },
      "pending_part_payment": false,
      "pending_transaction": false,
      "period_end": null,
      "period_start": null,
      "post_payment_credit_notes_amount": 0,
      "pre_payment_credit_notes_amount": 0,
      "source_dispute": null,
      "starting_balance": 0,
      "status": "open",
      "subscription": null,
      "subtotal": 0,
      "tax": 0,
      "total": 0,
      "total_tax_amounts": [],
      "transaction": null,
      "transfer_data": [],
      "voided_at": null
    }
  ],
  "count": 1,
  "has_more": false
}

Parameters

  • No parameters

Returns

List

Invoices Items

Endpoints

POST    /v1/invoice_items
GET     /v1/invoice_items/:id
POST    /v1/invoice_items/:id
DELETE  /v1/invoice_items/:id
GET     /v1/invoice_items

Bill customers for additional charges or rent.

The invoice item object

The invoice item object

{
  "id": "ii_test",
  "object": "invoice_item",
  "created": 1627210800,
  "accounting_code": null,
  "apply_after": null,
  "amount": 10000,
  "credit_amount": 0,
  "currency": "gbp",
  "customer": "cus_test",
  "description": null,
  "discount": 0,
  "invoice": "inv_test",
  "metadata": {},
  "part_payment_amount": 0,
  "price_data": {
    "amount": 10000,
    "currency": "gbp",
    "recurring": null,
    "tax_percent": 0,
    "type": "one_time"
  },
  "price": null,
  "proration_amount": 0,
  "subscription": null,
  "subscription_item": null,
  "tax": 0,
  "tax_percent": 0,
  "transfer_behavior": "automatic",
  "transfer_destination": null,
  "type": "rent",
  "unit": null
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be invoice_item.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • accounting_code string
    The accounting code to use for the invoice item.
  • apply_after timestamp
    The date after which the invoice item will be applied.
  • amount integer
    The integer amount in the smallest smallest currency unit of the amount to be applied to the invoice.
  • credit_amount integer
    The credit amount applied to this invoice item.
  • currency string
    Three-letter ISO currency code, in lowercase. Must be a supported currency.
  • customer stringexpandable
    The ID of the customer who will be billed.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • discount integer
    The discount amount applied to this invoice item.
  • invoice stringexpandable
    The ID of the associated invoice.
  • 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.
  • part_payment_amount integer
    The part payment amount applied to this invoice item.
  • price_data object
    The price the customer is subscribed to.
    price_data.amount integer
    The amount to be charged, represented as a whole integer.
    price_data.currency string
    Three-letter ISO currency code, in lowercase. Must be a supported currency.
    price_data.recurring object
    price_data.recurring.interval string
    The frequency at which a subscription is billed. One of day, week, month or year.
    price_data.recurring.interval_count string
    The number of intervals (specified in the interval attribute) between subscription billings. For example, interval=month and interval_count=3 bills every 3 months.
    price_data.tax_percent integer
    The tax percent to apply to the amount.
    price_data.type string
    One of one_time or recurring depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. Invoice items created through the API will always be one_time.
  • price stringexpandable
    The ID of the associated price.
  • proration_amount integer
    The proration amount applied to this invoice item.
  • subscription stringexpandable
    The ID of the associated subscription.
  • subscription_item stringexpandable
    The ID of the associated subscription item that created this invoice item.
  • tax integer
    The tax amount applied to this invoice item.
  • tax_percent integer
    The tax percent used to calculate the tax amount.
  • transfer_behavior string
    The transfer behavior for this invoice item. Can be automatic.
  • transfer_destination stringexpandable
    ID of the owner that will receive the funds from this invoice item.
  • type string
    The type of invoice item. Can be charge or rent.
  • unit stringexpandable
    The ID of the associated unit.

Create an invoice item

POST /v1/invoice_items

curl https://api.yorlet.com/v1/invoice_items \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "ii_test",
  "object": "invoice_item",
  "created": 1627210800,
  "accounting_code": null,
  "apply_after": null,
  "amount": 10000,
  "credit_amount": 0,
  "currency": "gbp",
  "customer": "cus_test",
  "description": null,
  "discount": 0,
  "invoice": "inv_test",
  "metadata": {},
  "part_payment_amount": 0,
  "price_data": {
    "amount": 10000,
    "currency": "gbp",
    "recurring": null,
    "tax_percent": 0,
    "type": "one_time"
  },
  "price": null,
  "proration_amount": 0,
  "subscription": null,
  "subscription_item": null,
  "tax": 0,
  "tax_percent": 0,
  "transfer_behavior": "automatic",
  "transfer_destination": null,
  "type": "rent",
  "unit": null
}

Creates a new invoice item.

Parameters

  • amount required  integer
    The amount to be charged, represented as a whole integer if possible.
  • currency required  string
    Three-letter ISO currency code, in lowercase. Must be a supported currency. Can be eur, gbp, sek or usd.
  • customer required  string
    The ID of the customer the invoice item is for.
  • description required  string
    The description for the invoice item, to be displayed to the customer.
  • type required  string
    The type of the invoice item. Can be charge, rent or product.
  • apply_after timestamp
    The date after which the invoice item will be applied.
  • invoice string
    The ID of the invoice the invoice item is for.
  • 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.
  • price string
    The ID of the price object.
  • tax_percent number
    The tax percentage to use when calculating the tax amount.
  • transfer_behavior string
    The invoice item transfer behavior. The default is automatic. Can be automatic, owner or none.
  • transfer_destination string
    ID of the owner that will be the transfer destination. Only allowed when the invoice item transfer behavior is owner.
  • unit string
    The ID of the unit the invoice item is for.

Returns

Returns the invoice item object if the request succeeded.

Retrieve an invoice item

GET /v1/invoice_items/:id

curl https://api.yorlet.com/v1/invoice_items/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "ii_test",
  "object": "invoice_item",
  "created": 1627210800,
  "accounting_code": null,
  "apply_after": null,
  "amount": 10000,
  "credit_amount": 0,
  "currency": "gbp",
  "customer": "cus_test",
  "description": null,
  "discount": 0,
  "invoice": "inv_test",
  "metadata": {},
  "part_payment_amount": 0,
  "price_data": {
    "amount": 10000,
    "currency": "gbp",
    "recurring": null,
    "tax_percent": 0,
    "type": "one_time"
  },
  "price": null,
  "proration_amount": 0,
  "subscription": null,
  "subscription_item": null,
  "tax": 0,
  "tax_percent": 0,
  "transfer_behavior": "automatic",
  "transfer_destination": null,
  "type": "rent",
  "unit": null
}

Retrieves the invoice item with the given ID.

Parameters

  • No parameters

Returns

An invoice item object if a valid identifier was provided.

Update an invoice item

POST /v1/invoice_items/:id

curl https://api.yorlet.com/v1/invoice_items/:id \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "ii_test",
  "object": "invoice_item",
  "created": 1627210800,
  "accounting_code": null,
  "apply_after": null,
  "amount": 10000,
  "credit_amount": 0,
  "currency": "gbp",
  "customer": "cus_test",
  "description": null,
  "discount": 0,
  "invoice": "inv_test",
  "metadata": {},
  "part_payment_amount": 0,
  "price_data": {
    "amount": 10000,
    "currency": "gbp",
    "recurring": null,
    "tax_percent": 0,
    "type": "one_time"
  },
  "price": null,
  "proration_amount": 0,
  "subscription": null,
  "subscription_item": null,
  "tax": 0,
  "tax_percent": 0,
  "transfer_behavior": "automatic",
  "transfer_destination": null,
  "type": "rent",
  "unit": null
}

Updates the invoice item with the given ID.

Parameters

  • amount integer
    The amount to be charged, represented as a whole integer if possible.
  • description string
    The description for the invoice item, to be displayed to the customer.
  • 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.
  • tax_percent number
    The tax percentage to use when calculating the tax amount.
  • transfer_behavior string
    The invoice item transfer behavior. The default is automatic. Can be automatic, owner or none.
  • transfer_destination string
    ID of the owner that will be the transfer destination. Only allowed when the invoice item transfer behavior is owner.

Returns

The updated invoice item. Otherwise, this call throws an error.

Delete an invoice item

DELETE /v1/invoice_items/:id

curl https://api.yorlet.com/v1/invoice_items/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "ii_test",
  "object": "invoice_item",
  "deleted": true
}

Deletes the invoice item with the given ID.

Parameters

  • No parameters

Returns

An object with the deleted invoice item’s ID and a deleted flag upon success.

List all invoice items

GET /v1/invoice_items

curl https://api.yorlet.com/v1/invoice_items \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "ii_test",
      "object": "invoice_item",
      "created": 1627210800,
      "accounting_code": null,
      "apply_after": null,
      "amount": 10000,
      "credit_amount": 0,
      "currency": "gbp",
      "customer": "cus_test",
      "description": null,
      "discount": 0,
      "invoice": "inv_test",
      "metadata": {},
      "part_payment_amount": 0,
      "price_data": {
        "amount": 10000,
        "currency": "gbp",
        "recurring": null,
        "tax_percent": 0,
        "type": "one_time"
      },
      "price": null,
      "proration_amount": 0,
      "subscription": null,
      "subscription_item": null,
      "tax": 0,
      "tax_percent": 0,
      "transfer_behavior": "automatic",
      "transfer_destination": null,
      "type": "rent",
      "unit": null
    }
  ],
  "count": 1,
  "has_more": false
}

A list of invoice items. The invoice items are returned sorted by creation date, with the most recent invoice items appearing first.

Parameters

  • No parameters

Returns

A object with a data property that contains an array of invoice items.

Part Payments

Endpoints

POST    /v1/part_payments
POST    /v1/part_payments/preview
GET     /v1/part_payments/:id
POST    /v1/part_payments/:id
GET     /v1/part_payments/:id/lines
POST    /v1/part_payments/:id/marked_paid
POST    /v1/part_payments/:id/void
GET     /v1/part_payments/

The part payment object

The part payment object

{
  "id": "pp_test",
  "object": "part_payment",
  "created": 1627210800,
  "amount": 100000,
  "currency": "gbp",
  "customer": null,
  "description": null,
  "invoice": null,
  "metadata": {},
  "number": null,
  "out_of_band": false,
  "paid_at": null,
  "status": null,
  "transaction": null
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be part_payment.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • amount integer
    The deposit amount.
  • currency string
    Three-letter ISO currency code, in lowercase.
  • customer stringexpandable
    The ID of the customer.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • invoice stringexpandable
    The ID of the invoice.
  • 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.
  • number string
    A unique number that identifies this part payment
  • out_of_band boolean
    Whether or not the part payment was paid outside of Yorlet.
  • paid_at timestamp
    Time at which the part payment was paid. Measured in seconds since the Unix epoch.
  • status string
  • transaction stringexpandable
    The ID of the transaction associated with this part payment.

The part payment line item object

The part payment object

{
  "id": "ppli_test",
  "object": "part_payment_line_item",
  "created": 1627210800,
  "amount": 100000,
  "currency": "gbp",
  "description": null,
  "invoice_item": "ii_test",
  "part_payment": "pp_test",
  "type": "invoice_line_item"
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be part_payment_line_item.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • amount integer
    The deposit amount.
  • currency string
    Three-letter ISO currency code, in lowercase.
  • description string
    The line item description.
  • invoice_item string
    The ID of the invoice item.
  • part_payment string
    The ID of the part payment.
  • type string
    The part payment line item type. Can be invoice_item.

Create a part payment

POST /v1/part_payments

curl https://api.yorlet.com/v1/part_payments \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "pp_test",
  "object": "part_payment",
  "created": 1627210800,
  "amount": 100000,
  "currency": "gbp",
  "customer": null,
  "description": null,
  "invoice": null,
  "metadata": {},
  "number": null,
  "out_of_band": false,
  "paid_at": null,
  "status": null,
  "transaction": null
}

Parameters

  • invoice required  string
    ID of the invoice.
  • lines required  array of objects
    A list of up to 10 line items to part pay.
    lines.amount required  integer
    The part payment amount to apply to the line item.
    lines.invoice_item required  string
    The invoice item to part pay.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • 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.
  • out_of_band boolean

Returns

Returns a part payment object if successful.

Preview a part payment

POST /v1/part_payments/preview

curl https://api.yorlet.com/v1/part_payments/preview \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "pp_test",
  "object": "part_payment",
  "created": 1627210800,
  "amount": 100000,
  "currency": "gbp",
  "customer": null,
  "description": null,
  "invoice": null,
  "metadata": {},
  "number": null,
  "out_of_band": false,
  "paid_at": null,
  "status": null,
  "transaction": null
}

Parameters

  • invoice required  string
    ID of the invoice.
  • lines required  array of objects
    A list of up to 10 line items to part pay.
    lines.amount required  integer
    The part payment amount to apply to the line item.
    lines.invoice_item required  string
    The invoice item to part pay.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • 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.
  • out_of_band boolean

Returns

Returns a part payment preview object if successful.

Retrieve a part payment

GET /v1/part_payments/:id

curl https://api.yorlet.com/v1/part_payments/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "pp_test",
  "object": "part_payment",
  "created": 1627210800,
  "amount": 100000,
  "currency": "gbp",
  "customer": null,
  "description": null,
  "invoice": null,
  "metadata": {},
  "number": null,
  "out_of_band": false,
  "paid_at": null,
  "status": null,
  "transaction": null
}

Parameters

  • No parameters

Returns

Returns a part payment object if a valid identifier was provided.

Update a part payment

POST /v1/part_payments/:id

curl https://api.yorlet.com/v1/part_payments/:id \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "pp_test",
  "object": "part_payment",
  "created": 1627210800,
  "amount": 100000,
  "currency": "gbp",
  "customer": null,
  "description": null,
  "invoice": null,
  "metadata": {},
  "number": null,
  "out_of_band": false,
  "paid_at": null,
  "status": null,
  "transaction": null
}

Parameters

  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • 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.

Returns

Returns an updated part payment object if a valid identifier was provided.

Retrieve a part payment's line items

GET /v1/part_payments/:id/lines

curl https://api.yorlet.com/v1/part_payments/:id/lines \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "ppli_test",
      "object": "part_payment_line_item",
      "created": 1627210800,
      "amount": 100000,
      "currency": "gbp",
      "description": null,
      "invoice_item": "ii_test",
      "part_payment": "pp_test",
      "type": "invoice_line_item"
    }
  ],
  "count": 1,
  "has_more": false
}

Parameters

  • No parameters

Returns

A object with a data property that contains an array of part payment line items.

Mark a part payment as paid

POST /v1/part_payments/:id/marked_paid

curl https://api.yorlet.com/v1/part_payments/:id/marked_paid \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "pp_test",
  "object": "part_payment",
  "created": 1627210800,
  "amount": 100000,
  "currency": "gbp",
  "customer": null,
  "description": null,
  "invoice": null,
  "metadata": {},
  "number": null,
  "out_of_band": false,
  "paid_at": null,
  "status": null,
  "transaction": null
}

Parameters

  • No parameters

Returns

Returns a voided part payment object if successful.

Void a part payment

POST /v1/part_payments/:id/void

curl https://api.yorlet.com/v1/part_payments/:id/void \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "pp_test",
  "object": "part_payment",
  "created": 1627210800,
  "amount": 100000,
  "currency": "gbp",
  "customer": null,
  "description": null,
  "invoice": null,
  "metadata": {},
  "number": null,
  "out_of_band": false,
  "paid_at": null,
  "status": null,
  "transaction": null
}

Parameters

  • No parameters

Returns

Returns a voided part payment object if successful.

List all part payments

GET /v1/part_payments/

curl https://api.yorlet.com/v1/part_payments/ \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "pp_test",
      "object": "part_payment",
      "created": 1627210800,
      "amount": 100000,
      "currency": "gbp",
      "customer": null,
      "description": null,
      "invoice": null,
      "metadata": {},
      "number": null,
      "out_of_band": false,
      "paid_at": null,
      "status": null,
      "transaction": null
    }
  ],
  "count": 1,
  "has_more": false
}

Parameters

  • No parameters

Returns

A object with a data property that contains an array of part payments.

Subscriptions

Endpoints

POST    /v1/subscriptions
GET     /v1/subscriptions/:id
POST    /v1/subscriptions/:id
POST    /v1/subscriptions/:id/cancel
DELETE  /v1/subscriptions/:id/discount
POST    /v1/subscriptions/:id/progress
GET     /v1/subscriptions

The API allows you to create, cancel, and update your subscriptions. You can retrieve individual subscriptions as well as a list of all your subscriptions.

The subscription object

The subscription object

{
  "id": "sub_test",
  "object": "subscription",
  "created": 1627210800,
  "application": null,
  "billing_anchor": null,
  "cancel_at": null,
  "canceled_at": null,
  "current_period_end": null,
  "current_period_start": null,
  "current_phase": null,
  "custom_fields": null,
  "customer": null,
  "days_before_collection": null,
  "days_until_due": null,
  "default_payment_method": null,
  "discount": null,
  "end": null,
  "from_subscription": {
    "action": null,
    "subscription": null
  },
  "metadata": {},
  "next_period_end": null,
  "next_period_start": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "pause_collection": null,
  "phases": null,
  "start": 1738338664
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be subscription.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • application string
    ID of the application associated with this subscription.
  • billing_anchor timestamp
    Determines the date of the first full invoice. You can use this parameter to set a regular billing date for the subscription.
  • cancel_at timestamp
    A date in the future at which the subscription will automatically be canceled. Measured in seconds since the Unix epoch.
  • canceled_at timestamp
    The date the subscription was canceled. Measured in seconds since the Unix epoch.
  • collection_method string
    Can be charge_automatically or send_invoice.
  • currency string
    Three-letter ISO currency code, in lowercase. Must be a supported currency.
  • current_period_end timestamp
    End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
  • current_period_start timestamp
    Start of the current period that the subscription has been invoiced for.
  • current_phase object
  • custom_fields array
    Custom fields displayed on each invoice this subscription creates.
  • customer stringexpandable
    ID of the customer who owns the subscription.
  • days_before_collection integer
    The number of days to create the invoice before the subscription's next period start date. Useful if you want to send the customer the upcoming invoice a few days before the subscription's next period start date. Only applies to subscriptions with collection_method=send_invoice.
  • days_until_due integer
  • default_payment_method stringexpandable
    ID of the default payment method for the subscription. It must belong to the customer associated with the subscription.
  • description string
    Subscriptions allow you to charge a customer on a recurring basis.
  • discount string
    Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis.
  • end timestamp
    Date when the subscription will end.
  • from_subscription object
    Details of the subscription which was revised.
  • interval string
    The frequency at which a subscription is billed. One of day, week, month or year.
  • interval_count string
    The number of intervals (specified in the interval attribute) between subscription billings. For example, interval=month and interval_count=3 bills every 3 months.
  • latest_invoice string
    The most recent invoice this subscription has generated.
  • 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.
  • next_period_end timestamp
    The end date of the next billing cycle.
  • next_period_start timestamp
    The start date of the next billing cycle.
  • optimized_collection_date timestamp
    The date on which collection will be optimized.
  • optimized_collection_reason string
    The reason collection was optimized.
  • pause_collection string
    If specified, payment collection for this subscription will be paused.
  • phases array
    The phases of the subscription schedule.
  • start timestamp
    Date when the subscription will start.
  • status string
    The status of the subscription.

Create a subscription

POST /v1/subscriptions

curl https://api.yorlet.com/v1/subscriptions \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "sub_test",
  "object": "subscription",
  "created": 1627210800,
  "application": null,
  "billing_anchor": null,
  "cancel_at": null,
  "canceled_at": null,
  "current_period_end": null,
  "current_period_start": null,
  "current_phase": null,
  "custom_fields": null,
  "customer": null,
  "days_before_collection": null,
  "days_until_due": null,
  "default_payment_method": null,
  "discount": null,
  "end": null,
  "from_subscription": {
    "action": null,
    "subscription": null
  },
  "metadata": {},
  "next_period_end": null,
  "next_period_start": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "pause_collection": null,
  "phases": null,
  "start": 1738338664
}

Parameters

  • customer required  string
    The ID of the customer.
  • interval required  string
    The interval of the subscription. Can be month, week or custom.
  • add_invoice_items array of objects
    A list of up to 10 invoice items that will be appended to the next invoice for this subscription.
    add_invoice_items.description required  string
    Description for the subscription item.
    add_invoice_items.type required  string
    The type of subscription item. Can be charge, deposit, rent or product.
    add_invoice_items.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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
    add_invoice_items.price string
    The ID of the price object.
    add_invoice_items.price_data object
    add_invoice_items.price_data.amount required  integer
    A positive integer in pence representing how much to charge.
    add_invoice_items.price_data.currency required  string
    Three-letter ISO currency code, in lowercase. Can be eur, gbp, sek or usd.
    add_invoice_items.price_data.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    add_invoice_items.proration_behavior string
    Can be create_prorations or none.
    add_invoice_items.tax_rate string
    The ID of the tax rate to apply to this item.
    add_invoice_items.transfer_behavior string
    Can be automatic, owner or none.
    add_invoice_items.transfer_destination string
    ID of the owner that will be the transfer destination. Only allowed when the subscription item transfer behavior is owner.
    add_invoice_items.unit string
    The ID of the unit. If type=rent you must provide a unit ID
  • application string
    The ID of the application to associate the subscription with.
  • billing_anchor timestamp
    The date to anchor the subscription to.
  • collection_method string
    The collection method for the subscription. Can be charge_automatically or send_invoice.
  • coupon string
    The ID of the coupon to apply to the subscription.
  • currency string
    Three-letter ISO currency code, in lowercase. Must be a supported currency. Can be eur, gbp, sek or usd.
  • custom_fields array of objects
    Custom fields to add to the subscription.
    custom_fields.name required  string
    The name of the custom field.
    custom_fields.value required  string
    The value of the custom field.
  • days_before_collection integer
    The number of days to create the invoice before the subscription's next billing date. Useful if you want to send the customer the upcoming invoice a few days before the subscription's next billing date. Only applies to subscriptions with collection_method=send_invoice.
  • days_until_due integer
    The number of days before the invoice is due.
  • default_payment_method string
    The ID of the payment method. It must belong to the customer associated with the subscription.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • end_date timestamp
    The date this subscription should end. When a subscription ends the status will change to complete
  • from_subscription object
    from_subscription.action required  string
    Can be revision.
    from_subscription.subscription required  string
  • interval_count integer
    The interval count of the subscription.
  • items array of objects
    A list of up to 10 subscription items, each with attached price_data.
    items.description required  string
    Description for the subscription item.
    items.type required  string
    The type of subscription item. Can be charge, deposit, rent or product.
    items.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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
    items.price string
    The ID of the price object.
    items.price_data object
    items.price_data.amount required  integer
    A positive integer in pence representing how much to charge.
    items.price_data.currency required  string
    Three-letter ISO currency code, in lowercase. Can be eur, gbp, sek or usd.
    items.price_data.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    items.proration_behavior string
    Can be create_prorations or none.
    items.tax_rate string
    The ID of the tax rate to apply to this item.
    items.transfer_behavior string
    Can be automatic, owner or none.
    items.transfer_destination string
    ID of the owner that will be the transfer destination. Only allowed when the subscription item transfer behavior is owner.
    items.unit string
    The ID of the unit. If type=rent you must provide a unit ID
  • payment_settings object
    Payment settings to pass on to invoices created for this subscription.
    payment_settings.payment_method_types array of strings
    Can be one or many of autogiro, bacs_debit, bank_transfer, card, direct_transfer, pay_by_bank or sepa_debit.
  • phases array of objects
    The phases of the subscription. Only allowed when interval=custom.
    phases.start_date required  timestamp
    The date on which the phase starts.
    phases.items array of objects
    A list of up to 10 subscription items, each with attached price_data.
    phases.items.description required  string
    Description for the subscription item.
    phases.items.type required  string
    The type of subscription item. Can be charge, deposit, rent or product.
    phases.items.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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
    phases.items.price string
    The ID of the price object.
    phases.items.price_data object
    phases.items.price_data.amount required  integer
    A positive integer in pence representing how much to charge.
    phases.items.price_data.currency required  string
    Three-letter ISO currency code, in lowercase. Can be eur, gbp, sek or usd.
    phases.items.price_data.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    phases.items.proration_behavior string
    Can be create_prorations or none.
    phases.items.tax_rate string
    The ID of the tax rate to apply to this item.
    phases.items.transfer_behavior string
    Can be automatic, owner or none.
    phases.items.transfer_destination string
    ID of the owner that will be the transfer destination. Only allowed when the subscription item transfer behavior is owner.
    phases.items.unit string
    The ID of the unit. If type=rent you must provide a unit ID
  • start_date timestamp
    The date this subscription should begin. Start dates in the future will cause the initial status of the sunscription to be scheduled
  • use_future_billing_date boolean
    Use the future billing date for the subscription.

Returns

Returns the subscription object if the request succeeded.

Retrieve a subscription

GET /v1/subscriptions/:id

curl https://api.yorlet.com/v1/subscriptions/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "sub_test",
  "object": "subscription",
  "created": 1627210800,
  "application": null,
  "billing_anchor": null,
  "cancel_at": null,
  "canceled_at": null,
  "current_period_end": null,
  "current_period_start": null,
  "current_phase": null,
  "custom_fields": null,
  "customer": null,
  "days_before_collection": null,
  "days_until_due": null,
  "default_payment_method": null,
  "discount": null,
  "end": null,
  "from_subscription": {
    "action": null,
    "subscription": null
  },
  "metadata": {},
  "next_period_end": null,
  "next_period_start": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "pause_collection": null,
  "phases": null,
  "start": 1738338664
}

Parameters

  • No parameters

Returns

Returns a subscription object if a valid identifier was provided.

Update a subscription

POST /v1/subscriptions/:id

curl https://api.yorlet.com/v1/subscriptions/:id \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "sub_test",
  "object": "subscription",
  "created": 1627210800,
  "application": null,
  "billing_anchor": null,
  "cancel_at": null,
  "canceled_at": null,
  "current_period_end": null,
  "current_period_start": null,
  "current_phase": null,
  "custom_fields": null,
  "customer": null,
  "days_before_collection": null,
  "days_until_due": null,
  "default_payment_method": null,
  "discount": null,
  "end": null,
  "from_subscription": {
    "action": null,
    "subscription": null
  },
  "metadata": {},
  "next_period_end": null,
  "next_period_start": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "pause_collection": null,
  "phases": null,
  "start": 1738338664
}

Parameters

  • add_invoice_items array of objects
    A list of up to 10 invoice items that will be appended to the next invoice for this subscription.
    add_invoice_items.description required  string
    Description for the subscription item.
    add_invoice_items.type required  string
    The type of subscription item. Can be charge, deposit, rent or product.
    add_invoice_items.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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
    add_invoice_items.price string
    The ID of the price object.
    add_invoice_items.price_data object
    add_invoice_items.price_data.amount required  integer
    A positive integer in pence representing how much to charge.
    add_invoice_items.price_data.currency required  string
    Three-letter ISO currency code, in lowercase. Can be eur, gbp, sek or usd.
    add_invoice_items.price_data.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    add_invoice_items.proration_behavior string
    Can be create_prorations or none.
    add_invoice_items.tax_rate string
    The ID of the tax rate to apply to this item.
    add_invoice_items.transfer_behavior string
    Can be automatic, owner or none.
    add_invoice_items.transfer_destination string
    ID of the owner that will be the transfer destination. Only allowed when the subscription item transfer behavior is owner.
    add_invoice_items.unit string
    The ID of the unit. If type=rent you must provide a unit ID
  • billing_anchor timestamp
    The date to anchor the subscription to.
  • billing_cycle_reset boolean
    Reset the billing cycle from the billing anchor provided.
  • cancel_at timestamp
    The time at which the subscription should be canceled. If set, the subscription will be scheduled for cancellation and will be canceled on the date provided.
  • collection_method string
    The collection method for the subscription. Can be charge_automatically or send_invoice.
  • coupon string
    The ID of the coupon to apply to the subscription.
  • custom_fields array of objects
    Custom fields to add to the subscription.
    custom_fields.name required  string
    The name of the custom field.
    custom_fields.value required  string
    The value of the custom field.
  • days_before_collection integer
    The number of days to create the invoice before the subscription's next billing date. Useful if you want to send the customer the upcoming invoice a few days before the subscription's next billing date. Only applies to subscriptions with collection_method=send_invoice.
  • days_until_due integer
    The number of days before the invoice is due.
  • default_payment_method string
    The ID of the payment method. It must belong to the customer associated with the subscription.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • end_date timestamp
    The date this subscription should end. When a subscription ends the status will change to complete
  • pause_collection object
    pause_collection.behavior required  string
    pause_collection.resumes_at timestamp
  • payment_settings object
    Payment settings to pass on to invoices created for this subscription.
    payment_settings.payment_method_types array of strings
    Can be one or many of autogiro, bacs_debit, bank_transfer, card, direct_transfer, pay_by_bank or sepa_debit.
  • phases array of objects
    The phases of the subscription. Only allowed when interval=custom.
    phases.start_date required  timestamp
    The date on which the phase starts.
    phases.items array of objects
    A list of up to 10 subscription items, each with attached price_data.
    phases.items.description required  string
    Description for the subscription item.
    phases.items.type required  string
    The type of subscription item. Can be charge, deposit, rent or product.
    phases.items.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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
    phases.items.price string
    The ID of the price object.
    phases.items.price_data object
    phases.items.price_data.amount required  integer
    A positive integer in pence representing how much to charge.
    phases.items.price_data.currency required  string
    Three-letter ISO currency code, in lowercase. Can be eur, gbp, sek or usd.
    phases.items.price_data.tax_percent number
    The percentage of sales tax to charge. For example, VAT would be 20.
    phases.items.proration_behavior string
    Can be create_prorations or none.
    phases.items.tax_rate string
    The ID of the tax rate to apply to this item.
    phases.items.transfer_behavior string
    Can be automatic, owner or none.
    phases.items.transfer_destination string
    ID of the owner that will be the transfer destination. Only allowed when the subscription item transfer behavior is owner.
    phases.items.unit string
    The ID of the unit. If type=rent you must provide a unit ID
  • proration_behavior string
    The proration behavior of the subscription when the billing anchor is updated. Can be create_prorations or none.

Returns

Returns the subscription object if the update succeeded.

Cancel a subscription

POST /v1/subscriptions/:id/cancel

curl https://api.yorlet.com/v1/subscriptions/:id/cancel \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "sub_test",
  "object": "subscription",
  "created": 1627210800,
  "application": null,
  "billing_anchor": null,
  "cancel_at": null,
  "canceled_at": null,
  "current_period_end": null,
  "current_period_start": null,
  "current_phase": null,
  "custom_fields": null,
  "customer": null,
  "days_before_collection": null,
  "days_until_due": null,
  "default_payment_method": null,
  "discount": null,
  "end": null,
  "from_subscription": {
    "action": null,
    "subscription": null
  },
  "metadata": {},
  "next_period_end": null,
  "next_period_start": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "pause_collection": null,
  "phases": null,
  "start": 1738338664
}

Parameters

Returns

If the subscription ID does not exist, this call throws an error.

Delete a discount

DELETE /v1/subscriptions/:id/discount

curl https://api.yorlet.com/v1/subscriptions/:id/discount \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "sub_test",
  "object": "subscription",
  "created": 1627210800,
  "application": null,
  "billing_anchor": null,
  "cancel_at": null,
  "canceled_at": null,
  "current_period_end": null,
  "current_period_start": null,
  "current_phase": null,
  "custom_fields": null,
  "customer": null,
  "days_before_collection": null,
  "days_until_due": null,
  "default_payment_method": null,
  "discount": null,
  "end": null,
  "from_subscription": {
    "action": null,
    "subscription": null
  },
  "metadata": {},
  "next_period_end": null,
  "next_period_start": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "pause_collection": null,
  "phases": null,
  "start": 1738338664
}

Parameters

  • No parameters

Returns

If the subscription ID does not exist, this call throws an error.

Progress a subscription

POST /v1/subscriptions/:id/progress

curl https://api.yorlet.com/v1/subscriptions/:id/progress \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "sub_test",
  "object": "subscription",
  "created": 1627210800,
  "application": null,
  "billing_anchor": null,
  "cancel_at": null,
  "canceled_at": null,
  "current_period_end": null,
  "current_period_start": null,
  "current_phase": null,
  "custom_fields": null,
  "customer": null,
  "days_before_collection": null,
  "days_until_due": null,
  "default_payment_method": null,
  "discount": null,
  "end": null,
  "from_subscription": {
    "action": null,
    "subscription": null
  },
  "metadata": {},
  "next_period_end": null,
  "next_period_start": null,
  "optimized_collection_date": null,
  "optimized_collection_reason": null,
  "pause_collection": null,
  "phases": null,
  "start": 1738338664
}

You can manually progress a subscription to the next period.

Parameters

  • No parameters

Returns

If the subscription ID does not exist, this call throws an error.

List all subscriptions

GET /v1/subscriptions

curl https://api.yorlet.com/v1/subscriptions \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "sub_test",
      "object": "subscription",
      "created": 1627210800,
      "application": null,
      "billing_anchor": null,
      "cancel_at": null,
      "canceled_at": null,
      "current_period_end": null,
      "current_period_start": null,
      "current_phase": null,
      "custom_fields": null,
      "customer": null,
      "days_before_collection": null,
      "days_until_due": null,
      "default_payment_method": null,
      "discount": null,
      "end": null,
      "from_subscription": {
        "action": null,
        "subscription": null
      },
      "metadata": {},
      "next_period_end": null,
      "next_period_start": null,
      "optimized_collection_date": null,
      "optimized_collection_reason": null,
      "pause_collection": null,
      "phases": null,
      "start": 1738338664
    }
  ],
  "count": 1,
  "has_more": false
}

Parameters

  • No parameters

Returns

A object with a data property that contains an array of subscriptions.

Subscription Items

Endpoints

POST    /v1/subscription_items
GET     /v1/subscription_items/:id
POST    /v1/subscription_items/:id
DELETE  /v1/subscription_items/:id
GET     /v1/subscription_items

The API allows you to delete and update a subscription item. You can retrieve individual subscription items as well as a list of all your subscription items.

The subscription item object

The subscription item object

{
  "id": "si_test",
  "object": "subscription_item",
  "created": 1627210800,
  "description": null,
  "metadata": {},
  "price_data": {
    "amount": null,
    "currency": null,
    "recurring": null,
    "tax_percent": 0,
    "type": null
  },
  "price": null,
  "proration_behavior": "create_prorations",
  "subscription": null,
  "transfer_behavior": "automatic",
  "transfer_destination": null,
  "unit": null
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be subscription_item.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • description string
    Description for the subscription item.
  • 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.
  • price_data object
    The price the customer is subscribed to.
    price_data.amount integer
    The amount to be charged, represented as a whole integer.
    price_data.currency string
    Three-letter ISO currency code, in lowercase. Must be a supported currency.
    price_data.recurring object
    price_data.recurring.interval string
    The frequency at which a subscription is billed. One of day, week, month or year.
    price_data.recurring.interval_count string
    The number of intervals (specified in the interval attribute) between subscription billings. For example, interval=month and interval_count=3 bills every 3 months.
    price_data.tax_percent integer
    price_data.type string
    One of one_time or recurring depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
  • price stringexpandable
    The ID of the associated price.
  • proration_behavior string
    Determines how to handle prorations when there is a partial billing cycle. Can be create_prorations or none.
  • subscription string
    The subscription this subscription_item belongs to.
  • transfer_behavior string
  • transfer_destination undefinedexpandable
    ID of the owner that will receive the funds from this subscription item.
  • type string
    Type of subscription item. Can be either rent or charge
  • unit string
    Id of the unit that the subscription item is applied to.

Create a subscription item

POST /v1/subscription_items

curl https://api.yorlet.com/v1/subscription_items \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "si_test",
  "object": "subscription_item",
  "created": 1627210800,
  "description": null,
  "metadata": {},
  "price_data": {
    "amount": null,
    "currency": null,
    "recurring": null,
    "tax_percent": 0,
    "type": null
  },
  "price": null,
  "proration_behavior": "create_prorations",
  "subscription": null,
  "transfer_behavior": "automatic",
  "transfer_destination": null,
  "unit": null
}

Parameters

  • No parameters

Returns

Returns the newly created subscription item.

Retrieve a subscription item

GET /v1/subscription_items/:id

curl https://api.yorlet.com/v1/subscription_items/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "si_test",
  "object": "subscription_item",
  "created": 1627210800,
  "description": null,
  "metadata": {},
  "price_data": {
    "amount": null,
    "currency": null,
    "recurring": null,
    "tax_percent": 0,
    "type": null
  },
  "price": null,
  "proration_behavior": "create_prorations",
  "subscription": null,
  "transfer_behavior": "automatic",
  "transfer_destination": null,
  "unit": null
}

Parameters

  • No parameters

Returns

Returns a subscription item object if a valid identifier was provided.

Update a subscription item

POST /v1/subscription_items/:id

curl https://api.yorlet.com/v1/subscription_items/:id \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "si_test",
  "object": "subscription_item",
  "created": 1627210800,
  "description": null,
  "metadata": {},
  "price_data": {
    "amount": null,
    "currency": null,
    "recurring": null,
    "tax_percent": 0,
    "type": null
  },
  "price": null,
  "proration_behavior": "create_prorations",
  "subscription": null,
  "transfer_behavior": "automatic",
  "transfer_destination": null,
  "unit": null
}

Parameters

  • No parameters

Returns

Returns the subscription item object if the update succeeded.

Delete a subscription item

DELETE /v1/subscription_items/:id

curl https://api.yorlet.com/v1/subscription_items/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "si_test",
  "object": "subscription_item",
  "deleted": true
}

Parameters

  • No parameters

Returns

Returns an object with a deleted parameter on success. If the subscription item ID does not exist, this call throws an error.

List all subscription items

GET /v1/subscription_items

curl https://api.yorlet.com/v1/subscription_items \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "si_test",
      "object": "subscription_item",
      "created": 1627210800,
      "description": null,
      "metadata": {},
      "price_data": {
        "amount": null,
        "currency": null,
        "recurring": null,
        "tax_percent": 0,
        "type": null
      },
      "price": null,
      "proration_behavior": "create_prorations",
      "subscription": null,
      "transfer_behavior": "automatic",
      "transfer_destination": null,
      "unit": null
    }
  ],
  "count": 1,
  "has_more": false
}

Parameters

  • No parameters

Returns

A object with a data property that contains an array of subscription items.

Owners Resources

Account Collections

Endpoints

POST    /v1/account_collections
GET     /v1/account_collections/:id
POST    /v1/account_collections/:id
POST    /v1/account_collections/:id/approve
POST    /v1/account_collections/:id/cancel
GET     /v1/account_collections

The account collection object

The account collection object

{
  "id": "ac_test",
  "object": "account_collection",
  "created": 1627210800,
  "amount": 40000,
  "currency": "gbp",
  "description": "Maintenance issue",
  "destination": "owner_to",
  "destination_owner_payment": null,
  "destination_platform_fee": 0,
  "destination_platform_fee_owner_payment": null,
  "documents": {
    "invoice_file": null
  },
  "refunded": false,
  "number": null,
  "owner_balance_transaction": null,
  "owner_payment": null,
  "owner": "owner_from",
  "period": {
    "end": null,
    "start": null
  },
  "references": {
    "invoice_number": null,
    "po_number": null
  },
  "status": "pending",
  "tax": 0,
  "tax_behavior": "exclusive",
  "tax_percent": 0,
  "tax_refunded": 0,
  "total": 0,
  "unit": "unit_test"
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be account_collection.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • amount integer
    The collection amount. This amount is in your currency and in the smallest currency unit.
  • amount_refunded integer
    The amount refunded.
  • currency string
    Three-letter ISO currency code, in lowercase. Must be a supported currency.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • destination stringexpandable
    The ID of an owner account to allocate the collection funds to.
  • destination_owner_payment stringexpandable
    If the destination is an owner account, this will be the ID of the payment that the destination account received for the collection.
  • destination_platform_fee integer
    The destination platform fee percentage.
  • destination_platform_fee_owner_payment stringexpandable
    If the destination platform fee was set, this will be the ID of the payment that the platform account received for the collection.
  • documents object
    A hash of the documents associated with this account collection.
    documents.invoice_file string
    The invoice file associated with this account collection.
  • expense object
    A hash of the expense details.
  • fee object
    A hash of the fee details.
  • refunded string
    Boolean value to indicate whether funds has been refunded or not.
  • number string
    The number of the account collection.
  • owner_balance_transaction stringexpandable
    ID of the owner balance transaction associated with this account collection.
  • owner_payment stringexpandable
    ID of the owner payment associated with this account collection.
  • owner stringexpandable
    The ID of the owner account to deduct the collection funds from.
  • period object
    The period associated with this account collection.
    period.end integer
    End of the period, which must be greater than or equal to the start.
    period.start integer
    Start of the period.
  • references object
    A hash of references for the account collection.
    references.invoice_number string
    The invoice number of the account collection.
    references.po_number string
    The purchase order number of the account collection.
  • status string
    The status of the account collection. Can be canceled, paid or pending.
  • tax integer
    The tax collected for this account collection.
  • tax_behavior string
    The tax behavior for this account collection.
  • tax_percent float
    The tax percent rate to use for this account collection.
  • tax_refunded integer
    The tax refunded for this account collection.
  • total integer
    The total for this account collection.
  • type undefined
    The account collection type. Can be expense, fee or service_charge.
  • unit stringexpandable
    ID of the unit associated with this account collection.

Create an account collection

POST /v1/account_collections

curl https://api.yorlet.com/v1/account_collections \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "ac_test",
  "object": "account_collection",
  "created": 1627210800,
  "amount": 40000,
  "currency": "gbp",
  "description": "Maintenance issue",
  "destination": "owner_to",
  "destination_owner_payment": null,
  "destination_platform_fee": 0,
  "destination_platform_fee_owner_payment": null,
  "documents": {
    "invoice_file": null
  },
  "refunded": false,
  "number": null,
  "owner_balance_transaction": null,
  "owner_payment": null,
  "owner": "owner_from",
  "period": {
    "end": null,
    "start": null
  },
  "references": {
    "invoice_number": null,
    "po_number": null
  },
  "status": "pending",
  "tax": 0,
  "tax_behavior": "exclusive",
  "tax_percent": 0,
  "tax_refunded": 0,
  "total": 0,
  "unit": "unit_test"
}

Creates a new account collection.

Parameters

  • amount required  integer
    The amount to charge. Should be a positive integer in the smallest currency unit (e.g. 100 for £1.00).
  • currency required  string
    Three-letter ISO currency code, in lowercase. Must be a supported currency. Can be eur, gbp, sek or usd.
  • description required  string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • owner required  string
    The ID of the owner the collection is for.
  • type required  string
    The type of the account collection. Can be expense, fee or service_charge.
  • auto_advance boolean
    Set auto_advance=true to attempt the account collection immediately regardless of whether the owner has the available funds. When setting auto_advance=false the account collection will be pending until it is approved. Only allowed when the account collection is not attached to an owner payout.
  • available_on timestamp
    The date the account collection is available on.
  • destination string
    The ID of an owner account to allocate the collection funds to.
  • destination_platform_fee integer
    The fee percent to charge the destination account. Only allowed when the destination is not the platform account.
  • documents object
    documents.invoice_file string
  • expense object
    expense.code string
    Can be compliance, ground_rent, maintenance, utilities or other.
  • fee object
    fee.code string
    Can be management_fee, tenant_find_fee or renewal_fee.
  • 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.
  • owner_payout string
    The ID of the owner payout to attach the account collection to. The owner payout must be in the same currency as the account collection and have the status draft.
  • period object
    A hash of the period this account collection relates to.
    period.end timestamp
    The period end date. Measured in seconds since the Unix epoch.
    period.start timestamp
    The period start date. Measured in seconds since the Unix epoch.
  • references object
    A hash of references for the account collection.
    references.invoice_number string
    The invoice number of the account collection.
    references.po_number string
    The purchase order number of the account collection.
  • tax_behavior string
    The tax behavior to use for this account collection. Can be exclusive or inclusive.
  • tax_percent integer
    The tax percent to use for this account collection.
  • unit string
    The ID of the unit this account collection is for.

Returns

Returns the account collection object if the request succeeded.

Retrieve an account collection

GET /v1/account_collections/:id

curl https://api.yorlet.com/v1/account_collections/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "ac_test",
  "object": "account_collection",
  "created": 1627210800,
  "amount": 40000,
  "currency": "gbp",
  "description": "Maintenance issue",
  "destination": "owner_to",
  "destination_owner_payment": null,
  "destination_platform_fee": 0,
  "destination_platform_fee_owner_payment": null,
  "documents": {
    "invoice_file": null
  },
  "refunded": false,
  "number": null,
  "owner_balance_transaction": null,
  "owner_payment": null,
  "owner": "owner_from",
  "period": {
    "end": null,
    "start": null
  },
  "references": {
    "invoice_number": null,
    "po_number": null
  },
  "status": "pending",
  "tax": 0,
  "tax_behavior": "exclusive",
  "tax_percent": 0,
  "tax_refunded": 0,
  "total": 0,
  "unit": "unit_test"
}

Retrieves the account collection with the given ID.

Parameters

  • No parameters

Returns

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

Update an account collection

POST /v1/account_collections/:id

curl https://api.yorlet.com/v1/account_collections/:id \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "ac_test",
  "object": "account_collection",
  "created": 1627210800,
  "amount": 40000,
  "currency": "gbp",
  "description": "Maintenance issue",
  "destination": "owner_to",
  "destination_owner_payment": null,
  "destination_platform_fee": 0,
  "destination_platform_fee_owner_payment": null,
  "documents": {
    "invoice_file": null
  },
  "refunded": false,
  "number": null,
  "owner_balance_transaction": null,
  "owner_payment": null,
  "owner": "owner_from",
  "period": {
    "end": null,
    "start": null
  },
  "references": {
    "invoice_number": null,
    "po_number": null
  },
  "status": "pending",
  "tax": 0,
  "tax_behavior": "exclusive",
  "tax_percent": 0,
  "tax_refunded": 0,
  "total": 0,
  "unit": "unit_test"
}

Updates an account collection.

Parameters

  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • destination string
    The ID of an owner account to allocate the collection funds to.
  • destination_platform_fee integer
    The fee percent to charge the destination account. Only allowed when the destination is not the platform account.
  • 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.
  • period object
    A hash of the period this account collection relates to.
    period.end timestamp
    The period end date. Measured in seconds since the Unix epoch.
    period.start timestamp
    The period start date. Measured in seconds since the Unix epoch.
  • unit string
    The ID of the unit this account collection is for.

Returns

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

Approve an account collection

POST /v1/account_collections/:id/approve

curl https://api.yorlet.com/v1/account_collections/:id/approve \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "ac_test",
  "object": "account_collection",
  "created": 1627210800,
  "amount": 40000,
  "currency": "gbp",
  "description": "Maintenance issue",
  "destination": "owner_to",
  "destination_owner_payment": null,
  "destination_platform_fee": 0,
  "destination_platform_fee_owner_payment": null,
  "documents": {
    "invoice_file": null
  },
  "refunded": false,
  "number": null,
  "owner_balance_transaction": null,
  "owner_payment": null,
  "owner": "owner_from",
  "period": {
    "end": null,
    "start": null
  },
  "references": {
    "invoice_number": null,
    "po_number": null
  },
  "status": "pending",
  "tax": 0,
  "tax_behavior": "exclusive",
  "tax_percent": 0,
  "tax_refunded": 0,
  "total": 0,
  "unit": "unit_test"
}

Approves a pending account collection.

Parameters

Returns

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

Cancel an account collection

POST /v1/account_collections/:id/cancel

curl https://api.yorlet.com/v1/account_collections/:id/cancel \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "ac_test",
  "object": "account_collection",
  "created": 1627210800,
  "amount": 40000,
  "currency": "gbp",
  "description": "Maintenance issue",
  "destination": "owner_to",
  "destination_owner_payment": null,
  "destination_platform_fee": 0,
  "destination_platform_fee_owner_payment": null,
  "documents": {
    "invoice_file": null
  },
  "refunded": false,
  "number": null,
  "owner_balance_transaction": null,
  "owner_payment": null,
  "owner": "owner_from",
  "period": {
    "end": null,
    "start": null
  },
  "references": {
    "invoice_number": null,
    "po_number": null
  },
  "status": "pending",
  "tax": 0,
  "tax_behavior": "exclusive",
  "tax_percent": 0,
  "tax_refunded": 0,
  "total": 0,
  "unit": "unit_test"
}

Cancels a pending account collection.

Parameters

Returns

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

List all account collections

GET /v1/account_collections

curl https://api.yorlet.com/v1/account_collections \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "ac_test",
      "object": "account_collection",
      "created": 1627210800,
      "amount": 40000,
      "currency": "gbp",
      "description": "Maintenance issue",
      "destination": "owner_to",
      "destination_owner_payment": null,
      "destination_platform_fee": 0,
      "destination_platform_fee_owner_payment": null,
      "documents": {
        "invoice_file": null
      },
      "refunded": false,
      "number": null,
      "owner_balance_transaction": null,
      "owner_payment": null,
      "owner": "owner_from",
      "period": {
        "end": null,
        "start": null
      },
      "references": {
        "invoice_number": null,
        "po_number": null
      },
      "status": "pending",
      "tax": 0,
      "tax_behavior": "exclusive",
      "tax_percent": 0,
      "tax_refunded": 0,
      "total": 0,
      "unit": "unit_test"
    }
  ],
  "count": 1,
  "has_more": false
}

Returns a list of account collections. The account collections are returned sorted by creation date, with the most recent account collections appearing first.

Parameters

  • building string
    The ID of the building to filter results.
  • destination string
    The ID of the destination to filter results.
  • owner string
    The ID of the owner to filter results.
  • partial_refund boolean
    Whether to return partial refunds.
  • status string
    The status to filter results.
  • type string
    The type to filter results.

Returns

A object with a data property that contains an array of account collections.

Account Collection Refunds

Endpoints

POST    /v1/account_collections/:id/refunds
GET     /v1/account_collections/:id/refunds/:id
GET     /v1/account_collections/:id/refunds

The account collection refund object

The account collection refund object

{
  "id": "acr_test",
  "object": "account_collection",
  "created": 1627210800,
  "account_collection": null,
  "amount": 40000,
  "currency": "gbp",
  "description": null,
  "destination_owner_payment_refund": null,
  "owner_balance_transaction": null,
  "owner": null,
  "tax": 0,
  "tax_behavior": "exclusive",
  "tax_percent": 0,
  "total": 0,
  "unit": null
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be account_collection.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • account_collection stringexpandable
  • amount integer
  • currency string
    Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html).
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • destination_owner_payment_refund stringexpandable
    Linked owner payment refund for the account collection refund.
  • owner_balance_transaction stringexpandable
  • owner stringexpandable
  • tax integer
    .
  • tax_behavior string
    The tax behavior for this account collection.
  • tax_percent float
    The tax percent rate to use for this account collection.
  • total integer
    The total for this account collection refund.
  • type undefined
    The transaction type.
  • unit stringexpandable

Create an account collection refund

POST /v1/account_collections/:id/refunds

curl https://api.yorlet.com/v1/account_collections/:id/refunds \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "acr_test",
  "object": "account_collection",
  "created": 1627210800,
  "account_collection": null,
  "amount": 40000,
  "currency": "gbp",
  "description": null,
  "destination_owner_payment_refund": null,
  "owner_balance_transaction": null,
  "owner": null,
  "tax": 0,
  "tax_behavior": "exclusive",
  "tax_percent": 0,
  "total": 0,
  "unit": null
}

Parameters

  • amount integer
  • description string
  • 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.

Returns

Returns

Retrieve an account collection refund

GET /v1/account_collections/:id/refunds/:id

curl https://api.yorlet.com/v1/account_collections/:id/refunds/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "acr_test",
  "object": "account_collection",
  "created": 1627210800,
  "account_collection": null,
  "amount": 40000,
  "currency": "gbp",
  "description": null,
  "destination_owner_payment_refund": null,
  "owner_balance_transaction": null,
  "owner": null,
  "tax": 0,
  "tax_behavior": "exclusive",
  "tax_percent": 0,
  "total": 0,
  "unit": null
}

Parameters

  • No parameters

Returns

Returns

List all account collection refunds

GET /v1/account_collections/:id/refunds

curl https://api.yorlet.com/v1/account_collections/:id/refunds \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "acr_test",
      "object": "account_collection",
      "created": 1627210800,
      "account_collection": null,
      "amount": 40000,
      "currency": "gbp",
      "description": null,
      "destination_owner_payment_refund": null,
      "owner_balance_transaction": null,
      "owner": null,
      "tax": 0,
      "tax_behavior": "exclusive",
      "tax_percent": 0,
      "total": 0,
      "unit": null
    }
  ],
  "count": 1,
  "has_more": false
}

Parameters

  • No parameters

Returns

List

Onboarding Sessions

Endpoints

POST    /v1/owners/:id/onboarding

An onboarding session represents your owner's session for completing their required information for compliance and identity verification.

The onboarding session object

The onboarding session object

{
  "id": "oos_test",
  "object": "onboarding_session",
  "created": 1627210800,
  "options": {
    "require_identity_verification": true
  },
  "owner": "owner_test",
  "return_url": "https://example.com/success",
  "type": "owner_onboarding",
  "unit_owner": null,
  "unit": "unit_test",
  "url": "https://owners.yorlet.com/onboarding/FlP02SduiwQ"
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be onboarding_session.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • options object
    The options for the onboarding session.
    options.require_identity_verification boolean
    Whether or not to require identity verification during the onboarding session. Defaults to true.
  • owner stringexpandable
    ID of the owner.
  • return_url string
    The URL to redirect the owner after the onboarding session is completed or expires.
  • type string
    The onboarding session type.
  • unit_owner stringexpandable
    ID of the unit owner.
  • unit stringexpandable
    ID of the unit.
  • url string

Create an onboarding session

POST /v1/owners/:id/onboarding

curl https://api.yorlet.com/v1/owners/:id/onboarding \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "oos_test",
  "object": "onboarding_session",
  "created": 1627210800,
  "options": {
    "require_identity_verification": true
  },
  "owner": "owner_test",
  "return_url": "https://example.com/success",
  "type": "owner_onboarding",
  "unit_owner": null,
  "unit": "unit_test",
  "url": "https://owners.yorlet.com/onboarding/FlP02SduiwQ"
}

Creates an onboarding session object.

Parameters

  • type required  string
    Can be unit_owner_onboarding or owner_onboarding.
  • options object
    A set of options for the session.
    options.require_identity_verification boolean
    Require the identity verification step. Defaults to true.
  • return_url string
    The URL to redirect the owner after the onboarding session is completed or expires.
  • send_email boolean
    Whether or not to send an email to the owner with a link to the onboarding flow. Defaults to false.
  • unit_owner string

Returns

Returns the onboarding session object if the request succeeded.

Owners

Endpoints

POST    /v1/owners
GET     /v1/owners/:id
POST    /v1/owners/:id
DELETE  /v1/owners/:id
GET     /v1/owners

The API allows you to create, delete and update your owners. You can retrieve individual owners as well as a list of all your owners.

The owner object

The owner object

{
  "id": "owner_test",
  "object": "owner",
  "created": 1627210800,
  "archived": false,
  "archived_at": null,
  "balance": 0,
  "bank_account": null,
  "company": null,
  "country": null,
  "customer": null,
  "default_currency": null,
  "email": null,
  "external_account": null,
  "individual": {
    "id": "own_pers_test",
    "object": "owner_person",
    "created": 1738338664,
    "address": null,
    "dob": {},
    "email": null,
    "title": null,
    "first_name": null,
    "last_name": null,
    "metadata": {},
    "phone": null,
    "relationship": {
      "director": false,
      "executive": false,
      "owner": false,
      "percent_ownership": null,
      "representative": false,
      "title": null
    },
    "requirements": {
      "currently_due": [],
      "eventually_due": [],
      "pending_verification": []
    },
    "verification": {
      "identity_check": null,
      "status": "unverified"
    }
  },
  "labels": [],
  "metadata": {},
  "name": null,
  "next_statement_sequence": 1,
  "non_resident_tax_details": {
    "certificate": null,
    "certificate_date": null,
    "country": null,
    "status": "exempt"
  },
  "payouts_enabled": false,
  "portal_enabled": false,
  "requirements": {
    "currently_due": [],
    "disabled_reason": null,
    "errors": [],
    "eventually_due": [],
    "pending_verification": []
  },
  "settings": {
    "account_collections": {
      "platform_fee": 0
    },
    "maintenance": {
      "issue_categories": [],
      "issue_preferred_categories": []
    },
    "payout_receipts": {
      "email_to": null,
      "email_cc": [],
      "statement_descriptor": null,
      "send_email": true
    },
    "payout_schedule": {
      "interval": "month",
      "monthly_anchor": 31,
      "weekly_anchor": 5
    },
    "payouts": {
      "automatic_approval": false,
      "instant_payouts": false,
      "negative_payouts": false,
      "transaction_grouping": "all"
    }
  },
  "statement_prefix": null,
  "status": null,
  "tax_residency": null,
  "trading_as_name": null,
  "type": null
}

Attributes

  • id string
    Unique identified for the object
  • object string
    String representing the object's type. Objects of the same type share the same value Can be owner.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • archived boolean
    Whether the owner is archived.
  • archived_at timestamp
    Time at which the owner was archived.
  • address integer
    The owner’s address.
  • balance integer
    The owner’s current balance amount.
  • bank_account object
  • business_type undefined
    Can be company or individual.
  • company string
    Information about the company.
  • country string
    The owner’s country.
  • customer stringexpandable
    ID of the customer associated with this owner.
  • default_currency string
    The owner’s default currency.
  • email string
    The owner’s email address.
  • external_account stringexpandable
    The owner’s external (bank) account.
  • individual objectexpandable
    Information about the individual.
  • labels array
    IDs of the labels associated with this owner.
  • 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.
  • name string
    The owner’s name.
  • next_statement_sequence integer
    The sequence to be used on the owners’s next payout.
  • non_resident_tax_details object
    The owner’s non resident tax status.
  • payouts_enabled boolean
    Whether payouts are enabled for this owner.
  • portal_enabled boolean
  • requirements object
    Information about the requirements for the owner.
  • settings object
    Options for the owner.
    settings.account_collections object
    The owner’s account collections settings.
    settings.account_collections.platform_fee integer
    The platform fee for the owner.
    settings.payout_receipts object
    The owner’s payout settings.
    settings.payout_receipts.email_to string
    The email address to send payout statements to.
    settings.payout_receipts.email_cc array
    List of emails to CC in the payout statements email.
    settings.payout_receipts.statement_descriptor string
    The statement descriptor for the owner’s payouts.
    settings.payout_schedule object
    Settings for the owner’s payout schedule.
    settings.payout_schedule.interval string
    How frequently available funds are attached to payouts.
    settings.payout_schedule.monthly_anchor integer
    The day of the month when available funds are grouped.
    settings.payout_schedule.weekly_anchor integer
    The day of the week when available funds are grouped.
    settings.payouts object
    Settings for the owner’s payouts.
    settings.payouts.automatic_approval string
    Whether or not to allow automatic approvals for owner payouts.
    settings.payouts.instant_payouts boolean
    A Boolean indicating if instant payouts are enabled for this owner.
    settings.payouts.negative_payouts boolean
    A Boolean indicating if negative payouts are enabled for this owner.
    settings.payouts.transaction_grouping string
    How to group transactions for owner payouts. Can be all or per_unit.
  • statement_prefix object
    The prefix used for owner payouts.
  • status string
    The status of the owner. Can be compete, information_required or archived.
  • tax_residency string
    The owner’s tax residency.
  • trading_as_name string
    The owner’s trading name.
  • type string
    The type of owner. Can be landlord or leaseholder.

Create an owner

POST /v1/owners

curl https://api.yorlet.com/v1/owners \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "owner_test",
  "object": "owner",
  "created": 1627210800,
  "archived": false,
  "archived_at": null,
  "balance": 0,
  "bank_account": null,
  "company": null,
  "country": null,
  "customer": null,
  "default_currency": null,
  "email": null,
  "external_account": null,
  "individual": {
    "id": "own_pers_test",
    "object": "owner_person",
    "created": 1738338664,
    "address": null,
    "dob": {},
    "email": null,
    "title": null,
    "first_name": null,
    "last_name": null,
    "metadata": {},
    "phone": null,
    "relationship": {
      "director": false,
      "executive": false,
      "owner": false,
      "percent_ownership": null,
      "representative": false,
      "title": null
    },
    "requirements": {
      "currently_due": [],
      "eventually_due": [],
      "pending_verification": []
    },
    "verification": {
      "identity_check": null,
      "status": "unverified"
    }
  },
  "labels": [],
  "metadata": {},
  "name": null,
  "next_statement_sequence": 1,
  "non_resident_tax_details": {
    "certificate": null,
    "certificate_date": null,
    "country": null,
    "status": "exempt"
  },
  "payouts_enabled": false,
  "portal_enabled": false,
  "requirements": {
    "currently_due": [],
    "disabled_reason": null,
    "errors": [],
    "eventually_due": [],
    "pending_verification": []
  },
  "settings": {
    "account_collections": {
      "platform_fee": 0
    },
    "maintenance": {
      "issue_categories": [],
      "issue_preferred_categories": []
    },
    "payout_receipts": {
      "email_to": null,
      "email_cc": [],
      "statement_descriptor": null,
      "send_email": true
    },
    "payout_schedule": {
      "interval": "month",
      "monthly_anchor": 31,
      "weekly_anchor": 5
    },
    "payouts": {
      "automatic_approval": false,
      "instant_payouts": false,
      "negative_payouts": false,
      "transaction_grouping": "all"
    }
  },
  "statement_prefix": null,
  "status": null,
  "tax_residency": null,
  "trading_as_name": null,
  "type": null
}

Parameters

  • business_type required  string
    The owner’s business type. Can be individual or company.
  • archived boolean
    Whether the owner is archived.
  • company object
    Information about the company.
    company.address object
    The company’s address.
    company.address.country required  string
    Two-letter country code (ISO 3166-1 alpha-2).
    company.address.line1 required  string
    Address line 1 (e.g., street, PO Box, or company name).
    company.address.city string
    City, district, suburb, town, or village.
    company.address.line2 string
    Address line 2 (e.g., apartment, suite, unit, or building).
    company.address.postal_code string
    Postal code.
    company.address.state string
    State, county, province, or region.
    company.name string
    The company’s legal name.
    company.phone string
    The company’s phone.
    company.tax_id string
    The company’s business ID number.
    company.vat_id string
    The company’s VAT number.
  • email string
    The email address of the owner.
  • individual object
    individual.address object
    The individual’s address.
    individual.address.country required  string
    Two-letter country code (ISO 3166-1 alpha-2).
    individual.address.line1 required  string
    Address line 1 (e.g., street, PO Box, or company name).
    individual.address.city string
    City, district, suburb, town, or village.
    individual.address.line2 string
    Address line 2 (e.g., apartment, suite, unit, or building).
    individual.address.postal_code string
    Postal code.
    individual.address.state string
    State, county, province, or region.
    individual.dob object
    The individual’s date of birth.
    individual.dob.day required  integer
    The day of birth, between 1 and 31.
    individual.dob.month required  integer
    The month of birth, between 1 and 12.
    individual.dob.year required  integer
    The four-digit year of birth.
    individual.email string
    The individual’s email address.
    individual.first_name string
    The individual’s first name.
    individual.last_name string
    The individual’s last name.
    individual.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.
    individual.phone string
    The individual’s phone number.
    individual.relationship object
    individual.relationship.director boolean
    individual.relationship.executive boolean
    individual.relationship.owner boolean
    individual.relationship.percent_ownership number
    individual.relationship.representative boolean
    individual.relationship.title string
    individual.title string
    The individual’s title. Can be mr, miss, mrs, ms, mx, m or dr.
  • labels array of strings
  • 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.
  • next_statement_sequence integer
    The sequence to be used on the owners’s next payout. Defaults to 1.
  • non_resident_tax_details object
    The owner’s non resident tax status.
    non_resident_tax_details.certificate string
    non_resident_tax_details.certificate_date timestamp
    non_resident_tax_details.country string
    Can be GB.
  • settings object
    Options for the owner.
    settings.account_collections object
    The owners’s account collection settings.
    settings.account_collections.platform_fee number
    The platform fee to be charged on the owner’s account.
    settings.maintenance object
    The owners’s maintenance settings.
    settings.maintenance.issue_categories array of strings
    The categories of maintenance issues the owner is responsible for.
    settings.maintenance.issue_preferred_categories array of strings
    The preferred categories of maintenance issues the owner is responsible for.
    settings.payout_receipts object
    The owners’s payout receipt settings.
    settings.payout_receipts.email_cc array of strings
    List of emails to CC in the statements email.
    settings.payout_receipts.email_to string
    The email address to send statements to.
    settings.payout_receipts.send_email boolean
    Whether or not to send an email to the owner with a payout receipt
    settings.payout_receipts.statement_descriptor string
    The statement descriptor to be used on the owner’s payouts.
    settings.payout_schedule object
    Settings for the owner’s payout schedule.
    settings.payout_schedule.interval string
    How frequently available funds are attached to payouts. Default is daily. Can be daily, monthly, weekly, manual or quarterly.
    settings.payout_schedule.monthly_anchor integer
    The day of the month when available funds are grouped. Can be between 1-31.
    settings.payout_schedule.weekly_anchor integer
    The day of the week when available funds are grouped. Can only be a weekday 1-5, 1=monday, 2=tuesday, etc.
    settings.payouts object
    The owners’s payout settings.
    settings.payouts.automatic_approval boolean
    Whether or not to allow automatic approvals for owner payouts.
    settings.payouts.instant_payouts boolean
    Whether or not instant payouts are enabled for this owner.
    settings.payouts.negative_payouts boolean
    Whether or not negative payouts are enabled for this owner.
    settings.payouts.transaction_grouping string
    Whether or not to create new payouts per unit for owner payouts. Can be all or per_unit.
  • statement_prefix string
    The prefix used for owner payouts.
  • tax_residency string
    The owner’s tax residency.
  • trading_as_name string
    The customer-facing name.
  • type string
    The owner’s type. Can be freeholder, landlord, leaseholder or supplier.

Returns

Returns the owner object if the request succeeded.

Retrieve an owner

GET /v1/owners/:id

curl https://api.yorlet.com/v1/owners/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "owner_test",
  "object": "owner",
  "created": 1627210800,
  "archived": false,
  "archived_at": null,
  "balance": 0,
  "bank_account": null,
  "company": null,
  "country": null,
  "customer": null,
  "default_currency": null,
  "email": null,
  "external_account": null,
  "individual": {
    "id": "own_pers_test",
    "object": "owner_person",
    "created": 1738338664,
    "address": null,
    "dob": {},
    "email": null,
    "title": null,
    "first_name": null,
    "last_name": null,
    "metadata": {},
    "phone": null,
    "relationship": {
      "director": false,
      "executive": false,
      "owner": false,
      "percent_ownership": null,
      "representative": false,
      "title": null
    },
    "requirements": {
      "currently_due": [],
      "eventually_due": [],
      "pending_verification": []
    },
    "verification": {
      "identity_check": null,
      "status": "unverified"
    }
  },
  "labels": [],
  "metadata": {},
  "name": null,
  "next_statement_sequence": 1,
  "non_resident_tax_details": {
    "certificate": null,
    "certificate_date": null,
    "country": null,
    "status": "exempt"
  },
  "payouts_enabled": false,
  "portal_enabled": false,
  "requirements": {
    "currently_due": [],
    "disabled_reason": null,
    "errors": [],
    "eventually_due": [],
    "pending_verification": []
  },
  "settings": {
    "account_collections": {
      "platform_fee": 0
    },
    "maintenance": {
      "issue_categories": [],
      "issue_preferred_categories": []
    },
    "payout_receipts": {
      "email_to": null,
      "email_cc": [],
      "statement_descriptor": null,
      "send_email": true
    },
    "payout_schedule": {
      "interval": "month",
      "monthly_anchor": 31,
      "weekly_anchor": 5
    },
    "payouts": {
      "automatic_approval": false,
      "instant_payouts": false,
      "negative_payouts": false,
      "transaction_grouping": "all"
    }
  },
  "statement_prefix": null,
  "status": null,
  "tax_residency": null,
  "trading_as_name": null,
  "type": null
}

Parameters

  • No parameters

Returns

Returns an owner object if a valid identifier was provided.

Update an owner

POST /v1/owners/:id

curl https://api.yorlet.com/v1/owners/:id \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "owner_test",
  "object": "owner",
  "created": 1627210800,
  "archived": false,
  "archived_at": null,
  "balance": 0,
  "bank_account": null,
  "company": null,
  "country": null,
  "customer": null,
  "default_currency": null,
  "email": null,
  "external_account": null,
  "individual": {
    "id": "own_pers_test",
    "object": "owner_person",
    "created": 1738338664,
    "address": null,
    "dob": {},
    "email": null,
    "title": null,
    "first_name": null,
    "last_name": null,
    "metadata": {},
    "phone": null,
    "relationship": {
      "director": false,
      "executive": false,
      "owner": false,
      "percent_ownership": null,
      "representative": false,
      "title": null
    },
    "requirements": {
      "currently_due": [],
      "eventually_due": [],
      "pending_verification": []
    },
    "verification": {
      "identity_check": null,
      "status": "unverified"
    }
  },
  "labels": [],
  "metadata": {},
  "name": null,
  "next_statement_sequence": 1,
  "non_resident_tax_details": {
    "certificate": null,
    "certificate_date": null,
    "country": null,
    "status": "exempt"
  },
  "payouts_enabled": false,
  "portal_enabled": false,
  "requirements": {
    "currently_due": [],
    "disabled_reason": null,
    "errors": [],
    "eventually_due": [],
    "pending_verification": []
  },
  "settings": {
    "account_collections": {
      "platform_fee": 0
    },
    "maintenance": {
      "issue_categories": [],
      "issue_preferred_categories": []
    },
    "payout_receipts": {
      "email_to": null,
      "email_cc": [],
      "statement_descriptor": null,
      "send_email": true
    },
    "payout_schedule": {
      "interval": "month",
      "monthly_anchor": 31,
      "weekly_anchor": 5
    },
    "payouts": {
      "automatic_approval": false,
      "instant_payouts": false,
      "negative_payouts": false,
      "transaction_grouping": "all"
    }
  },
  "statement_prefix": null,
  "status": null,
  "tax_residency": null,
  "trading_as_name": null,
  "type": null
}

Parameters

  • archived boolean
    Whether the owner is archived.
  • business_type string
    The owner’s business type. Can be individual or company.
  • company object
    Information about the company.
    company.address object
    The company’s address.
    company.address.country required  string
    Two-letter country code (ISO 3166-1 alpha-2).
    company.address.line1 required  string
    Address line 1 (e.g., street, PO Box, or company name).
    company.address.city string
    City, district, suburb, town, or village.
    company.address.line2 string
    Address line 2 (e.g., apartment, suite, unit, or building).
    company.address.postal_code string
    Postal code.
    company.address.state string
    State, county, province, or region.
    company.name string
    The company’s legal name.
    company.phone string
    The company’s phone.
    company.tax_id string
    The company’s business ID number.
    company.vat_id string
    The company’s VAT number.
  • email string
    The email address of the owner.
  • individual object
    individual.address object
    The individual’s address.
    individual.address.country required  string
    Two-letter country code (ISO 3166-1 alpha-2).
    individual.address.line1 required  string
    Address line 1 (e.g., street, PO Box, or company name).
    individual.address.city string
    City, district, suburb, town, or village.
    individual.address.line2 string
    Address line 2 (e.g., apartment, suite, unit, or building).
    individual.address.postal_code string
    Postal code.
    individual.address.state string
    State, county, province, or region.
    individual.dob object
    The individual’s date of birth.
    individual.dob.day required  integer
    The day of birth, between 1 and 31.
    individual.dob.month required  integer
    The month of birth, between 1 and 12.
    individual.dob.year required  integer
    The four-digit year of birth.
    individual.email string
    The individual’s email address.
    individual.first_name string
    The individual’s first name.
    individual.last_name string
    The individual’s last name.
    individual.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.
    individual.phone string
    The individual’s phone number.
    individual.relationship object
    individual.relationship.director boolean
    individual.relationship.executive boolean
    individual.relationship.owner boolean
    individual.relationship.percent_ownership number
    individual.relationship.representative boolean
    individual.relationship.title string
    individual.title string
    The individual’s title. Can be mr, miss, mrs, ms, mx, m or dr.
  • labels array of strings
  • 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.
  • next_statement_sequence integer
    The sequence to be used on the owners’s next payout. Defaults to 1.
  • non_resident_tax_details object
    The owner’s non resident tax status.
    non_resident_tax_details.certificate string
    non_resident_tax_details.certificate_date timestamp
    non_resident_tax_details.country string
    Can be GB.
  • settings object
    Options for the owner.
    settings.account_collections object
    The owners’s account collection settings.
    settings.account_collections.platform_fee number
    The platform fee to be charged on the owner’s account.
    settings.maintenance object
    The owners’s maintenance settings.
    settings.maintenance.issue_categories array of strings
    The categories of maintenance issues the owner is responsible for.
    settings.maintenance.issue_preferred_categories array of strings
    The preferred categories of maintenance issues the owner is responsible for.
    settings.payout_receipts object
    The owners’s payout receipt settings.
    settings.payout_receipts.email_cc array of strings
    List of emails to CC in the statements email.
    settings.payout_receipts.email_to string
    The email address to send statements to.
    settings.payout_receipts.send_email boolean
    Whether or not to send an email to the owner with a payout receipt
    settings.payout_receipts.statement_descriptor string
    The statement descriptor to be used on the owner’s payouts.
    settings.payout_schedule object
    Settings for the owner’s payout schedule.
    settings.payout_schedule.interval string
    How frequently available funds are attached to payouts. Default is daily. Can be daily, monthly, weekly, manual or quarterly.
    settings.payout_schedule.monthly_anchor integer
    The day of the month when available funds are grouped. Can be between 1-31.
    settings.payout_schedule.weekly_anchor integer
    The day of the week when available funds are grouped. Can only be a weekday 1-5, 1=monday, 2=tuesday, etc.
    settings.payouts object
    The owners’s payout settings.
    settings.payouts.automatic_approval boolean
    Whether or not to allow automatic approvals for owner payouts.
    settings.payouts.instant_payouts boolean
    Whether or not instant payouts are enabled for this owner.
    settings.payouts.negative_payouts boolean
    Whether or not negative payouts are enabled for this owner.
    settings.payouts.transaction_grouping string
    Whether or not to create new payouts per unit for owner payouts. Can be all or per_unit.
  • statement_prefix string
    The prefix used for owner payouts.
  • tax_residency string
    The owner’s tax residency.
  • trading_as_name string
    The customer-facing name.
  • type string
    The owner’s type. Can be freeholder, landlord, leaseholder or supplier.

Returns

Returns the owner object if the update succeeded.

Delete an owner

DELETE /v1/owners/:id

curl https://api.yorlet.com/v1/owners/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "owner_test",
  "object": "owner",
  "deleted": true
}

Parameters

  • No parameters

Returns

Returns an object with a deleted parameter on success. If the owner ID does not exist, this call throws an error.

List all owners

GET /v1/owners

curl https://api.yorlet.com/v1/owners \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "owner_test",
      "object": "owner",
      "created": 1627210800,
      "archived": false,
      "archived_at": null,
      "balance": 0,
      "bank_account": null,
      "company": null,
      "country": null,
      "customer": null,
      "default_currency": null,
      "email": null,
      "external_account": null,
      "individual": {
        "id": "own_pers_test",
        "object": "owner_person",
        "created": 1738338664,
        "address": null,
        "dob": {},
        "email": null,
        "title": null,
        "first_name": null,
        "last_name": null,
        "metadata": {},
        "phone": null,
        "relationship": {
          "director": false,
          "executive": false,
          "owner": false,
          "percent_ownership": null,
          "representative": false,
          "title": null
        },
        "requirements": {
          "currently_due": [],
          "eventually_due": [],
          "pending_verification": []
        },
        "verification": {
          "identity_check": null,
          "status": "unverified"
        }
      },
      "labels": [],
      "metadata": {},
      "name": null,
      "next_statement_sequence": 1,
      "non_resident_tax_details": {
        "certificate": null,
        "certificate_date": null,
        "country": null,
        "status": "exempt"
      },
      "payouts_enabled": false,
      "portal_enabled": false,
      "requirements": {
        "currently_due": [],
        "disabled_reason": null,
        "errors": [],
        "eventually_due": [],
        "pending_verification": []
      },
      "settings": {
        "account_collections": {
          "platform_fee": 0
        },
        "maintenance": {
          "issue_categories": [],
          "issue_preferred_categories": []
        },
        "payout_receipts": {
          "email_to": null,
          "email_cc": [],
          "statement_descriptor": null,
          "send_email": true
        },
        "payout_schedule": {
          "interval": "month",
          "monthly_anchor": 31,
          "weekly_anchor": 5
        },
        "payouts": {
          "automatic_approval": false,
          "instant_payouts": false,
          "negative_payouts": false,
          "transaction_grouping": "all"
        }
      },
      "statement_prefix": null,
      "status": null,
      "tax_residency": null,
      "trading_as_name": null,
      "type": null
    }
  ],
  "count": 1,
  "has_more": false
}

Parameters

  • No parameters

Returns

A object with a data property that contains an array of owners.

Owner Balance Transactions

Endpoints

POST    /v1/owner_balance_transactions
GET     /v1/owner_balance_transactions/:id
POST    /v1/owner_balance_transactions/:id
GET     /v1/owner_balance_transactions

The owner balance transaction object

The owner balance transaction object

{
  "id": "obtxn_test",
  "object": "owner_balance_transaction",
  "created": 1627210800,
  "amount": 40000,
  "available_on": null,
  "currency": "gbp",
  "description": null,
  "owner": null,
  "owner_payout": null,
  "reconciled_owner_payout": null,
  "source": null,
  "source_object": null,
  "tax": 0,
  "tax_percent": 0,
  "visible_to_owner": true
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be owner_balance_transaction.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • amount integer
  • available_on timestamp
    Time at which the transaction will be available. Measured in seconds since the Unix epoch.
  • currency string
    Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html).
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • owner string
    ID of the owner this owner balance transaction is associated with.
  • owner_payout stringexpandable
    ID of the payout this owner balance transaction is associated with.
  • reconciled_owner_payout stringexpandable
  • source string
  • source_object string
  • tax integer
    .
  • tax_percent integer
  • type string
    The transaction type.
  • visible_to_owner boolean

Create an owner balance transaction

POST /v1/owner_balance_transactions

curl https://api.yorlet.com/v1/owner_balance_transactions \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "obtxn_test",
  "object": "owner_balance_transaction",
  "created": 1627210800,
  "amount": 40000,
  "available_on": null,
  "currency": "gbp",
  "description": null,
  "owner": null,
  "owner_payout": null,
  "reconciled_owner_payout": null,
  "source": null,
  "source_object": null,
  "tax": 0,
  "tax_percent": 0,
  "visible_to_owner": true
}

Parameters

  • amount required  number
    The amount of the transaction.
  • currency required  string
    The currency of the transaction.
  • description required  string
    The description of the transaction.
  • owner required  string
    The owner ID of the transaction.
  • available_on timestamp
    The date the transaction is available on.
  • unit string
    The unit ID of the transaction.

Returns

Returns an owner balance transaction object if a valid create request was made

Retrieve an owner balance transaction

GET /v1/owner_balance_transactions/:id

curl https://api.yorlet.com/v1/owner_balance_transactions/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "obtxn_test",
  "object": "owner_balance_transaction",
  "created": 1627210800,
  "amount": 40000,
  "available_on": null,
  "currency": "gbp",
  "description": null,
  "owner": null,
  "owner_payout": null,
  "reconciled_owner_payout": null,
  "source": null,
  "source_object": null,
  "tax": 0,
  "tax_percent": 0,
  "visible_to_owner": true
}

Parameters

  • No parameters

Returns

Returns an owner balance transaction object if a valid identifier was provided

Update a balance transaction

POST /v1/owner_balance_transactions/:id

curl https://api.yorlet.com/v1/owner_balance_transactions/:id \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "obtxn_test",
  "object": "owner_balance_transaction",
  "created": 1627210800,
  "amount": 40000,
  "available_on": null,
  "currency": "gbp",
  "description": null,
  "owner": null,
  "owner_payout": null,
  "reconciled_owner_payout": null,
  "source": null,
  "source_object": null,
  "tax": 0,
  "tax_percent": 0,
  "visible_to_owner": true
}

Change whether the owner balance transaction can be seen on statements and payout receipts by owners.

Parameters

  • visible_to_owner required  boolean
    Whether the transaction is visible to the owner.
  • available_on timestamp
    The date the transaction is available on.

Returns

List

List all owner balance transactions

GET /v1/owner_balance_transactions

curl https://api.yorlet.com/v1/owner_balance_transactions \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "obtxn_test",
      "object": "owner_balance_transaction",
      "created": 1627210800,
      "amount": 40000,
      "available_on": null,
      "currency": "gbp",
      "description": null,
      "owner": null,
      "owner_payout": null,
      "reconciled_owner_payout": null,
      "source": null,
      "source_object": null,
      "tax": 0,
      "tax_percent": 0,
      "visible_to_owner": true
    }
  ],
  "count": 1,
  "has_more": false
}

Parameters

  • No parameters

Returns

List

Owner Payments

Endpoints

GET     /v1/owner_payments/:id
POST    /v1/owner_payments/:id
GET     /v1/owner_payments

The owner payment object

The owner payment object

{
  "id": "opy_test",
  "object": "owner_payment",
  "created": 1627210800,
  "amount": 40000,
  "currency": "gbp",
  "description": null,
  "owner": "owner_test",
  "owner_balance_transaction": null,
  "period": {
    "end": null,
    "start": null
  },
  "refunded": false,
  "source_account_collection": null,
  "source_transfer": null,
  "status": null,
  "unit": "unit_test"
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be owner_payment.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • account_collection stringexpandable
    The account collection that was automatically created by this owner payment.
  • amount integer
    Amount for this payment. This must be a positive integer in the smallest currency unit (e.g., 100 pennies for a charge of £1.00).
  • amount_refunded integer
    Amount refunded from this payment.
  • currency string
    Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html).
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • owner stringexpandable
    ID of the owner this payment is for.
  • owner_balance_transaction stringexpandable
    ID of the owner balance transaction that describes the impact of this payment on their account balance (not including refunds).
  • period object
    The period for which the payment was made.
    period.end integer
    End of the payment's billing period.
    period.start integer
    Start of the payment's billing period.
  • refunded boolean
    Whether or not the payment has been fully refunded.
  • source_account_collection stringexpandable
    The account collection ID which created this owner payment. Only present if the payment came from another owner account.
  • source_transfer stringexpandable
    The transfer ID which created this owner payment. Only present if the payment was created from a transfer.
  • status string
    The status of the payment.
  • unit stringexpandable
    ID of the unit this payment is for.

Get an owner payment

GET /v1/owner_payments/:id

curl https://api.yorlet.com/v1/owner_payments/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "opy_test",
  "object": "owner_payment",
  "created": 1627210800,
  "amount": 40000,
  "currency": "gbp",
  "description": null,
  "owner": "owner_test",
  "owner_balance_transaction": null,
  "period": {
    "end": null,
    "start": null
  },
  "refunded": false,
  "source_account_collection": null,
  "source_transfer": null,
  "status": null,
  "unit": "unit_test"
}

Parameters

  • No parameters

Returns

Returns an owner payment object if a valid identifier was provided

Update an owner payment

POST /v1/owner_payments/:id

curl https://api.yorlet.com/v1/owner_payments/:id \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "opy_test",
  "object": "owner_payment",
  "created": 1627210800,
  "amount": 40000,
  "currency": "gbp",
  "description": null,
  "owner": "owner_test",
  "owner_balance_transaction": null,
  "period": {
    "end": null,
    "start": null
  },
  "refunded": false,
  "source_account_collection": null,
  "source_transfer": null,
  "status": null,
  "unit": "unit_test"
}

Parameters

  • description string
    The description for the invoice item, to be displayed to the customer.
  • 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.
  • period object
    A hash of the period this owner payment relates to.
    period.end timestamp
    The period end date. Measured in seconds since the Unix epoch.
    period.start timestamp
    The period start date. Measured in seconds since the Unix epoch.

Returns

Returns an updated owner payment object if a valid identifier was provided

List all owner payments

GET /v1/owner_payments

curl https://api.yorlet.com/v1/owner_payments \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "opy_test",
      "object": "owner_payment",
      "created": 1627210800,
      "amount": 40000,
      "currency": "gbp",
      "description": null,
      "owner": "owner_test",
      "owner_balance_transaction": null,
      "period": {
        "end": null,
        "start": null
      },
      "refunded": false,
      "source_account_collection": null,
      "source_transfer": null,
      "status": null,
      "unit": "unit_test"
    }
  ],
  "count": 1,
  "has_more": false
}

Parameters

  • No parameters

Returns

List

Owner Payouts

Endpoints

POST    /v1/owner_payouts
POST    /v1/owner_payouts/preview
GET     /v1/owner_payouts/:id
POST    /v1/owner_payouts/:id/approve
POST    /v1/owner_payouts/:id/approve/preview
POST    /v1/owner_payouts/:id/cancel
POST    /v1/owner_payouts/:id/mark_failed
POST    /v1/owner_payouts/:id/mark_paid
POST    /v1/owner_payouts/:id/send_receipt
GET     /v1/owner_payouts

The owner payout object

The owner payout object

{
  "id": "opo_test",
  "object": "owner_payout",
  "created": 1627210800,
  "amount": 40000,
  "approved_at": null,
  "canceled_at": null,
  "client_secret": "opo_test_secret_undefined",
  "currency": "gbp",
  "description": null,
  "destination": null,
  "destination_details": null,
  "failed_at": null,
  "failure_code": null,
  "failure_message": null,
  "failure_owner_balance_transaction": null,
  "hosted_payment_url": null,
  "last_approval_error": null,
  "metadata": {},
  "method": "manual",
  "net": 0,
  "number": null,
  "owner": "owner_test",
  "owner_balance_transaction": null,
  "owner_non_resident_tax": {
    "deduction": 0,
    "details": null,
    "taxable_amount": null
  },
  "owner_tax_residency": null,
  "paid_at": null,
  "payment_run": null,
  "period": {
    "adjustment_amount": null,
    "end": null,
    "start": null
  },
  "statement_descriptor": "OWNER PAYOUT",
  "status": "draft",
  "transaction": null,
  "type": "owner",
  "unit": null
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be owner_payout.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • amount integer
    Amount to be transfered to the bank account.
  • approved_at timestamp
    Time at which the object was approved. Measured in seconds since the Unix epoch.
  • canceled_at timestamp
    Time at which the object was canceled. Measured in seconds since the Unix epoch.
  • client_secret string
    The client secret can be used to access the statement PDF for the owner payout.
  • currency string
    Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html).
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • destination stringexpandable
    The ID of the bank account or external account the payout was sent to. Only applicable if the payout was paid out to a bank account or external account.
  • destination_details string
  • failed_at timestamp
    Time at which the object was failed. Measured in seconds since the Unix epoch.
  • failure_code string
    The failure code on this owner payout.
  • failure_message string
    The failure message on this owner payout.
  • failure_owner_balance_transaction stringexpandable
    ID for the failure owner balance transaction on this owner payout.
  • hosted_payment_url string
    The URL for the hosted payment page, which allows customers to view and pay a negative payout.
  • last_approval_error string
    The last approval error on this owner payout.
  • metadata string
    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.
  • method string
    The method used to pay out the owner.
  • net integer
    The net amount of the owner payout.
  • number string
    The number of the owner payout.
  • owner stringexpandable
    The ID of the owner associated with this owner payout.
  • owner_balance_transaction stringexpandable
    The ID of the owner balance transaction associated with this owner payout.
  • owner_non_resident_tax string
    A hash containing details of the owner non-resident tax.
  • owner_tax_residency string
    The tax residency of the owner.
  • paid_at timestamp
    Time at which the object was paid. Measured in seconds since the Unix epoch.
  • payment_run stringexpandable
    The ID of the payment run associated with this owner payout.
  • period object
    The period for which the owner payout is calculated.
  • statement_descriptor string
    The statement descriptor for the owner payout.
  • status undefined
    The status of the owner payout. Can be pending, in_transit, succeeded, failed or cancelled.
  • transaction stringexpandable
    The ID of the transaction associated with this owner payout.
  • type undefined
    The type of the owner payout. Can be owner or vendor.
  • unit stringexpandable

Create an owner payout

POST /v1/owner_payouts

curl https://api.yorlet.com/v1/owner_payouts \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "opo_test",
  "object": "owner_payout",
  "created": 1627210800,
  "amount": 40000,
  "approved_at": null,
  "canceled_at": null,
  "client_secret": "opo_test_secret_undefined",
  "currency": "gbp",
  "description": null,
  "destination": null,
  "destination_details": null,
  "failed_at": null,
  "failure_code": null,
  "failure_message": null,
  "failure_owner_balance_transaction": null,
  "hosted_payment_url": null,
  "last_approval_error": null,
  "metadata": {},
  "method": "manual",
  "net": 0,
  "number": null,
  "owner": "owner_test",
  "owner_balance_transaction": null,
  "owner_non_resident_tax": {
    "deduction": 0,
    "details": null,
    "taxable_amount": null
  },
  "owner_tax_residency": null,
  "paid_at": null,
  "payment_run": null,
  "period": {
    "adjustment_amount": null,
    "end": null,
    "start": null
  },
  "statement_descriptor": "OWNER PAYOUT",
  "status": "draft",
  "transaction": null,
  "type": "owner",
  "unit": null
}

Parameters

  • owner required  string
    The ID of the owner to pay.
  • description string
    Description of the payout.
  • method string
    The method of the payout. Can be automatic or manual.
  • options object
    Options for the payout.
    options.apply_unit_restriction boolean
    Whether to apply the unit restriction to the payout.
  • period object
    The period for the payout.
    period.end timestamp
    The end of the period for the payout.
    period.start timestamp
    The start of the period for the payout.
  • statement_descriptor string
    The statement descriptor for the payout.
  • unit string
    The ID of the unit to pay the owner for.

Returns

List

Preview an owner payout

POST /v1/owner_payouts/preview

curl https://api.yorlet.com/v1/owner_payouts/preview \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "opo_test",
  "object": "owner_payout",
  "created": 1627210800,
  "amount": 40000,
  "approved_at": null,
  "canceled_at": null,
  "client_secret": "opo_test_secret_undefined",
  "currency": "gbp",
  "description": null,
  "destination": null,
  "destination_details": null,
  "failed_at": null,
  "failure_code": null,
  "failure_message": null,
  "failure_owner_balance_transaction": null,
  "hosted_payment_url": null,
  "last_approval_error": null,
  "metadata": {},
  "method": "manual",
  "net": 0,
  "number": null,
  "owner": "owner_test",
  "owner_balance_transaction": null,
  "owner_non_resident_tax": {
    "deduction": 0,
    "details": null,
    "taxable_amount": null
  },
  "owner_tax_residency": null,
  "paid_at": null,
  "payment_run": null,
  "period": {
    "adjustment_amount": null,
    "end": null,
    "start": null
  },
  "statement_descriptor": "OWNER PAYOUT",
  "status": "draft",
  "transaction": null,
  "type": "owner",
  "unit": null
}

Parameters

  • owner required  string
    The ID of the owner to pay.
  • description string
    Description of the payout.
  • method string
    The method of the payout. Can be automatic or manual.
  • options object
    Options for the payout.
    options.apply_unit_restriction boolean
    Whether to apply the unit restriction to the payout.
  • period object
    The period for the payout.
    period.end timestamp
    The end of the period for the payout.
    period.start timestamp
    The start of the period for the payout.
  • statement_descriptor string
    The statement descriptor for the payout.
  • unit string
    The ID of the unit to pay the owner for.

Returns

Returns

Retrieve an owner payout

GET /v1/owner_payouts/:id

curl https://api.yorlet.com/v1/owner_payouts/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "opo_test",
  "object": "owner_payout",
  "created": 1627210800,
  "amount": 40000,
  "approved_at": null,
  "canceled_at": null,
  "client_secret": "opo_test_secret_undefined",
  "currency": "gbp",
  "description": null,
  "destination": null,
  "destination_details": null,
  "failed_at": null,
  "failure_code": null,
  "failure_message": null,
  "failure_owner_balance_transaction": null,
  "hosted_payment_url": null,
  "last_approval_error": null,
  "metadata": {},
  "method": "manual",
  "net": 0,
  "number": null,
  "owner": "owner_test",
  "owner_balance_transaction": null,
  "owner_non_resident_tax": {
    "deduction": 0,
    "details": null,
    "taxable_amount": null
  },
  "owner_tax_residency": null,
  "paid_at": null,
  "payment_run": null,
  "period": {
    "adjustment_amount": null,
    "end": null,
    "start": null
  },
  "statement_descriptor": "OWNER PAYOUT",
  "status": "draft",
  "transaction": null,
  "type": "owner",
  "unit": null
}

Parameters

  • No parameters

Returns

Returns

Approve an owner payout

POST /v1/owner_payouts/:id/approve

curl https://api.yorlet.com/v1/owner_payouts/:id/approve \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "opo_test",
  "object": "owner_payout",
  "created": 1627210800,
  "amount": 40000,
  "approved_at": null,
  "canceled_at": null,
  "client_secret": "opo_test_secret_undefined",
  "currency": "gbp",
  "description": null,
  "destination": null,
  "destination_details": null,
  "failed_at": null,
  "failure_code": null,
  "failure_message": null,
  "failure_owner_balance_transaction": null,
  "hosted_payment_url": null,
  "last_approval_error": null,
  "metadata": {},
  "method": "manual",
  "net": 0,
  "number": null,
  "owner": "owner_test",
  "owner_balance_transaction": null,
  "owner_non_resident_tax": {
    "deduction": 0,
    "details": null,
    "taxable_amount": null
  },
  "owner_tax_residency": null,
  "paid_at": null,
  "payment_run": null,
  "period": {
    "adjustment_amount": null,
    "end": null,
    "start": null
  },
  "statement_descriptor": "OWNER PAYOUT",
  "status": "draft",
  "transaction": null,
  "type": "owner",
  "unit": null
}

Parameters

  • description string
    Description of the payout.
  • method string
    The method of the payout. Can be automatic or manual.
  • period object
    The period for the payout.
    period.end timestamp
    The end of the period for the payout.
    period.start timestamp
    The start of the period for the payout.
  • send_email boolean
    Whether to send an email to the owner with a link to the hosted payment page. Yorlet only sends an email if the payout is negative.
  • statement_descriptor string
    The statement descriptor for the payout.

Returns

Returns

Preview an owner payout approval

POST /v1/owner_payouts/:id/approve/preview

curl https://api.yorlet.com/v1/owner_payouts/:id/approve/preview \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "opo_test",
  "object": "owner_payout",
  "created": 1627210800,
  "amount": 40000,
  "approved_at": null,
  "canceled_at": null,
  "client_secret": "opo_test_secret_undefined",
  "currency": "gbp",
  "description": null,
  "destination": null,
  "destination_details": null,
  "failed_at": null,
  "failure_code": null,
  "failure_message": null,
  "failure_owner_balance_transaction": null,
  "hosted_payment_url": null,
  "last_approval_error": null,
  "metadata": {},
  "method": "manual",
  "net": 0,
  "number": null,
  "owner": "owner_test",
  "owner_balance_transaction": null,
  "owner_non_resident_tax": {
    "deduction": 0,
    "details": null,
    "taxable_amount": null
  },
  "owner_tax_residency": null,
  "paid_at": null,
  "payment_run": null,
  "period": {
    "adjustment_amount": null,
    "end": null,
    "start": null
  },
  "statement_descriptor": "OWNER PAYOUT",
  "status": "draft",
  "transaction": null,
  "type": "owner",
  "unit": null
}

Parameters

  • description string
    Description of the payout.
  • method string
    The method of the payout. Can be automatic or manual.
  • period object
    The period for the payout.
    period.end timestamp
    The end of the period for the payout.
    period.start timestamp
    The start of the period for the payout.
  • send_email boolean
    Whether to send an email to the owner with a link to the hosted payment page. Yorlet only sends an email if the payout is negative.
  • statement_descriptor string
    The statement descriptor for the payout.

Returns

Returns

Cancel an owner payout

POST /v1/owner_payouts/:id/cancel

curl https://api.yorlet.com/v1/owner_payouts/:id/cancel \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "opo_test",
  "object": "owner_payout",
  "created": 1627210800,
  "amount": 40000,
  "approved_at": null,
  "canceled_at": null,
  "client_secret": "opo_test_secret_undefined",
  "currency": "gbp",
  "description": null,
  "destination": null,
  "destination_details": null,
  "failed_at": null,
  "failure_code": null,
  "failure_message": null,
  "failure_owner_balance_transaction": null,
  "hosted_payment_url": null,
  "last_approval_error": null,
  "metadata": {},
  "method": "manual",
  "net": 0,
  "number": null,
  "owner": "owner_test",
  "owner_balance_transaction": null,
  "owner_non_resident_tax": {
    "deduction": 0,
    "details": null,
    "taxable_amount": null
  },
  "owner_tax_residency": null,
  "paid_at": null,
  "payment_run": null,
  "period": {
    "adjustment_amount": null,
    "end": null,
    "start": null
  },
  "statement_descriptor": "OWNER PAYOUT",
  "status": "draft",
  "transaction": null,
  "type": "owner",
  "unit": null
}

Parameters

  • No parameters

Returns

Returns

Mark an owner payout as failed

POST /v1/owner_payouts/:id/mark_failed

curl https://api.yorlet.com/v1/owner_payouts/:id/mark_failed \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "opo_test",
  "object": "owner_payout",
  "created": 1627210800,
  "amount": 40000,
  "approved_at": null,
  "canceled_at": null,
  "client_secret": "opo_test_secret_undefined",
  "currency": "gbp",
  "description": null,
  "destination": null,
  "destination_details": null,
  "failed_at": null,
  "failure_code": null,
  "failure_message": null,
  "failure_owner_balance_transaction": null,
  "hosted_payment_url": null,
  "last_approval_error": null,
  "metadata": {},
  "method": "manual",
  "net": 0,
  "number": null,
  "owner": "owner_test",
  "owner_balance_transaction": null,
  "owner_non_resident_tax": {
    "deduction": 0,
    "details": null,
    "taxable_amount": null
  },
  "owner_tax_residency": null,
  "paid_at": null,
  "payment_run": null,
  "period": {
    "adjustment_amount": null,
    "end": null,
    "start": null
  },
  "statement_descriptor": "OWNER PAYOUT",
  "status": "draft",
  "transaction": null,
  "type": "owner",
  "unit": null
}

Parameters

  • failure_code string
    The failure code for the payout. Can be no_account.
  • failure_message string
    The failure message for the payout.

Returns

Returns

Mark an owner payout as paid

POST /v1/owner_payouts/:id/mark_paid

curl https://api.yorlet.com/v1/owner_payouts/:id/mark_paid \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "opo_test",
  "object": "owner_payout",
  "created": 1627210800,
  "amount": 40000,
  "approved_at": null,
  "canceled_at": null,
  "client_secret": "opo_test_secret_undefined",
  "currency": "gbp",
  "description": null,
  "destination": null,
  "destination_details": null,
  "failed_at": null,
  "failure_code": null,
  "failure_message": null,
  "failure_owner_balance_transaction": null,
  "hosted_payment_url": null,
  "last_approval_error": null,
  "metadata": {},
  "method": "manual",
  "net": 0,
  "number": null,
  "owner": "owner_test",
  "owner_balance_transaction": null,
  "owner_non_resident_tax": {
    "deduction": 0,
    "details": null,
    "taxable_amount": null
  },
  "owner_tax_residency": null,
  "paid_at": null,
  "payment_run": null,
  "period": {
    "adjustment_amount": null,
    "end": null,
    "start": null
  },
  "statement_descriptor": "OWNER PAYOUT",
  "status": "draft",
  "transaction": null,
  "type": "owner",
  "unit": null
}

Parameters

  • paid_at timestamp
    The time the payout was paid.
  • send_receipt boolean
    Whether to send a receipt to the owner.

Returns

Returns

Send an owner payout receipt

POST /v1/owner_payouts/:id/send_receipt

curl https://api.yorlet.com/v1/owner_payouts/:id/send_receipt \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "opo_test",
  "object": "owner_payout",
  "created": 1627210800,
  "amount": 40000,
  "approved_at": null,
  "canceled_at": null,
  "client_secret": "opo_test_secret_undefined",
  "currency": "gbp",
  "description": null,
  "destination": null,
  "destination_details": null,
  "failed_at": null,
  "failure_code": null,
  "failure_message": null,
  "failure_owner_balance_transaction": null,
  "hosted_payment_url": null,
  "last_approval_error": null,
  "metadata": {},
  "method": "manual",
  "net": 0,
  "number": null,
  "owner": "owner_test",
  "owner_balance_transaction": null,
  "owner_non_resident_tax": {
    "deduction": 0,
    "details": null,
    "taxable_amount": null
  },
  "owner_tax_residency": null,
  "paid_at": null,
  "payment_run": null,
  "period": {
    "adjustment_amount": null,
    "end": null,
    "start": null
  },
  "statement_descriptor": "OWNER PAYOUT",
  "status": "draft",
  "transaction": null,
  "type": "owner",
  "unit": null
}

Parameters

Returns

Returns

List all owner payouts

GET /v1/owner_payouts

curl https://api.yorlet.com/v1/owner_payouts \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "opo_test",
      "object": "owner_payout",
      "created": 1627210800,
      "amount": 40000,
      "approved_at": null,
      "canceled_at": null,
      "client_secret": "opo_test_secret_undefined",
      "currency": "gbp",
      "description": null,
      "destination": null,
      "destination_details": null,
      "failed_at": null,
      "failure_code": null,
      "failure_message": null,
      "failure_owner_balance_transaction": null,
      "hosted_payment_url": null,
      "last_approval_error": null,
      "metadata": {},
      "method": "manual",
      "net": 0,
      "number": null,
      "owner": "owner_test",
      "owner_balance_transaction": null,
      "owner_non_resident_tax": {
        "deduction": 0,
        "details": null,
        "taxable_amount": null
      },
      "owner_tax_residency": null,
      "paid_at": null,
      "payment_run": null,
      "period": {
        "adjustment_amount": null,
        "end": null,
        "start": null
      },
      "statement_descriptor": "OWNER PAYOUT",
      "status": "draft",
      "transaction": null,
      "type": "owner",
      "unit": null
    }
  ],
  "count": 1,
  "has_more": false
}

Parameters

  • No parameters

Returns

List

Tax Forms

Endpoints

POST    /v1/tax_forms
GET     /v1/tax_forms/:id
DELETE  /v1/tax_forms/:id
GET     /v1/tax_forms

The tax form object

The tax form object

{
  "id": "tax_form_test",
  "object": "tax_form",
  "created": 1627210800,
  "client_secret": "tax_form_test_secret_token",
  "currency": "gbp",
  "description": null,
  "metadata": {},
  "nrl6": {
    "collected": 12000,
    "refunded": 0
  },
  "period": {
    "end": 1738338664,
    "start": 1738338664
  },
  "options": {
    "quarter": null,
    "year": 2021
  },
  "owner": null,
  "type": "nrl6"
}

Attributes

  • id string
    Unique identifier for the object
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be tax_form.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • client_secret string
    The client secret can be used to access the PDF for the tax form.
  • currency string
    Three-letter ISO currency code, in lowercase.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • 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.
  • nrl6 object
    The amount collected and refunded for the NRL6 tax form.
    nrl6.collected integer
    The amount of tax collected for the tax form.
    nrl6.refunded integer
    The amount of tax refunded for the tax form.
  • nrlq object
    The amount collected and refunded for the NRLQ tax form.
    nrlq.collected integer
    The amount of tax collected for the tax form.
    nrlq.refunded integer
    The amount of tax refunded for the tax form.
  • nrly object
    The amount collected and refunded for the NRLY tax form.
    nrly.collected integer
    The amount of tax collected for the tax form.
    nrly.refunded integer
    The amount of tax refunded for the tax form.
  • period object
    The start and end dates of the tax form.
  • options object
    The options for the tax form.
    options.quarter integer
    The quarter of the tax form.
    options.year integer
    The year of the tax form.
  • owner stringexpandable
    The ID of the owner this tax form is for.
  • status string
    The status of the tax form. Can be ready, needs_attention or filed.
  • type string
    The type of the tax form. Can be nrl6, nrlq or nrly.

Create a tax form

POST /v1/tax_forms

curl https://api.yorlet.com/v1/tax_forms \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "tax_form_test",
  "object": "tax_form",
  "created": 1627210800,
  "client_secret": "tax_form_test_secret_token",
  "currency": "gbp",
  "description": null,
  "metadata": {},
  "nrl6": {
    "collected": 12000,
    "refunded": 0
  },
  "period": {
    "end": 1738338664,
    "start": 1738338664
  },
  "options": {
    "quarter": null,
    "year": 2021
  },
  "owner": null,
  "type": "nrl6"
}

Parameters

  • options required  object
    A set of options for the tax form.
    options.year required  integer
    The tax year for the tax form. Can be 2025, 2024, 2023, 2022 or 2021.
    options.quarter integer
    The tax quarter for the tax form. Can be 1, 2, 3 or 4.
  • type required  string
    The tax form type. Can be nrl6, nrlq or nrly.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • 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.
  • owner string
    The ID of the owner to create the tax form for. Only allowed when the tax form type is nrl6.

Returns

Returns a tax form object if successful.

Retrieve a tax form

GET /v1/tax_forms/:id

curl https://api.yorlet.com/v1/tax_forms/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "tax_form_test",
  "object": "tax_form",
  "created": 1627210800,
  "client_secret": "tax_form_test_secret_token",
  "currency": "gbp",
  "description": null,
  "metadata": {},
  "nrl6": {
    "collected": 12000,
    "refunded": 0
  },
  "period": {
    "end": 1738338664,
    "start": 1738338664
  },
  "options": {
    "quarter": null,
    "year": 2021
  },
  "owner": null,
  "type": "nrl6"
}

Parameters

  • No parameters

Returns

Returns a tax form object if a valid identifier was provided.

Delete a tax report

DELETE /v1/tax_forms/:id

curl https://api.yorlet.com/v1/tax_forms/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "tax_form_test",
  "object": "tax_form",
  "deleted": true
}

Parameters

  • No parameters

Returns

Returns an object with a deleted parameter on success. If the tax form ID does not exist, this call throws an error.

List all tax forms

GET /v1/tax_forms

curl https://api.yorlet.com/v1/tax_forms \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "tax_form_test",
      "object": "tax_form",
      "created": 1627210800,
      "client_secret": "tax_form_test_secret_token",
      "currency": "gbp",
      "description": null,
      "metadata": {},
      "nrl6": {
        "collected": 12000,
        "refunded": 0
      },
      "period": {
        "end": 1738338664,
        "start": 1738338664
      },
      "options": {
        "quarter": null,
        "year": 2021
      },
      "owner": null,
      "type": "nrl6"
    }
  ],
  "count": 1,
  "has_more": false
}

Parameters

  • No parameters

Returns

A object with a data property that contains an array of tax forms.

Transfers

Endpoints

POST    /v1/transfers
GET     /v1/transfers/:id
GET     /v1/transfers/:id
GET     /v1/transfers

The transfer object

The transfer object

{
  "id": "tr_test",
  "object": "transfer",
  "created": 1627210800,
  "amount": 0,
  "balance_transaction": null,
  "destination": null,
  "destination_owner_payment": null,
  "source_invoice_item": null,
  "source_transaction": null,
  "transfer_group": null
}

Attributes

  • id string
    Unique identifier for the object
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be transfer.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • amount integer
  • amount_reversed integer
  • balance_transaction stringexpandable
  • currency string
  • description string
  • destination stringexpandable
  • destination_owner_payment stringexpandable
  • reversed boolean
    Whether the transfer has been fully reversed.
  • source_invoice_item stringexpandable
  • source_transaction stringexpandable
  • transfer_group string

Create a transfer

POST /v1/transfers

curl https://api.yorlet.com/v1/transfers \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "tr_test",
  "object": "transfer",
  "created": 1627210800,
  "amount": 0,
  "balance_transaction": null,
  "destination": null,
  "destination_owner_payment": null,
  "source_invoice_item": null,
  "source_transaction": null,
  "transfer_group": null
}

Parameters

  • amount required  integer
    The amount of the transfer.
  • currency required  string
    The currency of the transfer. Can be eur, gbp, sek or usd.
  • destination required  string
    The destination of the transfer.
  • apply_unit_fees boolean
    Whether to apply unit fees.
  • description string
    The description of the transfer.
  • 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.
  • owner_payment_data object
    The owner payment data hash.
    owner_payment_data.period object
    A hash of the period this owner payment relates to.
    owner_payment_data.period.end timestamp
    The period end date. Measured in seconds since the Unix epoch.
    owner_payment_data.period.start timestamp
    The period start date. Measured in seconds since the Unix epoch.
  • reporting_type string
    The type of the transfer. Can be rent, deposit or other.
  • source_transaction string
    The source transaction ID.
  • unit string
    The unit ID of the transfer.

Returns

Returns a transfer object if successful.

Retrieve a transfer

GET /v1/transfers/:id

curl https://api.yorlet.com/v1/transfers/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "tr_test",
  "object": "transfer",
  "created": 1627210800,
  "amount": 0,
  "balance_transaction": null,
  "destination": null,
  "destination_owner_payment": null,
  "source_invoice_item": null,
  "source_transaction": null,
  "transfer_group": null
}

Parameters

  • No parameters

Returns

Returns a transfer object if a valid identifier was provided.

Update a transfer

GET /v1/transfers/:id

curl https://api.yorlet.com/v1/transfers/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "tr_test",
  "object": "transfer",
  "created": 1627210800,
  "amount": 0,
  "balance_transaction": null,
  "destination": null,
  "destination_owner_payment": null,
  "source_invoice_item": null,
  "source_transaction": null,
  "transfer_group": null
}

Parameters

  • No parameters

Returns

Returns an updated transfer object if a valid identifier was provided.

List all transfers

GET /v1/transfers

curl https://api.yorlet.com/v1/transfers \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "tr_test",
      "object": "transfer",
      "created": 1627210800,
      "amount": 0,
      "balance_transaction": null,
      "destination": null,
      "destination_owner_payment": null,
      "source_invoice_item": null,
      "source_transaction": null,
      "transfer_group": null
    }
  ],
  "count": 1,
  "has_more": false
}

Parameters

  • No parameters

Returns

A object with a data property that contains an array of transfers.

Transfer Reversals

Endpoints

POST    /v1/transfers/:id/reversals
GET     /v1/transfers/:id/reversals/:id
GET     /v1/transfers/:id/reversals/:id
GET     /v1/transfers/:id/reversals

The transfer reversal object

The transfer reversal object

{
  "id": "trr_test",
  "object": "transfer_reversal",
  "created": 1627210800,
  "amount": 0,
  "destination_owner_payment_refund": null,
  "metadata": {},
  "transfer": null
}

Attributes

  • id string
    Unique identifier for the object
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be transfer_reversal.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • amount integer
  • currency string
  • description string
  • destination_owner_payment_refund stringexpandable
  • 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.
  • transfer stringexpandable

Create a transfer reversal

POST /v1/transfers/:id/reversals

curl https://api.yorlet.com/v1/transfers/:id/reversals \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "trr_test",
  "object": "transfer_reversal",
  "created": 1627210800,
  "amount": 0,
  "destination_owner_payment_refund": null,
  "metadata": {},
  "transfer": null
}

Parameters

  • amount required  integer
  • description string
  • 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.

Returns

Returns a transfer reversal object if successful.

Retrieve a transfer reversal

GET /v1/transfers/:id/reversals/:id

curl https://api.yorlet.com/v1/transfers/:id/reversals/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "trr_test",
  "object": "transfer_reversal",
  "created": 1627210800,
  "amount": 0,
  "destination_owner_payment_refund": null,
  "metadata": {},
  "transfer": null
}

Parameters

  • No parameters

Returns

Returns a transfer reversal object if a valid identifier was provided.

Update a transfer reversal

GET /v1/transfers/:id/reversals/:id

curl https://api.yorlet.com/v1/transfers/:id/reversals/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "trr_test",
  "object": "transfer_reversal",
  "created": 1627210800,
  "amount": 0,
  "destination_owner_payment_refund": null,
  "metadata": {},
  "transfer": null
}

Parameters

  • No parameters

Returns

Returns a transfer reversal object if a valid identifier was provided.

List all transfer reversals

GET /v1/transfers/:id/reversals

curl https://api.yorlet.com/v1/transfers/:id/reversals \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "trr_test",
      "object": "transfer_reversal",
      "created": 1627210800,
      "amount": 0,
      "destination_owner_payment_refund": null,
      "metadata": {},
      "transfer": null
    }
  ],
  "count": 1,
  "has_more": false
}

Parameters

  • No parameters

Returns

A object with a data property that contains an array of transfer reversals.

Platform Resources

Accounts

Endpoints

GET     /v1/accounts

The account object

The account object

{
  "id": "acct_test",
  "object": "account",
  "created": 1627210800,
  "address": {
    "line1": null,
    "line2": null,
    "city": null,
    "state": null,
    "postal_code": null,
    "country": null
  },
  "balance_enabled": false,
  "business_profile": {
    "address": null,
    "name": null,
    "support_email": null,
    "support_phone": null,
    "support_url": null,
    "url": null
  },
  "charges_enabled": false,
  "country": "GB",
  "default_currency": "gbp",
  "details_submitted": false,
  "invoice_settings": {
    "days_until_due": null,
    "supported_payment_methods": {
      "bacs_debit": true,
      "card": true,
      "gbp_credit_transfer": true,
      "sepa_debit": false
    }
  },
  "name": null,
  "payouts_enabled": false,
  "settings": {
    "bacs_debit_payments": {
      "display_name": null
    },
    "payments": {
      "statement_descriptor": null
    }
  },
  "settlement_currencies": []
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be account.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • address object
    The account's address.
  • balance_enabled boolean
    .
  • business_profile object
    .
    business_profile.address object
    business_profile.name string
    business_profile.support_email string
    business_profile.support_phone string
    business_profile.support_url string
    business_profile.url string
  • business_type string
  • charges_enabled boolean
  • company object
  • country string
  • default_currency string
    Three-letter ISO currency code, in lowercase. Must be a supported currency.
  • details_submitted boolean
    .
  • individual object
  • invoice_settings object
  • name string
    The building's name.
  • payouts_enabled boolean
    .
  • settings object
  • settlement_currencies array
    .

List all connected accounts

GET /v1/accounts

curl https://api.yorlet.com/v1/accounts \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "acct_test",
      "object": "account",
      "created": 1627210800,
      "address": {
        "line1": null,
        "line2": null,
        "city": null,
        "state": null,
        "postal_code": null,
        "country": null
      },
      "balance_enabled": false,
      "business_profile": {
        "address": null,
        "name": null,
        "support_email": null,
        "support_phone": null,
        "support_url": null,
        "url": null
      },
      "charges_enabled": false,
      "country": "GB",
      "default_currency": "gbp",
      "details_submitted": false,
      "invoice_settings": {
        "days_until_due": null,
        "supported_payment_methods": {
          "bacs_debit": true,
          "card": true,
          "gbp_credit_transfer": true,
          "sepa_debit": false
        }
      },
      "name": null,
      "payouts_enabled": false,
      "settings": {
        "bacs_debit_payments": {
          "display_name": null
        },
        "payments": {
          "statement_descriptor": null
        }
      },
      "settlement_currencies": []
    }
  ],
  "count": 1,
  "has_more": false
}

Returns a list of accounts connected to your platform.

Parameters

  • No parameters

Returns

List

Webhook Resources

Webhook Endpoints

Endpoints

POST    /v1/webhook_endpoints
GET     /v1/webhook_endpoints/:id
POST    /v1/webhook_endpoints/:id
DELETE  /v1/webhook_endpoints/:id
GET     /v1/webhook_endpoints

You can configure webhook endpoints via the API to be notified about events that happen in your Yorlet account or connected accounts. You can see the full list of available events you can subscribe to here.

The webhook endpoint object

The webhook endpoint object

{
  "id": "wh_test",
  "object": "webhook_endpoint",
  "created": 1627210800,
  "connected_accounts": false,
  "description": null,
  "enabled_events": [],
  "metadata": {},
  "status": "enabled",
  "url": "https://example.com/webhook"
}

Attributes

  • id string
    Unique identifier for the object.
  • object string
    String representing the object's type. Objects of the same type share the same value. Can be webhook_endpoint.
  • created timestamp
    Time at which the object was created. Measured in seconds since the Unix epoch.
  • connected_accounts object
    Whether the webhook endpoint is for connected account events.
  • description string
    An arbitrary string attached to the object. Often useful for displaying to users.
  • enabled_events array
    The events this endpoint will receive.
  • metadata string
    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.
  • status string
    The status of the webhook endpoint. Can be disabled or enabled.
  • url string
    The url of the webhook endpoint.

Create a webhook endpoint

POST /v1/webhook_endpoints

curl https://api.yorlet.com/v1/webhook_endpoints \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "wh_test",
  "object": "webhook_endpoint",
  "created": 1627210800,
  "connected_accounts": false,
  "description": null,
  "enabled_events": [],
  "metadata": {},
  "status": "enabled",
  "url": "https://example.com/webhook"
}

Creates a webhook endpoint.

Parameters

  • enabled_events required  array of strings
    The list of events to enable for this endpoint. You can see the full list of available events here.
  • url required  string
    The URL of the webhook endpoint.
  • connected_accounts boolean
    Whether this endpoint should receive events from connected accounts, or from your account.
  • description string
    An optional description of what the webhook is used for.
  • disabled boolean
    Disable the webhook endpoint if set to true.
  • 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.

Returns

Returns the webhook endpoint object if the request succeeded.

Retrieve a webhook endpoint

GET /v1/webhook_endpoints/:id

curl https://api.yorlet.com/v1/webhook_endpoints/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "wh_test",
  "object": "webhook_endpoint",
  "created": 1627210800,
  "connected_accounts": false,
  "description": null,
  "enabled_events": [],
  "metadata": {},
  "status": "enabled",
  "url": "https://example.com/webhook"
}

Retrieves the webhook endpoint with the given ID.

Parameters

  • No parameters

Returns

Returns a unit object if a valid identifier was provided.

Update a webhook endpoint

POST /v1/webhook_endpoints/:id

curl https://api.yorlet.com/v1/webhook_endpoints/:id \ 
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \

Example Response

{
  "id": "wh_test",
  "object": "webhook_endpoint",
  "created": 1627210800,
  "connected_accounts": false,
  "description": null,
  "enabled_events": [],
  "metadata": {},
  "status": "enabled",
  "url": "https://example.com/webhook"
}

Updates the specified webhook endpoint by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Parameters

  • description string
    An optional description of what the webhook is used for.
  • disabled boolean
    Disable the webhook endpoint if set to true.
  • enabled_events array of strings
    The list of events to enable for this endpoint. You can see the full list of available events here.
  • 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.
  • url string
    The URL of the webhook endpoint.

Returns

Returns the webhook endpoint object if the update succeeded.

Delete a webhook endpoint

DELETE /v1/webhook_endpoints/:id

curl https://api.yorlet.com/v1/webhook_endpoints/:id \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "id": "wh_test",
  "object": "webhook_endpoint",
  "deleted": true
}

Permanently deletes a webhook endpoint. This cannot be undone.

Parameters

  • No parameters

Returns

Returns an object with a deleted parameter on success. If the webhook endpoint ID does not exist, this call throws an error.

List all webhook endpoints

GET /v1/webhook_endpoints

curl https://api.yorlet.com/v1/webhook_endpoints \ 
-H "Authorization: Bearer {API_KEY}" \

Example Response

{
  "object": "list",
  "data": [
    {
      "id": "wh_test",
      "object": "webhook_endpoint",
      "created": 1627210800,
      "connected_accounts": false,
      "description": null,
      "enabled_events": [],
      "metadata": {},
      "status": "enabled",
      "url": "https://example.com/webhook"
    }
  ],
  "count": 1,
  "has_more": false
}

Returns a list of webhook endpoints. The webhook endpoints are returned sorted by creation date, with the most recent units appearing first.

Parameters

  • No parameters

Returns

A object with a data property that contains an array of webhook endpoints.