Create participant
Information
A participant in Iopole refers to a company.
To receive invoices on its behalf, a participant must be created using this API.
Link to swaggerThis endpoint is
synchronous
The role
admin
is needed in order to use this endpointCreating a participant implies connecting it to a network.
Endpoints
POST/v1/config/participant
Body parameters
namestring - Required
vatNumberstring - Optional
legalIdentifierstring (enum) - Required
Request
POST /v1/config/participant
- bash
- javascript
- .NET
curl -X 'POST'
'https://api.ppd.iopole.fr//v1/config/participant'
-H 'accept: application/json'
-H 'Authorization: Bearer ${token}'
-H 'Content-Type: application/json'
-d '{
"name": "IOPOLE France",
"country": "FR",
"vatNumber": "FR61922304308",
"legalIdentifier": "922304308",
"partyIdentifier": "92230430800013"
}'
const got = require('got');
const token = 'your_token_here';
(async () => {
try {
const response = await got.post('https://api.ppd.iopole.fr//v1/config/participant', {
headers: {
'accept': 'application/json',
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
json: {
name: "IOPOLE France",
country: "FR",
vatNumber: "FR61922304308",
legalIdentifier: "922304308",
partyIdentifier: "92230430800013"
},
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 client = new HttpClient();
client.DefaultRequestHeaders.Add("accept", "application/json");
client.DefaultRequestHeaders.Add("Authorization", Bearer ${token}");
var json = new StringContent("{"name": "IOPOLE France", "country": "FR", "vatNumber": "FR61922304308", "legalIdentifier": "922304308", "partyIdentifier": "92230430800013"}", Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.ppd.iopole.fr//v1/config/participant", json);
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);
}
}
Response
201 Created
{
"type": "PARTICIPANT",
"id": "127cfd27-33de-4bb6-832c-4eaf7518e8b9"
}