Reference
Companies
GET/api/v1/companiesSearch companies
Finds companies by name or city, 50 per page, alphabetically. Use get_company for one company's details, people and orders.scope customers:read
Query
| query | stringWords to find in the name or city. |
| role | one of customer, supplier |
| include_inactive | booleanInclude deactivated rows. Default: only active ones, as the lists in nxva.base show. |
| page | integer1-based page of 50 rows. Omit for the first page. |
Response 200
| items[] | object[] |
| items[].id | string |
| items[].name | string |
| items[].city | string | null |
| items[].is_customer | boolean |
| items[].is_supplier | boolean |
| items[].is_active | boolean |
| items[].people | integer |
| items[].url | string |
| page | integer |
| total | integer |
| has_more | boolean |
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"city": {
"type": [
"string",
"null"
]
},
"is_customer": {
"type": "boolean"
},
"is_supplier": {
"type": "boolean"
},
"is_active": {
"type": "boolean"
},
"people": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"url": {
"type": "string"
}
},
"required": [
"id",
"name",
"city",
"is_customer",
"is_supplier",
"is_active",
"people",
"url"
],
"additionalProperties": false
}
},
"page": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"has_more": {
"type": "boolean"
}
},
"required": [
"items",
"page",
"total",
"has_more"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/companiesCreate company
Creates a company -- a customer by default. Refused when an active company of the same name exists, with its id: use that one, or pass allow_duplicate when it really is a different company. Search first with search_companies.scope customers:write
Body (JSON)
| namerequired | string |
| is_customer | booleanDefault: true. |
| is_supplier | booleanDefault: false. A company can be both. |
| street | stringStreet and number. An empty string clears it; omit it to leave it as it is. |
| zip | stringPostcode. An empty string clears it; omit it to leave it as it is. |
| city | stringCity. An empty string clears it; omit it to leave it as it is. |
| vat_id | stringVAT id, e.g. DE123456789. An empty string clears it; omit it to leave it as it is. |
| country_code | stringISO 3166-1 alpha-2, e.g. "DE". Decides reverse charge on invoices. Default for a new company: DE. |
| document_language | one of de, enThe language quotes and invoices to this company are written in. Default for a new company: de. |
| avv_signed_on | stringThe day the data processing agreement (AVV) was signed, YYYY-MM-DD, not in the future. An empty string clears it. Without it, provisioning does not start an instance for this company. |
| business_evidence_note | stringWhy this company counts as a business for VAT, as evidence. An empty string clears it; omit it to leave it as it is. |
| payment_term_days | integer | nullDays an invoice to this company is due in, proposed on its quotes and used on its free invoices. null clears it: the billing settings' default applies. Omit it to leave it as it is. |
| allow_duplicate | booleanCreate it even though an active company has this name. |
Response 200
| id | string |
| created | boolean |
| name | string |
| street | string | null |
| zip | string | null |
| city | string | null |
| vat_id | string | null |
| country_code | string |
| document_language | string |
| payment_term_days | integer | null |
| avv_signed_on | string | null |
| is_customer | boolean |
| is_supplier | boolean |
| is_active | boolean |
| mail_recipients[]optional | object[] |
| mail_recipients[].kind | string |
| mail_recipients[].role | string |
| mail_recipients[].person | object | null |
| mail_recipients[].person.id | string |
| mail_recipients[].person.name | string |
| mail_recipients[].email | string | null |
| ticket_sources[]optional | object[] |
| ticket_sources[].id | string |
| ticket_sources[].label | string |
| ticket_sources[].kind | string |
| ticket_sources[].address | string |
| ticket_sources[].active | boolean |
| url | string |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"created": {
"type": "boolean"
},
"name": {
"type": "string"
},
"street": {
"type": [
"string",
"null"
]
},
"zip": {
"type": [
"string",
"null"
]
},
"city": {
"type": [
"string",
"null"
]
},
"vat_id": {
"type": [
"string",
"null"
]
},
"country_code": {
"type": "string"
},
"document_language": {
"type": "string"
},
"payment_term_days": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"avv_signed_on": {
"type": [
"string",
"null"
]
},
"is_customer": {
"type": "boolean"
},
"is_supplier": {
"type": "boolean"
},
"is_active": {
"type": "boolean"
},
"mail_recipients": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"role": {
"type": "string"
},
"person": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"email": {
"type": [
"string",
"null"
]
}
},
"required": [
"kind",
"role",
"person",
"email"
],
"additionalProperties": false
}
},
"ticket_sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"kind": {
"type": "string"
},
"address": {
"type": "string"
},
"active": {
"type": "boolean"
}
},
"required": [
"id",
"label",
"kind",
"address",
"active"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
}
},
"required": [
"id",
"created",
"name",
"street",
"zip",
"city",
"vat_id",
"country_code",
"document_language",
"payment_term_days",
"avv_signed_on",
"is_customer",
"is_supplier",
"is_active",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
GET/api/v1/companies/{id}Get company
One company: address, VAT id, note, its people, its orders, how many of its tasks are still open, who receives its invoices and order documents, and the ticket systems its mails come from.scope customers:read
Path
| idrequired | stringThe company's id, from search_companies. |
Response 200
| id | string |
| name | string |
| street | string | null |
| zip | string | null |
| city | string | null |
| country_code | string |
| vat_id | string | null |
| payment_term_days | integer | null |
| avv_signed_on | string | null |
| note | string | null |
| is_customer | boolean |
| is_supplier | boolean |
| is_active | boolean |
| people[] | object[] |
| people[].id | string |
| people[].name | string |
| people[].email | string | null |
| people[].phone | string | null |
| people[].position | string | null |
| people[].is_active | boolean |
| orders[]optional | object[] |
| orders[].id | string |
| orders[].number | string |
| orders[].title | string |
| orders[].status | string |
| mail_recipients[]optional | object[] |
| mail_recipients[].kind | string |
| mail_recipients[].role | string |
| mail_recipients[].person | object | null |
| mail_recipients[].person.id | string |
| mail_recipients[].person.name | string |
| mail_recipients[].email | string | null |
| ticket_sources[]optional | object[] |
| ticket_sources[].id | string |
| ticket_sources[].label | string |
| ticket_sources[].kind | string |
| ticket_sources[].address | string |
| ticket_sources[].key_pattern | string | null |
| ticket_sources[].active | boolean |
| ticket_sources[].default_order | string | null |
| ticket_sources[].fallback_person | string | null |
| ticket_sources[].answer_mode | string |
| ticket_sources[].answer_address | string | null |
| open_tasks | integer |
| url | string |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"street": {
"type": [
"string",
"null"
]
},
"zip": {
"type": [
"string",
"null"
]
},
"city": {
"type": [
"string",
"null"
]
},
"country_code": {
"type": "string"
},
"vat_id": {
"type": [
"string",
"null"
]
},
"payment_term_days": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"avv_signed_on": {
"type": [
"string",
"null"
]
},
"note": {
"type": [
"string",
"null"
]
},
"is_customer": {
"type": "boolean"
},
"is_supplier": {
"type": "boolean"
},
"is_active": {
"type": "boolean"
},
"people": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"phone": {
"type": [
"string",
"null"
]
},
"position": {
"type": [
"string",
"null"
]
},
"is_active": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"position",
"is_active"
],
"additionalProperties": false
}
},
"orders": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"number": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "string"
}
},
"required": [
"id",
"number",
"title",
"status"
],
"additionalProperties": false
}
},
"mail_recipients": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"role": {
"type": "string"
},
"person": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"email": {
"type": [
"string",
"null"
]
}
},
"required": [
"kind",
"role",
"person",
"email"
],
"additionalProperties": false
}
},
"ticket_sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"kind": {
"type": "string"
},
"address": {
"type": "string"
},
"key_pattern": {
"type": [
"string",
"null"
]
},
"active": {
"type": "boolean"
},
"default_order": {
"type": [
"string",
"null"
]
},
"fallback_person": {
"type": [
"string",
"null"
]
},
"answer_mode": {
"type": "string"
},
"answer_address": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"label",
"kind",
"address",
"key_pattern",
"active",
"default_order",
"fallback_person",
"answer_mode",
"answer_address"
],
"additionalProperties": false
}
},
"open_tasks": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"url": {
"type": "string"
}
},
"required": [
"id",
"name",
"street",
"zip",
"city",
"country_code",
"vat_id",
"payment_term_days",
"avv_signed_on",
"note",
"is_customer",
"is_supplier",
"is_active",
"people",
"open_tasks",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
PATCH/api/v1/companies/{id}Update company
Changes a company's name, roles, address, VAT id, country, document language, payment term or AVV date. Only the fields given change. A role stays while quotes or contracts rely on it.scope customers:write
Path
| idrequired | stringThe company's id, from search_companies. |
Body (JSON)
| name | string |
| is_customer | boolean |
| is_supplier | boolean |
| active | booleanfalse deactivates the company: it stays, with its quotes and orders, but is no longer offered. true activates it again. |
| street | stringStreet and number. An empty string clears it; omit it to leave it as it is. |
| zip | stringPostcode. An empty string clears it; omit it to leave it as it is. |
| city | stringCity. An empty string clears it; omit it to leave it as it is. |
| vat_id | stringVAT id, e.g. DE123456789. An empty string clears it; omit it to leave it as it is. |
| country_code | stringISO 3166-1 alpha-2, e.g. "DE". Decides reverse charge on invoices. Default for a new company: DE. |
| document_language | one of de, enThe language quotes and invoices to this company are written in. Default for a new company: de. |
| avv_signed_on | stringThe day the data processing agreement (AVV) was signed, YYYY-MM-DD, not in the future. An empty string clears it. Without it, provisioning does not start an instance for this company. |
| business_evidence_note | stringWhy this company counts as a business for VAT, as evidence. An empty string clears it; omit it to leave it as it is. |
| payment_term_days | integer | nullDays an invoice to this company is due in, proposed on its quotes and used on its free invoices. null clears it: the billing settings' default applies. Omit it to leave it as it is. |
Response 200
| id | string |
| created | boolean |
| name | string |
| street | string | null |
| zip | string | null |
| city | string | null |
| vat_id | string | null |
| country_code | string |
| document_language | string |
| payment_term_days | integer | null |
| avv_signed_on | string | null |
| is_customer | boolean |
| is_supplier | boolean |
| is_active | boolean |
| mail_recipients[]optional | object[] |
| mail_recipients[].kind | string |
| mail_recipients[].role | string |
| mail_recipients[].person | object | null |
| mail_recipients[].person.id | string |
| mail_recipients[].person.name | string |
| mail_recipients[].email | string | null |
| ticket_sources[]optional | object[] |
| ticket_sources[].id | string |
| ticket_sources[].label | string |
| ticket_sources[].kind | string |
| ticket_sources[].address | string |
| ticket_sources[].active | boolean |
| url | string |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"created": {
"type": "boolean"
},
"name": {
"type": "string"
},
"street": {
"type": [
"string",
"null"
]
},
"zip": {
"type": [
"string",
"null"
]
},
"city": {
"type": [
"string",
"null"
]
},
"vat_id": {
"type": [
"string",
"null"
]
},
"country_code": {
"type": "string"
},
"document_language": {
"type": "string"
},
"payment_term_days": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"avv_signed_on": {
"type": [
"string",
"null"
]
},
"is_customer": {
"type": "boolean"
},
"is_supplier": {
"type": "boolean"
},
"is_active": {
"type": "boolean"
},
"mail_recipients": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"role": {
"type": "string"
},
"person": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"email": {
"type": [
"string",
"null"
]
}
},
"required": [
"kind",
"role",
"person",
"email"
],
"additionalProperties": false
}
},
"ticket_sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"kind": {
"type": "string"
},
"address": {
"type": "string"
},
"active": {
"type": "boolean"
}
},
"required": [
"id",
"label",
"kind",
"address",
"active"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
}
},
"required": [
"id",
"created",
"name",
"street",
"zip",
"city",
"vat_id",
"country_code",
"document_language",
"payment_term_days",
"avv_signed_on",
"is_customer",
"is_supplier",
"is_active",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.