Search by invoice id
Information
This API allow you to search for all status related to an invoice by unique invoice identifier.
This endpoint is
synchronous
The role
user
is needed in order to use this endpointEndpoints
GET/v1/invoice/{invoiceId}/status-history
Warning
All status in the Iopole system are marked as either seen or not seen. By default, if no webhook is defined, the status won't be flagged as seen. You must call the dedicated endpoint.
Path parameters
invoiceIdstring (uuid) - Required
Request
GET /v1/invoice/:invoiceId/status-history
- bash
- javascript
- .NET
curl -X 'GET'
'https://api.ppd.iopole.fr//v1/invoice/32c9aec1-e6d6-4ddf-82a0-42dfa29268f8/status-history'
-H 'accept: application/json'
-H 'Authorization: Bearer ${TOKEN}'
const got = require('got');
const token = 'your_token_here';
const invoiceId = '32c9aec1-e6d6-4ddf-82a0-42dfa29268f8';
(async () => {
try {
const response = await got(`https://api.ppd.iopole.fr//v1/invoice/${invoiceId}/status-history`, {
headers: {
'accept': 'application/json',
'Authorization': `Bearer ${token}`,
},
responseType: 'json',
});
console.log(response.body);
} catch (error) {
console.error(error.response.body);
}
})();
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var token = "your_token_here";
var invoiceId = "32c9aec1-e6d6-4ddf-82a0-42dfa29268f8";
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("accept", "application/json");
client.DefaultRequestHeaders.Add("Authorization", "Bearer ${token}");
try
{
var response = await client.GetAsync("https://api.ppd.iopole.fr//v1/invoice/{invoiceId}/status-history");
response.EnsureSuccessStatusCode();
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);
}
catch (HttpRequestException ex)
{
Console.WriteLine("Request error: {ex.Message}");
}
}
}
Response
Status: 200 - application/json
Description: Returns list of status for given invoice.
Schema:
Examples:
{
"statusId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"date": "2024-07-16T20:35:16Z",
"destType": "OPERATOR",
"invoiceId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"status": {
"code": "205",
"value": "Approved",
"desc": "Approuvée",
"message": "La facture est en cours de traitement par le destinataire"
},
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>",
"json": {
"category": {
"code": "eInvoicing",
"value": "S1"
},
"context": {
"id": "LC_APPROVED_STREAM",
"name": "LifeCycle - Approuvée",
"date": "2024-07-16T20:36:31Z",
"sender": {
"name": "Sender Company",
"siren": "123456789",
"siret": "12345678909090",
"roleCode": {
"code": "BUYER",
"value": "BY",
"desc": "Acheteur"
}
},
"issuer": {
"name": "Issuer Company",
"siren": "987654321",
"siret": "98765432109876",
"roleCode": {
"code": "SELLER",
"value": "SE",
"desc": "Vendeur"
}
},
"recipients": [
{
"name": "Recipient Company",
"siren": "112233445",
"siret": "11223344556677",
"roleCode": {
"code": "INTERMEDIARY",
"value": "IN",
"desc": "Intermédiaire"
}
}
]
},
"responses": [
{
"documentReference": {
"issuerAssignedId": "F-LGjGKOUIQjgFjB",
"typeCode": "CDAR",
"receiptDate": "2024-07-16T20:35:16Z",
"issuerTradeParty": {
"name": "Issuer Company",
"siren": "987654321",
"siret": "98765432109876",
"roleCode": {
"code": "SELLER",
"value": "SE",
"desc": "Vendeur"
}
}
},
"documentStatus": {
"message": "La facture est en cours de traitement par le destinataire",
"status": {
"code": "205",
"value": "Approved",
"desc": "Approuvée"
},
"details": {
"generatedDate": "2024-07-16T20:36:31Z",
"reason": "Error occurred during invoice validation process",
"documentStatusCharacteristic": []
}
}
}
]
}
}
Status: 401
Description: Unauthorized - Authentication is required and has failed or has not yet been provided.
Status: 403
Description: Forbidden - The server understood the request, but it refuses to authorize it. Note: This endpoint requires an admin account.