Leverantörsfakturor
Leverantörsfakturor: utkast, fil, registrering, attest och betalning.
Lista leverantörsfakturor
GET
/supplier-invoices
listSupplierInvoices
Leverantörsfakturor med rader, betalningar och betalstatus.
Mer i detalj (på engelska)
Supplier invoices and credit notes with rows, payments and payment status. Needs supplier-invoices:create, supplier-invoices:approve or payments:create.
Behörighet
supplier-invoices:create eller supplier-invoices:approve eller payments:create
Parametrar
-
limitinteger frågaPage size, 1–200.
-
cursorstring frågaOpaque cursor from meta.next_cursor of the previous page.
-
updated_sincestring (date-time) frågaBara poster som ändrats efter den här tiden (ISO 8601). Listor sorteras på updated_at och id.
-
statusstring frågaDRAFT, REGISTERED (waiting for approval), APPROVED (to pay) or PAID.
-
supplier_idinteger frågaOnly this supplier.
-
date_fromstring (date) frågaFrom this date (YYYY-MM-DD), inclusive.
-
date_tostring (date) frågaUp to this date (YYYY-MM-DD), inclusive.
Svar
200 OK – A page of supplier invoices.
application/jsonobject
-
dataarray<SupplierInvoice> krävs29 fält · varje post
-
idstring (uuid) -
numberinteger kan vara null -
kindstring -
statusstringPayment status: REGISTERED waits for approval, APPROVED waits for payment. Open enum.
-
supplier_idinteger -
supplier_namestring -
invoice_numberstring kan vara null -
ocrstring kan vara null -
invoice_datestring (date) -
due_datestring (date) -
descriptionstring kan vara null -
vat_treatmentstring -
currencystring -
total_oreinteger -
vat_oreinteger -
paid_oreinteger -
remaining_oreinteger -
invoice_currencystring -
foreign_total_minorinteger kan vara null -
foreign_paid_minorinteger kan vara null -
exchange_rate_microsinteger kan vara nullKronor per unit in millionths (9.8264 is 9826400).
-
fileobject | any2 fält
-
Ett av object
-
namestring -
mimestring -
sizeinteger -
sha256string
-
-
Ett av any
-
-
voucher_idstring (uuid) kan vara null -
registered_atstring (date-time) kan vara null -
approved_atstring (date-time) kan vara null -
rowsarray<SupplierInvoiceRow>6 fält · varje post
-
accountinteger kan vara null -
descriptionstring kan vara null -
amount_oreinteger -
vat_rateinteger kan vara null -
cost_centerstring kan vara null -
projectstring kan vara null
-
-
paymentsarray<SupplierPayment>11 fält · varje post
-
idinteger -
supplier_invoice_idstring (uuid) -
paid_onstring (date) -
amount_oreintegerKronor the bank took, öre (negative for money back on a credit note).
-
currencystring -
foreign_amount_minorinteger kan vara nullHundredths of the invoice's currency, for an invoice in another currency.
-
exchange_difference_oreinteger -
accountinteger kan vara null -
voucher_idstring (uuid) -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
created_atstring (date-time) -
updated_atstring (date-time)
-
-
metaListMeta krävs3 fält
-
limitinteger krävs -
next_cursorstring krävs kan vara nullOpaque; pass as `cursor` for the next page. null on the last page.
-
has_moreboolean krävs
-
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.
Kodexempel
curl "https://nonox.app/api/v1/supplier-invoices?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/supplier-invoices', [
'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/supplier-invoices', [
'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/supplier-invoices');
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/supplier-invoices",
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"]Svar · 200
{
"data": [
{
"id": "8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e",
"number": 77,
"kind": "INVOICE",
"status": "APPROVED",
"supplier_id": 9,
"supplier_name": "Leverantören Exempel AB",
"invoice_number": "F-2026-118",
"ocr": "4005",
"invoice_date": "2026-03-03",
"due_date": "2026-04-02",
"description": "Kontorsmaterial",
"vat_treatment": "DOMESTIC",
"currency": "SEK",
"total_ore": 125000,
"vat_ore": 25000,
"paid_ore": 0,
"remaining_ore": 125000,
"invoice_currency": "SEK",
"foreign_total_minor": null,
"foreign_paid_minor": null,
"exchange_rate_micros": null,
"file": {
"name": "faktura.pdf",
"mime": "application/pdf",
"size": 48211,
"sha256": "3c1f0e9d8b7a6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d"
},
"voucher_id": "6e5d4c3b-2a19-4f8e-8d7c-6b5a49382716",
"registered_at": "2026-03-03T14:00:00+01:00",
"approved_at": "2026-03-04T09:30:00+01:00",
"rows": [
{
"account": 5410,
"description": "Förbrukningsinventarier",
"amount_ore": 100000,
"vat_rate": null,
"cost_center": "20",
"project": null
}
],
"payments": [],
"created_at": "2026-03-03T13:50:00+01:00",
"updated_at": "2026-03-04T09:30:00+01:00"
}
],
"meta": {
"limit": 50,
"next_cursor": null,
"has_more": false
}
}Fel
4011 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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"
}Skapa ett utkast till leverantörsfaktura
POST
/supplier-invoices
createSupplierInvoice
Sparar ett utkast med belopp och konteringsrader, som måste gå jämnt ut.
Mer i detalj (på engelska)
Saves a draft as printed on the invoice: total, VAT and cost rows, which must add up. Add the invoice file with /file. Nothing is booked until it is registered. Same Action as the app (SaveSupplierInvoice).
Behörighet
Parametrar
-
Idempotency-Keystring huvud krävsKrävs på varje POST. Ett unikt värde per avsedd åtgärd (helst ett UUID). Sparas i 24 timmar per nyckel eller app, så att ett nytt försök aldrig bokför två gånger.
Innehåll i anropet
application/jsonSupplierInvoiceInput krävs
The rows and the VAT must add up to total_ore.
-
supplier_idinteger krävs -
invoice_numberstring kan vara null -
ocrstring kan vara null -
invoice_datestring (date) krävs -
due_datestring (date) kan vara null -
descriptionstring kan vara null -
creditbooleanA credit note; send positive amounts.
-
vat_treatmentstring kan vara null -
currencystring kan vara null -
total_oreinteger krävsTo pay, in kronor (öre).
-
vat_oreinteger -
foreign_total_minorinteger kan vara null -
exchange_rate_microsinteger kan vara null -
rowsarray<object> krävs6 fält · varje post
-
accountinteger kan vara nullDefault: the supplier's default account.
-
amount_oreinteger krävs -
descriptionstring kan vara null -
vat_rateinteger kan vara null -
cost_centerstring kan vara null -
projectstring kan vara null
-
Svar
201 Created – The draft.
application/jsonobject
-
dataSupplierInvoice krävs29 fält
-
idstring (uuid) -
numberinteger kan vara null -
kindstring -
statusstringPayment status: REGISTERED waits for approval, APPROVED waits for payment. Open enum.
-
supplier_idinteger -
supplier_namestring -
invoice_numberstring kan vara null -
ocrstring kan vara null -
invoice_datestring (date) -
due_datestring (date) -
descriptionstring kan vara null -
vat_treatmentstring -
currencystring -
total_oreinteger -
vat_oreinteger -
paid_oreinteger -
remaining_oreinteger -
invoice_currencystring -
foreign_total_minorinteger kan vara null -
foreign_paid_minorinteger kan vara null -
exchange_rate_microsinteger kan vara nullKronor per unit in millionths (9.8264 is 9826400).
-
fileobject | any2 fält
-
Ett av object
-
namestring -
mimestring -
sizeinteger -
sha256string
-
-
Ett av any
-
-
voucher_idstring (uuid) kan vara null -
registered_atstring (date-time) kan vara null -
approved_atstring (date-time) kan vara null -
rowsarray<SupplierInvoiceRow>6 fält · varje post
-
accountinteger kan vara null -
descriptionstring kan vara null -
amount_oreinteger -
vat_rateinteger kan vara null -
cost_centerstring kan vara null -
projectstring kan vara null
-
-
paymentsarray<SupplierPayment>11 fält · varje post
-
idinteger -
supplier_invoice_idstring (uuid) -
paid_onstring (date) -
amount_oreintegerKronor the bank took, öre (negative for money back on a credit note).
-
currencystring -
foreign_amount_minorinteger kan vara nullHundredths of the invoice's currency, for an invoice in another currency.
-
exchange_difference_oreinteger -
accountinteger kan vara null -
voucher_idstring (uuid) -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
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.
Kodexempel
curl -X POST "https://nonox.app/api/v1/supplier-invoices" \
-H "Authorization: Bearer $NONOX_TOKEN" \
-H "Accept: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"supplier_id": 9,
"invoice_number": "F-2026-118",
"ocr": "4005",
"invoice_date": "2026-03-03",
"total_ore": 125000,
"vat_ore": 25000,
"rows": [
{
"account": 5410,
"amount_ore": 100000,
"description": "Förbrukningsinventarier",
"cost_center": "20"
}
]
}'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/supplier-invoices', [
'supplier_id' => 9,
'invoice_number' => 'F-2026-118',
'ocr' => '4005',
'invoice_date' => '2026-03-03',
'total_ore' => 125000,
'vat_ore' => 25000,
'rows' => [
[
'account' => 5410,
'amount_ore' => 100000,
'description' => 'Förbrukningsinventarier',
'cost_center' => '20',
],
],
]);
$response->throw();
$data = $response->json('data');$client = new \GuzzleHttp\Client(['timeout' => 30]);
$response = $client->request('POST', 'https://nonox.app/api/v1/supplier-invoices', [
'headers' => [
'Authorization' => 'Bearer '.getenv('NONOX_TOKEN'),
'Accept' => 'application/json',
'Idempotency-Key' => bin2hex(random_bytes(16)),
],
'json' => [
'supplier_id' => 9,
'invoice_number' => 'F-2026-118',
'ocr' => '4005',
'invoice_date' => '2026-03-03',
'total_ore' => 125000,
'vat_ore' => 25000,
'rows' => [
[
'account' => 5410,
'amount_ore' => 100000,
'description' => 'Förbrukningsinventarier',
'cost_center' => '20',
],
],
],
]);
$data = json_decode((string) $response->getBody(), true, flags: JSON_THROW_ON_ERROR)['data'];const response = await fetch('https://nonox.app/api/v1/supplier-invoices', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.NONOX_TOKEN}`,
Accept: 'application/json',
'Idempotency-Key': crypto.randomUUID(),
'Content-Type': 'application/json',
},
body: JSON.stringify({
"supplier_id": 9,
"invoice_number": "F-2026-118",
"ocr": "4005",
"invoice_date": "2026-03-03",
"total_ore": 125000,
"vat_ore": 25000,
"rows": [
{
"account": 5410,
"amount_ore": 100000,
"description": "Förbrukningsinventarier",
"cost_center": "20"
}
]
}),
});
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/supplier-invoices",
headers={
"Authorization": f"Bearer {os.environ['NONOX_TOKEN']}",
"Accept": "application/json",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"supplier_id": 9,
"invoice_number": "F-2026-118",
"ocr": "4005",
"invoice_date": "2026-03-03",
"total_ore": 125000,
"vat_ore": 25000,
"rows": [
{
"account": 5410,
"amount_ore": 100000,
"description": "Förbrukningsinventarier",
"cost_center": "20",
},
],
},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Svar · 201
{
"data": {
"id": "8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e",
"number": 77,
"kind": "INVOICE",
"status": "APPROVED",
"supplier_id": 9,
"supplier_name": "Leverantören Exempel AB",
"invoice_number": "F-2026-118",
"ocr": "4005",
"invoice_date": "2026-03-03",
"due_date": "2026-04-02",
"description": "Kontorsmaterial",
"vat_treatment": "DOMESTIC",
"currency": "SEK",
"total_ore": 125000,
"vat_ore": 25000,
"paid_ore": 0,
"remaining_ore": 125000,
"invoice_currency": "SEK",
"foreign_total_minor": null,
"foreign_paid_minor": null,
"exchange_rate_micros": null,
"file": {
"name": "faktura.pdf",
"mime": "application/pdf",
"size": 48211,
"sha256": "3c1f0e9d8b7a6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d"
},
"voucher_id": "6e5d4c3b-2a19-4f8e-8d7c-6b5a49382716",
"registered_at": "2026-03-03T14:00:00+01:00",
"approved_at": "2026-03-04T09:30:00+01:00",
"rows": [
{
"account": 5410,
"description": "Förbrukningsinventarier",
"amount_ore": 100000,
"vat_rate": null,
"cost_center": "20",
"project": null
}
],
"payments": [],
"created_at": "2026-03-03T13:50:00+01:00",
"updated_at": "2026-03-04T09:30:00+01:00"
}
}Fel
4003 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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"
}Hämta en leverantörsfaktura
GET
/supplier-invoices/{supplierInvoice}
getSupplierInvoice
En leverantörsfaktura med betalstatus.
Mer i detalj (på engelska)
One supplier invoice with rows, payments and payment status.
Behörighet
supplier-invoices:create eller supplier-invoices:approve eller payments:create
Parametrar
-
supplierInvoicestring (uuid) sökväg krävsSupplier invoice id (UUID).
Svar
200 OK – The supplier invoice.
application/jsonobject
-
dataSupplierInvoice krävs29 fält
-
idstring (uuid) -
numberinteger kan vara null -
kindstring -
statusstringPayment status: REGISTERED waits for approval, APPROVED waits for payment. Open enum.
-
supplier_idinteger -
supplier_namestring -
invoice_numberstring kan vara null -
ocrstring kan vara null -
invoice_datestring (date) -
due_datestring (date) -
descriptionstring kan vara null -
vat_treatmentstring -
currencystring -
total_oreinteger -
vat_oreinteger -
paid_oreinteger -
remaining_oreinteger -
invoice_currencystring -
foreign_total_minorinteger kan vara null -
foreign_paid_minorinteger kan vara null -
exchange_rate_microsinteger kan vara nullKronor per unit in millionths (9.8264 is 9826400).
-
fileobject | any2 fält
-
Ett av object
-
namestring -
mimestring -
sizeinteger -
sha256string
-
-
Ett av any
-
-
voucher_idstring (uuid) kan vara null -
registered_atstring (date-time) kan vara null -
approved_atstring (date-time) kan vara null -
rowsarray<SupplierInvoiceRow>6 fält · varje post
-
accountinteger kan vara null -
descriptionstring kan vara null -
amount_oreinteger -
vat_rateinteger kan vara null -
cost_centerstring kan vara null -
projectstring kan vara null
-
-
paymentsarray<SupplierPayment>11 fält · varje post
-
idinteger -
supplier_invoice_idstring (uuid) -
paid_onstring (date) -
amount_oreintegerKronor the bank took, öre (negative for money back on a credit note).
-
currencystring -
foreign_amount_minorinteger kan vara nullHundredths of the invoice's currency, for an invoice in another currency.
-
exchange_difference_oreinteger -
accountinteger kan vara null -
voucher_idstring (uuid) -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
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.
Kodexempel
curl "https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e" \
-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/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e');
$response->throw();
$data = $response->json('data');$client = new \GuzzleHttp\Client(['timeout' => 30]);
$response = $client->request('GET', 'https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e', [
'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/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e', {
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/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e",
headers={
"Authorization": f"Bearer {os.environ['NONOX_TOKEN']}",
"Accept": "application/json",
},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Svar · 200
{
"data": {
"id": "8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e",
"number": 77,
"kind": "INVOICE",
"status": "APPROVED",
"supplier_id": 9,
"supplier_name": "Leverantören Exempel AB",
"invoice_number": "F-2026-118",
"ocr": "4005",
"invoice_date": "2026-03-03",
"due_date": "2026-04-02",
"description": "Kontorsmaterial",
"vat_treatment": "DOMESTIC",
"currency": "SEK",
"total_ore": 125000,
"vat_ore": 25000,
"paid_ore": 0,
"remaining_ore": 125000,
"invoice_currency": "SEK",
"foreign_total_minor": null,
"foreign_paid_minor": null,
"exchange_rate_micros": null,
"file": {
"name": "faktura.pdf",
"mime": "application/pdf",
"size": 48211,
"sha256": "3c1f0e9d8b7a6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d"
},
"voucher_id": "6e5d4c3b-2a19-4f8e-8d7c-6b5a49382716",
"registered_at": "2026-03-03T14:00:00+01:00",
"approved_at": "2026-03-04T09:30:00+01:00",
"rows": [
{
"account": 5410,
"description": "Förbrukningsinventarier",
"amount_ore": 100000,
"vat_rate": null,
"cost_center": "20",
"project": null
}
],
"payments": [],
"created_at": "2026-03-03T13:50:00+01:00",
"updated_at": "2026-03-04T09:30:00+01:00"
}
}Fel
4011 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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"
}Ändra ett utkast
PATCH
/supplier-invoices/{supplierInvoice}
updateSupplierInvoice
Ändrar ett utkast. En registrerad faktura ändras aldrig.
Mer i detalj (på engelska)
Changes a draft; a registered invoice answers 403 and never changes.
Behörighet
Parametrar
-
supplierInvoicestring (uuid) sökväg krävsSupplier invoice id (UUID).
Innehåll i anropet
application/jsonSupplierInvoicePatch krävs
Only the fields sent are changed; `rows`, when sent, replaces all rows.
-
supplier_idinteger -
invoice_numberstring kan vara null -
ocrstring kan vara null -
invoice_datestring (date) -
due_datestring (date) kan vara null -
descriptionstring kan vara null -
creditbooleanA credit note; send positive amounts.
-
vat_treatmentstring kan vara null -
currencystring kan vara null -
total_oreintegerTo pay, in kronor (öre).
-
vat_oreinteger -
foreign_total_minorinteger kan vara null -
exchange_rate_microsinteger kan vara null -
rowsarray<object>6 fält · varje post
-
accountinteger kan vara nullDefault: the supplier's default account.
-
amount_oreinteger krävs -
descriptionstring kan vara null -
vat_rateinteger kan vara null -
cost_centerstring kan vara null -
projectstring kan vara null
-
Svar
200 OK – The draft.
application/jsonobject
-
dataSupplierInvoice krävs29 fält
-
idstring (uuid) -
numberinteger kan vara null -
kindstring -
statusstringPayment status: REGISTERED waits for approval, APPROVED waits for payment. Open enum.
-
supplier_idinteger -
supplier_namestring -
invoice_numberstring kan vara null -
ocrstring kan vara null -
invoice_datestring (date) -
due_datestring (date) -
descriptionstring kan vara null -
vat_treatmentstring -
currencystring -
total_oreinteger -
vat_oreinteger -
paid_oreinteger -
remaining_oreinteger -
invoice_currencystring -
foreign_total_minorinteger kan vara null -
foreign_paid_minorinteger kan vara null -
exchange_rate_microsinteger kan vara nullKronor per unit in millionths (9.8264 is 9826400).
-
fileobject | any2 fält
-
Ett av object
-
namestring -
mimestring -
sizeinteger -
sha256string
-
-
Ett av any
-
-
voucher_idstring (uuid) kan vara null -
registered_atstring (date-time) kan vara null -
approved_atstring (date-time) kan vara null -
rowsarray<SupplierInvoiceRow>6 fält · varje post
-
accountinteger kan vara null -
descriptionstring kan vara null -
amount_oreinteger -
vat_rateinteger kan vara null -
cost_centerstring kan vara null -
projectstring kan vara null
-
-
paymentsarray<SupplierPayment>11 fält · varje post
-
idinteger -
supplier_invoice_idstring (uuid) -
paid_onstring (date) -
amount_oreintegerKronor the bank took, öre (negative for money back on a credit note).
-
currencystring -
foreign_amount_minorinteger kan vara nullHundredths of the invoice's currency, for an invoice in another currency.
-
exchange_difference_oreinteger -
accountinteger kan vara null -
voucher_idstring (uuid) -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
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.
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.
Kodexempel
curl -X PATCH "https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e" \
-H "Authorization: Bearer $NONOX_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"description": "Kontorsmaterial"
}'use Illuminate\Support\Facades\Http;
$response = Http::withToken(config('services.nonox.token'))
->acceptJson()
->patch('https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e', [
'description' => 'Kontorsmaterial',
]);
$response->throw();
$data = $response->json('data');$client = new \GuzzleHttp\Client(['timeout' => 30]);
$response = $client->request('PATCH', 'https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e', [
'headers' => [
'Authorization' => 'Bearer '.getenv('NONOX_TOKEN'),
'Accept' => 'application/json',
],
'json' => [
'description' => 'Kontorsmaterial',
],
]);
$data = json_decode((string) $response->getBody(), true, flags: JSON_THROW_ON_ERROR)['data'];const response = await fetch('https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.NONOX_TOKEN}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"description": "Kontorsmaterial"
}),
});
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/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e",
headers={
"Authorization": f"Bearer {os.environ['NONOX_TOKEN']}",
"Accept": "application/json",
},
json={
"description": "Kontorsmaterial",
},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Svar · 200
{
"data": {
"id": "8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e",
"number": 77,
"kind": "INVOICE",
"status": "APPROVED",
"supplier_id": 9,
"supplier_name": "Leverantören Exempel AB",
"invoice_number": "F-2026-118",
"ocr": "4005",
"invoice_date": "2026-03-03",
"due_date": "2026-04-02",
"description": "Kontorsmaterial",
"vat_treatment": "DOMESTIC",
"currency": "SEK",
"total_ore": 125000,
"vat_ore": 25000,
"paid_ore": 0,
"remaining_ore": 125000,
"invoice_currency": "SEK",
"foreign_total_minor": null,
"foreign_paid_minor": null,
"exchange_rate_micros": null,
"file": {
"name": "faktura.pdf",
"mime": "application/pdf",
"size": 48211,
"sha256": "3c1f0e9d8b7a6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d"
},
"voucher_id": "6e5d4c3b-2a19-4f8e-8d7c-6b5a49382716",
"registered_at": "2026-03-03T14:00:00+01:00",
"approved_at": "2026-03-04T09:30:00+01:00",
"rows": [
{
"account": 5410,
"description": "Förbrukningsinventarier",
"amount_ore": 100000,
"vat_rate": null,
"cost_center": "20",
"project": null
}
],
"payments": [],
"created_at": "2026-03-03T13:50:00+01:00",
"updated_at": "2026-03-04T09:30:00+01:00"
}
}Fel
4011 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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"
}Ta bort ett utkast
DELETE
/supplier-invoices/{supplierInvoice}
deleteSupplierInvoice
Tar bort ett utkast. En registrerad faktura kan aldrig tas bort.
Mer i detalj (på engelska)
Removes a draft and its file. A registered invoice can never be removed (403).
Behörighet
Parametrar
-
supplierInvoicestring (uuid) sökväg krävsSupplier invoice id (UUID).
Svar
204 No Content – Deleted.
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.
Kodexempel
curl -X DELETE "https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e" \
-H "Authorization: Bearer $NONOX_TOKEN" \
-H "Accept: application/json"use Illuminate\Support\Facades\Http;
$response = Http::withToken(config('services.nonox.token'))
->acceptJson()
->delete('https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e');
$response->throw();$client = new \GuzzleHttp\Client(['timeout' => 30]);
$response = $client->request('DELETE', 'https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e', [
'headers' => [
'Authorization' => 'Bearer '.getenv('NONOX_TOKEN'),
'Accept' => 'application/json',
],
]);const response = await fetch('https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e', {
method: 'DELETE',
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}`);
}import os
import requests
response = requests.delete(
"https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e",
headers={
"Authorization": f"Bearer {os.environ['NONOX_TOKEN']}",
"Accept": "application/json",
},
timeout=30,
)
response.raise_for_status()Fel
4011 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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"
}Lägg till fakturafilen
POST
/supplier-invoices/{supplierInvoice}/file
addSupplierInvoiceFile
Laddar upp fakturan som PDF eller bild till utkastet. Den blir underlag när fakturan registreras.
Mer i detalj (på engelska)
Uploads the invoice itself to a draft as multipart/form-data in the field `file`: a PDF or an image (JPG, PNG, WebP), at most 10 MB, the type detected from the content. It becomes the underlag of the voucher when the invoice is registered. Replaces an earlier file.
Behörighet
Parametrar
-
supplierInvoicestring (uuid) sökväg krävsSupplier invoice id (UUID).
-
Idempotency-Keystring huvud krävsKrävs på varje POST. Ett unikt värde per avsedd åtgärd (helst ett UUID). Sparas i 24 timmar per nyckel eller app, så att ett nytt försök aldrig bokför två gånger.
Innehåll i anropet
multipart/form-dataobject krävs
-
filestring (binary) krävs
Svar
200 OK – The draft with its file.
application/jsonobject
-
dataSupplierInvoice krävs29 fält
-
idstring (uuid) -
numberinteger kan vara null -
kindstring -
statusstringPayment status: REGISTERED waits for approval, APPROVED waits for payment. Open enum.
-
supplier_idinteger -
supplier_namestring -
invoice_numberstring kan vara null -
ocrstring kan vara null -
invoice_datestring (date) -
due_datestring (date) -
descriptionstring kan vara null -
vat_treatmentstring -
currencystring -
total_oreinteger -
vat_oreinteger -
paid_oreinteger -
remaining_oreinteger -
invoice_currencystring -
foreign_total_minorinteger kan vara null -
foreign_paid_minorinteger kan vara null -
exchange_rate_microsinteger kan vara nullKronor per unit in millionths (9.8264 is 9826400).
-
fileobject | any2 fält
-
Ett av object
-
namestring -
mimestring -
sizeinteger -
sha256string
-
-
Ett av any
-
-
voucher_idstring (uuid) kan vara null -
registered_atstring (date-time) kan vara null -
approved_atstring (date-time) kan vara null -
rowsarray<SupplierInvoiceRow>6 fält · varje post
-
accountinteger kan vara null -
descriptionstring kan vara null -
amount_oreinteger -
vat_rateinteger kan vara null -
cost_centerstring kan vara null -
projectstring kan vara null
-
-
paymentsarray<SupplierPayment>11 fält · varje post
-
idinteger -
supplier_invoice_idstring (uuid) -
paid_onstring (date) -
amount_oreintegerKronor the bank took, öre (negative for money back on a credit note).
-
currencystring -
foreign_amount_minorinteger kan vara nullHundredths of the invoice's currency, for an invoice in another currency.
-
exchange_difference_oreinteger -
accountinteger kan vara null -
voucher_idstring (uuid) -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
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.
Kodexempel
curl -X POST "https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/file" \
-H "Authorization: Bearer $NONOX_TOKEN" \
-H "Accept: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-F "file=@kvitto.pdf;type=application/pdf"use Illuminate\Support\Facades\Http;
use Illuminate\Support\Str;
$response = Http::withToken(config('services.nonox.token'))
->acceptJson()
->withHeaders(['Idempotency-Key' => (string) Str::uuid()])
->attach('file', file_get_contents('kvitto.pdf'), 'kvitto.pdf')
->post('https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/file');
$response->throw();
$data = $response->json('data');$client = new \GuzzleHttp\Client(['timeout' => 30]);
$response = $client->request('POST', 'https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/file', [
'headers' => [
'Authorization' => 'Bearer '.getenv('NONOX_TOKEN'),
'Accept' => 'application/json',
'Idempotency-Key' => bin2hex(random_bytes(16)),
],
'multipart' => [
['name' => 'file', 'contents' => fopen('kvitto.pdf', 'r'), 'filename' => 'kvitto.pdf'],
],
]);
$data = json_decode((string) $response->getBody(), true, flags: JSON_THROW_ON_ERROR)['data'];import { readFile } from 'node:fs/promises';
const form = new FormData();
form.append('file', new Blob([await readFile('kvitto.pdf')], { type: 'application/pdf' }), 'kvitto.pdf');
const response = await fetch('https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/file', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.NONOX_TOKEN}`,
Accept: 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: form,
});
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/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/file",
headers={
"Authorization": f"Bearer {os.environ['NONOX_TOKEN']}",
"Accept": "application/json",
"Idempotency-Key": str(uuid.uuid4()),
},
files={"file": ("kvitto.pdf", open("kvitto.pdf", "rb"), "application/pdf")},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Svar · 200
{
"data": {
"id": "8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e",
"number": 77,
"kind": "INVOICE",
"status": "APPROVED",
"supplier_id": 9,
"supplier_name": "Leverantören Exempel AB",
"invoice_number": "F-2026-118",
"ocr": "4005",
"invoice_date": "2026-03-03",
"due_date": "2026-04-02",
"description": "Kontorsmaterial",
"vat_treatment": "DOMESTIC",
"currency": "SEK",
"total_ore": 125000,
"vat_ore": 25000,
"paid_ore": 0,
"remaining_ore": 125000,
"invoice_currency": "SEK",
"foreign_total_minor": null,
"foreign_paid_minor": null,
"exchange_rate_micros": null,
"file": {
"name": "faktura.pdf",
"mime": "application/pdf",
"size": 48211,
"sha256": "3c1f0e9d8b7a6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d"
},
"voucher_id": "6e5d4c3b-2a19-4f8e-8d7c-6b5a49382716",
"registered_at": "2026-03-03T14:00:00+01:00",
"approved_at": "2026-03-04T09:30:00+01:00",
"rows": [
{
"account": 5410,
"description": "Förbrukningsinventarier",
"amount_ore": 100000,
"vat_rate": null,
"cost_center": "20",
"project": null
}
],
"payments": [],
"created_at": "2026-03-03T13:50:00+01:00",
"updated_at": "2026-03-04T09:30:00+01:00"
}
}Fel
4003 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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"
}Registrera leverantörsfakturan
POST
/supplier-invoices/{supplierInvoice}/register
registerSupplierInvoice
Ger utkastet nummer och bokför det i serie D. Sedan väntar det på attest. Bokför en verifikation, så nyckeln eller appen behöver även vouchers:create och vouchers:post.
Mer i detalj (på engelska)
Gives the draft the next number, freezes the supplier and under fakturametoden books it in series D with the file as underlag. From here on it never changes; it waits for approval. Books a voucher as the person behind the credential, so the credential also needs vouchers:create and vouchers:post. Same Action as the app (RegisterSupplierInvoice).
Behörighet
supplier-invoices:create + vouchers:create + vouchers:post
Parametrar
-
supplierInvoicestring (uuid) sökväg krävsSupplier invoice id (UUID).
-
Idempotency-Keystring huvud krävsKrävs på varje POST. Ett unikt värde per avsedd åtgärd (helst ett UUID). Sparas i 24 timmar per nyckel eller app, så att ett nytt försök aldrig bokför två gånger.
Svar
200 OK – The registered invoice.
application/jsonobject
-
dataSupplierInvoice krävs29 fält
-
idstring (uuid) -
numberinteger kan vara null -
kindstring -
statusstringPayment status: REGISTERED waits for approval, APPROVED waits for payment. Open enum.
-
supplier_idinteger -
supplier_namestring -
invoice_numberstring kan vara null -
ocrstring kan vara null -
invoice_datestring (date) -
due_datestring (date) -
descriptionstring kan vara null -
vat_treatmentstring -
currencystring -
total_oreinteger -
vat_oreinteger -
paid_oreinteger -
remaining_oreinteger -
invoice_currencystring -
foreign_total_minorinteger kan vara null -
foreign_paid_minorinteger kan vara null -
exchange_rate_microsinteger kan vara nullKronor per unit in millionths (9.8264 is 9826400).
-
fileobject | any2 fält
-
Ett av object
-
namestring -
mimestring -
sizeinteger -
sha256string
-
-
Ett av any
-
-
voucher_idstring (uuid) kan vara null -
registered_atstring (date-time) kan vara null -
approved_atstring (date-time) kan vara null -
rowsarray<SupplierInvoiceRow>6 fält · varje post
-
accountinteger kan vara null -
descriptionstring kan vara null -
amount_oreinteger -
vat_rateinteger kan vara null -
cost_centerstring kan vara null -
projectstring kan vara null
-
-
paymentsarray<SupplierPayment>11 fält · varje post
-
idinteger -
supplier_invoice_idstring (uuid) -
paid_onstring (date) -
amount_oreintegerKronor the bank took, öre (negative for money back on a credit note).
-
currencystring -
foreign_amount_minorinteger kan vara nullHundredths of the invoice's currency, for an invoice in another currency.
-
exchange_difference_oreinteger -
accountinteger kan vara null -
voucher_idstring (uuid) -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
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.
Kodexempel
curl -X POST "https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/register" \
-H "Authorization: Bearer $NONOX_TOKEN" \
-H "Accept: application/json" \
-H "Idempotency-Key: $(uuidgen)"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/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/register');
$response->throw();
$data = $response->json('data');$client = new \GuzzleHttp\Client(['timeout' => 30]);
$response = $client->request('POST', 'https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/register', [
'headers' => [
'Authorization' => 'Bearer '.getenv('NONOX_TOKEN'),
'Accept' => 'application/json',
'Idempotency-Key' => bin2hex(random_bytes(16)),
],
]);
$data = json_decode((string) $response->getBody(), true, flags: JSON_THROW_ON_ERROR)['data'];const response = await fetch('https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/register', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.NONOX_TOKEN}`,
Accept: 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
});
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/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/register",
headers={
"Authorization": f"Bearer {os.environ['NONOX_TOKEN']}",
"Accept": "application/json",
"Idempotency-Key": str(uuid.uuid4()),
},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Svar · 200
{
"data": {
"id": "8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e",
"number": 77,
"kind": "INVOICE",
"status": "APPROVED",
"supplier_id": 9,
"supplier_name": "Leverantören Exempel AB",
"invoice_number": "F-2026-118",
"ocr": "4005",
"invoice_date": "2026-03-03",
"due_date": "2026-04-02",
"description": "Kontorsmaterial",
"vat_treatment": "DOMESTIC",
"currency": "SEK",
"total_ore": 125000,
"vat_ore": 25000,
"paid_ore": 0,
"remaining_ore": 125000,
"invoice_currency": "SEK",
"foreign_total_minor": null,
"foreign_paid_minor": null,
"exchange_rate_micros": null,
"file": {
"name": "faktura.pdf",
"mime": "application/pdf",
"size": 48211,
"sha256": "3c1f0e9d8b7a6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d"
},
"voucher_id": "6e5d4c3b-2a19-4f8e-8d7c-6b5a49382716",
"registered_at": "2026-03-03T14:00:00+01:00",
"approved_at": "2026-03-04T09:30:00+01:00",
"rows": [
{
"account": 5410,
"description": "Förbrukningsinventarier",
"amount_ore": 100000,
"vat_rate": null,
"cost_center": "20",
"project": null
}
],
"payments": [],
"created_at": "2026-03-03T13:50:00+01:00",
"updated_at": "2026-03-04T09:30:00+01:00"
}
}Fel
4003 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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"
}Attestera leverantörsfakturan
POST
/supplier-invoices/{supplierInvoice}/approve
approveSupplierInvoice
Attesterar fakturan. Den som registrerade den kan inte attestera den när företaget kräver attest av någon annan.
Mer i detalj (på engelska)
Approves a registered invoice so it may be paid, and fires supplier_invoice.approved. Segregation of duties: while the company requires approval by someone else (the default), the person who created or registered the invoice gets 422, whichever app or key they use. Same Action as the app (ApproveSupplierInvoice).
Behörighet
Parametrar
-
supplierInvoicestring (uuid) sökväg krävsSupplier invoice id (UUID).
-
Idempotency-Keystring huvud krävsKrävs på varje POST. Ett unikt värde per avsedd åtgärd (helst ett UUID). Sparas i 24 timmar per nyckel eller app, så att ett nytt försök aldrig bokför två gånger.
Svar
200 OK – The approved invoice.
application/jsonobject
-
dataSupplierInvoice krävs29 fält
-
idstring (uuid) -
numberinteger kan vara null -
kindstring -
statusstringPayment status: REGISTERED waits for approval, APPROVED waits for payment. Open enum.
-
supplier_idinteger -
supplier_namestring -
invoice_numberstring kan vara null -
ocrstring kan vara null -
invoice_datestring (date) -
due_datestring (date) -
descriptionstring kan vara null -
vat_treatmentstring -
currencystring -
total_oreinteger -
vat_oreinteger -
paid_oreinteger -
remaining_oreinteger -
invoice_currencystring -
foreign_total_minorinteger kan vara null -
foreign_paid_minorinteger kan vara null -
exchange_rate_microsinteger kan vara nullKronor per unit in millionths (9.8264 is 9826400).
-
fileobject | any2 fält
-
Ett av object
-
namestring -
mimestring -
sizeinteger -
sha256string
-
-
Ett av any
-
-
voucher_idstring (uuid) kan vara null -
registered_atstring (date-time) kan vara null -
approved_atstring (date-time) kan vara null -
rowsarray<SupplierInvoiceRow>6 fält · varje post
-
accountinteger kan vara null -
descriptionstring kan vara null -
amount_oreinteger -
vat_rateinteger kan vara null -
cost_centerstring kan vara null -
projectstring kan vara null
-
-
paymentsarray<SupplierPayment>11 fält · varje post
-
idinteger -
supplier_invoice_idstring (uuid) -
paid_onstring (date) -
amount_oreintegerKronor the bank took, öre (negative for money back on a credit note).
-
currencystring -
foreign_amount_minorinteger kan vara nullHundredths of the invoice's currency, for an invoice in another currency.
-
exchange_difference_oreinteger -
accountinteger kan vara null -
voucher_idstring (uuid) -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
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.
Kodexempel
curl -X POST "https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/approve" \
-H "Authorization: Bearer $NONOX_TOKEN" \
-H "Accept: application/json" \
-H "Idempotency-Key: $(uuidgen)"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/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/approve');
$response->throw();
$data = $response->json('data');$client = new \GuzzleHttp\Client(['timeout' => 30]);
$response = $client->request('POST', 'https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/approve', [
'headers' => [
'Authorization' => 'Bearer '.getenv('NONOX_TOKEN'),
'Accept' => 'application/json',
'Idempotency-Key' => bin2hex(random_bytes(16)),
],
]);
$data = json_decode((string) $response->getBody(), true, flags: JSON_THROW_ON_ERROR)['data'];const response = await fetch('https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/approve', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.NONOX_TOKEN}`,
Accept: 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
});
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/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/approve",
headers={
"Authorization": f"Bearer {os.environ['NONOX_TOKEN']}",
"Accept": "application/json",
"Idempotency-Key": str(uuid.uuid4()),
},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Svar · 200
{
"data": {
"id": "8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e",
"number": 77,
"kind": "INVOICE",
"status": "APPROVED",
"supplier_id": 9,
"supplier_name": "Leverantören Exempel AB",
"invoice_number": "F-2026-118",
"ocr": "4005",
"invoice_date": "2026-03-03",
"due_date": "2026-04-02",
"description": "Kontorsmaterial",
"vat_treatment": "DOMESTIC",
"currency": "SEK",
"total_ore": 125000,
"vat_ore": 25000,
"paid_ore": 0,
"remaining_ore": 125000,
"invoice_currency": "SEK",
"foreign_total_minor": null,
"foreign_paid_minor": null,
"exchange_rate_micros": null,
"file": {
"name": "faktura.pdf",
"mime": "application/pdf",
"size": 48211,
"sha256": "3c1f0e9d8b7a6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d"
},
"voucher_id": "6e5d4c3b-2a19-4f8e-8d7c-6b5a49382716",
"registered_at": "2026-03-03T14:00:00+01:00",
"approved_at": "2026-03-04T09:30:00+01:00",
"rows": [
{
"account": 5410,
"description": "Förbrukningsinventarier",
"amount_ore": 100000,
"vat_rate": null,
"cost_center": "20",
"project": null
}
],
"payments": [],
"created_at": "2026-03-03T13:50:00+01:00",
"updated_at": "2026-03-04T09:30:00+01:00"
}
}Fel
4003 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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"
}Registrera en betalning
POST
/supplier-invoices/{supplierInvoice}/payments
paySupplierInvoice
Registrerar en betalning av en attesterad faktura, bokförd i serie E. Bokför en verifikation, så nyckeln eller appen behöver även vouchers:create och vouchers:post.
Mer i detalj (på engelska)
Registers money paid for an approved invoice, booked in series E; PAID when nothing remains. For an invoice in another currency send foreign_amount_minor too; the exchange difference is booked on 3960 or 7960. Books a voucher as the person behind the credential, so the credential also needs vouchers:create and vouchers:post. Same Action as the app (PaySupplierInvoice).
Behörighet
payments:create + vouchers:create + vouchers:post
Parametrar
-
supplierInvoicestring (uuid) sökväg krävsSupplier invoice id (UUID).
-
Idempotency-Keystring huvud krävsKrävs på varje POST. Ett unikt värde per avsedd åtgärd (helst ett UUID). Sparas i 24 timmar per nyckel eller app, så att ett nytt försök aldrig bokför två gånger.
Innehåll i anropet
application/jsonSupplierPaymentInput krävs
-
paid_onstring (date) krävs -
amount_oreinteger krävsKronor the bank took; negative for money back on a credit note.
-
foreign_amount_minorinteger kan vara null -
accountinteger kan vara null
Svar
201 Created – The payment.
application/jsonobject
-
dataSupplierPayment krävs11 fält
-
idinteger -
supplier_invoice_idstring (uuid) -
paid_onstring (date) -
amount_oreintegerKronor the bank took, öre (negative for money back on a credit note).
-
currencystring -
foreign_amount_minorinteger kan vara nullHundredths of the invoice's currency, for an invoice in another currency.
-
exchange_difference_oreinteger -
accountinteger kan vara null -
voucher_idstring (uuid) -
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.
Kodexempel
curl -X POST "https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/payments" \
-H "Authorization: Bearer $NONOX_TOKEN" \
-H "Accept: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"paid_on": "2026-03-31",
"amount_ore": 125000
}'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/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/payments', [
'paid_on' => '2026-03-31',
'amount_ore' => 125000,
]);
$response->throw();
$data = $response->json('data');$client = new \GuzzleHttp\Client(['timeout' => 30]);
$response = $client->request('POST', 'https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/payments', [
'headers' => [
'Authorization' => 'Bearer '.getenv('NONOX_TOKEN'),
'Accept' => 'application/json',
'Idempotency-Key' => bin2hex(random_bytes(16)),
],
'json' => [
'paid_on' => '2026-03-31',
'amount_ore' => 125000,
],
]);
$data = json_decode((string) $response->getBody(), true, flags: JSON_THROW_ON_ERROR)['data'];const response = await fetch('https://nonox.app/api/v1/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/payments', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.NONOX_TOKEN}`,
Accept: 'application/json',
'Idempotency-Key': crypto.randomUUID(),
'Content-Type': 'application/json',
},
body: JSON.stringify({
"paid_on": "2026-03-31",
"amount_ore": 125000
}),
});
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/supplier-invoices/8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e/payments",
headers={
"Authorization": f"Bearer {os.environ['NONOX_TOKEN']}",
"Accept": "application/json",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"paid_on": "2026-03-31",
"amount_ore": 125000,
},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Svar · 201
{
"data": {
"id": 41,
"supplier_invoice_id": "8d1f4b2a-3c5e-4a7b-9d0e-6f1a2b3c4d5e",
"paid_on": "2026-03-31",
"amount_ore": 125000,
"currency": "SEK",
"foreign_amount_minor": null,
"exchange_difference_ore": 0,
"account": 1930,
"voucher_id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
"created_at": "2026-03-31T08:00:00+02:00",
"updated_at": "2026-03-31T08:00:00+02:00"
}
}Fel
4003 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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 exempel
{
"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"
}