Skip to main content

2ememain

2ememain is the Belgian market leader in online classifieds, providing a platform for buying and selling cars, clothes, construction materials, furniture, and other goods through user-generated listings.

2ememain icon

Power end-to-end data operations for your 2ememain API with Nexla. Our bi-directional 2ememain connector is purpose-built for 2ememain, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to 2ememain or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your 2ememain workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

Before creating a 2ememain credential, you need to register an application in your 2ememain account and obtain your Client ID and Client Secret. 2ememain uses OAuth2 3-legged authentication for all API requests, requiring user authorization to obtain an access token.

To obtain your 2ememain credentials, follow these steps:

  1. Sign in to your 2ememain account using your administrator credentials.

  2. Navigate to your account settings or developer section in the 2ememain interface.

  3. Look for the API or Developer section in your account settings, or navigate to Settings > API or Developer > API Settings.

  4. If you don't have API credentials yet, look for the option to create or register an OAuth application.

  5. Click Create OAuth App or Register Application to create a new OAuth application for API access.

  6. Configure your OAuth application settings:

    • Enter a name for the application (e.g., "Nexla Integration")
    • Enter an application description (optional)
    • Review and select the permissions or scopes for the application (if applicable)
  7. Click Create or Register to create the OAuth application.

  8. After the application is created, you will be provided with your Client ID and Client Secret. Copy both credentials immediately, as the Client Secret may not be accessible again after you navigate away from the page.

  9. Store both credentials securely, as you will need them to configure your Nexla credential. The Client ID and Client Secret are sensitive information and should be kept confidential.

The Client ID and Client Secret are used in the OAuth2 3-legged authorization flow. During credential creation in Nexla, you will be redirected to 2ememain to authorize the application. After authorization, 2ememain will provide an access token that is used in the Authorization: Bearer {token} header for all API requests to the 2ememain API. The token authenticates your requests and grants access to 2ememain resources based on the scopes you configured for your application. If your credentials are compromised, you should immediately revoke them in your 2ememain account settings and generate new ones. For detailed information about registering applications, OAuth2 authentication, and available endpoints, refer to the 2ememain API documentation.

Authenticate

Credentials required

FieldRequiredSecretDescription
Client IDYesYes2ememain Client ID
Access ScopeNoNo2ememain Access Scope
Client SecretYesYes2ememain Client Secret for Token URL

Create a credential in Nexla

  1. After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

New Credential Overlay – 2ememain

2ememainCred.png
  1. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  2. 2ememain uses OAuth2 3-legged authentication for all API requests, and the Client ID and Client Secret are used to initiate the OAuth2 authorization flow, which requires user authorization to obtain an access token. Enter your 2ememain Client ID in the Client ID field. This is the Client ID you obtained from your 2ememain account settings (Settings > API or Developer > API Settings) when creating your OAuth application.

  3. Enter your 2ememain Client Secret in the Client Secret field. This is the Client Secret you obtained from your 2ememain account settings when creating your OAuth application. The Client Secret is used along with the Client ID to initiate the OAuth2 authorization flow. The Client Secret is sensitive information and must be kept confidential.

  4. Optionally, enter your 2ememain Access Scope in the Access Scope field. This should be the scope(s) you configured for your application in 2ememain. If not specified, the default scopes will be used.

  5. Click Authorize or Connect to initiate the OAuth2 authorization flow. You will be redirected to 2ememain to authorize the application. Sign in to your 2ememain account if prompted, and review the permissions requested by the application. Click Authorize or Allow to grant the application access to your 2ememain account. After authorization, you will be redirected back to Nexla, and the access token will be automatically configured for your credential.

    Your 2ememain OAuth credentials can be found in your 2ememain account settings under Settings > API or Developer > API Settings. The Client ID and Client Secret are generated when you create an OAuth application.

    These credentials are used to initiate the OAuth2 3-legged authorization flow. During credential creation, you will be redirected to 2ememain to authorize the application. After authorization, 2ememain will provide an access token that is used in the Authorization: Bearer {token} header for all API requests to the 2ememain API.

    If your credentials are compromised, you should immediately revoke them in your 2ememain account settings and generate new ones. The credentials provide access to your 2ememain account data and should be treated as sensitive information. Keep your credentials secure and do not share them publicly.

    For detailed information about registering applications, OAuth2 authentication, API scopes, and available endpoints, see the 2ememain API documentation and API overview.

  6. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the 2ememain connector tile, then select the credential that will be used to connect to your 2ememain account, and click Next; or, create a new 2ememain credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common 2ememain endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

