Skip to content
This is a new version of the Kivra Developer Docs. Report issues or share feedback at avsandare.support@kivra.se. The previous version can be found here.

Associate company ID to tenant

POST
/v2/tenant/{tenantKey}/company_id
curl --request POST \
--url https://sender.api.kivra.com/v2/tenant/example/company_id \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "company_id": { "name": "Kivra AB", "orgnr": "SE556840226601" } }'

Add a new company ID for a tenant. A tenant can be associated with one or more company ids (Vat number and company name)

tenantKey
required
string format: hexadecimal

The unique Key for a Tenant

Media typeapplication/json
object
company_id
CompanyId
object
name
required

Legal name of Company

string
Example
Kivra AB
orgnr
required

Vat number of Company

string
Example
SE556840226601

Empty response confirming that the post operation was successful

Another tenant with the same orgnr already exists.

Media typeapplication/json
Error40915
object
code

The 5-digits error code

string
short_message

A short message explaining the conflict

string
long_message

A text message explaining the conflict

string
Example
{
"code": 40915,
"short_message": "Orgnumber already exist",
"long_message": "One or more of the organisation numbers within the company_id's you provided, already exist in existing tenants. Tenants outside your scope: {Name: TestBolag, Tenant key: 1424780396902ee9278b16417f8e3252c3ced28c38, Organisation number: SE556840226601}"
}