Skip to main content

Bexio Destination

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a sync or streaming data flow that sends data to a Bexio location.
bexio_api.png

Bexio

Create a Bexio Destination

  1. Click the + icon on the Nexset that will be sent to the Bexio destination, and select the Send to Destination option from the menu.

  2. Select the Bexio connector from the list of available destination connectors. Then, select the credential that will be used to connect to the Bexio organization, and click Next; or, create a new Bexio credential for use in this flow.

  3. In Nexla, Bexio destinations can be created using pre-built endpoint templates, which expedite destination setup for common Bexio endpoints. Each template is designed specifically for the corresponding Bexio endpoint, making destination configuration easy and efficient.
    • To configure this destination using a template, follow the instructions in Configure Using a Template.

    Bexio destinations can also be configured manually, allowing you to send data to Bexio endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this destination manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Bexio endpoints. Each template is designed specifically for the corresponding Bexio endpoint, making destination setup easy and efficient.

  • To configure this destination using a template, select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

    Create Resources

    This endpoint creates a new resource of the selected type in your Bexio account. Use this endpoint when you need to create contacts, quotes, orders, invoices, bills, expenses, or purchase orders from your data sources.

    • Select the API version from the Version Number dropdown menu. Available options are:

      • 2.0: Bexio API v2.0 (default)
      • 3.0: Bexio API v3.0
      • 4.0: Bexio API v4.0

      The default value is 2.0 if not specified. You can also add custom version numbers if needed.

    • Select the resource type you want to create from the Resource Type dropdown menu. Available options include:

      • contact: Create contact
      • quote: Create quote (kb_offer)
      • order: Create order (kb_order, default)
      • invoice: Create invoice (kb_invoice)
      • bill: Create bill (purchase/bills)
      • expense: Create expense
      • purchase order: Create purchase order (purchase_orders)

      The default value is order if not specified. You can also add custom resource types if needed.

    • The endpoint uses POST requests to https://api.bexio.com/{'{version}'}/{'{resource_type}'} where {version} is the API version and {resource_type} is the selected resource type. The endpoint URL is automatically constructed based on the version and resource type you select.
    • The endpoint sends data from your Nexset as the request body in JSON format. Each record in your Nexset will be sent as a JSON object containing the resource data to create. The request body should follow the Bexio API specification for creating resources, including required fields and field names.
    • Batch mode is disabled by default for this endpoint. Each record in your Nexset will be sent as a separate API request to create a resource. If you need to create multiple resources, you can send multiple records, but each will be processed as a separate request.

    The request body must be properly formatted JSON that matches the Bexio API specification for creating the selected resource type. The endpoint requires Bearer token authentication in the Authorization header, which is handled automatically by your credential configuration. The Content-Type: application/json header is automatically included in requests. Batch mode is disabled by default (batch.mode: false), so each record will be sent as a separate request. You can add custom API versions and resource types if needed. For detailed information about creating resources, including required fields, field names, and request formats for each resource type, see the Bexio API documentation.

    Create resource from order

    This endpoint creates a new resource (delivery or invoice) from an existing order in your Bexio account. Use this endpoint when you need to create deliveries or invoices based on existing orders.

    • Select the resource type you want to create from the order from the Resource Type dropdown menu. Available options include:

      • delivery: Create delivery from order (default)
      • invoice: Create invoice from order

      The default value is delivery if not specified. You can also add custom resource types if needed.

    • Enter the unique identifier of the order in the Resource ID field. This is the ID of the existing order from which you want to create the delivery or invoice.

    • The endpoint uses POST requests to https://api.bexio.com/2.0/kb_order/{'{resource_id}'}/{'{resource_type}'} where {resource_id} is the order ID and {resource_type} is the selected resource type (delivery or invoice). The endpoint URL is automatically constructed based on the order ID and resource type you provide.
    • The endpoint sends data from your Nexset as the request body in JSON format. The request body should follow the Bexio API specification for creating resources from orders, including required fields and field names.
    • Batch mode is disabled by default for this endpoint. Each record in your Nexset will be sent as a separate API request to create a resource from an order.

    Order IDs can be obtained from the "Fetch a list of resources" data source endpoint by selecting "orders" as the resource type, which returns all orders with their corresponding IDs. The request body must be properly formatted JSON that matches the Bexio API specification for creating resources from orders. The endpoint requires Bearer token authentication in the Authorization header, which is handled automatically by your credential configuration. The Content-Type: application/json header is automatically included in requests. Batch mode is disabled by default (batch.mode: false), so each record will be sent as a separate request. The endpoint uses API version 2.0 by default. For detailed information about creating resources from orders, including required fields, field names, and request formats, see the Bexio API documentation.