Get Resources

This endpoint template retrieves a list of resources of a specific type from your 2ememain account. Use this template when you need to access resource data, listings, or other 2ememain resources for analysis, reporting, or integration purposes.

  • Enter the Resource Type in the Resource Type field. This should be the type of 2ememain resources you want to retrieve (e.g., advertisements, categories, users, etc.). The Resource Type determines which type of resources will be retrieved. The endpoint returns all resources of the specified type for the authenticated user.

This endpoint returns a list of resources of a specific type from your 2ememain account, including resource IDs, names, and other resource metadata. The endpoint returns all resources of the specified type for the authenticated user.

The Resource Type determines which type of resources will be retrieved. For detailed information about resources, API response structures, and available resource types, see the 2ememain API documentation.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

2ememain data sources can also be manually configured to ingest data from any valid 2ememain API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.

The 2ememain API base URL is https://api.marktplaats.nl/v1/ (e.g., https://api.marktplaats.nl/v1/advertisements, https://api.marktplaats.nl/v1/categories), and typically uses the GET method for retrieving data. For the Response Data Path, use $[*] to extract all items from the response array, or $.{field}[*] to extract items from a specific field array, depending on the endpoint. Pagination mechanisms may vary by endpoint.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new 2ememain data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.

Use as a destination

Click the + icon on the Nexset that will be sent to the 2ememain destination, and select the Send to Destination option from the menu. Select the 2ememain connector from the list of available destination connectors, then select the credential that will be used to connect to your 2ememain account, and click Next; or, create a new 2ememain credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common 2ememain endpoints. 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 Resource

This endpoint template allows you to create a new resource of a specific type in your 2ememain account using records from a Nexset. Use this template when you need to automatically create resources such as advertisements, listings, or other 2ememain resources based on data from your Nexla flows.

  • Enter the Resource Type in the Resource Type field. This should be the type of 2ememain resources you want to create (e.g., advertisements, listings, etc.). The Resource Type determines which type of resources will be created.
  • This endpoint sends data as JSON in the request body to create new resources in your 2ememain account. Each record from your Nexset will be sent as a separate API request to create a new resource. The request body should contain the resource data in the format required by the 2ememain API for the specific resource type.

This endpoint sends data as JSON in the request body to create new resources in your 2ememain account. Each record from your Nexset will be sent as a separate API request to create a new resource. The request body should contain the resource data in the format required by the 2ememain API for the specific resource type, including all required fields and optional fields as needed.

The Resource Type determines which type of resources will be created. The resource structure must match the 2ememain API's expected format for the specific resource type. For detailed information about resource creation, request body formats, and available resource properties, see the 2ememain API documentation.

Manual configuration

2ememain destinations can also be manually configured to send data to any valid 2ememain API endpoint. Using manual configuration, you can also configure Nexla to automatically send the response received from the 2ememain API after each call to a new Nexla webhook data source. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, data format, endpoint URL, request headers, attribute exclusions, record batching, and response webhooks.

The 2ememain API base URL is https://api.marktplaats.nl/v1/ (e.g., https://api.marktplaats.nl/v1/advertisements, https://api.marktplaats.nl/v1/listings), and typically uses the POST method with JSON format to create resources. The request body is typically {message.json} to send the entire Nexset record as JSON, or a custom JSON structure matching the fields required by the 2ememain API for the specific resource type.

Save & activate

Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To send the data to the configured 2ememain endpoint, open the destination resource menu, and select Activate.

The Nexset data will not be sent to the 2ememain endpoint until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.