Create identifier
Information
Use this endpoint to create a new identifier for a business entity.
This endpoint is
synchronous
The role
admin
is needed in order to use this endpointEndpoints
POST/v1/config/business/entity/{businessEntityId}/identifier
Path parameters
businessEntityIdstring (uuid) - Required
Body parameters
typeenum - Required
schemestring - Required
valuestring - Required
labelstring - Optional
postalAddressobject - Optional
Request
POST /v1/config/business/entity/:businessEntityId/identifier
- bash
- javascript
- .NET
curl -X 'GET'
'https://api.ppd.iopole.fr//v1/config/business/entity/32c9aec1-e6d6-4ddf-82a0-42dfa29268f8/identifier'
-H 'accept: application/json'
-H 'Authorization: Bearer ${TOKEN}'
-d '{
"type": "ROUTING_CODE",
"scheme": "0224",
"value": "Service A",
"businessCard": {
"countrySubdivision": "Herault",
"city": "Montpellier",
"postalCode": "34000",
"addressLine1": "line 1",
"addressLine2": "line 2",
"addressLine3": "line 3"
}
}'
const got = require('got');
const url = 'https://api.ppd.iopole.fr//v1/config/business/entity/32c9aec1-e6d6-4ddf-82a0-42dfa29268f8/identifier';
const token = 'your_token_here';
(async () => {
try {
const response = await got(url, {
headers: {
accept: 'application/json',
Authorization: `Bearer ${token}`,
},
json: {
"type": "ROUTING_CODE",
"scheme": "0224",
"value": "Service A",
"businessCard": {
"countrySubdivision": "Herault",
"city": "Montpellier",
"postalCode": "34000",
"addressLine1": "line 1",
"addressLine2": "line 2",
"addressLine3": "line 3"
}
},
responseType: 'json',
});
console.log(response.body);
} catch (error) {
console.error('Error:', error.message);
}
})();
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string token = "your_token_here";
using HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var jsonContent = "{"name": "IOPOLE Belgique Namur","country": "BE","scope": "PRIVATE_TAX_PAYER","identifierScheme": "0193","identifierValue": "51144456707865","businessCard": {"city": "Namur","postalCode": 1000,"addressLine1": "line 1","addressLine2": "line 2","addressLine3": "line 3"}"
var content = new StringContent(jsonContent, Encoding.UTF8, "application/json");
try
{
var response = await client.PostAsync("https://api.ppd.iopole.fr//v1/config/business/entity/32c9aec1-e6d6-4ddf-82a0-42dfa29268f8/identifier", content);
response.EnsureSuccessStatusCode();
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (HttpRequestException e)
{
Console.WriteLine("Error: {e.Message}");
}
}
}
Response
Status: 201 - application/json
Description: Created identifier id
Schema:
- type: enum
The type of the response object. - id: string
The unique identifier for the created element.
Examples:
{
"type": "BUSINESS_ENTITY_IDENTIFIER",
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
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.