### API Pagination Example Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Demonstrates how pagination is implemented using RFC5988 Link headers for navigating through paginated results. It shows example links for 'prev', 'last', and 'first' pages, and the structure of the 'pagination' object within JSON responses. ```APIDOC Link Header Example: ; rel="prev", \ ; rel="last", \ ; rel="first" JSON Pagination Object: "pagination": { "page": 1, "rows": 1, "total_rows": 1, "total_pages": 1 } ``` -------------------------------- ### Webhook Trigger Example Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Shows how to trigger a webhook notification for an API action by appending the `?send_webhook=true` parameter to the resource URL. ```APIDOC POST https://uk.payprop.com/api/agency/v1.1/entity/payment?send_webhook=true ``` -------------------------------- ### PayProp API OAuth 2.0 Authorization Request Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Example of initiating the OAuth 2.0 authorization code grant flow by redirecting the user to the PayProp API authorization page. ```APIDOC https://uk.payprop.com/api/oauth/authorize?response_type=code&client_id=YourAppClientID \ &redirect_uri=https%3A%2F%2Fyourapp.com%2Fcallback&scope=read:export:beneficiaries%20read:export:tenants ``` -------------------------------- ### PayProp API OAuth 2.0 Access Token Response Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Example JSON response from the PayProp API containing the access token details after a successful authorization. ```APIDOC { "token_type": "Bearer", "expires_in": 3600, } ``` -------------------------------- ### PayProp API OAuth 2.0 Access Token Request Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Example POST request to exchange an authorization code for an access token, including client credentials and redirect URI. ```APIDOC POST /api/oauth/access_token HTTP/1.1 Host: uk.payprop.com Content-Type: application/x-www-form-urlencoded code=43423d76123a1124f2&client_id=YourAppClientID&client_secret=YourAppClientSecret& \ redirect_uri=https%3A%2F%2Fyourapp.com%2Fcallback&grant_type=authorization_code ``` -------------------------------- ### Create Adhoc Invoice Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Allows the creation of a new adhoc invoice. Requires details such as tenant ID, property ID, amount, and category ID. Optional fields include description, tax information, and start date. ```APIDOC /entity/adhoc-invoice: post: consumes: - application/json description: "Create new adhoc invoice\n" operationId: create_adhoc_invoice parameters: - description: Adhoc invoice to create. in: body name: invoice schema: $schema: http://json-schema.org/draft-07/schema# additionalProperties: 0 properties: amount: minimum: 0.01 multipleOf: 0.01 type: number category_id: description: 'Invoice category id. Ref: [/api/docs/agency?version=v1.1#operation/get_invoice_categories](/api/docs/agency?version=v1.1#operation/get_invoice_categories).' example: 'D8eJPwZG7j' maxLength: 32 minLength: 10 pattern: ^[a-zA-Z0-9]+$ type: string customer_id: description: The customer ID is a unique, case-sensitive value per API consumer. The value can be used to retrieve and update the entity. Providing `null` on update will remove the customer ID associated with the entity.

