# Enrollment
Use the enrollment API to enroll and unenroll services for a party.
# Enroll Party
The enrollment API serves as a one-stop-shop for registering partyId’s with eConnect and our services. We recommend using this endpoint when registering new parties for eConnect services. For advanced use cases there are endpoints with specific functionality (e.g. Peppol endpoints).
The endpoint can only be used by users with the ApManager role. They can enroll parties via a PUT method call on the /api/v1-beta/{partyId}/enroll
endpoint. The endpoint must first be activated within the subscription before being able to use it.
{
"services": [
{
"config": {
"verification": {
"notes": "Online Payment Verification::2020-12-19T09:31:35.623",
"verifiedOn": "2020-12-19T09:31:35.623+00:00"
},
"businessCard": {
"names": [
{
"name": "eVerbinding",
"language": "nl"
},
{
"name": "eConnect International B.V.",
"language": "en"
}
],
"countryCode": "NL",
"isActive": true
},
"capabilities": {
"invoices": {
"state": "inherited => on",
"description": "SI 1.2, SI 2.0, SI 2.0 CreditNote, BIS Billing V3, BIS Billing V3 CreditNote, BIS Billing V3 CII"
},
"orders": {
"state": "inherited => off",
"description": "SI Order 1.2, PEPPOL Order transaction 3.0"
},
"reviews": {
"state": "inherited => on",
"description": "PEPPOL MLR 3.0"
}
},
"createdOn": "2020-01-17T08:05:03.3845085+00:00",
"changedOn": "2020-03-21T04:57:05.6917681+00:00"
}
"name": "peppolService",
"isActive": true
}
],
"users": {
"existing username": {
"canSendDocument": true,
"canReceiveDocument": true,
"canRemoveDocument": false,
"canManageHook": true
}
},
"hooks": [
{
"id": "1",
"name": "mail hook",
"action": "mailto:techsupport@econnect.eu",
"topics": [
"InvoiceReceived",
"InvoiceReceivedError",
"InvoiceSent",
"InvoiceSentError",
"InvoiceSentRetry",
"HookSent",
"HookSentError",
"HookSentRetry"
],
"isActive": true,
"createdOn": "0001-01-01T00:00:00+00:00",
"changedOn": null
}
]
}
# Enrollment Object Components
The enrollment object consists of three parts: services, party authorizations and hooks.
# Services
At this moment the only service that can be enrolled is the Peppol service. Enrolling for the Peppol service means registering a party in the Peppol network. If the “isActive” field is set to true, the given partyId is registered in the Peppol SML and in the eConnect SMP. When “isActive” is false, the party is deregistered from the SML and the eConnect SMP.
For more information regarding the Peppol service see the corresponding page.
# Party authorizations
Before you can register party authorizations, make sure you have a user registered. More information on registering users and permissions can be found in the next section about User Management.
Every party that’s enrolled must be connected to a user. This user is assigned permissions for the party.
# Hooks
Registering PSB hooks is optional in the enrollment API. See the page about hooks for more information about PSB hooks.
# Unenroll Party
To unenroll, or remove, a party and all its registered services, permissions and hooks use the DELETE method on the /api/v1-beta/{partyId}/enroll
endpoint.