Child Companies interface empowers users to efficiently create and oversee child companies linked to their primary Sproom account, streamlining document reception processes. Throughout this documentation, you'll discover API endpoints tailored for child company creation, authentication mechanisms, and protocols for enrolling pre-existing Sproom-registered entities. By leveraging the provided status codes, users can seamlessly navigate the platform, promptly addressing any challenges, such as data conflicts or request inconsistencies.
If you need to handle documents for many companies, you must add child companies to your Sproom account.
Software providers can use this to manage Sproom accounts for their clients.
A company can be a child to more than one parent company. This lets different software vendors to receive and process the same company's documents. For safety, our API doesn't let you add a company as a child that's already registered in Sproom. If you try, you'll get a 409 HTTP error, which means Conflict. To add such a company, check the "Enroll a Child Company" section.
Use POST /api/child-companies to create a child company. If you're registering a Danish company, make sure its CVR number is valid, as it will be verified through virk.dk.
curl -X 'POST' \
'https://sproom.net/api/child-companies' \
-H 'accept: */*' \
-H 'Authorization: Bearer (INSERT YOUR TOKEN HERE) \
-H 'Content-Type: application/json' \
-d '{
"companyName": "The Smallish Company A/S",
"organizationIdentifier": {
"schemeId": "DK:CVR",
"value": "29403473"
},
"glnNumber": "5798009811578"
}'
When successful, the system responds with a status code of 200. It will also provide the CompanyID in the Location header. Remember this ID for tasks like deleting the company or registering it for document reception with NemHandel or PEPPOL. This CompanyID is also referenced in Webhooks.
If the company already exists in Sproom, you'll get a 409 status code, which means 'Conflict'. The returned information will show the pre-existing CompanyID. For more on this situation, see the "Enroll a Child Company" section.
When you want to perform actions for a child company, like registering it, you must first authenticate as that company.
To do this, obtain an API token using GET /api/child-companies/{childCompanyId}/token. Ensure you use the CompanyID you received when the child company was set up.
curl -X 'GET' \
'https://sproom.net/api/child-companies/fa55f5df-555z-0d55-ef7d-313f6cf0c3be/token' \
-H 'accept: application/json' \
-H 'Authorization: Bearer (INSERT YOUR TOKEN HERE)
Once successful, you'll get a token that represents your access rights. Keep in mind, this token is only valid for one hour.
If you're enrolling a company already registered on Sproom, make sure it agrees to share its data with the parent company. As part of this, there's an agreement to be signed. We check that the person signing truly represents the company, with some help from Addo Sign. For now, this automated process is just for Danish companies.
Here's how to enroll a Sproom-registered company as a child:
curl -X 'POST' \
'https://sproom.net/api/child-companies/enrollmentRequests' \
-H 'accept: application/json' \
-H 'Authorization: Bearer (INSERT YOUR TOKEN HERE)
-H 'Content-Type: application/json' \
-d '{
"childCompanyName": "ChildCompanyName",
"childCompanyId": "5848d0b6-a1e4-4a99-aeaf-b88146745f8f",
"organizationIdentifier": {
"schemeId": "DK:CVR",
"value": "12345678"
},
"userEmail": "[email protected]",
"parentCompanyName": "The Parent Company Name",
"authenticationMethod": "mitIDErhverv"
}'
If everything you provide is correct, Sproom will get the enrollment going. You'll then get a 200 status code and an EnrollmentId.
If Integration Service is not activated on your Sproom account, you'll get a 403 status (Forbidden). You must have this service to add or enroll child companies and you need to contact our support.
If there's something wrong or missing in the data you give, you'll get a 400 status (Bad Request) and a message explaining the problem.
The diagram below provides a comprehensive visual representation of the child company enrollment process. It outlines the interaction between the main components:
As you navigate through the diagram, you'll encounter various grouped actions that illustrate the sequence of steps and interactions that occur during the child company's enrollment process, from creation to confirmation or declination.
Do you have questions on how to do you integration, contact us now and we will help you as quick as possible
Tlf: +45 88 20 20 40 E-mail: [email protected]