Please note that currently, this functionality is marked as **experimental**; we strongly recommend keeping track of PayProp entity `external_id` along with your `customer_id`. maxLength: 50 minLength: 1 pattern: ^[a-zA-Z0-9_-]+$ type: - string - 'null' description: maxLength: 255 type: - string - 'null' frequency: enum: - O type: string has_tax: type: boolean is_direct_debit: type: boolean property_id: &1 example: 'D8eJPwZG7j' maxLength: 32 minLength: 10 pattern: ^[a-zA-Z0-9]+$ type: string start_date: description: Default value of today if not provided. example: '2021-08-24' format: date type: string tax_amount: minimum: 0 type: - number - string tenant_id: *1 required: - tenant_id - property_id - amount - category_id type: object responses: '200': description: Created adhoc invoice. schema: $schema: http://json-schema.org/draft-07/schema# ``` -------------------------------- ### Get Invoice Instructions Data Export Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Retrieves a list of invoice instructions for data export. Supports filtering by rows, page, tenant ID, property ID, invoice rule ID, external ID, processed status, and category ID. Includes pagination information in the response. ```APIDOC GET /export/invoice-instructions Parameters: rows (integer, optional): Number of rows to return. Maximum 25. page (integer, optional): Page number to return. tenant_id (string, optional): Filter invoice instructions based on tenant_id. property_id (string, optional): Filter invoice instructions based on property_id. invoice_rule_id (string, optional): Filter invoice instructions based on invoice_rule_id. external_id (string, optional): Filter invoice instructions based on external_id. Max length 32. include_processed (boolean, optional): Include processed invoice instructions. category_id (string, optional): Invoice category ID. Ref: [/api/docs/agency?version=v1.1#operation/get_invoice_categories](/api/docs/agency#operation/get_invoice_categories). Responses: 200: List of invoice instruction item objects, including pagination. 400: Bad request errors. ``` -------------------------------- ### Get Tenant Data Export Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Retrieves tenant data in an exportable format. Supports pagination and filtering by various parameters including external ID, customer reference, search criteria, and property ID. Returns a list of tenant items and pagination details. ```APIDOC GET /export/tenants summary: Get tenant data export tags: - Export operationId: get_tenants_export parameters: - description: Restrict rows returned. in: query name: rows required: false type: integer - description: Return given page number. in: query name: page required: false type: integer - description: Return results from last modified time. in: query name: modified_from_time pattern: \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2} type: string x-example: '2018-02-22T17:01:59' - description: Timezone for modified_from_time. in: query name: modified_from_timezone type: string x-example: 'Europe/Zurich' - description: External ID of tenant. in: query maxLength: 32 name: external_id required: false type: string - description: Customer reference of tenant. in: query maxLength: 50 name: customer_reference required: false type: string - collectionFormat: multi description: To be used with `search_value`. in: query items: enum: - business_name - first_name - last_name - email_address type: string name: search_by required: false type: array - description: To be used with `search_by`. in: query maxLength: 50 minLength: 3 name: search_value required: false type: string - description: Return only tenants that have been archived. Defaults to `false`. in: query name: is_archived required: false type: string - description: Lookup entities based on `customer_id`. in: query maxLength: 50 name: customer_id required: false type: string - description: Filter tenants on property relationships. in: query maxLength: 32 minLength: 10 name: property_id pattern: ^[a-zA-Z0-9]+$ required: false type: string responses: '200': description: List of tenant item objects. schema: properties: items: description: List of ExportTenantItem objects. items: $ref: api_definitions.yaml#/definitions/ExportTenantItem type: array pagination: $ref: api_definitions.yaml#/definitions/Pagination type: object type: object '400': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error400 '401': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error401 '403': description: Invalid privileges error. schema: $ref: api_definitions.yaml#/definitions/Error403 '404': description: Not found error. schema: $ref: api_definitions.yaml#/definitions/Error404 '500': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error500 '501': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error501 ``` -------------------------------- ### Get Property Data Export Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Retrieves property data in an exportable format. Supports pagination and filtering based on various criteria. Returns a list of property items and pagination details. ```APIDOC GET /export/properties summary: Get property data export tags: - Export responses: '200': description: Property data export. schema: properties: items: description: List of ExportPropertyItem objects. items: $ref: api_definitions.yaml#/definitions/ExportPropertyItem type: array pagination: $ref: api_definitions.yaml#/definitions/Pagination type: object type: object '400': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error400 '401': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error401 '403': description: Invalid privileges error. schema: $ref: api_definitions.yaml#/definitions/Error403 '404': description: Not found error. schema: $ref: api_definitions.yaml#/definitions/Error404 '500': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error500 '501': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error501 ``` -------------------------------- ### Get Tenant Balances Report Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Retrieves the tenant balances report. Supports filtering by property and tenant IDs, and allows specifying a date for the balances. Defaults to today's date if not provided. Includes detailed error responses. ```APIDOC /report/tenant/balances: get: description: "Return tenant balances report\n" operationId: get_tenant_balances parameters: - description: External ID of property. in: query maxLength: 32 name: property_id required: false type: string - description: External ID of tenant. in: query maxLength: 32 name: tenant_id required: false type: string - description: Tenant balances on given date. Defaults to today. format: date in: query name: date required: false type: string responses: '200': description: Tenant balances report. schema: $ref: api_definitions.yaml#/definitions/TenantBalancesReport '400': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error400 '401': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error401 '403': description: Invalid privileges error. schema: $ref: api_definitions.yaml#/definitions/Error403 '404': description: Not found error. schema: $ref: api_definitions.yaml#/definitions/Error404 '500': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error500 '501': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error501 summary: Tenant balances tags: - Reports ``` -------------------------------- ### API Error Response Example Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Illustrates the structure of a typical JSON error response from the API, which includes a 'status' code and an 'errors' array containing detailed error messages. This format should be used for testing API call outcomes. ```APIDOC { "errors": [ { "message" : "Could not find entity based on given customer ID" } ], "status": 404 } ``` -------------------------------- ### Get Global Beneficiaries Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Retrieves a list of global beneficiaries. This endpoint provides access to beneficiary data relevant across the system. ```APIDOC GET /global-beneficiaries description: "Return global beneficiaries\n" operationId: get_global_beneficiaries responses: '200': description: Global beneficiaries. schema: ``` -------------------------------- ### Tenant Creation API Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Defines the API endpoint for creating a new tenant. It supports different account types (individual/business) and conditional requirements for bank accounts and mobile numbers. Includes detailed schema validation for tenant properties. ```APIDOC /entity/tenant: post: consumes: - application/json description: "Create new tenant\n" operationId: create_tenant parameters: - description: Tenant to create. in: body name: tenant schema: $schema: http://json-schema.org/schema# additionalProperties: 0 allOf: - if: properties: account_type: const: individual then: properties: first_name: minLength: 2 last_name: minLength: 2 required: - first_name - last_name - if: properties: account_type: const: business then: properties: business_name: minLength: 2 required: - business_name - if: properties: has_bank_account: const: 1 then: properties: bank_account: required: - account_name - branch_code - account_number required: - bank_account - if: properties: mobile_number: minLength: 1 then: properties: mobile_number: pattern: ^[1-9]\d+$ properties: account_type: default: individual description: This determines how the tenant is addressed on their communications. Individuals are addressed by the `first_name` and `last_name` field, whereas a business is addressed by the `business_name` field. enum: - individual - business type: string address: $schema: http://json-schema.org/schema# additionalProperties: 0 description: The address that will be used on tenant communications. Typically this is the rental address, but can be a guarantor. properties: address_line_1: maxLength: 50 type: string address_line_2: maxLength: 50 type: string address_line_3: maxLength: 50 type: string city: maxLength: 50 type: string country_code: default: UK enum: - AD - AE - AF - AG - AI - AL - AM - AN - AO - AQ - AR - AS - AT - AU - AW - AX - AZ - BA - BB - BD - BE - BF - BG - BH - BI - BJ - BL - BM - BN - BO - BQ - BR - BS - BT - BV - BW - BY - BZ - CA - CC - CD - CF - CG - CH - CI - CK - CL - CM - CN - CO - CR - CU - CV - CW - CX - CY - CZ - DE - DJ - DK - DM - DO - DZ - EC - EE - EG - EH - ER ``` -------------------------------- ### Payment Entity API Operations Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Provides details on the available operations for managing payment entities, including GET and PUT requests for retrieving and updating payment information. ```APIDOC APIDOC: /entity/payment/{external_id}: get: description: "Get payment\n" operationId: get_payment parameters: - description: External ID of payment. in: path maxLength: 32 name: external_id required: true type: string - description: Lookup entity based on given customer ID by overriding route `external_id`. in: query name: is_customer_id required: false type: boolean responses: '200': description: Retrieved payment. schema: *14 '400': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error400 '401': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error401 '403': description: Invalid privileges error. schema: $ref: api_definitions.yaml#/definitions/Error403 '404': description: Not found error. schema: $ref: api_definitions.yaml#/definitions/Error404 '500': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error500 '501': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error501 summary: Get payment tags: - Payment Entity put: consumes: - application/json description: | Update payment. This action will change the entity ID and you will be issued a new ID for subsequent requests. operationId: update_payment parameters: - description: Payment to update. in: body name: payment schema: $schema: http://json-schema.org/draft-07/schema# additionalProperties: 0 properties: amount: minimum: 0.01 multipleOf: 0.01 type: number beneficiary_id: &16 example: 'D8eJPwZG7j' maxLength: 32 minLength: 10 pattern: ^[a-zA-Z0-9]+$ type: string beneficiary_type: enum: - agency - beneficiary - global_beneficiary - property_account - deposit_account type: string customer_id: description: The customer ID is a unique, case-sensitive value per API consumer. The value can be used to retrieve and update the entity. Providing `null` on update will remove the customer ID associated with the entity.

