{"openapi":"3.0.0","paths":{"/status":{"get":{"description":"Gets the status of the API","operationId":"AppController_getStatus","parameters":[],"responses":{"200":{"description":"The API is up and running.","content":{"text/plain":{"schema":{"type":"string","example":"The API is up and running."}}}}},"summary":"","tags":["App"]}},"/mandates/{mandateUlid}":{"get":{"description":"This call gets a mandate by ulid.<br/><br/>","operationId":"MandateController_getMandate","parameters":[{"name":"mandateUlid","required":true,"in":"path","description":"The ulid of the mandate","schema":{"example":"01KJAHTSTJNZ1M7F6KW2Y2X4ZQ","type":"string"}}],"responses":{"200":{"description":"The mandate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MandateDto"}}}},"400":{"description":"The provided request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"No mandate found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"summary":"Gets a mandate by ulid","tags":["mandates"]}},"/mandates/be":{"post":{"description":"This call requests a new mandate.<br/><br/>","operationId":"MandateController_requestMandateForParticipantInBelgium","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BelgiumParticipantMandateRequestDto"}}}},"responses":{"201":{"description":"The mandate was successfully requested, further communications will be delivered via webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestMandateDocs"}}}},"400":{"description":"The provided request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"summary":"Request a mandate for a participant for a specific country","tags":["mandates"]}},"/mandates/nl":{"post":{"description":"This call requests a new mandate.<br/><br/>","operationId":"MandateController_requestMandateForParticipantInNetherlands","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetherlandsParticipantMandateRequestDto"}}}},"responses":{"201":{"description":"The mandate was successfully requested, further communications will be delivered via webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestMandateDocs"}}}},"400":{"description":"The provided request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"summary":"Request a mandate for a participant for a specific country","tags":["mandates"]}},"/mandates/fr":{"post":{"description":"This call requests a new mandate.<br/><br/>","operationId":"MandateController_requestMandateForParticipantInFrance","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FranceParticipantMandateRequestDto"}}}},"responses":{"201":{"description":"The mandate was successfully requested, further communications will be delivered via webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestMandateDocs"}}}},"400":{"description":"The provided request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"summary":"Request a mandate for a participant for a specific country","tags":["mandates"]}},"/mandates/be/{mandateUlid}":{"put":{"description":"This call updates an existing mandate.<br/><br/>","operationId":"MandateController_updateMandateForParticipantInBelgium","parameters":[{"name":"mandateUlid","required":true,"in":"path","description":"The ulid of the mandate","schema":{"example":"01KJAHTSTJNZ1M7F6KW2Y2X4ZQ","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBelgiumParticipantMandateRequestDto"}}}},"responses":{"200":{"description":"The mandate was successfully updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMandateResponseDto"}}}},"400":{"description":"The provided request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"No mandate found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"summary":"Update a mandate for a participant for a specific country","tags":["mandates"]}},"/mandates/fr/{mandateUlid}":{"put":{"description":"This call updates an existing mandate.<br/><br/>","operationId":"MandateController_updateMandateForParticipantInFrance","parameters":[{"name":"mandateUlid","required":true,"in":"path","description":"The ulid of the mandate","schema":{"example":"01KJAHTSTJNZ1M7F6KW2Y2X4ZQ","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFranceParticipantMandateRequestDto"}}}},"responses":{"200":{"description":"The mandate was successfully updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMandateResponseDto"}}}},"400":{"description":"The provided request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"No mandate found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"summary":"Update a mandate for a participant for a specific country","tags":["mandates"]}},"/mandates/nl/{mandateUlid}":{"put":{"description":"This call updates an existing mandate.<br/><br/>","operationId":"MandateController_updateMandateForParticipantInNetherlands","parameters":[{"name":"mandateUlid","required":true,"in":"path","description":"The ulid of the mandate","schema":{"example":"01KJAHTSTJNZ1M7F6KW2Y2X4ZQ","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNetherlandsParticipantMandateRequestDto"}}}},"responses":{"200":{"description":"The mandate was successfully updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMandateResponseDto"}}}},"400":{"description":"The provided request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"No mandate found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"summary":"Update a mandate for a participant for a specific country","tags":["mandates"]}},"/clients/deactivate-client-registration":{"post":{"description":"This call deactivates registration of the calling client.<br/><br/>Feedback needs to be received on registered webhook for event \"client.cancellation\", it is required to have this webhook registered before cancelling a subscription","operationId":"ClientController_deactivateClientRegistrationForClient","parameters":[],"responses":{"200":{"description":"Deactivation of client registration successfully initiated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientCancellationResponseDto"}}}},"400":{"description":"No Webhook with event \"client.cancellation\" was registered for client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"summary":"Deactivates the registration for the calling client","tags":["clients"]}},"/webhooks":{"post":{"description":"Register a new webhook URL for a given list of events.<br/><br/>URL needs to be publicly accessible, accepting POST request and should return 200 OK immediatelty. Processing of the received data should happen asynchronously.  No data is expected in the response.<br/><br/>It is possible to register multiple webhooks for the same event, in that case all URLs will be called.  If no webhooks are registered for a given event, nothing will be called but processing will never be blocked.<br/><br/>A client can register a total of 10 webhooks","operationId":"WebhookController_createWebhook","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRequestDto"}}}},"responses":{"201":{"description":"The webhook has been registered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookResponseDto"}}}},"400":{"description":"The provided request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"summary":"Register webhook","tags":["webhooks"]},"get":{"description":"Lists all registered webhooks.","operationId":"WebhookController_getWebhooks","parameters":[],"responses":{"200":{"description":"List of registered webhooks.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookResponseDto"}}}}},"400":{"description":"The provided request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"summary":"List webhooks","tags":["webhooks"]}},"/webhooks/{ulid}":{"delete":{"description":"Deregister a webhook based on its ulid and clientUlid.<br/><br/>","operationId":"WebhookController_deleteWebhook","parameters":[{"name":"ulid","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"The webhook has been deregistered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteWebhookResponseDto"}}}},"400":{"description":"The provided request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"No webhook found for provided ulid and clientUlid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"summary":"Deregister webhook","tags":["webhooks"]}},"/webhooks/secretKey":{"post":{"description":"Generate a webhook secret as a client. In case you need a new key, rerun this operation to invalidate the previous key and regenerate a new one","operationId":"WebhookController_generateWebhookSecretForClient","parameters":[],"responses":{"201":{"description":"The webhook secret has been generated for the client.","content":{"text/plain":{"schema":{"type":"string","example":"your-webhook-secret-key"}}}},"400":{"description":"The provided request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"summary":"Generate a webhook secret key","tags":["webhooks"]}}},"info":{"title":"Mandate API","description":"Dokapi Mandate API\n\n**Note:** Mandates for Peppol participants using the `0225` scheme (ICD) will be open for Production as soon as Dokapi is confirmed as a French-certified Plateforme Agréée, currently expected on June 15.","version":"N/A","contact":{}},"tags":[],"servers":[{"url":"https://mandate-api.dokapi-stg.io/v1"}],"components":{"schemas":{"ProblemDetailDto":{"type":"object","properties":{"type":{"type":"string","description":"A URI reference that identifies the problem type.","format":"uri","example":"https://httpstatuses.com/500"},"title":{"type":"string","description":"A short, human-readable summary of the problem.","example":"Service Unavailable"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem.","example":"The service is currently unable to handle the request."},"instance":{"type":"string","description":"A URI reference that identifies the specific occurrence of the problem.","example":"/errors/12345"},"status":{"type":"number","description":"The HTTP status code for this occurrence of the problem.","example":500},"uuid":{"type":"string","description":"A UUID that uniquely identifies this specific error occurrence.","example":"550e8400-e29b-41d4-a716-446655440000"}},"required":["title","detail"]},"PersonalInformationDto":{"type":"object","properties":{"firstName":{"type":"string","description":"First name"},"lastName":{"type":"string","description":"Last name"}},"required":["firstName","lastName"]},"ParticipantAgreementDto":{"type":"object","properties":{"date":{"type":"string","description":"Indicates the date on which the agreement was created/signed. In Iso format","example":"2026-01-01"},"version":{"type":"string","description":"The version of the agreement."},"paid":{"type":"boolean","description":"If the agreement is paying."},"signer":{"description":"Personal information of person who signed the agreement","allOf":[{"$ref":"#/components/schemas/PersonalInformationDto"}]}},"required":["date","version","paid","signer"]},"PostalAddressDto":{"type":"object","properties":{"streetName":{"type":"string","description":"The main address line in an address.","example":"Lille gatan 545"},"additionalStreetName":{"type":"string","description":"An additional address line in an address that can be used to give further details supplementing the main line.","example":"Po Box 987"},"cityName":{"type":"string","description":"The common name of the city, town or village, where the tax representative address is located.","example":"Göteborg"},"postalZone":{"type":"string","description":"The identifier for an addressable group of properties according to the relevant postal service.","example":"12345"},"countrySubentity":{"type":"string","description":"The subdivision of a country.","example":"Region Vest"},"countryCode":{"type":"string","description":"Alpha 2 countryCode","example":"BE"}},"required":["streetName","cityName","postalZone","countrySubentity","countryCode"]},"KycCompanyDto":{"type":"object","properties":{"name":{"type":"string"},"address":{"$ref":"#/components/schemas/PostalAddressDto"},"contactEmail":{"type":"string","format":"email"}},"required":["name","address","contactEmail"]},"KycRepresentativeDto":{"type":"object","properties":{"personalInformation":{"$ref":"#/components/schemas/PersonalInformationDto"},"dateOfBirth":{"type":"string","example":"1985-07-12"},"email":{"type":"string","format":"email"},"role":{"type":"string"}},"required":["personalInformation","dateOfBirth","email","role"]},"BelgiumKycDataDto":{"type":"object","properties":{"participantAgreement":{"$ref":"#/components/schemas/ParticipantAgreementDto"},"company":{"$ref":"#/components/schemas/KycCompanyDto"},"representative":{"$ref":"#/components/schemas/KycRepresentativeDto"},"additionalDocuments":{"type":"array","items":{"type":"string"}}},"required":["participantAgreement","company","representative","additionalDocuments"]},"FranceKycDataDto":{"type":"object","properties":{"participantAgreement":{"$ref":"#/components/schemas/ParticipantAgreementDto"},"company":{"$ref":"#/components/schemas/KycCompanyDto"},"representative":{"$ref":"#/components/schemas/KycRepresentativeDto"},"additionalDocuments":{"type":"array","items":{"type":"string"}}},"required":["participantAgreement","company","representative","additionalDocuments"]},"NetherlandsKycDataDto":{"type":"object","properties":{"participantAgreement":{"$ref":"#/components/schemas/ParticipantAgreementDto"},"company":{"$ref":"#/components/schemas/KycCompanyDto"},"representative":{"$ref":"#/components/schemas/KycRepresentativeDto"},"additionalDocuments":{"type":"array","items":{"type":"string"}}},"required":["participantAgreement","company","representative","additionalDocuments"]},"BelgiumMandateIdentifierDto":{"type":"object","properties":{"kbo":{"type":"string","description":"KBO number of the Belgian company"}},"required":["kbo"]},"FranceMandateIdentifierDto":{"type":"object","properties":{"siren":{"type":"string","description":"SIREN number of the French company"},"siret":{"type":"string","description":"SIRET number of the French company"}},"required":["siren"]},"NetherlandsMandateIdentifierDto":{"type":"object","properties":{"kvk":{"type":"string","description":"KVK number of the Dutch company"}},"required":["kvk"]},"ParticipantIdentifierDto":{"type":"object","properties":{"scheme":{"type":"string","example":"iso6523-actorid-upis","description":"The optional scheme for this participant identifier. If none is given, the default scheme value will be used (`iso6523-actorid-upis`)"},"value":{"type":"string","pattern":"^\\d{4}(:[a-zA-Z0-9-._~]{1,50})$","example":"0208:0478493179","description":"The mandatory value for this participant identifier. For identifiers that follow the `iso6523-actorid-upis` scheme, this looks as follows: `{ICD}:{OrganisationId}`.\n**Note:** ICD `0225` (French SIREN/SIRET) is not yet supported in production."}},"required":["value"]},"PeppolEntityDto":{"type":"object","properties":{"participantIdentifier":{"description":"ParticipantIdentifier for this peppol entity","allOf":[{"$ref":"#/components/schemas/ParticipantIdentifierDto"}]},"sendingCapabilities":{"type":"boolean","description":"Indicates if the mandate will allow sending for this entity."},"receivingCapabilities":{"type":"boolean","description":"Indicates if the mandate will allow receiving for this entity."}},"required":["participantIdentifier"]},"MandateDto":{"type":"object","properties":{"ulid":{"type":"string","example":"01KJAHTSTJNZ1M7F6KW2Y2X4ZQ"},"status":{"enum":["REQUESTED","REVIEWING","ACTION_REQUIRED","REVIEWED","ACTIVATING","ACTIVE","INACTIVE"],"type":"string"},"countryCode":{"enum":["BE","NL","FR"],"type":"string"},"contractType":{"enum":["DOKAPI_CONTRACT_BASED","THIRD_PARTY_CONTRACT_BASED"],"type":"string"},"creationTimestamp":{"type":"string"},"lastModifiedTimestamp":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"statusMessage":{"type":"string"},"activatedAt":{"type":"string"},"peppolEntities":{"type":"array","items":{"$ref":"#/components/schemas/PeppolEntityDto"}},"identifier":{"oneOf":[{"$ref":"#/components/schemas/BelgiumMandateIdentifierDto"},{"$ref":"#/components/schemas/FranceMandateIdentifierDto"},{"$ref":"#/components/schemas/NetherlandsMandateIdentifierDto"}],"discriminator":{"propertyName":"country"}},"kycData":{"oneOf":[{"$ref":"#/components/schemas/BelgiumKycDataDto"},{"$ref":"#/components/schemas/FranceKycDataDto"},{"$ref":"#/components/schemas/NetherlandsKycDataDto"}],"discriminator":{"propertyName":"country"}}},"required":["ulid","status","countryCode","contractType","creationTimestamp","lastModifiedTimestamp","startDate","identifier","kycData"]},"BelgiumParticipantMandateRequestDto":{"type":"object","properties":{"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"peppolEntities":{"type":"array","items":{"$ref":"#/components/schemas/PeppolEntityDto"}},"identifier":{"$ref":"#/components/schemas/BelgiumMandateIdentifierDto"},"kycData":{"$ref":"#/components/schemas/BelgiumKycDataDto"}},"required":["startDate","identifier","kycData"]},"RequestMandateDocs":{"type":"object","properties":{}},"NetherlandsParticipantMandateRequestDto":{"type":"object","properties":{"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"peppolEntities":{"type":"array","items":{"$ref":"#/components/schemas/PeppolEntityDto"}},"identifier":{"$ref":"#/components/schemas/NetherlandsMandateIdentifierDto"},"kycData":{"$ref":"#/components/schemas/NetherlandsKycDataDto"}},"required":["startDate","identifier","kycData"]},"FranceParticipantMandateRequestDto":{"type":"object","properties":{"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"peppolEntities":{"type":"array","items":{"$ref":"#/components/schemas/PeppolEntityDto"}},"identifier":{"$ref":"#/components/schemas/FranceMandateIdentifierDto"},"kycData":{"$ref":"#/components/schemas/FranceKycDataDto"}},"required":["startDate","identifier","kycData"]},"UpdateBelgiumParticipantMandateRequestDto":{"type":"object","properties":{"kycData":{"$ref":"#/components/schemas/BelgiumKycDataDto"}},"required":["kycData"]},"UpdateMandateResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"The mandate was successfully updated"},"mandate":{"$ref":"#/components/schemas/MandateDto"}},"required":["message","mandate"]},"UpdateFranceParticipantMandateRequestDto":{"type":"object","properties":{"kycData":{"$ref":"#/components/schemas/FranceKycDataDto"}},"required":["kycData"]},"UpdateNetherlandsParticipantMandateRequestDto":{"type":"object","properties":{"kycData":{"$ref":"#/components/schemas/NetherlandsKycDataDto"}},"required":["kycData"]},"ClientCancellationFeedbackDto":{"type":"object","properties":{"event":{"type":"string","description":"Will always be `client.cancellation` in this case."},"ulid":{"type":"string","description":"A unique identifier for this webhook invocation, requests with the same ULID coming in again can be ignored"},"body":{"type":"string","description":"A message being set as feedback for client cancellation","example":"Cancellation process completed successfully!"}},"required":["event","ulid","body"]},"ClientCancellationResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Client cancellation successfully initiated. Further communications will be sent to the client.cancellation webhook."}},"required":["message"]},"WebhookRequestDto":{"type":"object","properties":{"url":{"type":"string","description":"A valid HTTPS Webhook URL.","format":"url","example":"https://webhook-test.com/004818c78eecacef393fee5822991234"},"events":{"description":"A list of event identifiers to be received on this webhook.<br/><br/>","example":["outgoing-peppol-documents.sent","incoming-peppol-documents.received","client.cancellation"],"type":"array","items":{"type":"string"}}},"required":["url","events"]},"WebhookResponseDto":{"type":"object","properties":{"ulid":{"type":"string","example":"01HT00M1TBRPRPN6HT5ARZ1R2F"},"clientUlid":{"type":"string","example":"01HT00M1TBRPRPN6HT5ARZ1R2F"},"creationTimestamp":{"type":"string","example":"2024-03-08T15:34:18.242Z"},"lastModifiedTimestamp":{"type":"string","example":"2024-03-08T15:34:18.242Z"},"url":{"type":"string","format":"url","example":"https://webhook-test.com/004818c78eecacef393fee5822991234"},"events":{"example":["outgoing-peppol-documents.sent","incoming-peppol-documents.received","client.cancellation"],"type":"array","items":{"type":"string"}}},"required":["ulid","clientUlid","creationTimestamp","lastModifiedTimestamp","url","events"]},"CreateWebhookResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Info about the webhook being created or not","example":"Webhook created successfully"},"webhook":{"description":"Info about the webhook","allOf":[{"$ref":"#/components/schemas/WebhookResponseDto"}]}},"required":["message","webhook"]},"DeleteWebhookResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Info about the webhook being deleted or not","example":"Webhook deleted successfully"}},"required":["message"]}},"securitySchemes":{"oauth2-cc":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://dev-portal.dokapi.io/api/oauth2/token","scopes":{}}},"description":"This API uses OAuth2 Client Credentials. Client credentials can be retrieved from the subscription details.<br/><br/>The endpoints to which you have access depend on your subscription. If an endpoint does not appear to be available, it might not be included in your current subscription.","x-receive-token-in":"request-body","x-client-id":"","x-client-secret":""}}},"security":[{"oauth2-cc":[]}]}