Pipeline
Émettre / déposer (étape SUBMIT)
Sandbox : acceptation simulée. Live : accepté côté InvoicePilot — transmission via PA connectée.
POST
/
invoices
/
emit
Émettre / déposer (étape SUBMIT)
curl --request POST \
--url http://localhost:8081/api/v1/invoices/emit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"format": "factur-x",
"invoice_id": "<string>",
"buyer": {
"siren": "552100554",
"legal_name": "<string>",
"vat": "<string>"
},
"seller": {
"siren": "512345678",
"legal_name": "<string>"
},
"issue_date": "2023-12-25",
"service_date": "2023-12-25",
"delivery_differs": true,
"delivery": {
"line1": "<string>",
"city": "<string>",
"postal": "<string>"
},
"lines": [
{
"description": "<string>",
"quantity": 123,
"unit_price_ht": 123,
"vat_rate": 123
}
],
"patches": {
"buyer_siren": "<string>",
"issue_date": "<string>",
"service_date": "<string>",
"delivery_line1": "<string>",
"delivery_city": "<string>"
},
"pdp": "<string>",
"options": {
"strict": true,
"check_siret": true,
"siren": "<string>",
"vat": "<string>"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
format: 'factur-x',
invoice_id: '<string>',
buyer: {siren: '552100554', legal_name: '<string>', vat: '<string>'},
seller: {siren: '512345678', legal_name: '<string>'},
issue_date: '2023-12-25',
service_date: '2023-12-25',
delivery_differs: true,
delivery: {line1: '<string>', city: '<string>', postal: '<string>'},
lines: [{description: '<string>', quantity: 123, unit_price_ht: 123, vat_rate: 123}],
patches: {
buyer_siren: '<string>',
issue_date: '<string>',
service_date: '<string>',
delivery_line1: '<string>',
delivery_city: '<string>'
},
pdp: '<string>',
options: {strict: true, check_siret: true, siren: '<string>', vat: '<string>'}
})
};
fetch('http://localhost:8081/api/v1/invoices/emit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:8081/api/v1/invoices/emit"
payload = {
"format": "factur-x",
"invoice_id": "<string>",
"buyer": {
"siren": "552100554",
"legal_name": "<string>",
"vat": "<string>"
},
"seller": {
"siren": "512345678",
"legal_name": "<string>"
},
"issue_date": "2023-12-25",
"service_date": "2023-12-25",
"delivery_differs": True,
"delivery": {
"line1": "<string>",
"city": "<string>",
"postal": "<string>"
},
"lines": [
{
"description": "<string>",
"quantity": 123,
"unit_price_ht": 123,
"vat_rate": 123
}
],
"patches": {
"buyer_siren": "<string>",
"issue_date": "<string>",
"service_date": "<string>",
"delivery_line1": "<string>",
"delivery_city": "<string>"
},
"pdp": "<string>",
"options": {
"strict": True,
"check_siret": True,
"siren": "<string>",
"vat": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8081",
CURLOPT_URL => "http://localhost:8081/api/v1/invoices/emit",
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([
'format' => 'factur-x',
'invoice_id' => '<string>',
'buyer' => [
'siren' => '552100554',
'legal_name' => '<string>',
'vat' => '<string>'
],
'seller' => [
'siren' => '512345678',
'legal_name' => '<string>'
],
'issue_date' => '2023-12-25',
'service_date' => '2023-12-25',
'delivery_differs' => true,
'delivery' => [
'line1' => '<string>',
'city' => '<string>',
'postal' => '<string>'
],
'lines' => [
[
'description' => '<string>',
'quantity' => 123,
'unit_price_ht' => 123,
'vat_rate' => 123
]
],
'patches' => [
'buyer_siren' => '<string>',
'issue_date' => '<string>',
'service_date' => '<string>',
'delivery_line1' => '<string>',
'delivery_city' => '<string>'
],
'pdp' => '<string>',
'options' => [
'strict' => true,
'check_siret' => true,
'siren' => '<string>',
'vat' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}Authorizations
bearerAuthapiKey
Sandbox : ip_sandbox_demo — Live : ip_live_…
Body
application/json
Available options:
factur-x, ubl, cii Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
GOODS, SERVICES, MIXED Show child attributes
Show child attributes
Show child attributes
Show child attributes
Utilisé par /remediate
Show child attributes
Show child attributes
Slug PA (emit)
Mode legacy — préférer body structuré
Show child attributes
Show child attributes
Response
Accepté
Previous
Simuler un import SourcesSandbox : importe N factures fictives depuis une source (PDF, Shopify, Woo…). Pas de sync réelle.
Next
⌘I
Émettre / déposer (étape SUBMIT)
curl --request POST \
--url http://localhost:8081/api/v1/invoices/emit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"format": "factur-x",
"invoice_id": "<string>",
"buyer": {
"siren": "552100554",
"legal_name": "<string>",
"vat": "<string>"
},
"seller": {
"siren": "512345678",
"legal_name": "<string>"
},
"issue_date": "2023-12-25",
"service_date": "2023-12-25",
"delivery_differs": true,
"delivery": {
"line1": "<string>",
"city": "<string>",
"postal": "<string>"
},
"lines": [
{
"description": "<string>",
"quantity": 123,
"unit_price_ht": 123,
"vat_rate": 123
}
],
"patches": {
"buyer_siren": "<string>",
"issue_date": "<string>",
"service_date": "<string>",
"delivery_line1": "<string>",
"delivery_city": "<string>"
},
"pdp": "<string>",
"options": {
"strict": true,
"check_siret": true,
"siren": "<string>",
"vat": "<string>"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
format: 'factur-x',
invoice_id: '<string>',
buyer: {siren: '552100554', legal_name: '<string>', vat: '<string>'},
seller: {siren: '512345678', legal_name: '<string>'},
issue_date: '2023-12-25',
service_date: '2023-12-25',
delivery_differs: true,
delivery: {line1: '<string>', city: '<string>', postal: '<string>'},
lines: [{description: '<string>', quantity: 123, unit_price_ht: 123, vat_rate: 123}],
patches: {
buyer_siren: '<string>',
issue_date: '<string>',
service_date: '<string>',
delivery_line1: '<string>',
delivery_city: '<string>'
},
pdp: '<string>',
options: {strict: true, check_siret: true, siren: '<string>', vat: '<string>'}
})
};
fetch('http://localhost:8081/api/v1/invoices/emit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:8081/api/v1/invoices/emit"
payload = {
"format": "factur-x",
"invoice_id": "<string>",
"buyer": {
"siren": "552100554",
"legal_name": "<string>",
"vat": "<string>"
},
"seller": {
"siren": "512345678",
"legal_name": "<string>"
},
"issue_date": "2023-12-25",
"service_date": "2023-12-25",
"delivery_differs": True,
"delivery": {
"line1": "<string>",
"city": "<string>",
"postal": "<string>"
},
"lines": [
{
"description": "<string>",
"quantity": 123,
"unit_price_ht": 123,
"vat_rate": 123
}
],
"patches": {
"buyer_siren": "<string>",
"issue_date": "<string>",
"service_date": "<string>",
"delivery_line1": "<string>",
"delivery_city": "<string>"
},
"pdp": "<string>",
"options": {
"strict": True,
"check_siret": True,
"siren": "<string>",
"vat": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8081",
CURLOPT_URL => "http://localhost:8081/api/v1/invoices/emit",
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([
'format' => 'factur-x',
'invoice_id' => '<string>',
'buyer' => [
'siren' => '552100554',
'legal_name' => '<string>',
'vat' => '<string>'
],
'seller' => [
'siren' => '512345678',
'legal_name' => '<string>'
],
'issue_date' => '2023-12-25',
'service_date' => '2023-12-25',
'delivery_differs' => true,
'delivery' => [
'line1' => '<string>',
'city' => '<string>',
'postal' => '<string>'
],
'lines' => [
[
'description' => '<string>',
'quantity' => 123,
'unit_price_ht' => 123,
'vat_rate' => 123
]
],
'patches' => [
'buyer_siren' => '<string>',
'issue_date' => '<string>',
'service_date' => '<string>',
'delivery_line1' => '<string>',
'delivery_city' => '<string>'
],
'pdp' => '<string>',
'options' => [
'strict' => true,
'check_siret' => true,
'siren' => '<string>',
'vat' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}