Please note that currently, this functionality is marked as **experimental**; we strongly recommend keeping track of PayProp entity `external_id` along with your `customer_id`. maxLength: 50 minLength: 1 pattern: ^[a-zA-Z0-9_-]+$ type: - string - 'null' description: maxLength: 255 type: - string - 'null' enabled: type: boolean end_date: example: '2021-09-24' format: date type: - string - 'null' frequency: description: 'Ref: [/api/docs/agency#operation/get_transaction_frequencies](/api/docs/agency?version=v1.1#operation/get_transaction_frequencies).' enum: - O - W - 2W - 4W - M - 2M - Q - 6M - A type: string global_beneficiary: description: This field is deprecated and will be removed in the future. Please make use of the `beneficiary_id` field. maxLength: 100 minLength: 2 type: string has_tax: type: boolean no_commission_amount: minimum: 0.01 type: - number - 'null' payment_day: maximum: 31 minimum: 0 type: integer percentage: maximum: 100 minimum: 0.01 type: - number - string property_id: *16 reference: description: Required if `beneficiary_type` is **beneficiary**. maxLength: 50 type: string summary: Update payment tags: - Payment Entity ``` -------------------------------- ### PayProp API Terms of Use and Integration Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md This section outlines the terms and conditions for using the PayProp API, including authorization, amendment policies, integration responsibilities, and the importance of secure and reliable system integration. It also covers the availability of legacy versions and development sandboxes. ```APIDOC API Usage Authorization: - PayProp is authorized to carry out instructions via the API authenticated with Customer's Authentication Credentials. - This authority applies to any use of Customer's Authentication Credentials. API Amendments: - PayProp reserves the right to amend these Terms and update the API at its sole discretion. - PayProp will keep API specifications updated with technical documentation, especially for breaking changes. Integration and Development: - Customer is responsible for secure and reliable system integration with the API. - Assistance from PayProp requires a separate professional services agreement. - Temporary Authentication Credentials can be issued for development sandbox testing (up to 90 days). - Customer must remain properly and securely integrated with the API. - PayProp will not support legacy API versions but will make them available upon releasing updated versions. - Development sandboxes with dummy data will be made available for integration testing prior to major updates. - PayProp may clean, change, or remove legacy API versions. Service Charges: - API usage is subject to PayProp's prevailing service charges. - Changes to service charges will be communicated with at least 30 days prior notice. Intellectual Property: - All intellectual property rights for the API and related documentation belong to PayProp. - Customers are granted a non-exclusive, non-transferable, non-sublicensable license to use the API for accessing and using the Website. - All rights not expressly granted are reserved by PayProp. Confidentiality and Security: - Customers must keep API information (credentials, specifications, etc.) confidential. - Protect Confidential Information from unauthorized use, access, or disclosure. - Promptly report security deficiencies or intrusions to api@payprop.com. Restrictions on Use: - Do not use the API to circumvent the Customer Agreement. - Do not operate a bureau service or syndicate access to the API. - Do not engage in unlawful or illegal activity. - Do not disrupt, impair, or overburden PayProp's network or operations. - Do not circumvent or interfere with API features or restrictions. - Do not use the API or derived data in an unlawful manner. ``` -------------------------------- ### Create Invoice Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Creates a new invoice with specified details. This includes setting the amount, category, customer association, description, dates, and tax information. It supports recurring invoices and direct debit options. ```APIDOC POST /entity/invoice Consumes: - application/json Parameters: - name: invoice in: body required: true description: Invoice to create. schema: type: object properties: amount: type: number minimum: 0.01 multipleOf: 0.01 category_id: type: string description: 'Invoice category id. Ref: [/api/docs/agency?version=v1.1#operation/get_invoice_categories](/api/docs/agency?version=v1.1#operation/get_invoice_categories).' maxLength: 32 minLength: 10 pattern: ^[a-zA-Z0-9]+$ example: 'D8eJPwZG7j' customer_id: type: [string, 'null'] description: The customer ID is a unique, case-sensitive value per API consumer. The value can be used to retrieve and update the entity. Providing `null` on update will remove the customer ID associated with the entity.

