Customers
The customer register.
List customers
GET
/customers
listCustomers
The customer register. Personal numbers are never returned, only has_personal_number.
Scope
Parameters
-
limitinteger queryPage size, 1–200.
-
cursorstring queryOpaque cursor from meta.next_cursor of the previous page.
-
updated_sincestring (date-time) queryOnly records whose updated_at is strictly later than this ISO 8601 time. Lists are ordered by updated_at, then id, so a sync stores the updated_at of the last record it has seen and passes it next time, walking all pages with `cursor`.
-
is_activeboolean queryOnly active (true) or inactive (false) records.
Responses
200 OK – A page of customers.
application/jsonobject
-
dataarray<Customer> required16 fields · each item
-
idinteger -
numberinteger -
namestring -
org_numberstring nullable -
has_personal_numberbooleanWhether a personal number is on file. The number itself is never returned.
-
vat_numberstring nullable -
emailstring nullable -
phonestring nullable -
addressobject5 fields
-
line1string nullable -
line2string nullable -
postal_codestring nullable -
citystring nullable -
countrystring nullableISO 3166-1 alpha-2.
-
-
payment_terms_daysinteger -
is_activeboolean -
reverse_charge_constructionboolean -
foreign_salestring nullable -
processing_restrictedbooleanProcessing restricted under GDPR art. 18.
-
created_atstring (date-time) -
updated_atstring (date-time)
-
-
metaListMeta required3 fields
-
limitinteger required -
next_cursorstring required nullableOpaque; pass as `cursor` for the next page. null on the last page.
-
has_moreboolean required
-
401 Unauthorized – Missing, invalid, expired or revoked token or API key. Also returned when the person behind the credential has left the company (an OAuth grant is then revoked for good).
-
unauthenticatedNo valid credentialNyckeln eller token saknas, är ogiltig, har gått ut eller har återkallats.
403 Forbidden – The credential may not do this: a scope is missing, the granting person no longer has the permission, the address is not allowed, the company is archived (read-only) or no longer allows the app.
-
insufficient_scopeScope missing or permission lostNyckeln eller appen saknar behörigheten vouchers:post, eller så har personen som gav den inte längre den behörigheten i företaget.
-
forbiddenThe action refuses (for example changing a posted voucher)Behörighet saknas för det här.
-
ip_not_allowedOutside the IP allowlistFöretaget tillåter inte anrop från den här adressen.
-
company_archivedWrite to an archived companyFöretaget är arkiverat och kan bara läsas.
-
app_not_allowedThe company no longer allows the appFöretaget tillåter inte längre den här appen.
404 Not Found – Not found. Also the answer for another company's ids (existence is never revealed) and for every call while NONOX Connect is turned off for the company.
-
not_foundUnknown id, other company's id, or module offDet du söker finns inte.
429 Too Many Requests – Rate limit exceeded (per credential, per company or per address). Wait Retry-After seconds.
-
rate_limitedOver the limitFör många anrop. Försök igen om 23 sekunder.
Code samples
curl "https://nonox.app/api/v1/customers?limit=50&updated_since=2026-03-01T00%3A00%3A00%2B01%3A00" \
-H "Authorization: Bearer $NONOX_TOKEN" \
-H "Accept: application/json"use Illuminate\Support\Facades\Http;
$response = Http::withToken(config('services.nonox.token'))
->acceptJson()
->get('https://nonox.app/api/v1/customers', [
'limit' => 50,
'updated_since' => '2026-03-01T00:00:00+01:00',
]);
$response->throw();
$data = $response->json('data');$client = new \GuzzleHttp\Client(['timeout' => 30]);
$response = $client->request('GET', 'https://nonox.app/api/v1/customers', [
'headers' => [
'Authorization' => 'Bearer '.getenv('NONOX_TOKEN'),
'Accept' => 'application/json',
],
'query' => [
'limit' => 50,
'updated_since' => '2026-03-01T00:00:00+01:00',
],
]);
$data = json_decode((string) $response->getBody(), true, flags: JSON_THROW_ON_ERROR)['data'];const url = new URL('https://nonox.app/api/v1/customers');
url.searchParams.set('limit', '50');
url.searchParams.set('updated_since', '2026-03-01T00:00:00+01:00');
const response = await fetch(url, {
headers: {
Authorization: `Bearer ${process.env.NONOX_TOKEN}`,
Accept: 'application/json',
},
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
const { data } = await response.json();import os
import requests
response = requests.get(
"https://nonox.app/api/v1/customers",
headers={
"Authorization": f"Bearer {os.environ['NONOX_TOKEN']}",
"Accept": "application/json",
},
params={
"limit": 50,
"updated_since": "2026-03-01T00:00:00+01:00",
},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Responses · 200
{
"data": [
{
"id": 18,
"number": 1004,
"name": "Kund Exempel AB",
"org_number": "559900-4560",
"has_personal_number": false,
"vat_number": "SE559900456001",
"email": "faktura@kund.example.se",
"phone": "08-000 00 00",
"address": {
"line1": "Kundvägen 5",
"line2": null,
"postal_code": "222 33",
"city": "Exempelby",
"country": "SE"
},
"payment_terms_days": 30,
"is_active": true,
"reverse_charge_construction": false,
"foreign_sale": null,
"processing_restricted": false,
"created_at": "2026-02-10T13:00:00+01:00",
"updated_at": "2026-02-10T13:00:00+01:00"
}
],
"meta": {
"limit": 50,
"next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0wMy0wMiAxMDo0NToxMiIsImlkIjoiMGI5ZjNjMWUiLCJfcG9pbnRzVG9OZXh0SXRlbXMiOnRydWV9",
"has_more": true
}
}Error
4011 example
{
"type": "urn:nonox:problem:unauthenticated",
"title": "Unauthorized",
"status": 401,
"code": "unauthenticated",
"detail": "Nyckeln eller token saknas, är ogiltig, har gått ut eller har återkallats.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4035 examples
{
"type": "urn:nonox:problem:insufficient_scope",
"title": "Forbidden",
"status": 403,
"code": "insufficient_scope",
"detail": "Nyckeln eller appen saknar behörigheten vouchers:post, eller så har personen som gav den inte längre den behörigheten i företaget.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17",
"required_scopes": [
"vouchers:post"
]
}{
"type": "urn:nonox:problem:forbidden",
"title": "Forbidden",
"status": 403,
"code": "forbidden",
"detail": "Behörighet saknas för det här.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}{
"type": "urn:nonox:problem:ip_not_allowed",
"title": "Forbidden",
"status": 403,
"code": "ip_not_allowed",
"detail": "Företaget tillåter inte anrop från den här adressen.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}{
"type": "urn:nonox:problem:company_archived",
"title": "Forbidden",
"status": 403,
"code": "company_archived",
"detail": "Företaget är arkiverat och kan bara läsas.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}{
"type": "urn:nonox:problem:app_not_allowed",
"title": "Forbidden",
"status": 403,
"code": "app_not_allowed",
"detail": "Företaget tillåter inte längre den här appen.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4041 example
{
"type": "urn:nonox:problem:not_found",
"title": "Not Found",
"status": 404,
"code": "not_found",
"detail": "Det du söker finns inte.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4291 example
{
"type": "urn:nonox:problem:rate_limited",
"title": "Too Many Requests",
"status": 429,
"code": "rate_limited",
"detail": "För många anrop. Försök igen om 23 sekunder.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}Create a customer
POST
/customers
createCustomer
Adds a customer; the number comes from the company's customer number series. personal_number is write-only (for sole traders and private persons) and is stored encrypted. Same Action as the app (SaveCustomer).
Scope
Parameters
-
Idempotency-Keystring header requiredRequired on every POST. A unique value per intended operation (a UUID v4 is ideal), 1–255 visible ASCII characters. Kept 24 hours per credential: the same key with the same request returns the stored response (Idempotent-Replayed: true); with a different request 422 idempotency_key_reused; while the first is still running 409. Server errors (5xx) are not stored, so retry with the same key.
Request body
application/jsonCustomerInput required
The customer.
-
namestring required -
org_numberstring nullableSwedish organisation number, checked with Luhn.
-
personal_numberstring nullable write-onlyWrite-only. Personnummer for sole traders and private persons, checked with Luhn, stored encrypted, never returned.
-
vat_numberstring nullableStarts with the country code.
-
emailstring (email) nullable -
phonestring nullable -
address_line1string nullable -
address_line2string nullable -
postal_codestring nullable -
citystring nullable -
countrystring nullableTwo-letter country code.
-
payment_terms_daysinteger required -
is_activeboolean -
reverse_charge_constructionbooleanConstruction services under omvänd betalningsskyldighet.
-
foreign_salestring nullable
Responses
201 Created – The customer.
application/jsonobject
-
dataCustomer required16 fields
-
idinteger -
numberinteger -
namestring -
org_numberstring nullable -
has_personal_numberbooleanWhether a personal number is on file. The number itself is never returned.
-
vat_numberstring nullable -
emailstring nullable -
phonestring nullable -
addressobject5 fields
-
line1string nullable -
line2string nullable -
postal_codestring nullable -
citystring nullable -
countrystring nullableISO 3166-1 alpha-2.
-
-
payment_terms_daysinteger -
is_activeboolean -
reverse_charge_constructionboolean -
foreign_salestring nullable -
processing_restrictedbooleanProcessing restricted under GDPR art. 18.
-
created_atstring (date-time) -
updated_atstring (date-time)
-
400 Bad Request – Bad request: missing or invalid Idempotency-Key, or a body that is not a JSON object.
-
idempotency_key_requiredNo Idempotency-Key on a POSTSkicka en unik Idempotency-Key (till exempel ett UUID) med varje POST, så att ett nytt försök aldrig bokför två gånger.
-
idempotency_key_invalidIdempotency-Key too long or not visible ASCIIIdempotency-Key ska vara 1–255 synliga ASCII-tecken.
-
invalid_jsonMalformed JSONKroppen är inte giltig JSON (ett objekt).
401 Unauthorized – Missing, invalid, expired or revoked token or API key. Also returned when the person behind the credential has left the company (an OAuth grant is then revoked for good).
-
unauthenticatedNo valid credentialNyckeln eller token saknas, är ogiltig, har gått ut eller har återkallats.
403 Forbidden – The credential may not do this: a scope is missing, the granting person no longer has the permission, the address is not allowed, the company is archived (read-only) or no longer allows the app.
-
insufficient_scopeScope missing or permission lostNyckeln eller appen saknar behörigheten vouchers:post, eller så har personen som gav den inte längre den behörigheten i företaget.
-
forbiddenThe action refuses (for example changing a posted voucher)Behörighet saknas för det här.
-
ip_not_allowedOutside the IP allowlistFöretaget tillåter inte anrop från den här adressen.
-
company_archivedWrite to an archived companyFöretaget är arkiverat och kan bara läsas.
-
app_not_allowedThe company no longer allows the appFöretaget tillåter inte längre den här appen.
404 Not Found – Not found. Also the answer for another company's ids (existence is never revealed) and for every call while NONOX Connect is turned off for the company.
-
not_foundUnknown id, other company's id, or module offDet du söker finns inte.
409 Conflict – A request with the same Idempotency-Key is still running.
-
idempotency_in_progressSame key, first request not finishedEn begäran med samma Idempotency-Key pågår. Vänta och försök igen.
415 Unsupported Media Type – The body is not application/json (or multipart/form-data where a file is accepted).
-
unsupported_media_typeWrong Content-TypeSkicka JSON (application/json).
422 Unprocessable Content – Validation failed, or the Idempotency-Key was already used for a different request.
-
validation_failedField errorsUppgifterna kunde inte godtas. Se errors.
-
idempotency_key_reusedSame key, different bodyIdempotency-Key har redan använts för en annan begäran. Använd en ny nyckel för en ny begäran.
429 Too Many Requests – Rate limit exceeded (per credential, per company or per address). Wait Retry-After seconds.
-
rate_limitedOver the limitFör många anrop. Försök igen om 23 sekunder.
Code samples
curl -X POST "https://nonox.app/api/v1/customers" \
-H "Authorization: Bearer $NONOX_TOKEN" \
-H "Accept: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "Kund Exempel AB",
"org_number": "559900-4560",
"vat_number": "SE559900456001",
"email": "faktura@kund.example.se",
"address_line1": "Kundvägen 5",
"postal_code": "222 33",
"city": "Exempelby",
"country": "SE",
"payment_terms_days": 30
}'use Illuminate\Support\Facades\Http;
use Illuminate\Support\Str;
$response = Http::withToken(config('services.nonox.token'))
->acceptJson()
->withHeaders(['Idempotency-Key' => (string) Str::uuid()])
->post('https://nonox.app/api/v1/customers', [
'name' => 'Kund Exempel AB',
'org_number' => '559900-4560',
'vat_number' => 'SE559900456001',
'email' => 'faktura@kund.example.se',
'address_line1' => 'Kundvägen 5',
'postal_code' => '222 33',
'city' => 'Exempelby',
'country' => 'SE',
'payment_terms_days' => 30,
]);
$response->throw();
$data = $response->json('data');$client = new \GuzzleHttp\Client(['timeout' => 30]);
$response = $client->request('POST', 'https://nonox.app/api/v1/customers', [
'headers' => [
'Authorization' => 'Bearer '.getenv('NONOX_TOKEN'),
'Accept' => 'application/json',
'Idempotency-Key' => bin2hex(random_bytes(16)),
],
'json' => [
'name' => 'Kund Exempel AB',
'org_number' => '559900-4560',
'vat_number' => 'SE559900456001',
'email' => 'faktura@kund.example.se',
'address_line1' => 'Kundvägen 5',
'postal_code' => '222 33',
'city' => 'Exempelby',
'country' => 'SE',
'payment_terms_days' => 30,
],
]);
$data = json_decode((string) $response->getBody(), true, flags: JSON_THROW_ON_ERROR)['data'];const response = await fetch('https://nonox.app/api/v1/customers', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.NONOX_TOKEN}`,
Accept: 'application/json',
'Idempotency-Key': crypto.randomUUID(),
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Kund Exempel AB",
"org_number": "559900-4560",
"vat_number": "SE559900456001",
"email": "faktura@kund.example.se",
"address_line1": "Kundvägen 5",
"postal_code": "222 33",
"city": "Exempelby",
"country": "SE",
"payment_terms_days": 30
}),
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
const { data } = await response.json();import os
import uuid
import requests
response = requests.post(
"https://nonox.app/api/v1/customers",
headers={
"Authorization": f"Bearer {os.environ['NONOX_TOKEN']}",
"Accept": "application/json",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"name": "Kund Exempel AB",
"org_number": "559900-4560",
"vat_number": "SE559900456001",
"email": "faktura@kund.example.se",
"address_line1": "Kundvägen 5",
"postal_code": "222 33",
"city": "Exempelby",
"country": "SE",
"payment_terms_days": 30,
},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Responses · 201
{
"data": {
"id": 18,
"number": 1004,
"name": "Kund Exempel AB",
"org_number": "559900-4560",
"has_personal_number": false,
"vat_number": "SE559900456001",
"email": "faktura@kund.example.se",
"phone": "08-000 00 00",
"address": {
"line1": "Kundvägen 5",
"line2": null,
"postal_code": "222 33",
"city": "Exempelby",
"country": "SE"
},
"payment_terms_days": 30,
"is_active": true,
"reverse_charge_construction": false,
"foreign_sale": null,
"processing_restricted": false,
"created_at": "2026-02-10T13:00:00+01:00",
"updated_at": "2026-02-10T13:00:00+01:00"
}
}Error
4003 examples
{
"type": "urn:nonox:problem:idempotency_key_required",
"title": "Bad Request",
"status": 400,
"code": "idempotency_key_required",
"detail": "Skicka en unik Idempotency-Key (till exempel ett UUID) med varje POST, så att ett nytt försök aldrig bokför två gånger.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}{
"type": "urn:nonox:problem:idempotency_key_invalid",
"title": "Bad Request",
"status": 400,
"code": "idempotency_key_invalid",
"detail": "Idempotency-Key ska vara 1–255 synliga ASCII-tecken.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}{
"type": "urn:nonox:problem:invalid_json",
"title": "Bad Request",
"status": 400,
"code": "invalid_json",
"detail": "Kroppen är inte giltig JSON (ett objekt).",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4011 example
{
"type": "urn:nonox:problem:unauthenticated",
"title": "Unauthorized",
"status": 401,
"code": "unauthenticated",
"detail": "Nyckeln eller token saknas, är ogiltig, har gått ut eller har återkallats.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4035 examples
{
"type": "urn:nonox:problem:insufficient_scope",
"title": "Forbidden",
"status": 403,
"code": "insufficient_scope",
"detail": "Nyckeln eller appen saknar behörigheten vouchers:post, eller så har personen som gav den inte längre den behörigheten i företaget.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17",
"required_scopes": [
"vouchers:post"
]
}{
"type": "urn:nonox:problem:forbidden",
"title": "Forbidden",
"status": 403,
"code": "forbidden",
"detail": "Behörighet saknas för det här.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}{
"type": "urn:nonox:problem:ip_not_allowed",
"title": "Forbidden",
"status": 403,
"code": "ip_not_allowed",
"detail": "Företaget tillåter inte anrop från den här adressen.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}{
"type": "urn:nonox:problem:company_archived",
"title": "Forbidden",
"status": 403,
"code": "company_archived",
"detail": "Företaget är arkiverat och kan bara läsas.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}{
"type": "urn:nonox:problem:app_not_allowed",
"title": "Forbidden",
"status": 403,
"code": "app_not_allowed",
"detail": "Företaget tillåter inte längre den här appen.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4041 example
{
"type": "urn:nonox:problem:not_found",
"title": "Not Found",
"status": 404,
"code": "not_found",
"detail": "Det du söker finns inte.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4091 example
{
"type": "urn:nonox:problem:idempotency_in_progress",
"title": "Conflict",
"status": 409,
"code": "idempotency_in_progress",
"detail": "En begäran med samma Idempotency-Key pågår. Vänta och försök igen.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4151 example
{
"type": "urn:nonox:problem:unsupported_media_type",
"title": "Unsupported Media Type",
"status": 415,
"code": "unsupported_media_type",
"detail": "Skicka JSON (application/json).",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4222 examples
{
"type": "urn:nonox:problem:validation_failed",
"title": "Unprocessable Content",
"status": 422,
"code": "validation_failed",
"detail": "Uppgifterna kunde inte godtas. Se errors.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17",
"errors": {
"rows": [
"Verifikationen balanserar inte: debet och kredit skiljer sig åt."
],
"voucher_date": [
"Det finns inget räkenskapsår som omfattar 2031-01-01."
]
}
}{
"type": "urn:nonox:problem:idempotency_key_reused",
"title": "Unprocessable Content",
"status": 422,
"code": "idempotency_key_reused",
"detail": "Idempotency-Key har redan använts för en annan begäran. Använd en ny nyckel för en ny begäran.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4291 example
{
"type": "urn:nonox:problem:rate_limited",
"title": "Too Many Requests",
"status": 429,
"code": "rate_limited",
"detail": "För många anrop. Försök igen om 23 sekunder.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}Get a customer
GET
/customers/{customer}
getCustomer
One customer by id.
Scope
Parameters
-
customerinteger path requiredCustomer id (not the customer number).
Responses
200 OK – The customer.
application/jsonobject
-
dataCustomer required16 fields
-
idinteger -
numberinteger -
namestring -
org_numberstring nullable -
has_personal_numberbooleanWhether a personal number is on file. The number itself is never returned.
-
vat_numberstring nullable -
emailstring nullable -
phonestring nullable -
addressobject5 fields
-
line1string nullable -
line2string nullable -
postal_codestring nullable -
citystring nullable -
countrystring nullableISO 3166-1 alpha-2.
-
-
payment_terms_daysinteger -
is_activeboolean -
reverse_charge_constructionboolean -
foreign_salestring nullable -
processing_restrictedbooleanProcessing restricted under GDPR art. 18.
-
created_atstring (date-time) -
updated_atstring (date-time)
-
401 Unauthorized – Missing, invalid, expired or revoked token or API key. Also returned when the person behind the credential has left the company (an OAuth grant is then revoked for good).
-
unauthenticatedNo valid credentialNyckeln eller token saknas, är ogiltig, har gått ut eller har återkallats.
403 Forbidden – The credential may not do this: a scope is missing, the granting person no longer has the permission, the address is not allowed, the company is archived (read-only) or no longer allows the app.
-
insufficient_scopeScope missing or permission lostNyckeln eller appen saknar behörigheten vouchers:post, eller så har personen som gav den inte längre den behörigheten i företaget.
-
forbiddenThe action refuses (for example changing a posted voucher)Behörighet saknas för det här.
-
ip_not_allowedOutside the IP allowlistFöretaget tillåter inte anrop från den här adressen.
-
company_archivedWrite to an archived companyFöretaget är arkiverat och kan bara läsas.
-
app_not_allowedThe company no longer allows the appFöretaget tillåter inte längre den här appen.
404 Not Found – Not found. Also the answer for another company's ids (existence is never revealed) and for every call while NONOX Connect is turned off for the company.
-
not_foundUnknown id, other company's id, or module offDet du söker finns inte.
429 Too Many Requests – Rate limit exceeded (per credential, per company or per address). Wait Retry-After seconds.
-
rate_limitedOver the limitFör många anrop. Försök igen om 23 sekunder.
Code samples
curl "https://nonox.app/api/v1/customers/18" \
-H "Authorization: Bearer $NONOX_TOKEN" \
-H "Accept: application/json"use Illuminate\Support\Facades\Http;
$response = Http::withToken(config('services.nonox.token'))
->acceptJson()
->get('https://nonox.app/api/v1/customers/18');
$response->throw();
$data = $response->json('data');$client = new \GuzzleHttp\Client(['timeout' => 30]);
$response = $client->request('GET', 'https://nonox.app/api/v1/customers/18', [
'headers' => [
'Authorization' => 'Bearer '.getenv('NONOX_TOKEN'),
'Accept' => 'application/json',
],
]);
$data = json_decode((string) $response->getBody(), true, flags: JSON_THROW_ON_ERROR)['data'];const response = await fetch('https://nonox.app/api/v1/customers/18', {
headers: {
Authorization: `Bearer ${process.env.NONOX_TOKEN}`,
Accept: 'application/json',
},
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
const { data } = await response.json();import os
import requests
response = requests.get(
"https://nonox.app/api/v1/customers/18",
headers={
"Authorization": f"Bearer {os.environ['NONOX_TOKEN']}",
"Accept": "application/json",
},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Responses · 200
{
"data": {
"id": 18,
"number": 1004,
"name": "Kund Exempel AB",
"org_number": "559900-4560",
"has_personal_number": false,
"vat_number": "SE559900456001",
"email": "faktura@kund.example.se",
"phone": "08-000 00 00",
"address": {
"line1": "Kundvägen 5",
"line2": null,
"postal_code": "222 33",
"city": "Exempelby",
"country": "SE"
},
"payment_terms_days": 30,
"is_active": true,
"reverse_charge_construction": false,
"foreign_sale": null,
"processing_restricted": false,
"created_at": "2026-02-10T13:00:00+01:00",
"updated_at": "2026-02-10T13:00:00+01:00"
}
}Error
4011 example
{
"type": "urn:nonox:problem:unauthenticated",
"title": "Unauthorized",
"status": 401,
"code": "unauthenticated",
"detail": "Nyckeln eller token saknas, är ogiltig, har gått ut eller har återkallats.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4035 examples
{
"type": "urn:nonox:problem:insufficient_scope",
"title": "Forbidden",
"status": 403,
"code": "insufficient_scope",
"detail": "Nyckeln eller appen saknar behörigheten vouchers:post, eller så har personen som gav den inte längre den behörigheten i företaget.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17",
"required_scopes": [
"vouchers:post"
]
}{
"type": "urn:nonox:problem:forbidden",
"title": "Forbidden",
"status": 403,
"code": "forbidden",
"detail": "Behörighet saknas för det här.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}{
"type": "urn:nonox:problem:ip_not_allowed",
"title": "Forbidden",
"status": 403,
"code": "ip_not_allowed",
"detail": "Företaget tillåter inte anrop från den här adressen.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}{
"type": "urn:nonox:problem:company_archived",
"title": "Forbidden",
"status": 403,
"code": "company_archived",
"detail": "Företaget är arkiverat och kan bara läsas.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}{
"type": "urn:nonox:problem:app_not_allowed",
"title": "Forbidden",
"status": 403,
"code": "app_not_allowed",
"detail": "Företaget tillåter inte längre den här appen.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4041 example
{
"type": "urn:nonox:problem:not_found",
"title": "Not Found",
"status": 404,
"code": "not_found",
"detail": "Det du söker finns inte.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4291 example
{
"type": "urn:nonox:problem:rate_limited",
"title": "Too Many Requests",
"status": 429,
"code": "rate_limited",
"detail": "För många anrop. Försök igen om 23 sekunder.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}Change a customer
PATCH
/customers/{customer}
updateCustomer
Changes the fields sent; the others keep their values.
Scope
Parameters
-
customerinteger path requiredCustomer id (not the customer number).
Request body
application/jsonCustomerPatch required
Any subset of CustomerInput.
-
namestring -
org_numberstring nullableSwedish organisation number, checked with Luhn.
-
personal_numberstring nullable write-onlyWrite-only. Personnummer for sole traders and private persons, checked with Luhn, stored encrypted, never returned.
-
vat_numberstring nullableStarts with the country code.
-
emailstring (email) nullable -
phonestring nullable -
address_line1string nullable -
address_line2string nullable -
postal_codestring nullable -
citystring nullable -
countrystring nullableTwo-letter country code.
-
payment_terms_daysinteger -
is_activeboolean -
reverse_charge_constructionbooleanConstruction services under omvänd betalningsskyldighet.
-
foreign_salestring nullable
Responses
200 OK – The customer.
application/jsonobject
-
dataCustomer required16 fields
-
idinteger -
numberinteger -
namestring -
org_numberstring nullable -
has_personal_numberbooleanWhether a personal number is on file. The number itself is never returned.
-
vat_numberstring nullable -
emailstring nullable -
phonestring nullable -
addressobject5 fields
-
line1string nullable -
line2string nullable -
postal_codestring nullable -
citystring nullable -
countrystring nullableISO 3166-1 alpha-2.
-
-
payment_terms_daysinteger -
is_activeboolean -
reverse_charge_constructionboolean -
foreign_salestring nullable -
processing_restrictedbooleanProcessing restricted under GDPR art. 18.
-
created_atstring (date-time) -
updated_atstring (date-time)
-
400 Bad Request – Bad request: missing or invalid Idempotency-Key, or a body that is not a JSON object.
-
idempotency_key_requiredNo Idempotency-Key on a POSTSkicka en unik Idempotency-Key (till exempel ett UUID) med varje POST, så att ett nytt försök aldrig bokför två gånger.
-
idempotency_key_invalidIdempotency-Key too long or not visible ASCIIIdempotency-Key ska vara 1–255 synliga ASCII-tecken.
-
invalid_jsonMalformed JSONKroppen är inte giltig JSON (ett objekt).
401 Unauthorized – Missing, invalid, expired or revoked token or API key. Also returned when the person behind the credential has left the company (an OAuth grant is then revoked for good).
-
unauthenticatedNo valid credentialNyckeln eller token saknas, är ogiltig, har gått ut eller har återkallats.
403 Forbidden – The credential may not do this: a scope is missing, the granting person no longer has the permission, the address is not allowed, the company is archived (read-only) or no longer allows the app.
-
insufficient_scopeScope missing or permission lostNyckeln eller appen saknar behörigheten vouchers:post, eller så har personen som gav den inte längre den behörigheten i företaget.
-
forbiddenThe action refuses (for example changing a posted voucher)Behörighet saknas för det här.
-
ip_not_allowedOutside the IP allowlistFöretaget tillåter inte anrop från den här adressen.
-
company_archivedWrite to an archived companyFöretaget är arkiverat och kan bara läsas.
-
app_not_allowedThe company no longer allows the appFöretaget tillåter inte längre den här appen.
404 Not Found – Not found. Also the answer for another company's ids (existence is never revealed) and for every call while NONOX Connect is turned off for the company.
-
not_foundUnknown id, other company's id, or module offDet du söker finns inte.
415 Unsupported Media Type – The body is not application/json (or multipart/form-data where a file is accepted).
-
unsupported_media_typeWrong Content-TypeSkicka JSON (application/json).
422 Unprocessable Content – Validation failed, or the Idempotency-Key was already used for a different request.
-
validation_failedField errorsUppgifterna kunde inte godtas. Se errors.
-
idempotency_key_reusedSame key, different bodyIdempotency-Key har redan använts för en annan begäran. Använd en ny nyckel för en ny begäran.
429 Too Many Requests – Rate limit exceeded (per credential, per company or per address). Wait Retry-After seconds.
-
rate_limitedOver the limitFör många anrop. Försök igen om 23 sekunder.
Code samples
curl -X PATCH "https://nonox.app/api/v1/customers/18" \
-H "Authorization: Bearer $NONOX_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"payment_terms_days": 20
}'use Illuminate\Support\Facades\Http;
$response = Http::withToken(config('services.nonox.token'))
->acceptJson()
->patch('https://nonox.app/api/v1/customers/18', [
'payment_terms_days' => 20,
]);
$response->throw();
$data = $response->json('data');$client = new \GuzzleHttp\Client(['timeout' => 30]);
$response = $client->request('PATCH', 'https://nonox.app/api/v1/customers/18', [
'headers' => [
'Authorization' => 'Bearer '.getenv('NONOX_TOKEN'),
'Accept' => 'application/json',
],
'json' => [
'payment_terms_days' => 20,
],
]);
$data = json_decode((string) $response->getBody(), true, flags: JSON_THROW_ON_ERROR)['data'];const response = await fetch('https://nonox.app/api/v1/customers/18', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.NONOX_TOKEN}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"payment_terms_days": 20
}),
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
const { data } = await response.json();import os
import requests
response = requests.patch(
"https://nonox.app/api/v1/customers/18",
headers={
"Authorization": f"Bearer {os.environ['NONOX_TOKEN']}",
"Accept": "application/json",
},
json={
"payment_terms_days": 20,
},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Responses · 200
{
"data": {
"id": 18,
"number": 1004,
"name": "Kund Exempel AB",
"org_number": "559900-4560",
"has_personal_number": false,
"vat_number": "SE559900456001",
"email": "faktura@kund.example.se",
"phone": "08-000 00 00",
"address": {
"line1": "Kundvägen 5",
"line2": null,
"postal_code": "222 33",
"city": "Exempelby",
"country": "SE"
},
"payment_terms_days": 20,
"is_active": true,
"reverse_charge_construction": false,
"foreign_sale": null,
"processing_restricted": false,
"created_at": "2026-02-10T13:00:00+01:00",
"updated_at": "2026-02-10T13:00:00+01:00"
}
}Error
4003 examples
{
"type": "urn:nonox:problem:idempotency_key_required",
"title": "Bad Request",
"status": 400,
"code": "idempotency_key_required",
"detail": "Skicka en unik Idempotency-Key (till exempel ett UUID) med varje POST, så att ett nytt försök aldrig bokför två gånger.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}{
"type": "urn:nonox:problem:idempotency_key_invalid",
"title": "Bad Request",
"status": 400,
"code": "idempotency_key_invalid",
"detail": "Idempotency-Key ska vara 1–255 synliga ASCII-tecken.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}{
"type": "urn:nonox:problem:invalid_json",
"title": "Bad Request",
"status": 400,
"code": "invalid_json",
"detail": "Kroppen är inte giltig JSON (ett objekt).",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4011 example
{
"type": "urn:nonox:problem:unauthenticated",
"title": "Unauthorized",
"status": 401,
"code": "unauthenticated",
"detail": "Nyckeln eller token saknas, är ogiltig, har gått ut eller har återkallats.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4035 examples
{
"type": "urn:nonox:problem:insufficient_scope",
"title": "Forbidden",
"status": 403,
"code": "insufficient_scope",
"detail": "Nyckeln eller appen saknar behörigheten vouchers:post, eller så har personen som gav den inte längre den behörigheten i företaget.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17",
"required_scopes": [
"vouchers:post"
]
}{
"type": "urn:nonox:problem:forbidden",
"title": "Forbidden",
"status": 403,
"code": "forbidden",
"detail": "Behörighet saknas för det här.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}{
"type": "urn:nonox:problem:ip_not_allowed",
"title": "Forbidden",
"status": 403,
"code": "ip_not_allowed",
"detail": "Företaget tillåter inte anrop från den här adressen.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}{
"type": "urn:nonox:problem:company_archived",
"title": "Forbidden",
"status": 403,
"code": "company_archived",
"detail": "Företaget är arkiverat och kan bara läsas.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}{
"type": "urn:nonox:problem:app_not_allowed",
"title": "Forbidden",
"status": 403,
"code": "app_not_allowed",
"detail": "Företaget tillåter inte längre den här appen.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4041 example
{
"type": "urn:nonox:problem:not_found",
"title": "Not Found",
"status": 404,
"code": "not_found",
"detail": "Det du söker finns inte.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4151 example
{
"type": "urn:nonox:problem:unsupported_media_type",
"title": "Unsupported Media Type",
"status": 415,
"code": "unsupported_media_type",
"detail": "Skicka JSON (application/json).",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4222 examples
{
"type": "urn:nonox:problem:validation_failed",
"title": "Unprocessable Content",
"status": 422,
"code": "validation_failed",
"detail": "Uppgifterna kunde inte godtas. Se errors.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17",
"errors": {
"rows": [
"Verifikationen balanserar inte: debet och kredit skiljer sig åt."
],
"voucher_date": [
"Det finns inget räkenskapsår som omfattar 2031-01-01."
]
}
}{
"type": "urn:nonox:problem:idempotency_key_reused",
"title": "Unprocessable Content",
"status": 422,
"code": "idempotency_key_reused",
"detail": "Idempotency-Key har redan använts för en annan begäran. Använd en ny nyckel för en ny begäran.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}4291 example
{
"type": "urn:nonox:problem:rate_limited",
"title": "Too Many Requests",
"status": 429,
"code": "rate_limited",
"detail": "För många anrop. Försök igen om 23 sekunder.",
"instance": "urn:nonox:request:7f3c2a9e-4b1d-4c8e-9a51-2d6f0e8b3c17"
}