Create office
Information
For French entities, you can directly claim the office as yours, as it is already registered in the official government directory.
Use this endpoint to create a new office.
For French entities, you can directly claim the office as yours, as it is already registered in the official government directory.
This endpoint is
synchronous
The role
admin
is needed in order to use this endpointNote: Using this endpoint will claim the company as yours automatically in outbound direction.
Endpoints
POST/v1/config/business/entity/office
Query parameters
legalBusinessEntityIdstring - Optional
Body parameters
namestring - Required
countryenum - Required
typestring - Optional - Default value : OFFICE
scopeenum - Required
identifierSchemestring - Required
identifierValuestring - Required
postalAddressobject - Optional
operatorRelationobject - Optional
identifiersarray - Optional
Request
POST /v1/config/business/entity/office
- bash
- javascript
- .NET
curl -X 'POST'
'https://api.ppd.iopole.fr//v1/config/business/entity/office'
-H 'accept: application/json'
-H 'Content-Type: application/json'
-H 'Authorization: Bearer ${TOKEN}'
-d '{
"name": "IOPOLE Belgique Namur",
"country": "BE",
"scope": "PRIMARY",
"identifierScheme": "0193",
"identifierValue": "51144456707865",
"businessCard": {
"city": "Namur",
"postalCode": 1000,
"addressLine1": "line 1",
"addressLine2": "line 2",
"addressLine3": "line 3"
}
}'
const got = require('got');
const url = 'https://api.ppd.iopole.fr//v1/config/business/entity/office';
const token = 'your_token_here';
(async () => {
try {
const response = await got(url, {
headers: {
accept: 'application/json',
Authorization: `Bearer ${token}`,
},
json: {
"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"
}
},
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": "0208","identifierValue": "0114445670", "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/office", content);
response.EnsureSuccessStatusCode();
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);
}
catch (HttpRequestException e)
{
Console.WriteLine("Error: {e.Message}");
}
}
}
Response
Status: 201 - application/json
Description: Created office business entity id and identifier id
Schema:
- type: enum
The type of the response object. - id: string
The unique identifier for the created element.
Examples:
[
{
"type": "BUSINESS_ENTITY",
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
},
{
"type": "BUSINESS_ENTITY_IDENTIFIER",
"id": "a67ac10b-58cc-4372-a567-0e02b2c3d123"
}
]
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.
Status: 409
Description: Conflict - The request could not be completed. A business entity with the same identifiers already exists.