Search by filter
Information
This API allow you to search for an invoice by powerful filter criteria.
Link to swaggerThis endpoint is
synchronous
The role
user
is needed in order to use this endpointEndpoints
GET/v1/invoice/search
Query parameters
qstring - RequiredRefer to page filter
expandstring (enum) - Optional
offsetinteger - Optional - Default value : 0
limitinteger - Optional - Default value : 50
Request
GET /v1/invoice/search
- bash
- javascript
- .NET
curl -X 'GET'
https://api.ppd.iopole.fr//v1/invoice/search?q=invoice.buyer.name%3A%2A'
-H 'accept: application/json'
-H 'Authorization: Bearer ${token}'
const got = require('got');
const token = 'your_token_here';
const query = 'invoice.buyer.name:*';
(async () => {
try {
const response = await got(`https://api.ppd.iopole.fr//v1/invoice/search?q=${encodeURIComponent(query)}`, {
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 query = "invoice.buyer.name:*";
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/search?q={Uri.EscapeDataString(query)}");
response.EnsureSuccessStatusCode();
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);
}
catch (HttpRequestException ex)
{
Console.WriteLine("Request error: {ex.Message}");
}
}
}
Response
200 OK
[
{
"streamId": "2154aa88-57d1-4314-8f1c-9ed78652ad38",
"documentId": "69a237c1-5920-4ae5-98a1-6d02cbec946a",
"invoiceId": "9ca2d4fa-0708-4cf5-85ca-cb2cf2eced52",
"date": "2024-07-30T14:46:11.566Z",
"originalFormat": "BASICWL",
"originalFlavor": "FacturX",
"way": "EMITTED"
}
]
Example
Common use case
Give me all invoice not yet delivered
invoiceState:DELIVERY_PENDING
Give me all invoices delivered between 2023-07-31 11:07:04 and 2024-08-01 01:07:04
invoice.deliveryState:DELIVERED AND (invoice.createdDate:>"2023-07-31 11:07:04" AND invoice.createdDate:<="2024-08-01 01:07:04")
Give me only received invoice
invoice.direction:INPUT
Give me buyer with corporate name that starts by ART or siret containing 123456789
invoice.buyer.name:ART* OR invoice.buyer.siret:*123456789*