### Ruby API Request Example Source: https://docs.froda.se/reference/transaction-upload-sessions Provides a Ruby example for making API calls using the 'httparty' gem. It covers GET requests with authorization headers. ```ruby require 'httparty' response = HTTParty.get('https://api.example.com/data', headers: { 'Authorization' => 'Bearer YOUR_API_KEY' }) if response.success? puts response.parsed_response else puts "Error: #{response.code}" end ``` -------------------------------- ### Create Product Account Response Source: https://docs.froda.se/reference/loans-1 Defines the response structure for creating a product account. ```APIDOC ## Create Product Account Response ### Description This object represents the response returned after successfully creating a product account. ### Method N/A (This is a response schema definition) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **id** (string) - The unique identifier for the created product account. #### Response Example ```json { "id": "acc_123abc" } ``` ``` -------------------------------- ### Getting Started Documentation Source: https://docs.froda.se/reference/invoice-offers-1 Link to the 'Getting Started' section of the Froda API documentation. This typically covers initial setup and basic usage. ```link /branches/1.0/reference/getting-started ``` -------------------------------- ### Shell: API Request Example Source: https://docs.froda.se/reference/transaction-upload-sessions-1 Example of how to make an API request using Shell. This snippet demonstrates basic command-line interaction. ```shell curl "https://api.example.com/data" -H "Accept: application/json" ``` -------------------------------- ### POST /organizations Source: https://docs.froda.se/reference/loans-1 Create a new organization. This is the first step in onboarding a new customer. The request structure varies based on the country code and legal type of the organization. For German organizations, different schemas are required based on the legal type (GmbH or Einzelkaufmann). ```APIDOC ## POST /organizations ### Description Create a new organization. This is the first step in onboarding a new customer. The request structure varies based on the country code and legal type of the organization. For German organizations, different schemas are required based on the legal type (GmbH or Einzelkaufmann). ### Method POST ### Endpoint /organizations ### Parameters #### Request Body - **registration_number** (string) - Required - The registration number of the organization. - **country_code** (string) - Required - The country code of the organization (SE, DK, FI, NO, GB, DE, IE). - **customer_since** (string) - Required - The date the customer relationship began (YYYY-MM-DD). - **reference** (string) - Required - A reference identifier for the organization. ### Request Example ```json { "registration_number": "1234567-8", "country_code": "SE", "customer_since": "2023-01-01", "reference": "CustomerABC" } ``` ### Response #### Success Response (201) - **id** (string) - The unique identifier of the created organization. #### Response Example ```json { "id": "org_12345abcde" } ``` #### Error Response (400) - **type** (string, nullable) - - **title** (string, nullable) - - **status** (integer, nullable) - - **detail** (string, nullable) - - **instance** (string, nullable) - #### Error Response Example ```json { "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1", "title": "One or more validation errors occurred.", "status": 400, "detail": "The field 'registration_number' is required.", "instance": "/organizations" } ``` ``` -------------------------------- ### Get Loan Repayment Schedule (OpenAPI GET) Source: https://docs.froda.se/reference/paymentorders-1 Details the GET request for retrieving a loan's repayment schedule. It specifies path and query parameters, including loan ID, start date, and end date, along with the expected 200 OK response structure. ```json { "tags": [ "Loans" ], "description": "Retrieve the repayment schedule for a specific loan within a date range, including future payments.", "parameters": [ { "name": "loan-id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "from-date", "in": "query", "schema": { "type": "string", "format": "date-time" } }, { "name": "to-date", "in": "query", "schema": { "type": "string", "format": "date-time" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "required": [ "schedule" ], "type": "object", "properties": { "schedule": { "type": "array", "items": { "required": [ "due_date", "amount" ], "type": "object", "properties": { "due_date": { "type": "string", "format": "date-time" }, "amount": { "type": "number", "format": "double" } }, "x-readme-ref-name": "PaymentScheduleItem" } } }, "x-readme-ref-name": "GetLoanScheduleResponse" } } } } } } ``` -------------------------------- ### Get Organization Credit Limit - HTTP Request Example Source: https://docs.froda.se/reference/withdrawalrequests-2 Demonstrates how to retrieve the credit limit details for a specific organization using an HTTP GET request. This includes the organization ID in the path and expects a JSON response. ```HTTP GET /organizations/{organization-id}/limit HTTP/1.1 Host: api.froda.se Accept: application/json ``` -------------------------------- ### Create Product Account Request/Response Objects Source: https://docs.froda.se/reference/paymentorders-1 Defines the structure for creating a product account, including its unique identifier. The request object specifies the details needed to create an account, while the response confirms the creation with an account ID. ```json { "type": "object", "x-readme-ref-name": "CreateProductAccountRequest" }, { "required": [ "id" ], "type": "object", "properties": { "id": { "type": "string" } }, "x-readme-ref-name": "CreateProductAccountResponse" } ``` -------------------------------- ### GET /loans/{loan-id}/schedule Source: https://docs.froda.se/reference/get_loans-loan-id-schedule Retrieves the repayment schedule for a specific loan. You can optionally filter the schedule by providing a start and end date. ```APIDOC ## GET /loans/{loan-id}/schedule ### Description Retrieve the repayment schedule for a specific loan within a date range, including future payments. ### Method GET ### Endpoint /loans/{loan-id}/schedule ### Parameters #### Path Parameters - **loan-id** (string) - Required - The unique identifier of the loan. #### Query Parameters - **startDate** (string) - Optional - The start date for filtering the schedule (YYYY-MM-DD). - **endDate** (string) - Optional - The end date for filtering the schedule (YYYY-MM-DD). ### Response #### Success Response (200) - **schedule** (array) - An array of payment objects, each containing details like payment date, amount, and status. - **paymentDate** (string) - The date of the payment. - **amount** (number) - The amount of the payment. - **status** (string) - The status of the payment (e.g., 'paid', 'due', 'upcoming'). #### Response Example ```json { "schedule": [ { "paymentDate": "2023-10-26", "amount": 150.75, "status": "paid" }, { "paymentDate": "2023-11-26", "amount": 150.75, "status": "due" } ] } ``` ``` -------------------------------- ### POST /organizations Source: https://docs.froda.se/reference/productaccounts-1 Creates a new organization. This is the initial step for onboarding a new customer. The request schema adapts to the organization's country code and legal type. For German organizations, specific schemas are enforced for GmbH and Einzelkaufmann legal types. ```APIDOC ## POST /organizations ### Description Creates a new organization. This is the first step in onboarding a new customer. The request structure varies based on the country code and legal type of the organization. For German organizations, different schemas are required based on the legal type (GmbH or Einzelkaufmann). ### Method POST ### Endpoint /organizations ### Parameters #### Request Body - **registration_number** (string) - Required - The registration number of the organization. - **country_code** (string) - Required - The country code of the organization. Allowed values: SE, DK, FI, NO, GB, DE, IE. - **customer_since** (string) - Required - The date the customer relationship started, in YYYY-MM-DD format. - **reference** (string) - Required - A reference identifier for the organization. ### Request Example ```json { "registration_number": "1234567-89", "country_code": "SE", "customer_since": "2023-01-15", "reference": "CustomerRef001" } ``` ### Response #### Success Response (201) - **id** (string) - The unique identifier of the created organization. #### Response Example ```json { "id": "org_abc123def456" } ``` #### Error Response (400) - **type** (string, nullable) - The type of the error. - **title** (string, nullable) - The title of the error. - **status** (integer, nullable) - The HTTP status code. - **detail** (string, nullable) - A detailed explanation of the error. - **instance** (string, nullable) - An instance identifier for the error. ``` -------------------------------- ### Create Product Account Request and Response Source: https://docs.froda.se/reference/limitrequests-2 Specifies the request and response formats for creating a product account. The response includes a unique account ID. ```json { "type": "object", "x-readme-ref-name": "CreateProductAccountRequest" } ``` ```json { "required": [ "id" ], "type": "object", "properties": { "id": { "type": "string" } }, "x-readme-ref-name": "CreateProductAccountResponse" } ``` -------------------------------- ### GET /loans/{loan-id}/transactions Source: https://docs.froda.se/reference/get_loans-loan-id-transactions Retrieve a list of transactions associated with a specific loan within a date range. This endpoint allows you to fetch transaction history for a given loan, optionally filtering by a start and end date. ```APIDOC ## GET /loans/{loan-id}/transactions ### Description Retrieve a list of transactions associated with a specific loan within a date range. ### Method GET ### Endpoint /loans/{loan-id}/transactions ### Parameters #### Path Parameters - **loan-id** (string) - Required - The unique identifier for the loan. #### Query Parameters - **from-transaction-date** (string) - Optional - The start date for filtering transactions (ISO 8601 format). - **to-transaction-date** (string) - Optional - The end date for filtering transactions (ISO 8601 format). ### Request Example ```json { "example": "GET https://partner-api.froda.se/engagement-test/v1/loans/some-loan-id/transactions?from-transaction-date=2023-01-01T00:00:00Z&to-transaction-date=2023-12-31T23:59:59Z" } ``` ### Response #### Success Response (200) - **transactions** (array) - A list of transaction objects. - **id** (string) - The unique identifier for the transaction. - **type** (string) - The type of transaction (e.g., "payment", "fee"). - **principal** (integer) - The principal amount of the transaction. - **currency** (string) - The currency of the transaction (e.g., "SEK"). - **booking_date** (string) - The date and time the transaction was booked. - **transaction_date** (string) - The date and time the transaction occurred. - **reference** (string) - A reference identifier for the transaction. - **source** (string) - The source of the transaction. #### Response Example ```json { "transactions": [ { "id": "txn_abc123", "type": "payment", "principal": 10000, "currency": "SEK", "booking_date": "2023-05-15T10:00:00Z", "transaction_date": "2023-05-15T09:30:00Z", "reference": "REF456", "source": "system" } ] } ``` ``` -------------------------------- ### Ruby: API Request Example Source: https://docs.froda.se/reference/transaction-upload-sessions-1 Example of how to make an API request using Ruby. This snippet shows how to use the built-in Net::HTTP library. ```ruby require 'net/http' require 'uri' uri = URI.parse('https://api.example.com/data') request = Net::HTTP::Get.new(uri.request_uri) request['Accept'] = 'application/json' response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http| http.request(request) end puts response.body ``` -------------------------------- ### GET /loans/{loan-id}/schedule Source: https://docs.froda.se/reference/withdrawalrequests-2 Retrieve the repayment schedule for a specific loan within a date range, including future payments. This endpoint allows users to query the scheduled payments for a given loan by specifying a start and end date. ```APIDOC ## GET /loans/{loan-id}/schedule ### Description Retrieve the repayment schedule for a specific loan within a date range, including future payments. ### Method GET ### Endpoint /loans/{loan-id}/schedule ### Parameters #### Path Parameters - **loan-id** (string) - Required - The unique identifier for the loan. #### Query Parameters - **from-date** (string) - Optional - The start date for the schedule query (ISO 8601 format). - **to-date** (string) - Optional - The end date for the schedule query (ISO 8601 format). ### Request Example ```json { "loan-id": "string", "from-date": "YYYY-MM-DDTHH:mm:ssZ", "to-date": "YYYY-MM-DDTHH:mm:ssZ" } ``` ### Response #### Success Response (200) - **schedule** (array) - An array of payment objects, each containing a due date and amount. - **due_date** (string) - The due date of the payment (ISO 8601 format). - **amount** (number) - The amount due for the payment. #### Response Example ```json { "schedule": [ { "due_date": "2023-10-26T00:00:00Z", "amount": 1500.50 }, { "due_date": "2023-11-26T00:00:00Z", "amount": 1500.50 } ] } ``` #### Error Response (404) - **type** (string) - The type of the problem. - **title** (string) - A short, human-readable summary of the problem. - **status** (integer) - The HTTP status code. - **detail** (string) - A human-readable explanation specific to this occurrence of the problem. - **instance** (string) - A URI reference that identifies the specific occurrence of the problem. ``` -------------------------------- ### Create Product Account Source: https://docs.froda.se/reference/productaccounts-1 Creates a new product account. Requires specifying the account ID. ```APIDOC ## POST /api/products/accounts ### Description Creates a new product account. This endpoint is used to provision new accounts for products. ### Method POST ### Endpoint /api/products/accounts ### Parameters #### Request Body - **id** (string) - Required - The unique identifier for the new product account. ### Request Example { "id": "acc_12345" } ### Response #### Success Response (200) - **id** (string) - The ID of the created product account. #### Response Example { "id": "acc_12345" } ``` -------------------------------- ### GET /branches/1.0/reference/getorganizationv2 Source: https://docs.froda.se/reference/limitrequests Gets an organization. ```APIDOC ## GET /branches/1.0/reference/getorganizationv2 ### Description Gets an organization. ### Method GET ### Endpoint /branches/1.0/reference/getorganizationv2 ### Parameters ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### Froda SE API: Get Organization User (GET) Source: https://docs.froda.se/reference/bank-cards Endpoint to retrieve information about a specific user within an organization. This is a GET request. ```HTTP GET /branches/1.0/reference/getorganizationuser-1 ``` -------------------------------- ### Integration Settings (Recaptcha, Segment, Speakeasy, Stainless) Source: https://docs.froda.se/reference/bank-cards Configuration details for Recaptcha, Segment, Speakeasy, and Stainless integrations. Site keys, secret keys, and API keys are not provided, suggesting these services are either not actively used or configured elsewhere. ```json { "integrations": { "recaptcha": { "site_key": null, "secret_key": null }, "segment": { "key": null, "domain": null }, "speakeasy": { "key": null, "spec_url": null }, "stainless": { "key": null, "name": null } } } ``` -------------------------------- ### POST /organizations Source: https://docs.froda.se/reference/organizations-4 Create a new organization. This is the first step in onboarding a new customer. The request structure varies based on the country code and legal type of the organization. ```APIDOC ## POST /organizations ### Description Create a new organization. This is the first step in onboarding a new customer. The request structure varies based on the country code and legal type of the organization. For German organizations, different schemas are required based on the legal type (GmbH or Einzelkaufmann). ### Method POST ### Endpoint /organizations ### Parameters #### Request Body - **registration_number** (string) - Required - The registration number of the organization. - **country_code** (string) - Required - The country code of the organization (SE, DK, FI, NO, GB, DE, IE). - **customer_since** (string) - Required - The date the customer relationship started (date format). - **reference** (string) - Required - A reference identifier for the organization. ### Request Example { "registration_number": "1234567-8", "country_code": "SE", "customer_since": "2023-01-15", "reference": "Org-Ref-123" } ### Response #### Success Response (201) - **id** (string) - The unique identifier of the created organization. #### Response Example { "id": "org_abc123" } ``` -------------------------------- ### GET /branches/1.0/reference/getpurchasefinanceorganization-1 Source: https://docs.froda.se/reference/organizations-1 Get an organization. ```APIDOC ## GET /branches/1.0/reference/getpurchasefinanceorganization-1 ### Description Retrieves an organization. ### Method GET ### Endpoint /branches/1.0/reference/getpurchasefinanceorganization-1 ### Parameters ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Froda.se Project Settings Source: https://docs.froda.se/reference/transaction-upload-sessions-1 Configures project-specific settings for Froda.se, including AI features, landing page behavior, and reference documentation display modes. ```json { "project": { "_id": "65c4d411db6e010040bce214", "ai": { "chat": { "knowledge": { "custom_knowledge": null, "use_project_knowledge": false }, "models": [] } }, "global_landing_page": { "html": "", "redirect": "" }, "allowApiExplorerJsonEditor": false, "referenceSimpleMode": true, "referenceLayout": "row", "link_logo_to_url": true, "theme": "solid", "colorScheme": "light", "overlay": "grain", "landing": true, "sticky": false, "hide_logo": false, "childrenAsPills": false, "subheaderStyle": "links", "splitReferenceDocs": true, "showMetricsInReference": false } } ``` -------------------------------- ### GET /branches/1.0/reference/getorganization-1 Source: https://docs.froda.se/reference/organizations Gets an organization. ```APIDOC ## GET /branches/1.0/reference/getorganization-1 ### Description Gets an organization. ### Method GET ### Endpoint /branches/1.0/reference/getorganization-1 ### Parameters #### Path Parameters - **None** #### Query Parameters - **None** #### Request Body - **None specified** ### Request Example - **None specified** ### Response #### Success Response (200) - **None specified** #### Response Example - **None specified** ``` -------------------------------- ### Integration Settings (Typekit, Zendesk, Intercom) Source: https://docs.froda.se/reference/bank-cards This snippet shows the integration settings for Typekit, Zendesk, and Intercom. API keys and subdomains are null, and Intercom's secure mode key is also not set. ```json { "integrations": { "typekit": { "key": null }, "zendesk": { "subdomain": null }, "intercom": { "app_id": null, "secure_mode": { "key": null, "email_only": false } } } } ``` -------------------------------- ### GET /branches/1.0/reference/getorganizationv2 Source: https://docs.froda.se/reference/index Gets an organization. ```APIDOC ## GET /branches/1.0/reference/getorganizationv2 ### Description Gets an organization. ### Method GET ### Endpoint /branches/1.0/reference/getorganizationv2 ### Parameters #### Path Parameters #### Query Parameters #### Request Body ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Python API Request Example Source: https://docs.froda.se/reference/transaction-upload-sessions Demonstrates making API requests in Python using the 'requests' library. It includes setting the Authorization header for secure access. ```python import requests url = "https://api.example.com/data" headers = { "Authorization": "Bearer YOUR_API_KEY" } try: response = requests.get(url, headers=headers) response.raise_for_status() # Raise an exception for bad status codes print(response.json()) except requests.exceptions.RequestException as e: print(f"Error fetching data: {e}") ``` -------------------------------- ### GET /branches/1.0/reference/getorganizationuser-1 Source: https://docs.froda.se/reference/organizations Gets a user of an organization. ```APIDOC ## GET /branches/1.0/reference/getorganizationuser-1 ### Description Gets a user of an organization. ### Method GET ### Endpoint /branches/1.0/reference/getorganizationuser-1 ### Parameters #### Path Parameters - **None** #### Query Parameters - **None** #### Request Body - **None specified** ### Request Example - **None specified** ### Response #### Success Response (200) - **None specified** #### Response Example - **None specified** ``` -------------------------------- ### Configure SuperHub and Wootric Settings Source: https://docs.froda.se/reference/organizations-3 This snippet shows settings for 'superHub' to enable new projects and for 'wootric' to configure account tokens and enable the service. ```json { "superHub": { "newProjectsEnabled": true }, "wootric": { "accountToken": "NPS-122b75a4", "enabled": true } } ``` -------------------------------- ### GET /loans/{loan-id}/transactions Source: https://docs.froda.se/reference/withdrawalrequests Get all transactions associated with a specific loan. ```APIDOC ## GET /loans/{loan-id}/transactions ### Description Retrieves all transactions associated with a specific loan. ### Method GET ### Endpoint /loans/{loan-id}/transactions ### Parameters #### Path Parameters - **loan-id** (string) - Required - The unique identifier of the loan. ### Response #### Success Response (200) - **field1** (type) - Description ``` -------------------------------- ### PUT /branches/1.0/reference/createcompany Source: https://docs.froda.se/reference/loans-1 Create a company/organization. ```APIDOC ## PUT /branches/1.0/reference/createcompany ### Description Create a company/organization. ### Method PUT ### Endpoint /branches/1.0/reference/createcompany ### Parameters ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### GET /branches/1.0/reference/getorganizationv2 Source: https://docs.froda.se/reference/withdrawalrequests Gets an organization. This endpoint retrieves details for a specific organization. ```APIDOC ## GET /branches/1.0/reference/getorganizationv2 ### Description Gets an organization. ### Method GET ### Endpoint /branches/1.0/reference/getorganizationv2 ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None (isBodyEmpty: true) ### Request Example (No request body) ### Response #### Success Response (200) (Details not provided in source) #### Response Example (No response example provided) ``` -------------------------------- ### GET /reference/getwithdrawalrequeststatus Source: https://docs.froda.se/reference/organizations Gets the status of a withdrawal request. ```APIDOC ## GET /reference/getwithdrawalrequeststatus ### Description Gets the status of a withdrawal request. ### Method GET ### Endpoint /reference/getwithdrawalrequeststatus ``` -------------------------------- ### Onboarding Status for Froda Project Source: https://docs.froda.se/reference/bank-accounts Tracks the completion status of different onboarding steps for the Froda project, including API, appearance, documentation, domain, and JWT setup. ```json { "onboarding_completed": { "api": true, "appearance": true, "documentation": true, "domain": true, "jwt": false, "logs": false, "metricsSDK": false } } ``` -------------------------------- ### Create Product Account Source: https://docs.froda.se/reference/transactionrequests Allows the creation of a new product account. ```APIDOC ## POST /product-accounts ### Description Creates a new product account. ### Method POST ### Endpoint /product-accounts ### Parameters #### Request Body - **id** (string) - Required - The unique identifier for the product account. ### Request Example ```json { "id": "account_123" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the created product account. #### Response Example ```json { "id": "account_123" } ``` ``` -------------------------------- ### GET /branches/1.0/reference/getpurchasefinanceorganization-1 Source: https://docs.froda.se/reference/transactionrequests Gets an organization. This endpoint is part of the Purchase Financing API V1. ```APIDOC ## GET /branches/1.0/reference/getpurchasefinanceorganization-1 ### Description Gets an organization. ### Method GET ### Endpoint /branches/1.0/reference/getpurchasefinanceorganization-1 ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None (isBodyEmpty: true) ### Request Example None ### Response #### Success Response (200) None (isBodyEmpty: true) #### Response Example None ``` -------------------------------- ### GET /reference/getloandetails Source: https://docs.froda.se/reference/paymentorders-1 This endpoint retrieves the detailed information for a specific loan. It is a GET request. ```APIDOC ## GET /reference/getloandetails ### Description Retrieves the details of a specific loan. ### Method GET ### Endpoint /reference/getloandetails ### Parameters #### Query Parameters - **loanId** (string) - Required - The ID of the loan whose details are to be retrieved. ### Request Example ``` /reference/getloandetails?loanId=loan_xyz789 ``` ### Response #### Success Response (200) - **loanId** (string) - The unique identifier for the loan. - **companyId** (string) - The ID of the company associated with the loan. - **loanAmount** (number) - The amount of the loan. - **interestRate** (number) - The interest rate for the loan. - **dueDate** (string) - The due date for the loan (YYYY-MM-DD). - **status** (string) - The current status of the loan. #### Response Example ```json { "loanId": "loan_xyz789", "companyId": "comp_12345abc", "loanAmount": 50000.00, "interestRate": 0.05, "dueDate": "2024-12-31", "status": "active" } ``` ``` -------------------------------- ### API Response Placeholder Source: https://docs.froda.se/reference/bank-cards Displays a message instructing users to 'Try It!' to initiate a request and see the API response. This is a common UI pattern in API documentation playgrounds. ```html
Try It! to start a request and see the response here!