Zum Hauptinhalt springen

Create an export of unlocked leads for the given customerId

POST/v2/customers/{customerId}/unlocked-leads-export
API-Version
v2
Request-Methode
POST
Operation-ID
leadfyndr-create-leads-export

Request​

  • customerIdstringrequired

Responses​

Format
application/json
Beschreibung
  • contentBase64stringrequired

    The base64 encoded csv content of the export.

  • exportIdstringrequired
Content-Type: application/json

{
"contentBase64": "string",
"exportId": "string"
}
{
"properties": {
"contentBase64": {
"description": "The base64 encoded csv content of the export.",
"type": "string"
},
"exportId": {
"type": "string"
}
},
"required": [
"exportId",
"contentBase64"
],
"type": "object"
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-X POST \
-d '{"exportAllLeads":true,"fieldKeys":["domain"]}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/customers/string/unlocked-leads-export
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";

const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.leadFyndr.createLeadsExport({
"customerId": "string",
"data": {
"exportAllLeads": true,
"fieldKeys": [
"domain"
]
}
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\LeadFyndr\CreateLeadsExport\CreateLeadsExportRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\LeadFyndr\CreateLeadsExport\CreateLeadsExportRequestBody;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

// TODO: Please consult the properties and constructor signature of
// CreateLeadsExportRequestBody to learn how to construct a valid instance
$body = new CreateLeadsExportRequestBody(/* TODO: ... */);

$request = (new CreateLeadsExportRequest(
customerId: "string",
body: $body
));
$response = $client->leadFyndr()->createLeadsExport($request);

var_dump($response->getBody();

Auf dieser Seite