Request access to a tenant
Request access to an existing tenant that is outside the client scope. Typically this request follows an unsuccessful attempt to create a tenant that resulted in a conflict error (error 409).
The meaning of the conflict error is that a tenant is already associated to a company_id including the same orgnr as in the tenant that the client attempted to post, and the tenant who owns the orgnr is outside the scope for the client.
In Kivra, it is allowed to have several different flows on the same tenant, for example one flow for invoices and another flow for salary slips. As these flows could be managed by different clients, we need a mechanism to allow sharing a tenant between clients. The request_access endpoint provide this functionality. As the request may be granted (or denied) asynchronously, after a successfull call to request_access the client will need to poll the request until it becomes accepted or rejected.
As allowing access to a new tenant requires modification of the scope for the client, an authorization must be performed once the request has been accepted, to retrieve an access token with the new scope.
If the client posts a new identical request (requesting the same OrgNr for the same client), the same object will be returned with an updated status.
Request
- Base URL: https://sender.api.kivra.com
- URL: https://sender.api.kivra.com/v2/tenant/request_access
- Auth: oAuth2Client (defined in the document in a form this page cannot read)
Request body
Example request
{
"vat_number": "SE556840226601"
}Response
Data about the requested tenant
Example response
{
"created_at": "2019-05-20T12:42:29Z",
"created_by": "client_15063298495eafd2749bb78e2f991af3ab023d13df",
"status": "pending",
"client_name": "Client XYZ",
"tenant_name": "Tenant ABC",
"tenant_key": "1424780396902ee9278b16417f8e3252c3ced28c38"
}Changes
No recorded changes to this operation across all 1 revision of this API.