Configure Manually

Bexio destinations can be manually configured to send data to any valid Bexio API endpoint. Manual configuration provides maximum flexibility for accessing endpoints not covered by pre-built templates or when you need custom API configurations.

Using manual configuration, you can also configure Nexla to automatically send the response received from the Bexio API after each call to a new Nexla webhook data source.

API Method

  1. To manually configure this destination, select the Advanced tab at the top of the configuration screen.

  2. Select the API method that will be used for calls to the Bexio API from the Method pulldown menu. The Bexio API primarily uses POST requests for data writing operations. The most common methods are:

    • POST: For creating new resources (e.g., creating contacts, orders, invoices)
    • PUT: For updating existing data
    • PATCH: For partial updates to existing data
    • DELETE: For removing data

Data Format

  1. Select the format in which the Nexset data will be sent to the Bexio API from the Content Format pulldown menu. Nexla will automatically convert the data to the selected format for each API call. The Bexio API typically uses JSON format for request bodies.

API Endpoint URL

  1. Enter the URL of the Bexio API endpoint to which you want to send the Nexset data in the URL field. This should be the complete URL including the protocol (https://) and any required path parameters. Bexio API endpoints typically follow the pattern https://api.bexio.com/{'{version}'}/{'{resource_type}'} for creating resources or https://api.bexio.com/2.0/kb_order/{'{order_id}'}/{'{resource_type}'} for creating resources from orders.

Ensure the API endpoint URL is correct and accessible with your current credentials. You can test the endpoint using the Test button after configuring the URL. The endpoint requires Bearer token authentication in the Authorization header, which is handled automatically by your credential configuration. For detailed information about Bexio API endpoints and available APIs, see the Bexio API documentation.

Request Headers

Optional
  • If Nexla should include any additional request headers in API calls to this destination, enter the headers & corresponding values as comma-separated pairs in the Request Headers field (e.g., header1:value1,header2:value2). Additional headers are often required for API versioning, content type specifications, or custom authentication requirements.

    You do not need to include any headers already present in the credentials. Common headers like Authorization (Bearer token), Content-Type, and Accept are typically handled automatically by Nexla based on your credential configuration. The Bexio API requires Bearer token authentication in the Authorization header, which is handled automatically by your credential configuration. The Content-Type: application/json header is typically set automatically for JSON request bodies.

Request Body

Optional
  • If the API endpoint requires a specific request body format, configure how Nexla should format the request body from your Nexset data. The request body can be sent as JSON, XML, or form data, depending on the API endpoint requirements.

    • For JSON format, select JSON from the Request Body Format dropdown, and the Nexset data will be sent as a JSON object in the request body. Bexio API endpoints typically use JSON format for request bodies.

    • For XML format, select XML from the Request Body Format dropdown, and the Nexset data will be converted to XML format in the request body.

    • For Form data format, select Form Data from the Request Body Format dropdown, and the Nexset data will be sent as form-encoded data in the request body.

Save the Destination

  1. Once all configuration steps have been completed, click the Save button to save your destination configuration.

  2. The destination will now be available in your data flow and will begin sending data to the Bexio endpoint according to the configured settings.