Importer un lot d'operations externes
Accepte jusqu’à 500 opérations, 10 000 notes et 20 Mio par requête. Le job est durable et chaque élément possède son propre résultat. category dans les notes est une chaine libre de 1 a 80 caracteres.
Scope requis : operations:write. Scopes et délégation.
Idempotence : header Idempotency-Key obligatoire. Pour reprendre la même mutation, réutiliser la même clé et le même contenu. Écritures et idempotence.
curl --request POST \
--url https://partner-api.marko.fr/v1/operations/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"operations": [
{
"external_id": "CF-OP-001",
"name": "Clubfunding Demo Deal",
"status": "instruction",
"data": {
"adresse": "12 rue de la Paix, Paris"
},
"kpi_snapshot": {
"date_reference": "2026-07-15",
"crd_total": 2500000
},
"notes": [
{
"external_id": "CF-NOTE-001",
"date": "2026-07-15T09:30:00Z",
"text": "Pièces complémentaires attendues.",
"category": "call"
}
]
}
]
}
'import requests
url = "https://partner-api.marko.fr/v1/operations/batch"
payload = { "operations": [
{
"external_id": "CF-OP-001",
"name": "Clubfunding Demo Deal",
"status": "instruction",
"data": { "adresse": "12 rue de la Paix, Paris" },
"kpi_snapshot": {
"date_reference": "2026-07-15",
"crd_total": 2500000
},
"notes": [
{
"external_id": "CF-NOTE-001",
"date": "2026-07-15T09:30:00Z",
"text": "Pièces complémentaires attendues.",
"category": "call"
}
]
}
] }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const url = 'https://partner-api.marko.fr/v1/operations/batch';
const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
operations: [
{
external_id: 'CF-OP-001',
name: 'Clubfunding Demo Deal',
status: 'instruction',
data: {adresse: '12 rue de la Paix, Paris'},
kpi_snapshot: {date_reference: '2026-07-15', crd_total: 2500000},
notes: [
{
external_id: 'CF-NOTE-001',
date: '2026-07-15T09:30:00Z',
text: 'Pièces complémentaires attendues.',
category: 'call'
}
]
}
]
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
operations: [
{
external_id: 'CF-OP-001',
name: 'Clubfunding Demo Deal',
status: 'instruction',
data: {adresse: '12 rue de la Paix, Paris'},
kpi_snapshot: {date_reference: '2026-07-15', crd_total: 2500000},
notes: [
{
external_id: 'CF-NOTE-001',
date: '2026-07-15T09:30:00Z',
text: 'Pièces complémentaires attendues.',
category: 'call'
}
]
}
]
})
};
fetch('https://partner-api.marko.fr/v1/operations/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://partner-api.marko.fr/v1/operations/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'operations' => [
[
'external_id' => 'CF-OP-001',
'name' => 'Clubfunding Demo Deal',
'status' => 'instruction',
'data' => [
'adresse' => '12 rue de la Paix, Paris'
],
'kpi_snapshot' => [
'date_reference' => '2026-07-15',
'crd_total' => 2500000
],
'notes' => [
[
'external_id' => 'CF-NOTE-001',
'date' => '2026-07-15T09:30:00Z',
'text' => 'Pièces complémentaires attendues.',
'category' => 'call'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"job_id": "88888888-8888-8888-8888-888888888888",
"status": "accepted",
"status_url": "/v1/import-jobs/88888888-8888-8888-8888-888888888888",
"results_url": "/v1/import-jobs/88888888-8888-8888-8888-888888888888/items",
"received_counts": {
"operations": 1,
"notes": 1
},
"idempotency_key": "client-nightly-2026-07-15-001",
"replayed": false
}{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "Idempotency-Key must contain at most 255 visible ASCII characters without spaces.",
"request_id": "req_example_partner_call"
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "A valid bearer token is required.",
"request_id": "req_example_partner_call"
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "The API key does not allow this operation.",
"request_id": "req_example_partner_call"
}{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"detail": "The idempotency key payload, external reference, target, or source conflicts with an existing write.",
"request_id": "req_example_partner_call"
}{
"type": "about:blank",
"title": "Unprocessable Content",
"status": 422,
"detail": "The request payload or parameters are invalid.",
"request_id": "req_example_partner_call"
}{
"type": "about:blank",
"title": "Precondition Required",
"status": 428,
"detail": "The Idempotency-Key header is required.",
"request_id": "req_example_partner_call"
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request rate limit was exceeded.",
"request_id": "req_example_partner_call"
}{
"type": "about:blank",
"title": "Internal Server Error",
"status": 500,
"detail": "An unexpected server error occurred.",
"request_id": "req_example_partner_call"
}Authorizations
Use the access_token returned by POST /v1/auth/token. Do not send the raw API secret on business endpoints.
Headers
Partner-generated correlation identifier echoed in logs and error payloads.
Required for every write, including environments where replay deduplication is disabled. Reuse the same value when retrying the same logical write and use a new value for a different write.
255^[!-~]+$Body
Opérations à importer; entre 1 et 500 par lot, enveloppe normalisée limitée à 20 Mio.
1 - 500 elementsShow child attributes
Show child attributes
Response
Successful response
UUID du job durable à suivre.
État du job d'import: accepted, queued, running, partial, completed, failed ou cancelled. Lire les compteurs et les résultats individuels avant de considérer l'ensemble du lot comme réussi.
Chemin permettant de lire l'état du job; peut être relatif à l'hôte de l'API.
Chemin permettant de lire les résultats individuels du job; peut être relatif à l'hôte de l'API.
Objet JSON extensible. Les types des valeurs sont indiqués par additionalProperties lorsque la route les contraint.
Show child attributes
Show child attributes
Clé utilisée pour cette intention; la conserver avec le job ou la ressource.
Indique qu'une réponse liée à la même intention a été retrouvée et rejouée.
curl --request POST \
--url https://partner-api.marko.fr/v1/operations/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"operations": [
{
"external_id": "CF-OP-001",
"name": "Clubfunding Demo Deal",
"status": "instruction",
"data": {
"adresse": "12 rue de la Paix, Paris"
},
"kpi_snapshot": {
"date_reference": "2026-07-15",
"crd_total": 2500000
},
"notes": [
{
"external_id": "CF-NOTE-001",
"date": "2026-07-15T09:30:00Z",
"text": "Pièces complémentaires attendues.",
"category": "call"
}
]
}
]
}
'import requests
url = "https://partner-api.marko.fr/v1/operations/batch"
payload = { "operations": [
{
"external_id": "CF-OP-001",
"name": "Clubfunding Demo Deal",
"status": "instruction",
"data": { "adresse": "12 rue de la Paix, Paris" },
"kpi_snapshot": {
"date_reference": "2026-07-15",
"crd_total": 2500000
},
"notes": [
{
"external_id": "CF-NOTE-001",
"date": "2026-07-15T09:30:00Z",
"text": "Pièces complémentaires attendues.",
"category": "call"
}
]
}
] }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const url = 'https://partner-api.marko.fr/v1/operations/batch';
const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
operations: [
{
external_id: 'CF-OP-001',
name: 'Clubfunding Demo Deal',
status: 'instruction',
data: {adresse: '12 rue de la Paix, Paris'},
kpi_snapshot: {date_reference: '2026-07-15', crd_total: 2500000},
notes: [
{
external_id: 'CF-NOTE-001',
date: '2026-07-15T09:30:00Z',
text: 'Pièces complémentaires attendues.',
category: 'call'
}
]
}
]
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
operations: [
{
external_id: 'CF-OP-001',
name: 'Clubfunding Demo Deal',
status: 'instruction',
data: {adresse: '12 rue de la Paix, Paris'},
kpi_snapshot: {date_reference: '2026-07-15', crd_total: 2500000},
notes: [
{
external_id: 'CF-NOTE-001',
date: '2026-07-15T09:30:00Z',
text: 'Pièces complémentaires attendues.',
category: 'call'
}
]
}
]
})
};
fetch('https://partner-api.marko.fr/v1/operations/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://partner-api.marko.fr/v1/operations/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'operations' => [
[
'external_id' => 'CF-OP-001',
'name' => 'Clubfunding Demo Deal',
'status' => 'instruction',
'data' => [
'adresse' => '12 rue de la Paix, Paris'
],
'kpi_snapshot' => [
'date_reference' => '2026-07-15',
'crd_total' => 2500000
],
'notes' => [
[
'external_id' => 'CF-NOTE-001',
'date' => '2026-07-15T09:30:00Z',
'text' => 'Pièces complémentaires attendues.',
'category' => 'call'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"job_id": "88888888-8888-8888-8888-888888888888",
"status": "accepted",
"status_url": "/v1/import-jobs/88888888-8888-8888-8888-888888888888",
"results_url": "/v1/import-jobs/88888888-8888-8888-8888-888888888888/items",
"received_counts": {
"operations": 1,
"notes": 1
},
"idempotency_key": "client-nightly-2026-07-15-001",
"replayed": false
}{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "Idempotency-Key must contain at most 255 visible ASCII characters without spaces.",
"request_id": "req_example_partner_call"
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "A valid bearer token is required.",
"request_id": "req_example_partner_call"
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "The API key does not allow this operation.",
"request_id": "req_example_partner_call"
}{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"detail": "The idempotency key payload, external reference, target, or source conflicts with an existing write.",
"request_id": "req_example_partner_call"
}{
"type": "about:blank",
"title": "Unprocessable Content",
"status": 422,
"detail": "The request payload or parameters are invalid.",
"request_id": "req_example_partner_call"
}{
"type": "about:blank",
"title": "Precondition Required",
"status": 428,
"detail": "The Idempotency-Key header is required.",
"request_id": "req_example_partner_call"
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request rate limit was exceeded.",
"request_id": "req_example_partner_call"
}{
"type": "about:blank",
"title": "Internal Server Error",
"status": 500,
"detail": "An unexpected server error occurred.",
"request_id": "req_example_partner_call"
}