spvs
Créer une SPV
Crée une SPV sur l’entité et le fonds ciblé. La forme juridique, le SIREN et l’adresse peuvent etre fournis des la creation. Le type d’investissement reste porte par l’operation, car une meme SPV peut en regrouper plusieurs.
Créer une SPV
curl --request POST \
--url https://partner-api.marko.fr/v1/spvs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "SPV Marseille",
"fond_id": "22222222-2222-2222-2222-222222222222",
"forme_juridique": "SAS",
"siren": "123456782",
"adresse": "10 rue de la Republique, 13001 Marseille"
}
'import requests
url = "https://partner-api.marko.fr/v1/spvs"
payload = {
"name": "SPV Marseille",
"fond_id": "22222222-2222-2222-2222-222222222222",
"forme_juridique": "SAS",
"siren": "123456782",
"adresse": "10 rue de la Republique, 13001 Marseille"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'SPV Marseille',
fond_id: '22222222-2222-2222-2222-222222222222',
forme_juridique: 'SAS',
siren: '123456782',
adresse: '10 rue de la Republique, 13001 Marseille'
})
};
fetch('https://partner-api.marko.fr/v1/spvs', 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/spvs",
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([
'name' => 'SPV Marseille',
'fond_id' => '22222222-2222-2222-2222-222222222222',
'forme_juridique' => 'SAS',
'siren' => '123456782',
'adresse' => '10 rue de la Republique, 13001 Marseille'
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://partner-api.marko.fr/v1/spvs"
payload := strings.NewReader("{\n \"name\": \"SPV Marseille\",\n \"fond_id\": \"22222222-2222-2222-2222-222222222222\",\n \"forme_juridique\": \"SAS\",\n \"siren\": \"123456782\",\n \"adresse\": \"10 rue de la Republique, 13001 Marseille\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://partner-api.marko.fr/v1/spvs")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"SPV Marseille\",\n \"fond_id\": \"22222222-2222-2222-2222-222222222222\",\n \"forme_juridique\": \"SAS\",\n \"siren\": \"123456782\",\n \"adresse\": \"10 rue de la Republique, 13001 Marseille\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://partner-api.marko.fr/v1/spvs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"SPV Marseille\",\n \"fond_id\": \"22222222-2222-2222-2222-222222222222\",\n \"forme_juridique\": \"SAS\",\n \"siren\": \"123456782\",\n \"adresse\": \"10 rue de la Republique, 13001 Marseille\"\n}"
response = http.request(request)
puts response.read_body{
"id": "33333333-3333-3333-3333-333333333334",
"name": "SPV Marseille",
"forme_juridique": "SAS",
"siren": "123456782",
"adresse": "10 rue de la Republique, 13001 Marseille"
}{
"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.
Maximum string length:
255Pattern:
^[!-~]+$Body
application/json
The body is of type object.
Response
Successful response
⌘I
Créer une SPV
curl --request POST \
--url https://partner-api.marko.fr/v1/spvs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "SPV Marseille",
"fond_id": "22222222-2222-2222-2222-222222222222",
"forme_juridique": "SAS",
"siren": "123456782",
"adresse": "10 rue de la Republique, 13001 Marseille"
}
'import requests
url = "https://partner-api.marko.fr/v1/spvs"
payload = {
"name": "SPV Marseille",
"fond_id": "22222222-2222-2222-2222-222222222222",
"forme_juridique": "SAS",
"siren": "123456782",
"adresse": "10 rue de la Republique, 13001 Marseille"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'SPV Marseille',
fond_id: '22222222-2222-2222-2222-222222222222',
forme_juridique: 'SAS',
siren: '123456782',
adresse: '10 rue de la Republique, 13001 Marseille'
})
};
fetch('https://partner-api.marko.fr/v1/spvs', 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/spvs",
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([
'name' => 'SPV Marseille',
'fond_id' => '22222222-2222-2222-2222-222222222222',
'forme_juridique' => 'SAS',
'siren' => '123456782',
'adresse' => '10 rue de la Republique, 13001 Marseille'
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://partner-api.marko.fr/v1/spvs"
payload := strings.NewReader("{\n \"name\": \"SPV Marseille\",\n \"fond_id\": \"22222222-2222-2222-2222-222222222222\",\n \"forme_juridique\": \"SAS\",\n \"siren\": \"123456782\",\n \"adresse\": \"10 rue de la Republique, 13001 Marseille\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://partner-api.marko.fr/v1/spvs")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"SPV Marseille\",\n \"fond_id\": \"22222222-2222-2222-2222-222222222222\",\n \"forme_juridique\": \"SAS\",\n \"siren\": \"123456782\",\n \"adresse\": \"10 rue de la Republique, 13001 Marseille\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://partner-api.marko.fr/v1/spvs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"SPV Marseille\",\n \"fond_id\": \"22222222-2222-2222-2222-222222222222\",\n \"forme_juridique\": \"SAS\",\n \"siren\": \"123456782\",\n \"adresse\": \"10 rue de la Republique, 13001 Marseille\"\n}"
response = http.request(request)
puts response.read_body{
"id": "33333333-3333-3333-3333-333333333334",
"name": "SPV Marseille",
"forme_juridique": "SAS",
"siren": "123456782",
"adresse": "10 rue de la Republique, 13001 Marseille"
}{
"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"
}