Send status
Information
This API allows sending status via one of the routing codes defined by the standard.
The Iopole system enables issuing a status in France or in any other country using Peppol network or point.
This endpoint is
asynchronous
The role
user
is needed in order to use this endpointEndpoints
POST/v1/invoice/{invoiceId}/status
Path parameters
invoiceIdstring (uuid) - Required
Body parameters
codeenum - Required
messagestring - Optional
paymentobject - Optional
Request
POST /v1/invoice/:invoiceId/status
- bash
- javascript
- .NET
curl -X 'POST'
'https://api.ppd.iopole.fr//v1/invoice/6d9bf1a6-25a7-4d48-b641-623c05b0a967/status'
-H 'accept: application/json'
-H 'Content-Type: application/json'
-d '{
"code": "IN_HAND",
"message": "Invoice received !"
}'
const got = require('got');
const token = 'your_token_here';
const invoiceId = '6d9bf1a6-25a7-4d48-b641-623c05b0a967';
(async () => {
try {
const response = await got.post(`https://api.ppd.iopole.fr//v1/invoice/${invoiceId}/status`, {
headers: {
'accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`,
},
json: {
code: 'IN_HAND',
message: 'Invoice received !'
},
responseType: 'json',
});
console.log(response.body);
} catch (error) {
console.error(error.response.body);
}
})();
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var token = "your_token_here";
var invoiceId = "6d9bf1a6-25a7-4d48-b641-623c05b0a967";
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("accept", "application/json");
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
client.DefaultRequestHeaders.Add("Authorization", "Bearer ${token}");
var jsonContent = "{"code": "IN_HAND", "message": "Invoice received !"}";
var content = new StringContent(jsonContent, Encoding.UTF8, "application/json");
try
{
var response = await client.PostAsync("https://api.ppd.iopole.fr//v1/invoice/{invoiceId}/status", content);
response.EnsureSuccessStatusCode();
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);
}
catch (HttpRequestException ex)
{
Console.WriteLine("Request error: {ex.Message}");
}
}
}
Response
Status: 204
Description: No content
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.