Please note that currently, this functionality is marked as **experimental**; we strongly recommend keeping track of PayProp entity `external_id` along with your `customer_id`. maxLength: 50 minLength: 1 pattern: ^[a-zA-Z0-9_-]+$ description: type: [string, 'null'] maxLength: 255 end_date: type: [string, 'null'] format: date example: '2021-09-24' frequency: type: string description: 'Ref: [/api/docs/agency?version=v1.1#operation/get_transaction_frequencies](/api/docs/agency#operation/get_transaction_frequencies).' enum: [O, W, 2W, 4W, M, 2M, Q, 6M, A] has_invoice_period: type: boolean description: Available for reoccurring invoices has_tax: type: boolean is_direct_debit: type: boolean payment_day: type: integer maximum: 31 minimum: 1 property_id: type: string maxLength: 32 minLength: 10 pattern: ^[a-zA-Z0-9]+$ example: 'D8eJPwZG7j' start_date: type: string description: Default value of today if not provided. example: '2021-08-24' format: date tax_amount: type: [number, string] minimum: 0 tenant_id: type: string maxLength: 32 minLength: 10 pattern: ^[a-zA-Z0-9]+$ example: 'D8eJPwZG7j' required: - tenant_id - property_id Responses: '200': description: Invoice created successfully. '400': description: Bad request errors. '401': description: Bad request errors. '403': description: Invalid privileges error. '404': description: Not found error. '500': description: Not implemented error. '501': description: Not implemented error. OperationId: create_invoice Tags: - Invoice Entity ``` -------------------------------- ### Get Payment Data Export Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Retrieves payment data for export. Supports filtering by rows, page, modification time, external ID, and property ID. Includes pagination information. ```APIDOC GET /export/payments Description: Return payment data export OperationId: get_payments_export Summary: Get payment data export Tags: - Export Parameters: - name: rows in: query description: Restrict rows returned. required: false type: integer - name: page in: query description: Return given page number. required: false type: integer - name: modified_from_time in: query description: Return results from last modified time. required: false type: string pattern: \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2} x-example: '2018-02-22T17:01:59' - name: modified_from_timezone in: query description: Timezone for modified_from_time. required: false type: string x-example: 'Europe/Zurich' - name: external_id in: query description: Filter payments based on external ID. required: false type: string maxLength: 32 - name: property_id in: query description: Filter payments based on external `property_id`. required: false type: string maxLength: 32 Responses: '200': description: List of payment item objects. schema: type: object properties: items: type: array description: List of ExportPaymentItem objects. items: $ref: api_definitions.yaml#/definitions/ExportPaymentItem pagination: $ref: api_definitions.yaml#/definitions/Pagination type: object '400': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error400 '401': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error401 '403': description: Invalid privileges error. schema: $ref: api_definitions.yaml#/definitions/Error403 '404': description: Not found error. schema: $ref: api_definitions.yaml#/definitions/Error404 '500': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error500 '501': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error501 ``` -------------------------------- ### Get Processing Summary Report Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Retrieves the agency processing summary report, which is cached for one hour. Allows filtering by date range. Includes detailed error responses for various scenarios. ```APIDOC /report/processing-summary: get: description: | Return agency processing summary. The report is cached for an hour. operationId: get_processing_summary_report parameters: - description: Show report from given date (e.g. 2020-01-01). Defaults to today. format: date in: query name: from_date required: false type: string - description: Show report to given date (e.g. 2020-01-31). Defaults to today. format: date in: query name: to_date required: false type: string responses: '200': description: Processing summary report. schema: $ref: api_definitions.yaml#/definitions/ProcessingSummaryReport '400': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error400 '401': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error401 '403': description: Invalid privileges error. schema: $ref: api_definitions.yaml#/definitions/Error403 '404': description: Not found error. schema: $ref: api_definitions.yaml#/definitions/Error404 '500': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error500 '501': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error501 summary: Processing summary tags: - Reports ``` -------------------------------- ### Get Payment Data Export Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Retrieves payment data for export. Supports filtering by beneficiary information, category, and maintenance ticket ID. Returns a list of payment items and pagination details. ```APIDOC /export/payments GET: summary: Get payment data export tags: - Export parameters: - name: include_beneficiary_info in: query description: Include payment target beneficiary info. required: false type: boolean - name: category_id in: query description: 'Payment category ID. Ref: [/api/docs/agency?version=v1.1#operation/get_payment_categories](/api/docs/agency#operation/get_payment_categories).' required: false type: string - name: maintenance_ticket_id in: query description: Filter payments based on `maintenance_ticket_id`. required: false type: string maxLength: 32 responses: '200': description: List of payment item objects. schema: type: object properties: items: type: array description: List of ExportPaymentItem objects. items: $ref: api_definitions.yaml#/definitions/ExportPaymentItem pagination: $ref: api_definitions.yaml#/definitions/Pagination type: object '400': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error400 '401': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error401 '403': description: Invalid privileges error. schema: $ref: api_definitions.yaml#/definitions/Error403 '404': description: Not found error. schema: $ref: api_definitions.yaml#/definitions/Error404 '500': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error500 '501': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error501 ``` -------------------------------- ### Tenant Entity API Operations Source: https://github.com/inverskproperty/payprop-api-spec/blob/main/api_spec.md Provides endpoints for creating, retrieving, and updating tenant entities. Includes detailed request and response schemas, parameter descriptions, and error handling for various HTTP status codes. ```APIDOC POST /entity/tenant: summary: Create tenant description: Create tenant operationId: create_tenant tags: - Tenant Entity parameters: - description: Tenant to create. in: body name: tenant schema: $schema: http://json-schema.org/schema# additionalProperties: 0 properties: account_type: description: This determines how the tenant is addressed on their communications. Individuals are addressed by the `first_name` and `last_name` field, whereas a business is addressed by the `business_name` field. enum: - individual - business type: string address: $schema: http://json-schema.org/schema# properties: city: type: string country: type: string postal_code: type: string street: type: string street_number: type: string type: object business_name: maxLength: 100 type: string email: maxLength: 100 type: string external_id: maxLength: 32 type: string first_name: minLength: 2 type: string has_bank_account: type: boolean invoice_day: description: The day of the month that invoices are generated. If this is not set, the invoice day is taken from the `invoice_day` of the `customer`. maximum: 31 type: integer last_name: minLength: 2 type: string mobile_number: description: The mobile phone number you would like receive notifications regarding this tenant. maxLength: 15 type: - string - 'null' notify_email: type: boolean notify_sms: type: boolean phone: maxLength: 15 type: string vat_number: maxLength: 50 type: string type: object '400': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error400 '401': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error401 '403': description: Invalid privileges error. schema: $ref: api_definitions.yaml#/definitions/Error403 '404': description: Not found error. schema: $ref: api_definitions.yaml#/definitions/Error404 '500': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error500 '501': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error501 GET /entity/tenant/{external_id}: summary: Get tenant description: Get tenant operationId: get_tenant tags: - Tenant Entity parameters: - description: External ID of tenant. in: path maxLength: 32 name: external_id required: true type: string - description: Lookup entity based on given customer ID by overriding route `external_id`. in: query name: is_customer_id required: false type: boolean responses: '200': description: Retrieved tenant. schema: *18 '400': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error400 '401': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error401 '403': description: Invalid privileges error. schema: $ref: api_definitions.yaml#/definitions/Error403 '404': description: Not found error. schema: $ref: api_definitions.yaml#/definitions/Error404 '500': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error500 '501': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error501 PUT /entity/tenant/{external_id}: summary: Update tenant description: Update tenant operationId: update_tenant tags: - Tenant Entity consumes: - application/json parameters: - description: Tenant to update. in: body name: tenant schema: $schema: http://json-schema.org/schema# additionalProperties: 0 allOf: - if: properties: account_type: const: individual then: properties: first_name: minLength: 2 last_name: minLength: 2 - if: properties: account_type: const: business then: properties: business_name: minLength: 2 - if: properties: has_bank_account: const: 1 then: properties: bank_account: {} - if: properties: mobile_number: minLength: 1 then: properties: mobile_number: pattern: ^[1-9]\d+$ properties: account_type: description: This determines how the tenant is addressed on their communications. Individuals are addressed by the `first_name` and `last_name` field, whereas a business is addressed by the `business_name` field. enum: - individual - business type: string address: $schema: http://json-schema.org/schema# properties: city: type: string country: type: string postal_code: type: string street: type: string street_number: type: string type: object business_name: maxLength: 100 type: string email: maxLength: 100 type: string external_id: maxLength: 32 type: string first_name: minLength: 2 type: string has_bank_account: type: boolean invoice_day: description: The day of the month that invoices are generated. If this is not set, the invoice day is taken from the `invoice_day` of the `customer`. maximum: 31 type: integer last_name: minLength: 2 type: string mobile_number: description: The mobile phone number you would like receive notifications regarding this tenant. maxLength: 15 type: - string - 'null' notify_email: type: boolean notify_sms: type: boolean phone: maxLength: 15 type: string vat_number: maxLength: 50 type: string type: object '400': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error400 '401': description: Bad request errors. schema: $ref: api_definitions.yaml#/definitions/Error401 '403': description: Invalid privileges error. schema: $ref: api_definitions.yaml#/definitions/Error403 '404': description: Not found error. schema: $ref: api_definitions.yaml#/definitions/Error404 '500': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error500 '501': description: Not implemented error. schema: $ref: api_definitions.yaml#/definitions/Error501 ```