{"openapi":"3.1.0","info":{"description":"The PayGo REST API lets your own software read and write the data of one company: customers, invoices and more. Every request is made with a secret API key of that company, sent as a bearer token. Errors are returned as RFC 9457 problem+json with a stable `code`. Lists are paged with `limit` and `cursor`. Operations that create documents accept an `Idempotency-Key` header so a retry never books twice.","title":"PayGo API","version":"v1"},"servers":[{"description":"Production","url":"https://api.paygo.is"}],"security":[{"apiKey":[]}],"tags":[{"name":"Customers"},{"name":"Expense documents"},{"name":"Expenses"},{"name":"Invoices"},{"name":"Orders"},{"name":"Ping"},{"name":"Products"},{"name":"Quotes"},{"name":"Reference data"},{"name":"Suppliers"},{"name":"Time clock"},{"description":"The events PayGo sends to your webhooks. Not operations you call: PayGo calls you. See https://paygo.is/developers/webhooks.","name":"Webhook events"},{"name":"Work orders"}],"paths":{"/v1/accounts":{"get":{"tags":["Reference data"],"summary":"List accounts","operationId":"listAccounts","description":"The company's chart of accounts, ordered by account number. Filters combine with AND. For the account of an expense use `?isExpenseAccount=true`. Balances are not part of this list. Not paginated: every item is returned in one response (`hasMore` is always false, `nextCursor` null); `limit` and `cursor` are ignored.\n\nRequires scope `reference:read`.","parameters":[{"description":"Ignored: reference lists return every item in one response.","in":"query","name":"limit","required":false,"schema":{"type":"string"}},{"description":"Ignored: reference lists return every item in one response.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}},{"description":"Only accounts of this type.","in":"query","name":"type","required":false,"schema":{"enum":["asset","liability","equity","revenue","expense"],"examples":["expense"],"type":"string"}},{"description":"Only accounts that can (`true`) or cannot (`false`) be chosen as the account of an expense. Default: both.","in":"query","name":"isExpenseAccount","required":false,"schema":{"examples":[true],"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AccountDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"All accounts that match the filters.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["reference:read"]}},"/v1/customers":{"get":{"tags":["Customers"],"summary":"List customers","operationId":"listCustomers","description":"Customers of the company, newest first by default. Filters combine with AND. For incremental sync use `sort=updatedAt&order=asc&updatedSince=<largest updatedAt you have seen>`. Contacts and balance are only on `GET /v1/customers/{id}`.\n\nRequires scope `customers:read`.","parameters":[{"description":"Maximum number of items in the page.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor: the `nextCursor` of the previous page, passed unchanged together with the same `sort` and `order`. Omit it for the first page.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}},{"description":"Field to sort by. Items with the same value are ordered by `id` in the same direction.","in":"query","name":"sort","required":false,"schema":{"default":"createdAt","enum":["createdAt","updatedAt"],"type":"string"}},{"description":"Sort direction.","in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Only items changed at or after this time (ISO 8601: a date, read as UTC midnight, or a timestamp with a zone, e.g. `2026-11-21T08:00:00Z`). For incremental sync use `sort=updatedAt&order=asc` and pass the largest `updatedAt` you have seen; items changed at exactly that time come again.","in":"query","name":"updatedSince","required":false,"schema":{"examples":["2026-11-21T08:00:00Z"],"type":"string"}},{"description":"Free text: matches part of the name, e-mail, phone, address, city or postal code, or the start of the kennitala. Icelandic letters match their plain forms (`baejar` finds `Bæjarhraun`).","in":"query","name":"search","required":false,"schema":{"examples":["dæmi"],"maxLength":100,"type":"string"}},{"description":"Exact kennitala, 10 digits (a hyphen after the sixth digit is accepted).","in":"query","name":"kennitala","required":false,"schema":{"examples":["5501012340"],"type":"string"}},{"description":"Exact `externalId`.","in":"query","name":"externalId","required":false,"schema":{"examples":["CRM-10042"],"maxLength":255,"type":"string"}},{"description":"Only active (`true`) or only deactivated (`false`) customers. Default: both.","in":"query","name":"isActive","required":false,"schema":{"examples":[true],"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CustomerDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"One page of customers.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["customers:read"]},"post":{"tags":["Customers"],"summary":"Create a customer","operationId":"createCustomer","description":"Creates a customer with the same rules as the PayGo dashboard. `externalId` and `kennitala` must be unique within the company: a duplicate is refused with 409 conflict naming the existing customer's id. Send an `Idempotency-Key` to make a retry safe.\n\nRequires scope `customers:write`.","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyOptional"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDetailDto"}}},"description":"The new customer.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["customers:write"]}},"/v1/customers/{id}":{"get":{"tags":["Customers"],"summary":"Get a customer","operationId":"getCustomer","description":"One customer with its contact people and its current balance.\n\nRequires scope `customers:read`.","parameters":[{"description":"Id of the customer in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["9b2e7c1a-4f3d-4e8a-b6c5-1d2e3f4a5b6c"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDetailDto"}}},"description":"The customer.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["customers:read"]},"patch":{"tags":["Customers"],"summary":"Update a customer","operationId":"updateCustomer","description":"Changes the fields sent and returns the whole customer. Fields left out are not changed. Send `null` (or an empty string) to clear externalId, kennitala, email, phone, addressLine1, addressLine2, postalCode, city or defaultCurrency (back to ISK); `null` on name, country, language, paymentTermsDays or isActive is refused with 422.\n\nRequires scope `customers:write`.","parameters":[{"description":"Id of the customer in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["9b2e7c1a-4f3d-4e8a-b6c5-1d2e3f4a5b6c"],"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDetailDto"}}},"description":"The customer after the change.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["customers:write"]}},"/v1/employees":{"get":{"tags":["Reference data"],"summary":"List employees","operationId":"listEmployees","description":"The company's employees by name: id, name and whether they are active, nothing more. Not paginated: every item is returned in one response (`hasMore` is always false, `nextCursor` null); `limit` and `cursor` are ignored.\n\nRequires scope `reference:read`.","parameters":[{"description":"Ignored: reference lists return every item in one response.","in":"query","name":"limit","required":false,"schema":{"type":"string"}},{"description":"Ignored: reference lists return every item in one response.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}},{"description":"Only active (`true`) or only inactive (`false`) employees. Default: both.","in":"query","name":"isActive","required":false,"schema":{"examples":[true],"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/EmployeeDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"All employees that match the filter.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["reference:read"]}},"/v1/expense-categories":{"get":{"tags":["Reference data"],"summary":"List expense categories","operationId":"listExpenseCategories","description":"The company's expense categories, in display order. The account of an expense is chosen separately from `GET /v1/accounts?isExpenseAccount=true`. Not paginated: every item is returned in one response (`hasMore` is always false, `nextCursor` null); `limit` and `cursor` are ignored.\n\nRequires scope `reference:read`.","parameters":[{"description":"Ignored: reference lists return every item in one response.","in":"query","name":"limit","required":false,"schema":{"type":"string"}},{"description":"Ignored: reference lists return every item in one response.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ExpenseCategoryDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"All expense categories.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["reference:read"]}},"/v1/expense-documents":{"get":{"tags":["Expense documents"],"summary":"List expense documents","operationId":"listExpenseDocuments","description":"Documents sent for AI reading, from this API, the PayGo dashboard and the app, newest first by default. `status`: `queued` (waiting), `processing` (being read), `completed` (an expense was recorded from the data read off the document; fetch it with `GET /v1/expenses/{expenseId}`), `needs_review` (an expense was recorded WITHOUT the data, because the document could not be read: amount 0, a bookkeeper fills it in), `not_an_expense` (the document was a customs declaration and was recorded as one; no expense, see `note`), `failed` (nothing was recorded; `failureCode` says why, and the same file may be uploaded again). Filter with `status`, `source`, `externalId`, `createdSince` and `createdBefore`.\n\nRequires scope `expenses:read`.","parameters":[{"description":"Maximum number of items in the page.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor: the `nextCursor` of the previous page, passed unchanged together with the same `sort` and `order`. Omit it for the first page.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}},{"description":"Field to sort by. Items with the same value are ordered by `id` in the same direction.","in":"query","name":"sort","required":false,"schema":{"default":"createdAt","enum":["createdAt","updatedAt"],"type":"string"}},{"description":"Sort direction.","in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Only items changed at or after this time (ISO 8601: a date, read as UTC midnight, or a timestamp with a zone, e.g. `2026-11-21T08:00:00Z`). For incremental sync use `sort=updatedAt&order=asc` and pass the largest `updatedAt` you have seen; items changed at exactly that time come again.","in":"query","name":"updatedSince","required":false,"schema":{"examples":["2026-11-21T08:00:00Z"],"type":"string"}},{"description":"Only documents in this status.","in":"query","name":"status","required":false,"schema":{"enum":["queued","processing","completed","needs_review","not_an_expense","failed"],"type":"string"}},{"description":"Only documents from this source.","in":"query","name":"source","required":false,"schema":{"enum":["api","dashboard","mobile"],"type":"string"}},{"description":"Exact `externalId`.","in":"query","name":"externalId","required":false,"schema":{"examples":["RCPT-2026-0042"],"maxLength":255,"type":"string"}},{"description":"Only documents uploaded at or after this time (ISO 8601: a date, read as UTC midnight, or a timestamp with a zone).","in":"query","name":"createdSince","required":false,"schema":{"examples":["2026-11-01T00:00:00Z"],"type":"string"}},{"description":"Only documents uploaded before this time (ISO 8601, as `createdSince`).","in":"query","name":"createdBefore","required":false,"schema":{"examples":["2026-12-01T00:00:00Z"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ExpenseDocumentDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"One page of expense documents.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["expenses:read"]},"post":{"tags":["Expense documents"],"summary":"Send a receipt for AI reading","operationId":"uploadExpenseDocument","description":"Sends a receipt or supplier invoice to PayGo to be read by AI, as `multipart/form-data` with the file in the field `file`. Accepted: application/pdf, image/jpeg, image/png, image/gif, image/webp, at most 10 MB, one file per request; the content must match the type. Processing is ASYNCHRONOUS: the answer is 202 with `status: \"queued\"` and a `Location`; poll `GET /v1/expense-documents/{id}` until the status is `completed`, `needs_review`, `not_an_expense` or `failed`. A document that is read becomes an expense with `status: \"pending\"`, never posted: a bookkeeper reviews and approves it in PayGo. `needs_review` means the document could not be read and the expense was recorded with amount 0 for the bookkeeper to fill in.\n\nEach document is read ONCE: sending the same file again (same SHA-256) answers 200 with the existing document and `duplicate: true`, and nothing new is read or recorded (unless the earlier one `failed`). A file that is already the receipt of an expense is 409 `conflict` (`document_already_registered`). Every new document costs an AI read, so a company may send at most 500 new documents per UTC day by default; beyond that the answer is 429 `rate_limited` with `Retry-After` (seconds to midnight UTC). Duplicates do not count. Counted as a heavy request for rate limiting.\n\nAn optional `externalId` (your own id, unique in the company) is 409 `conflict` when another document has it. An optional `Idempotency-Key` covers the file's content: the same key with another file is 422 `idempotency_key_reused`. Refusals name the reason in `errors[].code`: `file_required`, `unsupported_file_type`, `file_signature_mismatch`, `expense_category_not_found`, `invalid_multipart`; a larger file is 413 `payload_too_large`.\n\nRequires scope `expenses:write`.\n\nNot available with a test key: answers 403 `not_available_in_test_mode` and does nothing.","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyOptional"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"contentMediaType":"application/octet-stream","description":"The receipt or supplier invoice.","type":"string"},"externalId":{"description":"Your own id of the upload, unique in the company.","maxLength":255,"type":"string"},"description":{"description":"Prefixes the description of the expense.","maxLength":500,"type":"string"},"expenseCategoryId":{"description":"An active expense category of the company.","format":"uuid","type":"string"},"paidWith":{"description":"How it was paid.","enum":["invoice","personal","bank_transfer"],"type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseDocumentUploadDto"}}},"description":"The same file was sent before: the existing document (`duplicate: true`), nothing new is read.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseDocumentUploadDto"}}},"description":"Queued for reading (`status: \"queued\"`, `duplicate: false`). `Location` names it.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/problem+json":{"example":{"code":"not_available_in_test_mode","detail":"not_available_in_test_mode","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":403,"title":"not_available_in_test_mode","type":"https://paygo.is/developers/errors/not_available_in_test_mode"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is valid but the request is not allowed: `insufficient_scope`, `ip_not_allowed`, `tenant_inactive`, or `not_available_in_test_mode` when the key is a test key (this operation sends e-mail, stores a file or starts AI reading)."},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"block","x-required-scopes":["expenses:write"]}},"/v1/expense-documents/{id}":{"get":{"tags":["Expense documents"],"summary":"Get an expense document","operationId":"getExpenseDocument","description":"A document sent for AI reading and what became of it; poll this after uploading. `status`: `queued` (waiting), `processing` (being read), `completed` (an expense was recorded from the data read off the document; fetch it with `GET /v1/expenses/{expenseId}`), `needs_review` (an expense was recorded WITHOUT the data, because the document could not be read: amount 0, a bookkeeper fills it in), `not_an_expense` (the document was a customs declaration and was recorded as one; no expense, see `note`), `failed` (nothing was recorded; `failureCode` says why, and the same file may be uploaded again).\n\nRequires scope `expenses:read`.","parameters":[{"description":"The document's `id`.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseDocumentDto"}}},"description":"The document.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["expenses:read"]}},"/v1/expenses":{"get":{"tags":["Expenses"],"summary":"List expenses","operationId":"listExpenses","description":"Expenses of the company (supplier invoices and supplier credit notes, including expenses employees paid out of pocket, shown as `paidWith: \"personal\"`), newest first by default, with their lines. Get one expense for its payments. A `pending` expense is recorded but NOT posted: it has no journal entry, VAT or payable until a bookkeeper approves it in PayGo (`posted`). For incremental sync use `sort=updatedAt&order=asc&updatedSince=<the latest updatedAt you have seen>`: edits, approval, reversal and recording or reversing a payment change `updatedAt`. An expense has three dates: `invoiceDate` is the date of the supplier's invoice and the posting date; `dueDate` (gjalddagi) is the day the payment falls due; `finalDueDate` (eindagi) is the last day to pay without late interest, by which PayGo decides overdue. Older expenses that recorded fewer dates get the earlier date: a missing `dueDate` is `invoiceDate`, a missing `finalDueDate` is `dueDate`.\n\nRequires scope `expenses:read`.","parameters":[{"description":"Maximum number of items in the page.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor: the `nextCursor` of the previous page, passed unchanged together with the same `sort` and `order`. Omit it for the first page.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}},{"description":"Field to sort by. Items with the same value are ordered by `id` in the same direction.","in":"query","name":"sort","required":false,"schema":{"default":"createdAt","enum":["createdAt","updatedAt"],"type":"string"}},{"description":"Sort direction.","in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Only items changed at or after this time (ISO 8601: a date, read as UTC midnight, or a timestamp with a zone, e.g. `2026-11-21T08:00:00Z`). For incremental sync use `sort=updatedAt&order=asc` and pass the largest `updatedAt` you have seen; items changed at exactly that time come again.","in":"query","name":"updatedSince","required":false,"schema":{"examples":["2026-11-21T08:00:00Z"],"type":"string"}},{"description":"Only expenses of this supplier.","in":"query","name":"supplierId","required":false,"schema":{"examples":["3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f"],"format":"uuid","type":"string"}},{"description":"Only `pending` (not posted) or only `posted` expenses. Default: both.","in":"query","name":"status","required":false,"schema":{"enum":["pending","posted"],"type":"string"}},{"description":"Only bills (`bill`) or only supplier credit notes (`credit_note`). Default: both.","in":"query","name":"type","required":false,"schema":{"enum":["bill","credit_note"],"type":"string"}},{"description":"Only this payment status (the rule of `paymentStatus` in the response).","in":"query","name":"paymentStatus","required":false,"schema":{"enum":["unpaid","partially_paid","paid","credit_open"],"type":"string"}},{"description":"Only expenses with `invoiceDate` on or after this date (YYYY-MM-DD).","in":"query","name":"invoiceDateFrom","required":false,"schema":{"examples":["2026-11-01"],"format":"date","type":"string"}},{"description":"Only expenses with `invoiceDate` on or before this date (YYYY-MM-DD).","in":"query","name":"invoiceDateTo","required":false,"schema":{"examples":["2026-11-30"],"format":"date","type":"string"}},{"description":"Only expenses with `finalDueDate` (eindagi) on or before this date (YYYY-MM-DD), e.g. with `paymentStatus=unpaid` for what falls due.","in":"query","name":"finalDueDateTo","required":false,"schema":{"examples":["2026-12-01"],"format":"date","type":"string"}},{"description":"Exact `externalId`.","in":"query","name":"externalId","required":false,"schema":{"examples":["AP-2026-0042"],"maxLength":255,"type":"string"}},{"description":"Exact invoice number of the supplier (`invoiceNumber`).","in":"query","name":"invoiceNumber","required":false,"schema":{"examples":["2026-118"],"maxLength":100,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ExpenseDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"One page of expenses.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["expenses:read"]},"post":{"tags":["Expenses"],"summary":"Record an expense","operationId":"createExpense","description":"Records a supplier invoice (`bill`) or a supplier credit note (`credit_note`) as an expense with `status: \"pending\"`. The expense is NOT posted: it has no journal entry, VAT or payable until a bookkeeper reviews and approves it in PayGo, and it cannot be approved or paid through the API. PayGo computes the VAT of each line (`netAmount × vatRate / 100`, rounded to two decimals, unless the printed `vatAmount` is sent) and the total (rounded to whole ISK); send `total` to have it checked. Only ISK. An `Idempotency-Key` header is REQUIRED (400 `idempotency_key_required` without one): a retry with the same key and body answers the first result and never records twice. A likely duplicate of an expense already in PayGo is still recorded, flagged for the bookkeeper, and answered with `possibleDuplicate: true` (never a 409). Refusals name the reason in `errors[].code`: `supplier_not_found`, `supplier_inactive`, `account_not_found`, `account_not_allowed`, `vat_account_not_allowed`, `invalid_vat_rate`, `vat_amount_mismatch`, `input_vat_account_missing`, `total_mismatch`, `currency_not_supported`, `expense_category_not_found`, `credited_expense_not_found`, `credited_expense_supplier_mismatch`, `credited_expense_requires_credit_note`, `due_date_before_invoice_date`, `final_due_date_before_invoice_date`, `final_due_date_before_due_date`, `expense_rejected`. An expense has three dates: `invoiceDate` is the date of the supplier's invoice and the posting date; `dueDate` (gjalddagi) is the day the payment falls due; `finalDueDate` (eindagi) is the last day to pay without late interest, by which PayGo decides overdue. Older expenses that recorded fewer dates get the earlier date: a missing `dueDate` is `invoiceDate`, a missing `finalDueDate` is `dueDate`.\n\nRequires scope `expenses:write`.","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyRequired"}],"requestBody":{"content":{"application/json":{"examples":{"bill":{"summary":"A supplier invoice with a 24 % and an 11 % line","value":{"description":"Skrifstofuvörur í nóvember","dueDate":"2026-11-15","externalId":"AP-2026-11-0042","finalDueDate":"2026-12-01","invoiceDate":"2026-11-01","invoiceNumber":"2026-118","lines":[{"account":{"accountNumber":"6110"},"description":"Prentarapappír","netAmount":"10000.00","vatRate":24},{"account":{"accountNumber":"6120"},"description":"Kaffi","netAmount":"3600.00","vatAmount":"396.00","vatRate":11}],"paidWith":"invoice","reference":"PO-4471","supplier":{"kennitala":"4602070880"},"total":"16396.00"}}},"schema":{"$ref":"#/components/schemas/CreateExpenseRequestDto"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseCreatedDto"}}},"description":"The recorded expense (`status: \"pending\"`). `Location` names it.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["expenses:write"]}},"/v1/expenses/{id}":{"get":{"tags":["Expenses"],"summary":"Get an expense","operationId":"getExpense","description":"One expense with its lines and payments (reversed payments included). A `pending` expense is recorded but NOT posted: it has no journal entry, VAT or payable until a bookkeeper approves it in PayGo (`posted`). An expense has three dates: `invoiceDate` is the date of the supplier's invoice and the posting date; `dueDate` (gjalddagi) is the day the payment falls due; `finalDueDate` (eindagi) is the last day to pay without late interest, by which PayGo decides overdue. Older expenses that recorded fewer dates get the earlier date: a missing `dueDate` is `invoiceDate`, a missing `finalDueDate` is `dueDate`.\n\nRequires scope `expenses:read`.","parameters":[{"description":"Id of the expense in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["2f3a4b5c-6d7e-4f8a-9b0c-1d2e3f4a5b6c"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseDetailDto"}}},"description":"The expense.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["expenses:read"]}},"/v1/expenses/{id}/attachments":{"get":{"tags":["Expenses"],"summary":"List the files of an expense","operationId":"listExpenseAttachments","description":"The receipt or invoice file the expense was recorded from (`kind: \"receipt\"`, id `receipt`) and its supplementary documents (`kind: \"attachment\"`). Download a file with its `id`; `available: false` means it cannot be downloaded through the API. Not paged: at most 1,000 supplementary documents; an expense with more is refused with 500 `internal_error` rather than answered with a shortened list.\n\nRequires scope `expenses:read`.","parameters":[{"description":"Id of the expense in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["2f3a4b5c-6d7e-4f8a-9b0c-1d2e3f4a5b6c"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseAttachmentListDto"}}},"description":"The files of the expense.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["expenses:read"]},"post":{"tags":["Expenses"],"summary":"Add a document to an expense","operationId":"uploadExpenseAttachment","description":"Adds a supplementary document to the expense (allowed at any stage, also after it is posted or paid), as `multipart/form-data` with the file in the field `file` and an optional `description`. Accepted: application/pdf, image/jpeg, image/png, image/gif, image/webp, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, at most 10 MB. The type is the part's `Content-Type`, or the file name's extension when that is missing or `application/octet-stream`; the content must match it. Refusals name the reason in `errors[].code`: `file_required`, `unsupported_file_type`, `file_signature_mismatch`, `unsafe_archive` (a Word or Excel file whose archive is malformed, oversized when unpacked, or contains macros), `invalid_multipart`; a larger file is 413 `payload_too_large` (`file_too_large`). An optional `Idempotency-Key` covers the file's content: the same key with another file is 422 `idempotency_key_reused`. Counted as a heavy request for rate limiting.\n\nRequires scope `expenses:write`.\n\nNot available with a test key: answers 403 `not_available_in_test_mode` and does nothing.","parameters":[{"description":"Id of the expense in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["2f3a4b5c-6d7e-4f8a-9b0c-1d2e3f4a5b6c"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyOptional"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"contentMediaType":"application/octet-stream","description":"The document.","type":"string"},"description":{"description":"What the document is.","maxLength":500,"type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseAttachmentDto"}}},"description":"The added document, as listed. `Location` names its download.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/problem+json":{"example":{"code":"not_available_in_test_mode","detail":"not_available_in_test_mode","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":403,"title":"not_available_in_test_mode","type":"https://paygo.is/developers/errors/not_available_in_test_mode"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is valid but the request is not allowed: `insufficient_scope`, `ip_not_allowed`, `tenant_inactive`, or `not_available_in_test_mode` when the key is a test key (this operation sends e-mail, stores a file or starts AI reading)."},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"block","x-required-scopes":["expenses:write"]}},"/v1/expenses/{id}/attachments/{attachmentId}":{"get":{"tags":["Expenses"],"summary":"Download a file of an expense","operationId":"downloadExpenseAttachment","description":"The file itself, always as an attachment (`Content-Disposition: attachment`) with `X-Content-Type-Options: nosniff` and `Cache-Control: private, no-store`. The `Content-Type` is the `mimeType` of the list. Counted as a heavy request for rate limiting. 404 when the expense or the file is not found, or the file cannot be downloaded (`available: false`). Errors are `application/problem+json` as everywhere else.\n\nRequires scope `expenses:read`.","parameters":[{"description":"Id of the expense in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["2f3a4b5c-6d7e-4f8a-9b0c-1d2e3f4a5b6c"],"format":"uuid","type":"string"}},{"description":"`receipt` for the main document, else the id of a supplementary document (from the list).","in":"path","name":"attachmentId","required":true,"schema":{"examples":["receipt"],"type":"string"}}],"responses":{"200":{"content":{"application/msword":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}},"application/octet-stream":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}},"application/pdf":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}},"application/vnd.ms-excel":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}},"image/gif":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}},"image/jpeg":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}},"image/png":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}},"image/webp":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}}},"description":"The file.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["expenses:read"]}},"/v1/invoices":{"get":{"tags":["Invoices"],"summary":"List invoices and credit notes","operationId":"listInvoices","description":"Invoices and credit notes of the company, newest first by default, without their lines (get one invoice for those). Filters combine with AND. For incremental sync use `sort=updatedAt&order=asc&updatedSince=<largest updatedAt you have seen>`: payments and credit notes change `updatedAt` of the invoice. `invoiceDate` is the invoice date. In PayGo the due date (`dueDate`, gjalddagi) is always the invoice date; `finalDueDate` (eindagi) is the last day to pay without late interest and decides `isOverdue`.\n\nRequires scope `invoices:read`.","parameters":[{"description":"Maximum number of items in the page.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor: the `nextCursor` of the previous page, passed unchanged together with the same `sort` and `order`. Omit it for the first page.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}},{"description":"Field to sort by. Items with the same value are ordered by `id` in the same direction.","in":"query","name":"sort","required":false,"schema":{"default":"createdAt","enum":["createdAt","updatedAt"],"type":"string"}},{"description":"Sort direction.","in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Only items changed at or after this time (ISO 8601: a date, read as UTC midnight, or a timestamp with a zone, e.g. `2026-11-21T08:00:00Z`). For incremental sync use `sort=updatedAt&order=asc` and pass the largest `updatedAt` you have seen; items changed at exactly that time come again.","in":"query","name":"updatedSince","required":false,"schema":{"examples":["2026-11-21T08:00:00Z"],"type":"string"}},{"description":"Only invoices of this customer.","in":"query","name":"customerId","required":false,"schema":{"examples":["9b2e7c1a-4f3d-4e8a-b6c5-1d2e3f4a5b6c"],"format":"uuid","type":"string"}},{"description":"Only invoices (`invoice`) or only credit notes (`credit_note`). Default: both.","in":"query","name":"type","required":false,"schema":{"enum":["invoice","credit_note"],"type":"string"}},{"description":"Only this document status.","in":"query","name":"status","required":false,"schema":{"enum":["posted","credited","cancelled"],"type":"string"}},{"description":"Only this payment status (computed from the amounts, as in the response).","in":"query","name":"paymentStatus","required":false,"schema":{"enum":["unpaid","partially_paid","paid"],"type":"string"}},{"description":"Only overdue (`true`) or only not overdue (`false`) invoices, by the rule of `isOverdue`.","in":"query","name":"overdue","required":false,"schema":{"examples":[true],"type":"boolean"}},{"description":"Exact invoice number.","in":"query","name":"invoiceNumber","required":false,"schema":{"examples":["1042"],"maxLength":50,"type":"string"}},{"description":"Exact `externalId`.","in":"query","name":"externalId","required":false,"schema":{"examples":["SHOP-ORDER-77812"],"maxLength":255,"type":"string"}},{"description":"Only invoices with `invoiceDate` on or after this date (YYYY-MM-DD).","in":"query","name":"invoiceDateFrom","required":false,"schema":{"examples":["2026-11-01"],"format":"date","type":"string"}},{"description":"Only invoices with `invoiceDate` on or before this date (YYYY-MM-DD).","in":"query","name":"invoiceDateTo","required":false,"schema":{"examples":["2026-11-30"],"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/InvoiceDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"One page of invoices.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["invoices:read"]},"post":{"tags":["Invoices"],"summary":"Create an invoice","operationId":"createInvoice","description":"Creates and BOOKS an invoice at once, with the same rules and side effects as the PayGo dashboard: the next invoice number, a journal entry in the general ledger, stock movements and a delivery note for product lines, and delivery to the customer by `delivery`. There are no drafts: a booked invoice is only undone by a credit note. An `Idempotency-Key` header is REQUIRED (400 `idempotency_key_required` without one): a retry with the same key and body answers the first result and never books twice. Prices are WITHOUT VAT and used exactly as sent. Business rules refused with 422 or 409 name the reason in `errors[].code`: `open_delivered_order`, `fiscal_period_closed`, `vat_period_locked`, `exchange_rate_unavailable`, `feature_disabled`, `customer_not_found`, `customer_inactive`, `product_not_found`, `product_inactive`, `vat_rate_mismatch`, `invalid_vat_rate`, `vat_rate_not_supported_on_free_line`, `tracked_product_not_supported`, `bank_claim_not_available`, `due_date_must_equal_invoice_date`, `final_due_date_before_invoice_date`. A 503 `service_unavailable` (with `Retry-After`) means nothing was booked. `invoiceDate` is the invoice date. In PayGo the due date (`dueDate`, gjalddagi) is always the invoice date; `finalDueDate` (eindagi) is the last day to pay without late interest and decides `isOverdue`.\n\nRequires scope `invoices:write`.\n\nWith a test key `delivery` is always `none`: the invoice is neither e-mailed nor sent electronically.","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyRequired"}],"requestBody":{"content":{"application/json":{"examples":{"invoice":{"summary":"A product line and a free-text line","value":{"customer":{"kennitala":"5501012340"},"delivery":{"electronicInvoice":"none","email":"auto"},"externalId":"SHOP-100045","finalDueDate":"2026-12-22","invoiceDate":"2026-11-22","lines":[{"quantity":2,"sku":"VARA-100","unitPrice":"5000.00"},{"description":"Uppsetning","discountPercent":10,"quantity":1,"unitPrice":"12000.00","vatRate":24}],"reference":"PO-4471"}}},"schema":{"$ref":"#/components/schemas/CreateInvoiceRequestDto"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailDto"}}},"description":"The booked invoice. `Location` names it.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow-no-delivery","x-required-scopes":["invoices:write"]}},"/v1/invoices/{id}":{"get":{"tags":["Invoices"],"summary":"Get an invoice","operationId":"getInvoice","description":"One invoice or credit note with its lines. `invoiceDate` is the invoice date. In PayGo the due date (`dueDate`, gjalddagi) is always the invoice date; `finalDueDate` (eindagi) is the last day to pay without late interest and decides `isOverdue`.\n\nRequires scope `invoices:read`.","parameters":[{"description":"Id of the invoice or credit note in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailDto"}}},"description":"The invoice.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["invoices:read"]}},"/v1/invoices/{id}/credit-notes":{"post":{"tags":["Invoices"],"summary":"Credit an invoice","operationId":"createCreditNote","description":"Creates and BOOKS a credit note for the invoice at once, with the same rules and side effects as the PayGo dashboard: the next credit-note number, a reversing journal entry, returned goods back in stock, the invoice's `creditedAmount`, `amountSettled`, `balance` and `status` (`credited` when nothing is left to credit), the invoice's claim in the online bank lowered or cancelled, and active payment links expired. The credit note first settles what is still open on the invoice; only the rest becomes customer credit. It is sent as an electronic invoice whenever the customer receives electronic invoices. Send ONE of: nothing (credit the rest of the invoice), `amount` (a price reduction, or the rest), or `lines` (return goods by line and quantity). An `Idempotency-Key` header is REQUIRED (400 `idempotency_key_required` without one): a retry with the same key and body answers the first result and never credits twice. Refusals name the reason in `errors[].code`: 409 `invoice_not_creditable` (a credit note, or credited or cancelled already), `prepayment_invoice_use_order`, `asset_disposal_posted`, `vat_period_locked`, `credit_note_rejected`; 422 `exceeds_creditable`, `exceeds_returnable`, `line_not_found`, `line_not_returnable`, `duplicate_line`, `fiscal_period_closed`, `credit_note_rejected`. A 503 `service_unavailable` (with `Retry-After`) means nothing was booked.\n\nRequires scope `invoices:credit`.","parameters":[{"description":"Id of the invoice or credit note in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyRequired"}],"requestBody":{"content":{"application/json":{"examples":{"amount":{"summary":"A price reduction","value":{"amount":"2480.00","creditDate":"2026-11-22","reason":"Afsláttur vegna galla."}},"full":{"summary":"Credit the rest of the invoice","value":{"externalId":"SHOP-RMA-2230","reason":"Reikningur gerður í ógáti."}},"lines":{"summary":"Return goods","value":{"externalId":"SHOP-RMA-2231","lines":[{"lineId":"0b1c2d3e-4f5a-4b6c-8d7e-9f0a1b2c3d4e","quantity":1}],"reason":"Vöru skilað."}}},"schema":{"$ref":"#/components/schemas/CreateCreditNoteRequestDto"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailDto"}}},"description":"The booked credit note (`type: credit_note`, `creditedInvoiceId`, lines with `creditedLineId`). `Location` names it.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["invoices:credit"]}},"/v1/invoices/{id}/emails/{emailId}":{"get":{"tags":["Invoices"],"summary":"Get the status of an emailed invoice","operationId":"getInvoiceEmail","description":"The status of an email `POST /v1/invoices/{id}/send` queued. `sent` means the mail server accepted it, not that it reached the inbox. `unknown` means PayGo did not record the delivery (emails sent before delivery was recorded, or one that has waited in the queue for over an hour). The reason of a failure is not shown; see the email log in PayGo.\n\nRequires scope `invoices:read`.","parameters":[{"description":"Id of the invoice or credit note in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"}},{"description":"Id of the email, as `send` answered it.","in":"path","name":"emailId","required":true,"schema":{"examples":["2f6c8e1a-3b4d-4c5e-9f7a-8b9c0d1e2f3a"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceEmailDto"}}},"description":"The email and its status.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["invoices:read"]}},"/v1/invoices/{id}/payments":{"get":{"tags":["Invoices"],"summary":"List the payments of an invoice","operationId":"listInvoicePayments","description":"Every payment allocated to the invoice, voided ones included (`status: void`), oldest first. `amount` is the part allocated to this invoice; `paymentTotal` the whole payment. Not paged: at most 1,000 payments; an invoice with more is refused with 500 `internal_error` rather than answered with a shortened list.\n\nRequires scope `invoices:read`.","parameters":[{"description":"Id of the invoice or credit note in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePaymentListDto"}}},"description":"The payments of the invoice.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["invoices:read"]},"post":{"tags":["Invoices"],"summary":"Record a payment of an invoice","operationId":"createInvoicePayment","description":"Records money received for one invoice and BOOKS it at once, with the same rules and side effects as the PayGo dashboard: the next payment number, the invoice's `amountSettled`, `balance` and `paymentStatus`, a journal entry (debit the bank account of the payment method, credit accounts receivable), and the invoice's claim in the online bank lowered or cancelled. A payment is only undone in PayGo itself. Recording payments has a scope of its own, `payments:write`: `invoices:write` creates invoices but cannot record payments. An `Idempotency-Key` header is REQUIRED (400 `idempotency_key_required` without one): a retry with the same key and body answers the first result and never records twice. The amount is in ISK and at most the invoice `balance`. Refusals name the reason in `errors[].code`: 409 `credit_note_payment_not_supported`, `invoice_not_payable` (credited or cancelled); 422 `currency_not_supported` (invoices in foreign currency), `payment_method_not_found`, `payment_method_not_allowed` (a method that spends customer credit), `exceeds_balance`, `fiscal_period_closed`, `customer_inactive`, `payment_rejected`. A 503 `service_unavailable` (with `Retry-After`) means nothing was recorded. `warnings` lists what the payment left for the company to fix by hand, e.g. `bank_claim_update_failed`; the payment is recorded all the same.\n\nRequires scope `payments:write`.","parameters":[{"description":"Id of the invoice or credit note in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyRequired"}],"requestBody":{"content":{"application/json":{"examples":{"payment":{"summary":"A bank transfer","value":{"amount":"12400.00","paymentDate":"2026-11-22","paymentMethodId":"7d8e9f0a-1b2c-4d3e-8f4a-5b6c7d8e9f0a","reference":"MILLIF-88213"}}},"schema":{"$ref":"#/components/schemas/CreateInvoicePaymentRequestDto"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePaymentCreatedDto"}}},"description":"The recorded payment, as the invoice's payment list shows it, and its warnings.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["payments:write"]}},"/v1/invoices/{id}/pdf":{"get":{"tags":["Invoices"],"summary":"Get the PDF of an invoice","operationId":"getInvoicePdf","description":"The invoice or credit note as a PDF, rendered with the company's invoice template in the customer's language, the same document the customer receives. Counted as a heavy request for rate limiting. Errors are `application/problem+json` as everywhere else.\n\nRequires scope `invoices:read`.","parameters":[{"description":"Id of the invoice or credit note in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}}},"description":"The PDF, as an attachment named `<invoiceNumber>.pdf`.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["invoices:read"]}},"/v1/invoices/{id}/send":{"post":{"tags":["Invoices"],"summary":"Email an invoice","operationId":"sendInvoice","description":"Emails the invoice or credit note to the customer, as the PayGo dashboard does: the PDF in the customer's language attached, the company's email address as reply-to, and a line in the invoice's email history. The email is queued, not sent, when the call answers (202): read its status with `GET /v1/invoices/{id}/emails/{emailId}` (`Location`). Without `to` the email goes to the customer's email address; with neither the request is refused with 422 `no_recipient` on `to`. An invalid address is 422 `is_email`. Send an `Idempotency-Key` header to make a retry safe: a retry with the same key and body answers the first result and never sends a second email. Counted as a heavy request for rate limiting. A company may email at most 500 recipients a day through the API, counting the distinct `to` and `bcc` addresses of each send (the customer's address when `to` is left out) over invoices, orders and quotes together. A send that does not fit is refused whole with 429 `rate_limited` and `Retry-After` until midnight UTC; nothing is sent and the refused recipients are not counted. Not in v1: a message of your own, time and material reports, choosing attachments.\n\nRequires scope `invoices:send`.\n\nNot available with a test key: answers 403 `not_available_in_test_mode` and does nothing.","parameters":[{"description":"Id of the invoice or credit note in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyOptional"}],"requestBody":{"content":{"application/json":{"examples":{"customer":{"summary":"To the customer's email address","value":{}},"recipients":{"summary":"To chosen recipients","value":{"bcc":["skjalasafn@example.is"],"to":["bokhald@example.is"]}}},"schema":{"$ref":"#/components/schemas/SendDocumentEmailRequestDto"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceEmailDto"}}},"description":"The queued email (`status: queued` unless the mail server was quicker). `Location` names its status.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/problem+json":{"example":{"code":"not_available_in_test_mode","detail":"not_available_in_test_mode","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":403,"title":"not_available_in_test_mode","type":"https://paygo.is/developers/errors/not_available_in_test_mode"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is valid but the request is not allowed: `insufficient_scope`, `ip_not_allowed`, `tenant_inactive`, or `not_available_in_test_mode` when the key is a test key (this operation sends e-mail, stores a file or starts AI reading)."},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"block","x-required-scopes":["invoices:send"]}},"/v1/openapi.json":{"get":{"tags":["Reference data"],"summary":"Get the OpenAPI document","operationId":"getOpenApiDocument","description":"Returns this API reference as an OpenAPI 3.1 document. Needs no API key.","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"The OpenAPI 3.1 document."},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[]}},"/v1/orders":{"get":{"tags":["Orders"],"summary":"List sales orders","operationId":"listOrders","description":"Sales orders of the company from every source (web shops, quotes, work orders, this API, entered by hand), newest first by default, without their lines (get one order for those). Filters combine with AND. For incremental sync use `sort=updatedAt&order=asc&updatedSince=<largest updatedAt you have seen>`. A line shows its effective quantity (ordered minus cancelled) and its amounts are computed on that quantity; the totals are the sums of the lines, so they never include cancelled quantities.\n\nRequires scope `orders:read`.","parameters":[{"description":"Maximum number of items in the page.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor: the `nextCursor` of the previous page, passed unchanged together with the same `sort` and `order`. Omit it for the first page.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}},{"description":"Field to sort by. Items with the same value are ordered by `id` in the same direction.","in":"query","name":"sort","required":false,"schema":{"default":"createdAt","enum":["createdAt","updatedAt"],"type":"string"}},{"description":"Sort direction.","in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Only items changed at or after this time (ISO 8601: a date, read as UTC midnight, or a timestamp with a zone, e.g. `2026-11-21T08:00:00Z`). For incremental sync use `sort=updatedAt&order=asc` and pass the largest `updatedAt` you have seen; items changed at exactly that time come again.","in":"query","name":"updatedSince","required":false,"schema":{"examples":["2026-11-21T08:00:00Z"],"type":"string"}},{"description":"Only orders of this customer.","in":"query","name":"customerId","required":false,"schema":{"examples":["9b2e7c1a-4f3d-4e8a-b6c5-1d2e3f4a5b6c"],"format":"uuid","type":"string"}},{"description":"Only this status.","in":"query","name":"status","required":false,"schema":{"enum":["pending","confirmed","awaiting_payment","awaiting_stock","processing","in_assembly","shipped","awaiting_pickup","delivered","partially_delivered","invoiced","partially_invoiced","cancelled"],"type":"string"}},{"description":"Only this delivery status.","in":"query","name":"deliveryStatus","required":false,"schema":{"enum":["none","partial","full"],"type":"string"}},{"description":"Only this invoicing status.","in":"query","name":"invoicingStatus","required":false,"schema":{"enum":["none","partial","full"],"type":"string"}},{"description":"Only orders from this source (the rule of `source`).","in":"query","name":"source","required":false,"schema":{"enum":["woocommerce","shopify","storefront","portal","api","quote","work_order","manual"],"type":"string"}},{"description":"Exact order number.","in":"query","name":"orderNumber","required":false,"schema":{"examples":["P-2026-0042"],"maxLength":50,"type":"string"}},{"description":"Exact `externalId`.","in":"query","name":"externalId","required":false,"schema":{"examples":["SHOP-ORDER-77812"],"maxLength":255,"type":"string"}},{"description":"Only orders with `orderDate` on or after this date (YYYY-MM-DD).","in":"query","name":"orderDateFrom","required":false,"schema":{"examples":["2026-11-01"],"format":"date","type":"string"}},{"description":"Only orders with `orderDate` on or before this date (YYYY-MM-DD).","in":"query","name":"orderDateTo","required":false,"schema":{"examples":["2026-11-30"],"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrderDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"One page of orders.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["orders:read"]},"post":{"tags":["Orders"],"summary":"Create a sales order","operationId":"createOrder","description":"Creates a confirmed sales order with the same rules and side effects as the PayGo dashboard: the next order number, and a RESERVATION of stock for every product line on the company's default warehouse (a kit reserves its components). Stock is never checked: the available quantity may go below zero, and lines that stock cannot fill are watched as pending deliveries. No e-mail is sent. An `Idempotency-Key` header is REQUIRED (400 `idempotency_key_required` without one): a retry with the same key and body answers the first result and never creates a second order, which would reserve the stock twice. Orders are always in ISK. Prices are WITHOUT VAT and used exactly as sent. Business rules refused with 422 or 409 name the reason in `errors[].code`: `customer_not_found`, `customer_inactive`, `product_not_found`, `product_inactive`, `vat_rate_mismatch`, `invalid_vat_rate`, `vat_rate_not_supported_on_free_line`, `max_length`, `no_default_warehouse`, `order_rejected`. An `externalId` already used → 409 `conflict` naming the existing order. Invoicing an order does not move stock: the reservation stands until a delivery note is made in PayGo.\n\nRequires scope `orders:write`.","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyRequired"}],"requestBody":{"content":{"application/json":{"examples":{"order":{"summary":"A product line and a free-text line","value":{"customer":{"kennitala":"5501012340"},"deliveryDate":"2026-11-25","externalId":"SHOP-100045","lines":[{"quantity":2,"sku":"VARA-100","unitPrice":"5000.00"},{"description":"Uppsetning","discountPercent":10,"quantity":1,"unitPrice":"12000.00","vatRate":24}],"orderDate":"2026-11-22","reference":"PO-4471","shippingAddress":"Laugavegur 1, 101 Reykjavík"}}},"schema":{"$ref":"#/components/schemas/CreateOrderRequestDto"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailDto"}}},"description":"The created order. `Location` names it.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["orders:write"]}},"/v1/orders/{id}":{"get":{"tags":["Orders"],"summary":"Get a sales order","operationId":"getOrder","description":"One sales order with its lines and the invoices made from it. A line shows its effective quantity (ordered minus cancelled) and its amounts are computed on that quantity; the totals are the sums of the lines, so they never include cancelled quantities.\n\nRequires scope `orders:read`.","parameters":[{"description":"Id of the order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["3e4f5a6b-7c8d-4e9f-8a0b-1c2d3e4f5a6b"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailDto"}}},"description":"The order.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["orders:read"]},"patch":{"tags":["Orders"],"summary":"Change a sales order","operationId":"updateOrder","description":"Changes the header fields sent (a field left out is not changed; `null` clears `shippingAddress`, `reference` or `notes`) and the lines named in `lineChanges`. Lines change by OPERATIONS on single lines, never by sending the whole list: `add` new lines, `update` fields of a line by its `lineId`, `remove` a line by its `lineId`; a line not named is left as it is. A `reason` is REQUIRED with `lineChanges` and is kept in the order's change history. Everything in one request applies together or not at all.\n\nStock reservations follow the lines on the company's default warehouse: an added product line reserves its quantity, a higher `quantity` reserves the difference, a lower one cancels the difference on the line and releases it, and a removed line (kept on the order with its whole quantity cancelled) releases what it held.\n\nAn `Idempotency-Key` header is REQUIRED when `lineChanges.add` is sent (400 `idempotency_key_required` without one): a retry of a request that added lines would otherwise add them, and reserve their stock, a second time. Without added lines it is optional: header fields, `update` (the quantity sent is the new quantity, not a difference) and `remove` give the same result when repeated.\n\nBusiness rules refused with 422 or 409 name the reason in `errors[].code`: `line_not_found` (a `lineId` that is not a line of this order), `duplicate_line`, `quantity_below_fulfilled` (below what was delivered or invoiced on the line, or removing such a line), `line_price_locked` (409: price, discount or VAT rate of an invoiced line), `order_not_editable` (409: the order is cancelled or fully invoiced), and for added lines the reasons of `createOrder` (`product_not_found`, `product_inactive`, `vat_rate_mismatch`, `invalid_vat_rate`, `vat_rate_not_supported_on_free_line`, `max_length`, `no_default_warehouse`); anything else `order_rejected`.\n\nRequires scope `orders:write`.","parameters":[{"description":"Id of the order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["3e4f5a6b-7c8d-4e9f-8a0b-1c2d3e4f5a6b"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyOptional"}],"requestBody":{"content":{"application/json":{"examples":{"header":{"summary":"Header fields only","value":{"deliveryDate":"2026-11-27","reference":null}},"lines":{"summary":"Add a line, change a quantity, remove a line","value":{"deliveryDate":"2026-11-27","lineChanges":{"add":[{"quantity":1,"sku":"VARA-200","unitPrice":"2500.00"}],"remove":[{"lineId":"5d9a2f3b-8c4e-4a7f-8b2d-3e4f5a6b7c8d"}],"update":[{"lineId":"4c8f1e2a-7b3d-4f6e-9a1c-2d3e4f5a6b7c","quantity":4}]},"reason":"Viðskiptavinur bætti við"}}},"schema":{"$ref":"#/components/schemas/UpdateOrderRequestDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailDto"}}},"description":"The order after the change.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["orders:write"]}},"/v1/orders/{id}/cancel":{"post":{"tags":["Orders"],"summary":"Cancel a sales order","operationId":"cancelOrder","description":"Cancels the order as the PayGo dashboard does: what is open on its lines is cancelled and their stock reservations are released; supplementary orders are cancelled with it, and an unpaid bank claim of the order is cancelled. The `reason` is kept in the order's change history. Cancelling an order that is already cancelled returns it unchanged (200), so a repeated call is harmless; an `Idempotency-Key` is optional. Refused with 409 and the reason in `errors[].code`: `order_invoiced` (invoiced in part or in full), `order_delivered` (delivered in part or in full: the goods must be returned in PayGo first), `order_has_prepayment_invoices`, `order_has_prepayments` (deposits must be dealt with in PayGo first), `order_rejected`.\n\nRequires scope `orders:write`.","parameters":[{"description":"Id of the order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["3e4f5a6b-7c8d-4e9f-8a0b-1c2d3e4f5a6b"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyOptional"}],"requestBody":{"content":{"application/json":{"examples":{"cancel":{"summary":"Cancel","value":{"reason":"Viðskiptavinur hætti við"}}},"schema":{"$ref":"#/components/schemas/CancelOrderRequestDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailDto"}}},"description":"The cancelled order.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["orders:write"]}},"/v1/orders/{id}/emails/{emailId}":{"get":{"tags":["Orders"],"summary":"Get the status of an emailed sales order","operationId":"getOrderEmail","description":"The status of an email `POST /v1/orders/{id}/send` queued. `sent` means the mail server accepted it, not that it reached the inbox. `unknown` means PayGo did not record the delivery (emails sent before delivery was recorded, or one that has waited in the queue for over an hour). The reason of a failure is not shown; see the email log in PayGo.\n\nRequires scope `orders:read`.","parameters":[{"description":"Id of the order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["3e4f5a6b-7c8d-4e9f-8a0b-1c2d3e4f5a6b"],"format":"uuid","type":"string"}},{"description":"Id of the email, as `send` answered it.","in":"path","name":"emailId","required":true,"schema":{"examples":["2f6c8e1a-3b4d-4c5e-9f7a-8b9c0d1e2f3a"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderEmailDto"}}},"description":"The email and its status.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["orders:read"]}},"/v1/orders/{id}/invoice":{"post":{"tags":["Orders"],"summary":"Invoice a sales order","operationId":"invoiceOrder","description":"Books an invoice of the order with the same rules and side effects as the PayGo dashboard: the next invoice number, the invoiced quantity of each line, and the journal entry, all at once. Without `lines` everything not yet invoiced on the order's lines is invoiced; with `lines` only those lines and quantities (partial invoicing; invoice the rest later with another call). Prices, discounts and VAT come from the order lines. Deposits paid on the order are applied to the invoice, and prepayment invoices of the order are deducted, as in the dashboard.\n\n**Stock does not move:** invoicing is a financial record only. The stock reservation of the order stands until a delivery note is made in PayGo.\n\nAn `Idempotency-Key` header is REQUIRED (400 `idempotency_key_required` without one): a retry with the same key and body answers the first result and never books a second invoice. The answer is the new invoice (as `GET /v1/invoices/{id}` returns it, with `orderId`); `Location` names it.\n\nRefused with the reason in `errors[].code`: 409 `nothing_to_invoice` (nothing left on the order), 409 `order_cancelled`, 422 `line_not_found`, `duplicate_line`, `exceeds_invoiceable` (more than is left on a line), `due_date_must_equal_invoice_date`, `final_due_date_before_invoice_date`, `bank_claim_not_available`, `customer_inactive`, `fiscal_period_closed` (the invoice date is not in an open fiscal period), 409 `vat_period_locked`, 422 `order_invoice_rejected`; an `externalId` already used → 409 `conflict` naming the existing invoice. 503 `service_unavailable` with `Retry-After` when posting is unavailable: nothing was saved, retry with the same key.\n\n`warnings` lists what the booking left for the company to fix by hand. `deposit_not_applied`: the deposits paid on the order could not be applied to the invoice, so it shows the full amount unpaid; no e-mail, electronic invoice or bank claim was sent for it, even when asked for, so the customer is never charged twice. The invoice is booked (201): do not invoice again; the company applies the deposit in PayGo and then sends the invoice. `post_processing_incomplete`: the invoice is booked (201) but a step after the booking failed, so whether the deposit was applied is unknown and no e-mail, electronic invoice or bank claim was sent; do not invoice again, check the invoice in PayGo.\n\nRequires scope `orders:invoice`.\n\nWith a test key `delivery` is always `none`: the invoice is neither e-mailed nor sent electronically.","parameters":[{"description":"Id of the order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["3e4f5a6b-7c8d-4e9f-8a0b-1c2d3e4f5a6b"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyRequired"}],"requestBody":{"content":{"application/json":{"examples":{"all":{"summary":"Everything not yet invoiced","value":{"externalId":"SHOP-100045-INV","invoiceDate":"2026-11-22"}},"partial":{"summary":"Part of one line","value":{"delivery":{"electronicInvoice":"auto","email":"none"},"lines":[{"lineId":"4c8f1e2a-7b3d-4f6e-9a1c-2d3e4f5a6b7c","quantity":2}]}}},"schema":{"$ref":"#/components/schemas/InvoiceOrderRequestDto"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInvoiceCreatedDto"}}},"description":"The booked invoice and its warnings. `Location` names it.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow-no-delivery","x-required-scopes":["orders:invoice"]}},"/v1/orders/{id}/pdf":{"get":{"tags":["Orders"],"summary":"Get the PDF of a sales order","operationId":"getOrderPdf","description":"The order as a PDF, rendered with the company's template in the customer's language: the same document the customer receives by e-mail. Lines of its supplementary orders are included, cancelled quantities are not. Counted as a heavy request for rate limiting. Errors are `application/problem+json` as everywhere else.\n\nRequires scope `orders:read`.","parameters":[{"description":"Id of the order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["3e4f5a6b-7c8d-4e9f-8a0b-1c2d3e4f5a6b"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}}},"description":"The PDF, as an attachment named `order-<orderNumber>.pdf`.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["orders:read"]}},"/v1/orders/{id}/send":{"post":{"tags":["Orders"],"summary":"Email a sales order","operationId":"sendOrder","description":"Emails the order confirmation to the customer, as the PayGo dashboard does: the order PDF in the customer's language attached (the document `GET /v1/orders/{id}/pdf` answers), the company's email address as reply-to, and a line in the order's email history. The status of the order does not change. The email is queued, not sent, when the call answers (202): read its status with `GET /v1/orders/{id}/emails/{emailId}` (`Location`). Without `to` the email goes to the customer's email address; with neither the request is refused with 422 `no_recipient` on `to`. An invalid address is 422 `is_email`. Send an `Idempotency-Key` header to make a retry safe: a retry with the same key and body answers the first result and never sends a second email. Counted as a heavy request for rate limiting. A company may email at most 500 recipients a day through the API, counting the distinct `to` and `bcc` addresses of each send (the customer's address when `to` is left out) over invoices, orders and quotes together. A send that does not fit is refused whole with 429 `rate_limited` and `Retry-After` until midnight UTC; nothing is sent and the refused recipients are not counted. Not in v1: a message of your own, the change history of the order.\n\nRequires scope `orders:send`.\n\nNot available with a test key: answers 403 `not_available_in_test_mode` and does nothing.","parameters":[{"description":"Id of the order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["3e4f5a6b-7c8d-4e9f-8a0b-1c2d3e4f5a6b"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyOptional"}],"requestBody":{"content":{"application/json":{"examples":{"customer":{"summary":"To the customer's email address","value":{}},"recipients":{"summary":"To chosen recipients","value":{"bcc":["skjalasafn@example.is"],"to":["innkaup@example.is"]}}},"schema":{"$ref":"#/components/schemas/SendDocumentEmailRequestDto"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderEmailDto"}}},"description":"The queued email (`status: queued` unless the mail server was quicker). `Location` names its status.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/problem+json":{"example":{"code":"not_available_in_test_mode","detail":"not_available_in_test_mode","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":403,"title":"not_available_in_test_mode","type":"https://paygo.is/developers/errors/not_available_in_test_mode"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is valid but the request is not allowed: `insufficient_scope`, `ip_not_allowed`, `tenant_inactive`, or `not_available_in_test_mode` when the key is a test key (this operation sends e-mail, stores a file or starts AI reading)."},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"block","x-required-scopes":["orders:send"]}},"/v1/payment-methods":{"get":{"tags":["Reference data"],"summary":"List payment methods","operationId":"listPaymentMethods","description":"The company's payment methods, in the order the company has set. Use `id` as `paymentMethodId` when recording an invoice payment; only methods with `canRecordInvoicePayment: true` are accepted there. Not paginated: every item is returned in one response (`hasMore` is always false, `nextCursor` null); `limit` and `cursor` are ignored.\n\nRequires scope `reference:read`.","parameters":[{"description":"Ignored: reference lists return every item in one response.","in":"query","name":"limit","required":false,"schema":{"type":"string"}},{"description":"Ignored: reference lists return every item in one response.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PaymentMethodDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"All payment methods.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["reference:read"]}},"/v1/ping":{"get":{"tags":["Ping"],"summary":"Check an API key","operationId":"ping","description":"Answers 200 for a valid key with the company it belongs to, its scopes and its expiry. Needs no scope. Use it to test a new key and the connection before calling other operations.\n\nNeeds a valid API key but no particular scope.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PingResponseDto"}}},"description":"The key is valid.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"content":{"application/problem+json":{"example":{"code":"invalid_api_key","detail":"invalid_api_key","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":401,"title":"invalid_api_key","type":"https://paygo.is/developers/errors/invalid_api_key"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"invalid_api_key (missing, malformed or unknown key, or an X-Tenant-ID header naming another company), key_expired or key_revoked.","headers":{"WWW-Authenticate":{"$ref":"#/components/headers/WwwAuthenticate"}}},"403":{"content":{"application/problem+json":{"example":{"code":"ip_not_allowed","detail":"ip_not_allowed","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":403,"title":"ip_not_allowed","type":"https://paygo.is/developers/errors/ip_not_allowed"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"ip_not_allowed (the key is limited to other IP addresses) or tenant_inactive."},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"content":{"application/problem+json":{"example":{"code":"maintenance","detail":"maintenance","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":503,"title":"maintenance","type":"https://paygo.is/developers/errors/maintenance"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"maintenance: try again shortly.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":[]}},"/v1/postman.json":{"get":{"tags":["Reference data"],"summary":"Get the Postman collection","operationId":"getPostmanCollection","description":"Returns this API as a Postman Collection v2.1 to import into Postman. Set the `apiKey` variable of the collection to your key. Needs no API key.","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"The Postman Collection v2.1."},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[]}},"/v1/products":{"get":{"tags":["Products"],"summary":"List products","operationId":"listProducts","description":"Products of the company, newest first by default, with sales price excluding VAT, VAT rate, barcodes and stock totals. Filters combine with AND. For incremental sync use `sort=updatedAt&order=asc&updatedSince=<largest updatedAt you have seen>`. `updatedSince` sees changes to the product itself and to its stock totals (goods in and out, reservations), but not a move between warehouses, which changes only the split per warehouse: for stock sync use `stockChangedSince`. Stock is live (warehouse records), not a stock count. Stock per warehouse is only on `GET /v1/products/{id}`.\n\nRequires scope `products:read`.","parameters":[{"description":"Maximum number of items in the page.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor: the `nextCursor` of the previous page, passed unchanged together with the same `sort` and `order`. Omit it for the first page.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}},{"description":"Field to sort by. Items with the same value are ordered by `id` in the same direction.","in":"query","name":"sort","required":false,"schema":{"default":"createdAt","enum":["createdAt","updatedAt"],"type":"string"}},{"description":"Sort direction.","in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Only items changed at or after this time (ISO 8601: a date, read as UTC midnight, or a timestamp with a zone, e.g. `2026-11-21T08:00:00Z`). For incremental sync use `sort=updatedAt&order=asc` and pass the largest `updatedAt` you have seen; items changed at exactly that time come again.","in":"query","name":"updatedSince","required":false,"schema":{"examples":["2026-11-21T08:00:00Z"],"type":"string"}},{"description":"Free text: matches part of the name or the SKU (case-insensitive).","in":"query","name":"search","required":false,"schema":{"examples":["kaffi"],"maxLength":100,"type":"string"}},{"description":"Exact SKU.","in":"query","name":"sku","required":false,"schema":{"examples":["KAF-1001"],"maxLength":50,"type":"string"}},{"description":"Exact barcode: the product that has this barcode (any of its barcodes).","in":"query","name":"barcode","required":false,"schema":{"examples":["5690527000017"],"maxLength":50,"type":"string"}},{"description":"Only active (`true`) or only inactive (`false`) products. Default: both.","in":"query","name":"isActive","required":false,"schema":{"examples":[true],"type":"boolean"}},{"description":"Only products of this type.","in":"query","name":"type","required":false,"schema":{"enum":["product","service","kit"],"examples":["product"],"type":"string"}},{"description":"Only products in this category.","in":"query","name":"categoryId","required":false,"schema":{"examples":["3d8e2f1a-5b6c-4d7e-8f9a-0b1c2d3e4f5a"],"format":"uuid","type":"string"}},{"description":"Only products whose stock changed at or after this time in any warehouse (goods in or out, reservations, moves between warehouses); same format as `updatedSince`. For stock sync, note the time you send the first request, page through with `stockChangedSince=<the time noted last run>`, then keep the new time for the next run. Combines with `updatedSince` by AND.","in":"query","name":"stockChangedSince","required":false,"schema":{"examples":["2026-11-21T08:00:00Z"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ProductDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"One page of products.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["products:read"]}},"/v1/products/{id}":{"get":{"tags":["Products"],"summary":"Get a product","operationId":"getProduct","description":"One product with its stock per warehouse (`null` for services and kits).\n\nRequires scope `products:read`.","parameters":[{"description":"Id of the product in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["1f2e3d4c-5b6a-4978-8a9b-0c1d2e3f4a5b"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDetailDto"}}},"description":"The product.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["products:read"]}},"/v1/quotes":{"get":{"tags":["Quotes"],"summary":"List quotes","operationId":"listQuotes","description":"Quotes of the company, newest first by default, without their lines (get one quote for those). Filters combine with AND. For incremental sync use `sort=updatedAt&order=asc&updatedSince=<largest updatedAt you have seen>`: edits, status changes and the conversion to an order change `updatedAt`. A quote that only passed its `validUntil` keeps its `updatedAt`, so re-read `status=sent` quotes near that day. A sent quote whose `validUntil` has passed is `expired` from the next day on (UTC), whatever the dashboard shows. Quotes are always in ISK, with VAT.\n\nRequires scope `quotes:read`.","parameters":[{"description":"Maximum number of items in the page.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor: the `nextCursor` of the previous page, passed unchanged together with the same `sort` and `order`. Omit it for the first page.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}},{"description":"Field to sort by. Items with the same value are ordered by `id` in the same direction.","in":"query","name":"sort","required":false,"schema":{"default":"createdAt","enum":["createdAt","updatedAt"],"type":"string"}},{"description":"Sort direction.","in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Only items changed at or after this time (ISO 8601: a date, read as UTC midnight, or a timestamp with a zone, e.g. `2026-11-21T08:00:00Z`). For incremental sync use `sort=updatedAt&order=asc` and pass the largest `updatedAt` you have seen; items changed at exactly that time come again.","in":"query","name":"updatedSince","required":false,"schema":{"examples":["2026-11-21T08:00:00Z"],"type":"string"}},{"description":"Only quotes of this customer.","in":"query","name":"customerId","required":false,"schema":{"examples":["9b2e7c1a-4f3d-4e8a-b6c5-1d2e3f4a5b6c"],"format":"uuid","type":"string"}},{"description":"Only quotes with this `status`, by the rule of the response: `expired` includes sent quotes past `validUntil`, and `sent` excludes them.","in":"query","name":"status","required":false,"schema":{"enum":["draft","sent","accepted","rejected","expired","converted_to_order"],"type":"string"}},{"description":"Exact quote number.","in":"query","name":"quoteNumber","required":false,"schema":{"examples":["QUO-2026-00042"],"maxLength":50,"type":"string"}},{"description":"Exact `externalId`.","in":"query","name":"externalId","required":false,"schema":{"examples":["CRM-DEAL-5521"],"maxLength":255,"type":"string"}},{"description":"Only quotes with `quoteDate` on or after this date (YYYY-MM-DD).","in":"query","name":"quoteDateFrom","required":false,"schema":{"examples":["2026-11-01"],"format":"date","type":"string"}},{"description":"Only quotes with `quoteDate` on or before this date (YYYY-MM-DD).","in":"query","name":"quoteDateTo","required":false,"schema":{"examples":["2026-11-30"],"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/QuoteDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"One page of quotes.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["quotes:read"]},"post":{"tags":["Quotes"],"summary":"Create a quote","operationId":"createQuote","description":"Creates a quote in status `draft` with the next quote number, as in the PayGo dashboard. Nothing else is written: no stock is reserved and nothing is posted. Send it with `mark-sent` once the customer has it. An `Idempotency-Key` header is optional: a retry with the same key and body answers the first result and never creates a second quote. Prices are WITHOUT VAT and used exactly as sent. Quotes are always in ISK. Refusals name the reason in `errors[].code` (422): `customer_not_found`, `customer_inactive`, `product_not_found`, `product_inactive`, `vat_rate_mismatch`, `invalid_vat_rate`, `vat_rate_not_supported_on_free_line`, `valid_until_before_quote_date`, `max_length`. A duplicate `externalId` → 409 `conflict` naming the existing quote.\n\nRequires scope `quotes:write`.","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyOptional"}],"requestBody":{"content":{"application/json":{"examples":{"quote":{"summary":"A product line and a free-text line","value":{"customer":{"kennitala":"5501012340"},"externalId":"CRM-88231","lines":[{"quantity":2,"sku":"VARA-100","unitPrice":"5000.00"},{"description":"Uppsetning","discountPercent":10,"quantity":1,"unitPrice":"12000.00","vatRate":24}],"quoteDate":"2026-11-22","reference":"RFQ-2201","validUntil":"2026-12-22"}}},"schema":{"$ref":"#/components/schemas/CreateQuoteRequestDto"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteDetailDto"}}},"description":"The new quote. `Location` names it.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["quotes:write"]}},"/v1/quotes/{id}":{"get":{"tags":["Quotes"],"summary":"Get a quote","operationId":"getQuote","description":"One quote with its lines. A sent quote whose `validUntil` has passed is `expired` from the next day on (UTC), whatever the dashboard shows. Quotes are always in ISK, with VAT.\n\nRequires scope `quotes:read`.","parameters":[{"description":"Id of the quote in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteDetailDto"}}},"description":"The quote.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["quotes:read"]},"patch":{"tags":["Quotes"],"summary":"Update a draft quote","operationId":"updateQuote","description":"Changes only the fields sent; `null` clears `reference`, `notes` and `terms`. `lines`, when sent, is the complete new list and replaces every line (line ids change). `customer` moves the draft to another active customer. Only a `draft` can be changed: otherwise 409 `quote_not_editable` (revise a sent quote in PayGo, or create a new one). Other refusals are 422 with the same reasons as creating a quote.\n\nRequires scope `quotes:write`.","parameters":[{"description":"Id of the quote in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f"],"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQuoteRequestDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteDetailDto"}}},"description":"The quote as it now stands.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["quotes:write"]}},"/v1/quotes/{id}/accept":{"post":{"tags":["Quotes"],"summary":"Accept a quote","operationId":"acceptQuote","description":"Records that the customer accepted a `sent` quote (`acceptedAt` is set). Not sent → 409 `quote_not_sent`; past `validUntil` → 409 `quote_expired`; an inactive customer → 422 `customer_inactive`. Refusals for the state of the quote are 409 `conflict` with the reason in `errors[].code`.\n\nRequires scope `quotes:write`.","parameters":[{"description":"Id of the quote in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteDetailDto"}}},"description":"The quote, now `accepted`.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["quotes:write"]}},"/v1/quotes/{id}/convert":{"post":{"tags":["Quotes"],"summary":"Convert a quote to a sales order","operationId":"convertQuote","description":"Makes a sales order of an `accepted` quote, with all its lines, prices and discounts as they stand (no price list or customer price is applied), and moves the quote to `converted_to_order`, exactly once. The order reserves stock like any new order. `terms` of the quote are not carried over (orders have none). An `Idempotency-Key` header is REQUIRED (400 `idempotency_key_required` without one): a retry with the same key and body answers the first result. Not accepted → 409 `quote_not_accepted`; already converted → 409 `quote_already_converted` (naming the order); past `validUntil` → 409 `quote_expired`; an inactive customer → 422 `customer_inactive`; not enough stock on hand for a product line (unless the company or product allows negative stock) → 422 `insufficient_stock`; `deliveryDate` before `orderDate` → 422 `delivery_date_before_order_date`. A duplicate `externalId` → 409 `conflict` naming the existing order. Refusals for the state of the quote are 409 `conflict` with the reason in `errors[].code`.\n\nRequires scope `quotes:write`.","parameters":[{"description":"Id of the quote in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyRequired"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertQuoteRequestDto"}}},"required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailDto"}}},"description":"The new sales order. `Location` names it (`/v1/orders/{id}`).","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["quotes:write"]}},"/v1/quotes/{id}/emails/{emailId}":{"get":{"tags":["Quotes"],"summary":"Get the status of an emailed quote","operationId":"getQuoteEmail","description":"The status of an email `POST /v1/quotes/{id}/send` queued. `sent` means the mail server accepted it, not that it reached the inbox. `unknown` means PayGo did not record the delivery (emails sent before delivery was recorded, or one that has waited in the queue for over an hour). The reason of a failure is not shown; see the email log in PayGo.\n\nRequires scope `quotes:read`.","parameters":[{"description":"Id of the quote in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f"],"format":"uuid","type":"string"}},{"description":"Id of the email, as `send` answered it.","in":"path","name":"emailId","required":true,"schema":{"examples":["2f6c8e1a-3b4d-4c5e-9f7a-8b9c0d1e2f3a"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteEmailDto"}}},"description":"The email and its status.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["quotes:read"]}},"/v1/quotes/{id}/mark-sent":{"post":{"tags":["Quotes"],"summary":"Mark a quote as sent","operationId":"markQuoteSent","description":"Moves a `draft` to `sent` without e-mailing it: for a client that delivers the quote to the customer itself. Only a draft: otherwise 409 `quote_not_sendable`. Refusals for the state of the quote are 409 `conflict` with the reason in `errors[].code`.\n\nRequires scope `quotes:write`.","parameters":[{"description":"Id of the quote in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteDetailDto"}}},"description":"The quote, now `sent`.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["quotes:write"]}},"/v1/quotes/{id}/pdf":{"get":{"tags":["Quotes"],"summary":"Get the PDF of a quote","operationId":"getQuotePdf","description":"The quote as a PDF, rendered with the company's template in the customer's language, the same document the customer receives. Counted as a heavy request for rate limiting. Errors are `application/problem+json` as everywhere else.\n\nRequires scope `quotes:read`.","parameters":[{"description":"Id of the quote in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}}},"description":"The PDF, as an attachment named `<quoteNumber>.pdf`.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["quotes:read"]}},"/v1/quotes/{id}/reject":{"post":{"tags":["Quotes"],"summary":"Reject a quote","operationId":"rejectQuote","description":"Records that the customer declined a `sent` quote. Not sent → 409 `quote_not_sent`. PayGo keeps no reason with the status; put it in `notes` before sending the quote if you need it. Refusals for the state of the quote are 409 `conflict` with the reason in `errors[].code`.\n\nRequires scope `quotes:write`.","parameters":[{"description":"Id of the quote in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteDetailDto"}}},"description":"The quote, now `rejected`.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["quotes:write"]}},"/v1/quotes/{id}/send":{"post":{"tags":["Quotes"],"summary":"Email a quote","operationId":"sendQuote","description":"Emails the quote to the customer, as the PayGo dashboard does: the quote PDF in the customer's language and the quote's own attachments, the company's email address as reply-to, and a line in the quote's email history. A `draft` becomes `sent` first; a `sent` quote is emailed again and an `accepted` one as a copy, without a status change. Any other status → 409 `quote_not_sendable`; a draft or sent quote past `validUntil` → 409 `quote_expired`. The email is queued, not sent, when the call answers (202): read its status with `GET /v1/quotes/{id}/emails/{emailId}` (`Location`). Without `to` the email goes to the customer's email address; with neither the request is refused with 422 `no_recipient` on `to` and a draft stays a draft. An invalid address is 422 `is_email`. Send an `Idempotency-Key` header to make a retry safe: a retry with the same key and body answers the first result and never sends a second email. Counted as a heavy request for rate limiting. A company may email at most 500 recipients a day through the API, counting the distinct `to` and `bcc` addresses of each send (the customer's address when `to` is left out) over invoices, orders and quotes together. A send that does not fit is refused whole with 429 `rate_limited` and `Retry-After` until midnight UTC; nothing is sent and the refused recipients are not counted. To deliver the quote yourself, use `mark-sent`. Not in v1: a message of your own. Refusals for the state of the quote are 409 `conflict` with the reason in `errors[].code`.\n\nRequires scope `quotes:send`.\n\nNot available with a test key: answers 403 `not_available_in_test_mode` and does nothing.","parameters":[{"description":"Id of the quote in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyOptional"}],"requestBody":{"content":{"application/json":{"examples":{"customer":{"summary":"To the customer's email address","value":{}},"recipients":{"summary":"To chosen recipients","value":{"bcc":["skjalasafn@example.is"],"to":["innkaup@example.is"]}}},"schema":{"$ref":"#/components/schemas/SendDocumentEmailRequestDto"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteEmailDto"}}},"description":"The queued email (`status: queued` unless the mail server was quicker). `Location` names its status.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/problem+json":{"example":{"code":"not_available_in_test_mode","detail":"not_available_in_test_mode","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":403,"title":"not_available_in_test_mode","type":"https://paygo.is/developers/errors/not_available_in_test_mode"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is valid but the request is not allowed: `insufficient_scope`, `ip_not_allowed`, `tenant_inactive`, or `not_available_in_test_mode` when the key is a test key (this operation sends e-mail, stores a file or starts AI reading)."},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"block","x-required-scopes":["quotes:send"]}},"/v1/suppliers":{"get":{"tags":["Suppliers"],"summary":"List suppliers","operationId":"listSuppliers","description":"Suppliers (creditors) of the company, newest first by default. Filters combine with AND. For incremental sync use `sort=updatedAt&order=asc&updatedSince=<largest updatedAt you have seen>`. Contacts and balance are only on `GET /v1/suppliers/{id}`.\n\nRequires scope `suppliers:read`.","parameters":[{"description":"Maximum number of items in the page.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor: the `nextCursor` of the previous page, passed unchanged together with the same `sort` and `order`. Omit it for the first page.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}},{"description":"Field to sort by. Items with the same value are ordered by `id` in the same direction.","in":"query","name":"sort","required":false,"schema":{"default":"createdAt","enum":["createdAt","updatedAt"],"type":"string"}},{"description":"Sort direction.","in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Only items changed at or after this time (ISO 8601: a date, read as UTC midnight, or a timestamp with a zone, e.g. `2026-11-21T08:00:00Z`). For incremental sync use `sort=updatedAt&order=asc` and pass the largest `updatedAt` you have seen; items changed at exactly that time come again.","in":"query","name":"updatedSince","required":false,"schema":{"examples":["2026-11-21T08:00:00Z"],"type":"string"}},{"description":"Free text: matches part of the name, contact person, e-mail or kennitala (the same search as the creditors list in PayGo). Four or more digits also match the kennitala with or without a hyphen.","in":"query","name":"search","required":false,"schema":{"examples":["vöruhús"],"maxLength":100,"type":"string"}},{"description":"Exact kennitala, 10 digits (a hyphen after the sixth digit is accepted).","in":"query","name":"kennitala","required":false,"schema":{"examples":["4501692839"],"type":"string"}},{"description":"Exact `externalId`.","in":"query","name":"externalId","required":false,"schema":{"examples":["ERP-20017"],"maxLength":255,"type":"string"}},{"description":"Only active (`true`) or only deactivated (`false`) suppliers. Default: both.","in":"query","name":"isActive","required":false,"schema":{"examples":[true],"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SupplierDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"One page of suppliers.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["suppliers:read"]},"post":{"tags":["Suppliers"],"summary":"Create a supplier","operationId":"createSupplier","description":"Creates a supplier with the same rules as the PayGo dashboard; its payables are booked on the default accounts payable account. `externalId`, `kennitala` and `email` must be unique within the company: a duplicate is refused with 409 conflict naming the existing supplier's id. Send an `Idempotency-Key` to make a retry safe.\n\nRequires scope `suppliers:write`.","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyOptional"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierDetailDto"}}},"description":"The new supplier.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["suppliers:write"]}},"/v1/suppliers/{id}":{"get":{"tags":["Suppliers"],"summary":"Get a supplier","operationId":"getSupplier","description":"One supplier with its contact people and the balance the company owes it now.\n\nRequires scope `suppliers:read`.","parameters":[{"description":"Id of the supplier in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["7c4e1b2a-9d3f-4a6e-8b5c-2d1e3f4a5b6c"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierDetailDto"}}},"description":"The supplier.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["suppliers:read"]},"patch":{"tags":["Suppliers"],"summary":"Update a supplier","operationId":"updateSupplier","description":"Changes the fields sent and returns the whole supplier. Fields left out are not changed. Send `null` (or an empty string) to clear externalId, kennitala, contactPerson, email, phone, addressLine1, addressLine2, postalCode or city; `null` on name, country, paymentTermsDays or isActive is refused with 422.\n\nRequires scope `suppliers:write`.","parameters":[{"description":"Id of the supplier in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["7c4e1b2a-9d3f-4a6e-8b5c-2d1e3f4a5b6c"],"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierDetailDto"}}},"description":"The supplier after the change.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["suppliers:write"]}},"/v1/time-clock/clock-in":{"post":{"tags":["Time clock"],"summary":"Clock an employee in","operationId":"clockIn","description":"Opens a shift for the employee at the PayGo server's time. The time of the stamp is ALWAYS the PayGo server's time when the request arrives: no time can be sent, and shifts cannot be registered after the fact through the API (corrections are made by a manager in PayGo). Shifts go into payroll only after a manager approves them in PayGo; a stamp made through the API is never approved automatically. An `Idempotency-Key` header is REQUIRED (400 `idempotency_key_required` without one): a retry with the same key and body answers the first result and never stamps twice. Refusals name the reason in `errors[].code`: 422 `employee_not_found` (no such employee in the company), `employee_inactive`; 409 `already_clocked_in` (names the open shift), `day_locked` (the day is in an approved payroll run), `shift_overlap`, `time_clock_rejected`.\n\nRequires scope `time-clock:write`.","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyRequired"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClockInRequestDto"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeClockEntryDto"}}},"description":"The open shift.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["time-clock:write"]}},"/v1/time-clock/clock-out":{"post":{"tags":["Time clock"],"summary":"Clock an employee out","operationId":"clockOut","description":"Closes the employee's open shift at the PayGo server's time. The time of the stamp is ALWAYS the PayGo server's time when the request arrives: no time can be sent, and shifts cannot be registered after the fact through the API (corrections are made by a manager in PayGo). Shifts go into payroll only after a manager approves them in PayGo; a stamp made through the API is never approved automatically. An `Idempotency-Key` header is REQUIRED (400 `idempotency_key_required` without one): a retry with the same key and body answers the first result and never stamps twice. A running break ends with the shift. While the employee works on a work order in the shift, `description` is required and is saved on that work time. A shift open longer than 24 hours is not closed (409 `shift_too_long`): a manager closes it in PayGo. Refusals name the reason in `errors[].code`: 422 `employee_not_found`, `employee_inactive`, `description_required`; 409 `not_clocked_in`, `shift_too_long`, `day_locked`, `shift_overlap`, `shift_excludes_work_log`, `time_clock_rejected`.\n\nRequires scope `time-clock:write`.","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyRequired"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClockOutRequestDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeClockEntryDto"}}},"description":"The closed shift.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["time-clock:write"]}},"/v1/time-clock/entries":{"get":{"tags":["Time clock"],"summary":"List time clock entries","operationId":"listTimeClockEntries","description":"Shifts of the company's employees, with their breaks. Shifts go into payroll only after a manager approves them in PayGo; a stamp made through the API is never approved automatically. Filter by employee, clock-in time (`from` ≤ clockIn < `to`), open or approved shifts. Breaks, work on the shift, corrections, approval and deletion all move `updatedAt`, so `updatedSince` with `sort=updatedAt&order=asc` (and `includeDeleted=true`) keeps a copy in sync.\n\nRequires scope `time-clock:read`.","parameters":[{"description":"Maximum number of items in the page.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor: the `nextCursor` of the previous page, passed unchanged together with the same `sort` and `order`. Omit it for the first page.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}},{"description":"Field to sort by. Items with the same value are ordered by `id` in the same direction.","in":"query","name":"sort","required":false,"schema":{"default":"createdAt","enum":["createdAt","updatedAt"],"type":"string"}},{"description":"Sort direction.","in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Only items changed at or after this time (ISO 8601: a date, read as UTC midnight, or a timestamp with a zone, e.g. `2026-11-21T08:00:00Z`). For incremental sync use `sort=updatedAt&order=asc` and pass the largest `updatedAt` you have seen; items changed at exactly that time come again.","in":"query","name":"updatedSince","required":false,"schema":{"examples":["2026-11-21T08:00:00Z"],"type":"string"}},{"description":"Only shifts of this employee.","in":"query","name":"employeeId","required":false,"schema":{"examples":["7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"}},{"description":"Only shifts clocked in at or after this time (ISO 8601: a date, read as UTC midnight, or a timestamp with a zone).","in":"query","name":"from","required":false,"schema":{"examples":["2026-11-01"],"type":"string"}},{"description":"Only shifts clocked in BEFORE this time (exclusive; ISO 8601: a date, read as UTC midnight, or a timestamp with a zone).","in":"query","name":"to","required":false,"schema":{"examples":["2026-12-01"],"type":"string"}},{"description":"`true`: only open shifts (not clocked out); `false`: only closed ones. Default: both.","in":"query","name":"open","required":false,"schema":{"type":"boolean"}},{"description":"`true`: only shifts a manager has approved; `false`: only shifts not approved. Default: both.","in":"query","name":"approved","required":false,"schema":{"type":"boolean"}},{"description":"`true` also lists deleted shifts (with `deletedAt` set), so a sync can remove them. Default: `false`.","in":"query","name":"includeDeleted","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TimeClockEntryDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"One page of time clock entries.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["time-clock:read"]}},"/v1/time-clock/entries/{id}":{"get":{"tags":["Time clock"],"summary":"Get a time clock entry","operationId":"getTimeClockEntry","description":"One shift with its breaks. Shifts go into payroll only after a manager approves them in PayGo; a stamp made through the API is never approved automatically.\n\nRequires scope `time-clock:read`.","parameters":[{"description":"Id of the time clock entry.","in":"path","name":"id","required":true,"schema":{"examples":["9d8c7b6a-5f4e-4d3c-8b2a-1f0e9d8c7b6a"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeClockEntryDto"}}},"description":"The shift.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["time-clock:read"]}},"/v1/time-clock/status":{"get":{"tags":["Time clock"],"summary":"Get an employee's clock status","operationId":"getTimeClockStatus","description":"Whether the employee is clocked in, the open shift, a running break and the work order being worked on, with the server time. 422 `employee_not_found` when the company has no such employee. Inactive employees can be read.\n\nRequires scope `time-clock:read`.","parameters":[{"description":"Id of the employee.","in":"query","name":"employeeId","required":true,"schema":{"examples":["7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeClockStatusDto"}}},"description":"The clock status.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["time-clock:read"]}},"/v1/vat-rates":{"get":{"tags":["Reference data"],"summary":"List VAT rates","operationId":"listVatRates","description":"The VAT rates documents can use, in display order. A document line names its VAT by the rate itself (e.g. `24`), so use `rate`. Not paginated: every item is returned in one response (`hasMore` is always false, `nextCursor` null); `limit` and `cursor` are ignored.\n\nRequires scope `reference:read`.","parameters":[{"description":"Ignored: reference lists return every item in one response.","in":"query","name":"limit","required":false,"schema":{"type":"string"}},{"description":"Ignored: reference lists return every item in one response.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/VatRateDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"All VAT rates.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["reference:read"]}},"/v1/warehouses":{"get":{"tags":["Reference data"],"summary":"List warehouses","operationId":"listWarehouses","description":"The company's warehouses (stock locations) by name. Not paginated: every item is returned in one response (`hasMore` is always false, `nextCursor` null); `limit` and `cursor` are ignored.\n\nRequires scope `reference:read`.","parameters":[{"description":"Ignored: reference lists return every item in one response.","in":"query","name":"limit","required":false,"schema":{"type":"string"}},{"description":"Ignored: reference lists return every item in one response.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WarehouseDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"All warehouses.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["reference:read"]}},"/v1/work-order-types":{"get":{"tags":["Work orders"],"summary":"List work order types","operationId":"listWorkOrderTypes","description":"The types of job offered when a work order is created in PayGo, in the order PayGo shows them. A work order stores the type's name as its `jobType` (free text, not a reference). Not paginated: every item is returned in one response (`hasMore` is always false, `nextCursor` null); `limit` and `cursor` are ignored.\n\nRequires scope `work-orders:read`.","parameters":[{"description":"Ignored: reference lists return every item in one response.","in":"query","name":"limit","required":false,"schema":{"type":"string"}},{"description":"Ignored: reference lists return every item in one response.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WorkOrderTypeDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"All work order types.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:read"]}},"/v1/work-orders":{"get":{"tags":["Work orders"],"summary":"List work orders","operationId":"listWorkOrders","description":"Work orders (field service jobs) of the company, newest first by default, with their customer and assigned employees. Status: `new`, `assigned`, `in_progress`, `on_hold`, `ready_to_invoice` (work done, waiting to be invoiced), `completed`, `invoiced` or `cancelled`. PayGo has no fixed order between them: any status can follow any other. For incremental sync use `sort=updatedAt&order=asc&updatedSince=<the latest updatedAt you have seen>`: `updatedAt` is the last activity on the work order, so a status change and new or changed hours, materials, attachments, notes or assigned employees all bring it back. Add `includeDeleted=true` to also see work orders deleted in PayGo.\n\nRequires scope `work-orders:read`.","parameters":[{"description":"Maximum number of items in the page.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor: the `nextCursor` of the previous page, passed unchanged together with the same `sort` and `order`. Omit it for the first page.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}},{"description":"Field to sort by. Items with the same value are ordered by `id` in the same direction.","in":"query","name":"sort","required":false,"schema":{"default":"createdAt","enum":["createdAt","updatedAt"],"type":"string"}},{"description":"Sort direction.","in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Only items changed at or after this time (ISO 8601: a date, read as UTC midnight, or a timestamp with a zone, e.g. `2026-11-21T08:00:00Z`). For incremental sync use `sort=updatedAt&order=asc` and pass the largest `updatedAt` you have seen; items changed at exactly that time come again.","in":"query","name":"updatedSince","required":false,"schema":{"examples":["2026-11-21T08:00:00Z"],"type":"string"}},{"description":"Only work orders of this customer.","in":"query","name":"customerId","required":false,"schema":{"examples":["9b2e7c1a-4f3d-4e8a-b6c5-1d2e3f4a5b6c"],"format":"uuid","type":"string"}},{"description":"Only work orders with this status.","in":"query","name":"status","required":false,"schema":{"enum":["new","assigned","in_progress","on_hold","ready_to_invoice","completed","invoiced","cancelled"],"type":"string"}},{"description":"Only work orders this employee is assigned to (`/v1/employees`).","in":"query","name":"assignedEmployeeId","required":false,"schema":{"examples":["1e2d3c4b-5a69-4788-9a6b-5c4d3e2f1a0b"],"format":"uuid","type":"string"}},{"description":"Only work orders planned to start at or after this time (ISO 8601: a date, read as UTC midnight, or a timestamp with a zone).","in":"query","name":"scheduledFrom","required":false,"schema":{"examples":["2026-11-23"],"type":"string"}},{"description":"Only work orders planned to start before this time (ISO 8601: a date, read as UTC midnight, or a timestamp with a zone). Work orders without a planned start are left out by either bound.","in":"query","name":"scheduledTo","required":false,"schema":{"examples":["2026-11-30"],"type":"string"}},{"description":"Exact `externalId`.","in":"query","name":"externalId","required":false,"schema":{"examples":["JOB-7781"],"maxLength":255,"type":"string"}},{"description":"Exact `workOrderNumber`.","in":"query","name":"workOrderNumber","required":false,"schema":{"examples":["WO-2026-00042"],"maxLength":50,"type":"string"}},{"description":"Also list work orders deleted in PayGo (their `deletedAt` is set), e.g. to remove them on your side when syncing. Default: false.","in":"query","name":"includeDeleted","required":false,"schema":{"examples":[false],"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WorkOrderDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"One page of work orders.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:read"]},"post":{"tags":["Work orders"],"summary":"Create a work order","operationId":"createWorkOrder","description":"Creates a work order (a field service job) with the same rules as the PayGo dashboard: the next work order number (`WO-YYYY-NNNNN`) and status `new`. Every field is optional: a work order may be created without a customer, but it cannot be invoiced in PayGo until it has one. An `Idempotency-Key` header is REQUIRED (400 `idempotency_key_required` without one): a retry with the same key and body answers the first result and never creates a second work order. No e-mail, notification, stock movement or posting follows; the change is kept in the work order's history in PayGo. Business rules refused with 422 name the reason in `errors[].code`: `customer_not_found`, `customer_inactive`, `employee_not_found`, `employee_inactive` (on `assignedEmployeeIds[i]`), `scheduled_end_before_start`, `coordinates_incomplete`, `work_order_rejected`. An `externalId` already used (deleted work orders count) → 409 `conflict` naming the existing work order.\n\nRequires scope `work-orders:write`.","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyRequired"}],"requestBody":{"content":{"application/json":{"examples":{"minimal":{"summary":"Only a description","value":{"description":"Árleg yfirferð á hitakerfi."}},"workOrder":{"summary":"A scheduled repair at the customer","value":{"assignedEmployeeIds":["1e2d3c4b-5a69-4788-9a6b-5c4d3e2f1a0b"],"customer":{"kennitala":"5501012340"},"description":"Lekur undir eldhúsvaski.","estimatedHours":3.5,"externalId":"CRM-JOB-2291","jobType":"Viðgerð","location":{"address":"Laugavegur 1, 101 Reykjavík","latitude":64.1466,"longitude":-21.9426},"priority":"high","scheduledEnd":"2026-11-24T12:00:00Z","scheduledStart":"2026-11-24T09:00:00Z"}}},"schema":{"$ref":"#/components/schemas/CreateWorkOrderRequestDto"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkOrderDto"}}},"description":"The created work order. `Location` names it.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:write"]}},"/v1/work-orders/{id}":{"get":{"tags":["Work orders"],"summary":"Get a work order","operationId":"getWorkOrder","description":"One work order with its customer and assigned employees. Status: `new`, `assigned`, `in_progress`, `on_hold`, `ready_to_invoice` (work done, waiting to be invoiced), `completed`, `invoiced` or `cancelled`. PayGo has no fixed order between them: any status can follow any other. A deleted work order answers 404.\n\nRequires scope `work-orders:read`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkOrderDto"}}},"description":"The work order.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:read"]},"patch":{"tags":["Work orders"],"summary":"Change a work order","operationId":"updateWorkOrder","description":"Changes the fields sent: a field left out is not changed, `null` clears it, and `assignedEmployeeIds` is the whole new list (`[]` removes everyone). Everything in one request applies together or not at all. The status is changed with `POST /v1/work-orders/{id}/status`, not here (`status` → 422 `unknown_field`), and `externalId` cannot be changed. No e-mail, notification, stock movement or posting follows; the change is kept in the work order's history in PayGo. An `Idempotency-Key` is optional: the same request gives the same result when repeated. Refused with 409: `work_order_not_editable` (the work order is invoiced or cancelled), `customer_locked` (another customer, or none, once hours or materials of the work order were moved to an order or invoice). Refused with 422: the reasons of `createWorkOrder`.\n\nRequires scope `work-orders:write`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyOptional"}],"requestBody":{"content":{"application/json":{"examples":{"clear":{"summary":"Clear the location and the estimate","value":{"estimatedHours":null,"location":null}},"reschedule":{"summary":"New time and people","value":{"assignedEmployeeIds":["1e2d3c4b-5a69-4788-9a6b-5c4d3e2f1a0b"],"scheduledEnd":"2026-11-25T12:00:00Z","scheduledStart":"2026-11-25T09:00:00Z"}}},"schema":{"$ref":"#/components/schemas/UpdateWorkOrderRequestDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkOrderDto"}}},"description":"The work order after the change.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:write"]}},"/v1/work-orders/{id}/attachments":{"get":{"tags":["Work orders"],"summary":"List the files of a work order","operationId":"listWorkOrderAttachments","description":"The photos, PDF documents and other files added to the work order, in PayGo or through the API, oldest first. Download a file with its `id`; `available: false` means it cannot be downloaded through the API. Not paged: at most 1,000 files; a work order with more is refused with 500 `internal_error` rather than answered with a shortened list.\n\nRequires scope `work-orders:read`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkOrderAttachmentListDto"}}},"description":"The files of the work order.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:read"]},"post":{"tags":["Work orders"],"summary":"Add a photo or PDF to a work order","operationId":"uploadWorkOrderAttachment","description":"Adds a file to the work order (in any status), as `multipart/form-data` with the file in the field `file`. Accepted: application/pdf, image/jpeg, image/png, image/gif, image/webp, at most 10 MB; no video. The type is the part's `Content-Type`, or the file name's extension when that is missing or `application/octet-stream`; the content must match it. It shows in PayGo like a file added there. Refusals name the reason in `errors[].code`: `file_required`, `unsupported_file_type`, `file_signature_mismatch`, `invalid_multipart`; a text field besides the file is 422 `unknown_field`; a larger file is 413 `payload_too_large` (`file_too_large`). An optional `Idempotency-Key` covers the file's content: the same key with another file is 422 `idempotency_key_reused`. Counted as a heavy request for rate limiting.\n\nRequires scope `work-orders:write`.\n\nNot available with a test key: answers 403 `not_available_in_test_mode` and does nothing.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyOptional"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"contentMediaType":"application/octet-stream","description":"The photo or PDF.","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkOrderAttachmentDto"}}},"description":"The added file, as listed. `Location` names its download.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/problem+json":{"example":{"code":"not_available_in_test_mode","detail":"not_available_in_test_mode","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":403,"title":"not_available_in_test_mode","type":"https://paygo.is/developers/errors/not_available_in_test_mode"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is valid but the request is not allowed: `insufficient_scope`, `ip_not_allowed`, `tenant_inactive`, or `not_available_in_test_mode` when the key is a test key (this operation sends e-mail, stores a file or starts AI reading)."},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"block","x-required-scopes":["work-orders:write"]}},"/v1/work-orders/{id}/attachments/{attachmentId}":{"get":{"tags":["Work orders"],"summary":"Download a file of a work order","operationId":"downloadWorkOrderAttachment","description":"The file itself, always as an attachment (`Content-Disposition: attachment`) with `X-Content-Type-Options: nosniff` and `Cache-Control: private, no-store`. The `Content-Type` is the `mimeType` of the list: a photo or PDF type, else `application/octet-stream` (for example a video added in PayGo). Counted as a heavy request for rate limiting. 404 when the work order or the file is not found, or the file cannot be downloaded (`available: false`). Errors are `application/problem+json` as everywhere else.\n\nRequires scope `work-orders:read`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}},{"description":"Id of the file (from the list).","in":"path","name":"attachmentId","required":true,"schema":{"examples":["7c9e6679-7425-40de-944b-e07fc1f90ae7"],"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}},"application/pdf":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}},"image/gif":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}},"image/jpeg":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}},"image/png":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}},"image/webp":{"schema":{"contentMediaType":"application/octet-stream","type":"string"}}},"description":"The file.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:read"]}},"/v1/work-orders/{id}/materials":{"get":{"tags":["Work orders"],"summary":"List the materials on a work order","operationId":"listWorkOrderMaterials","description":"The material lines of the work order, newest first by default. Recording material does NOT move stock: stock moves only when the work order's lines are moved to a sales order in PayGo and delivered. The amounts are the SALE price to the customer, without VAT, in ISK; the VAT of the product applies when the line is invoiced. Deleted lines are not listed.\n\nRequires scope `work-orders:read`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}},{"description":"Maximum number of items in the page.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor: the `nextCursor` of the previous page, passed unchanged together with the same `sort` and `order`. Omit it for the first page.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}},{"description":"Field to sort by. Items with the same value are ordered by `id` in the same direction.","in":"query","name":"sort","required":false,"schema":{"default":"createdAt","enum":["createdAt","updatedAt"],"type":"string"}},{"description":"Sort direction.","in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Only items changed at or after this time (ISO 8601: a date, read as UTC midnight, or a timestamp with a zone, e.g. `2026-11-21T08:00:00Z`). For incremental sync use `sort=updatedAt&order=asc` and pass the largest `updatedAt` you have seen; items changed at exactly that time come again.","in":"query","name":"updatedSince","required":false,"schema":{"examples":["2026-11-21T08:00:00Z"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WorkOrderMaterialDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"One page of results.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:read"]},"post":{"tags":["Work orders"],"summary":"Record material on a work order","operationId":"createWorkOrderMaterial","description":"Adds a material line: a product of the company (`productId` or `sku`) or a free-text line (`name`). Recording material does NOT move stock: stock moves only when the work order's lines are moved to a sales order in PayGo and delivered. The amounts are the SALE price to the customer, without VAT, in ISK; the VAT of the product applies when the line is invoiced. `unitPrice` is required: no price is taken from the product. An `Idempotency-Key` header is REQUIRED (400 `idempotency_key_required` without one): a retry with the same key and body answers the first result and never adds the line twice. Refused with 422 (reason in `errors[].code`): `product_not_found`, `product_inactive`. Refused with 409: `work_order_closed` (the work order is cancelled or invoiced; a completed one takes late lines).\n\nRequires scope `work-orders:write`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyRequired"}],"requestBody":{"content":{"application/json":{"examples":{"freeText":{"summary":"A free-text line","value":{"discountPercent":10,"name":"Smáhlutir","quantity":1,"unitPrice":"2500.00"}},"product":{"summary":"A product of the company","value":{"quantity":1,"sku":"VARA-100","unitPrice":"45900.00"}}},"schema":{"$ref":"#/components/schemas/CreateWorkOrderMaterialRequestDto"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkOrderMaterialDto"}}},"description":"The recorded line. `Location` names it.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:write"]}},"/v1/work-orders/{id}/materials/{materialId}":{"delete":{"tags":["Work orders"],"summary":"Delete a material line","operationId":"deleteWorkOrderMaterial","description":"Deletes the line (PayGo keeps it in the work order's history). Repeating the call answers 404. Refused with 409: `work_order_closed`, `material_billed`.\n\nRequires scope `work-orders:write`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}},{"description":"Id of the material line.","in":"path","name":"materialId","required":true,"schema":{"examples":["9e8d7c6b-5a49-4382-8170-6f5e4d3c2b1a"],"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:write"]},"get":{"tags":["Work orders"],"summary":"Get a material line of a work order","operationId":"getWorkOrderMaterial","description":"One material line of the work order, as in the list.\n\nRequires scope `work-orders:read`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}},{"description":"Id of the material line.","in":"path","name":"materialId","required":true,"schema":{"examples":["9e8d7c6b-5a49-4382-8170-6f5e4d3c2b1a"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkOrderMaterialDto"}}},"description":"","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:read"]},"patch":{"tags":["Work orders"],"summary":"Change a material line","operationId":"updateWorkOrderMaterial","description":"Changes the fields sent (`notes: null` clears the notes); the line amount is computed again. The product cannot be changed: delete the line and record a new one. Recording material does NOT move stock: stock moves only when the work order's lines are moved to a sales order in PayGo and delivered. The amounts are the SALE price to the customer, without VAT, in ISK; the VAT of the product applies when the line is invoiced. Refused with 409: `work_order_closed`, `material_billed` (moved to an order or invoice).\n\nRequires scope `work-orders:write`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}},{"description":"Id of the material line.","in":"path","name":"materialId","required":true,"schema":{"examples":["9e8d7c6b-5a49-4382-8170-6f5e4d3c2b1a"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyOptional"}],"requestBody":{"content":{"application/json":{"examples":{"quantity":{"summary":"Two instead of one","value":{"quantity":2}}},"schema":{"$ref":"#/components/schemas/UpdateWorkOrderMaterialRequestDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkOrderMaterialDto"}}},"description":"The line after the change.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:write"]}},"/v1/work-orders/{id}/notes":{"get":{"tags":["Work orders"],"summary":"List the notes of a work order","operationId":"listWorkOrderNotes","description":"The notes written on the work order, in PayGo or through the API, oldest first, internal ones included (`isInternal`). The author is not shown; `source` tells a note written through the API from one written in PayGo. Not paged: at most 1,000 notes; a work order with more is refused with 500 `internal_error` rather than answered with a shortened list.\n\nRequires scope `work-orders:read`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkOrderNoteListDto"}}},"description":"The notes of the work order.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:read"]},"post":{"tags":["Work orders"],"summary":"Add a note to a work order","operationId":"createWorkOrderNote","description":"Adds a plain-text note (at most 10000 characters) to the work order, in any status. It shows in PayGo like a note written there, marked as written by the API, and is kept in the work order's history. A note that is not internal is printed on the work order report the customer gets. No e-mail or notification follows. An optional `Idempotency-Key` makes a retry return the first answer instead of adding the note twice.\n\nRequires scope `work-orders:write`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyOptional"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkOrderNoteRequestDto"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkOrderNoteDto"}}},"description":"The added note, as listed.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:write"]}},"/v1/work-orders/{id}/status":{"post":{"tags":["Work orders"],"summary":"Change the status of a work order","operationId":"changeWorkOrderStatus","description":"Moves the work order to another status. Status: `new`, `assigned`, `in_progress`, `on_hold`, `ready_to_invoice` (work done, waiting to be invoiced), `completed`, `invoiced` or `cancelled`. PayGo has no fixed order between them: any status can follow any other. The rules are stricter than in the PayGo dashboard: `invoiced` cannot be set (422 `status_not_settable` on `status`; only invoicing the work order in PayGo sets it), and an invoiced work order never changes status (409 `work_order_invoiced`); `completed` and `cancelled` are refused while a time entry on the work order is running (409 `time_entry_running`: stop it first); `cancelled` is refused once hours or materials were moved to an order or invoice (409 `work_order_billed`). Any other change is allowed, a cancelled work order may be reopened. The status it already has → 200 with the work order unchanged and nothing recorded, so a retry is harmless. No e-mail, notification, stock movement or posting follows; the change is kept in the work order's history in PayGo.\n\nRequires scope `work-orders:write`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyOptional"}],"requestBody":{"content":{"application/json":{"examples":{"complete":{"summary":"The job is done","value":{"status":"completed"}}},"schema":{"$ref":"#/components/schemas/ChangeWorkOrderStatusRequestDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkOrderDto"}}},"description":"The work order with its new status.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:write"]}},"/v1/work-orders/{id}/time-entries":{"get":{"tags":["Work orders"],"summary":"List the hours on a work order","operationId":"listWorkOrderTimeEntries","description":"The time entries of the work order, newest first by default (`sort=updatedAt` for changes). Each names the employee (`id`, `name`), the kind of work, start and end, the length in minutes, whether it is billable and billed, the NAME of its rate (never an amount) and where it was recorded (`source`). Deleted entries are not listed.\n\nRequires scope `work-orders:read`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}},{"description":"Maximum number of items in the page.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor: the `nextCursor` of the previous page, passed unchanged together with the same `sort` and `order`. Omit it for the first page.","in":"query","name":"cursor","required":false,"schema":{"maxLength":512,"type":"string"}},{"description":"Field to sort by. Items with the same value are ordered by `id` in the same direction.","in":"query","name":"sort","required":false,"schema":{"default":"createdAt","enum":["createdAt","updatedAt"],"type":"string"}},{"description":"Sort direction.","in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Only items changed at or after this time (ISO 8601: a date, read as UTC midnight, or a timestamp with a zone, e.g. `2026-11-21T08:00:00Z`). For incremental sync use `sort=updatedAt&order=asc` and pass the largest `updatedAt` you have seen; items changed at exactly that time come again.","in":"query","name":"updatedSince","required":false,"schema":{"examples":["2026-11-21T08:00:00Z"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WorkOrderTimeEntryDto"},"type":"array"},"hasMore":{"description":"True when more items follow this page.","type":"boolean"},"nextCursor":{"description":"Cursor of the next page (pass it as `cursor` with the same `sort` and `order`); null on the last page.","type":["string","null"]}},"required":["data","hasMore","nextCursor"],"type":"object"}}},"description":"One page of results.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:read"]},"post":{"tags":["Work orders"],"summary":"Record hours on a work order","operationId":"createWorkOrderTimeEntry","description":"Records a finished piece of work by an employee on the work order. Hours on a work order are PAYROLL INPUT: for employees paid from work orders (the default in PayGo) they are paid as recorded, without a manager's approval, and they are billed to the customer when the work order is invoiced. The employee's default rate in PayGo applies; rates and amounts are never set or shown through the API. An `Idempotency-Key` header is REQUIRED (400 `idempotency_key_required` without one): a retry with the same key and body answers the first result and never books the hours twice. Requires the scope `work-orders:time`. `endTime` is required: a running timer is started in PayGo or with the time clock, not here. Refused with 422 (reason in `errors[].code`): `employee_not_found`, `employee_inactive` (on `employeeId`), `end_before_start`, `too_long` (more than 168 hours), `in_future` (on `endTime`, more than 5 minutes ahead of the server's clock). Refused with 409: `work_order_closed` (the work order is cancelled or invoiced; a completed one takes late entries), `time_entry_overlap` (another entry of the same employee, on any work order, covers part of the span: the detail names it). No e-mail, notification or posting follows.\n\nRequires scope `work-orders:time`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyRequired"}],"requestBody":{"content":{"application/json":{"examples":{"onSite":{"summary":"Two and a half hours at the customer","value":{"description":"Skipti um dælu.","employeeId":"1e2d3c4b-5a69-4788-9a6b-5c4d3e2f1a0b","endTime":"2026-11-24T11:30:00Z","startTime":"2026-11-24T09:00:00Z","type":"on_site"}}},"schema":{"$ref":"#/components/schemas/CreateWorkOrderTimeEntryRequestDto"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkOrderTimeEntryDto"}}},"description":"The recorded entry. `Location` names it.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:time"]}},"/v1/work-orders/{id}/time-entries/{entryId}":{"delete":{"tags":["Work orders"],"summary":"Delete a time entry","operationId":"deleteWorkOrderTimeEntry","description":"Deletes the entry (it no longer counts for payroll or billing; PayGo keeps it in the work order's history). Repeating the call answers 404. Refused with 409: `work_order_closed`, `time_entry_billed`, `managed_by_time_clock`. Requires the scope `work-orders:time`.\n\nRequires scope `work-orders:time`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}},{"description":"Id of the time entry.","in":"path","name":"entryId","required":true,"schema":{"examples":["5d6e7f8a-9b0c-4d1e-8f2a-3b4c5d6e7f8a"],"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:time"]},"get":{"tags":["Work orders"],"summary":"Get a time entry of a work order","operationId":"getWorkOrderTimeEntry","description":"One time entry of the work order, as in the list.\n\nRequires scope `work-orders:read`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}},{"description":"Id of the time entry.","in":"path","name":"entryId","required":true,"schema":{"examples":["5d6e7f8a-9b0c-4d1e-8f2a-3b4c5d6e7f8a"],"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkOrderTimeEntryDto"}}},"description":"","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:read"]},"patch":{"tags":["Work orders"],"summary":"Change a time entry","operationId":"updateWorkOrderTimeEntry","description":"Changes the fields sent (kind, start, end, description; `null` clears the description). Hours on a work order are PAYROLL INPUT: for employees paid from work orders (the default in PayGo) they are paid as recorded, without a manager's approval, and they are billed to the customer when the work order is invoiced. The employee's default rate in PayGo applies; rates and amounts are never set or shown through the API. The employee cannot be changed: delete the entry and record a new one. The span rules and reasons of `createWorkOrderTimeEntry` apply to the result. Refused with 409: `work_order_closed`, `time_entry_overlap`, `time_entry_billed` (moved to an order or invoice), `managed_by_time_clock` (a segment of a time clock shift: changed with the time clock in PayGo). Requires the scope `work-orders:time`.\n\nRequires scope `work-orders:time`.","parameters":[{"description":"Id of the work order in PayGo.","in":"path","name":"id","required":true,"schema":{"examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"}},{"description":"Id of the time entry.","in":"path","name":"entryId","required":true,"schema":{"examples":["5d6e7f8a-9b0c-4d1e-8f2a-3b4c5d6e7f8a"],"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyOptional"}],"requestBody":{"content":{"application/json":{"examples":{"end":{"summary":"Correct the end","value":{"endTime":"2026-11-24T12:00:00Z"}}},"schema":{"$ref":"#/components/schemas/UpdateWorkOrderTimeEntryRequestDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkOrderTimeEntryDto"}}},"description":"The entry after the change.","headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"apiKey":[]}],"x-paygo-test-mode":"allow","x-required-scopes":["work-orders:time"]}}},"webhooks":{"customer.created":{"post":{"tags":["Webhook events"],"summary":"Event customer.created","operationId":"webhookCustomerCreated","description":"A customer was created.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `customers:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"customer.created"},"data":{"$ref":"#/components/schemas/WebhookCustomerData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["customers:read"]}},"customer.updated":{"post":{"tags":["Webhook events"],"summary":"Event customer.updated","operationId":"webhookCustomerUpdated","description":"A customer was changed (its updatedAt moved), including being deactivated.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `customers:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"customer.updated"},"data":{"$ref":"#/components/schemas/WebhookCustomerData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["customers:read"]}},"supplier.created":{"post":{"tags":["Webhook events"],"summary":"Event supplier.created","operationId":"webhookSupplierCreated","description":"A supplier was created.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `suppliers:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"supplier.created"},"data":{"$ref":"#/components/schemas/WebhookSupplierData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["suppliers:read"]}},"supplier.updated":{"post":{"tags":["Webhook events"],"summary":"Event supplier.updated","operationId":"webhookSupplierUpdated","description":"A supplier was changed (its updatedAt moved), including being deactivated.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `suppliers:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"supplier.updated"},"data":{"$ref":"#/components/schemas/WebhookSupplierData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["suppliers:read"]}},"invoice.created":{"post":{"tags":["Webhook events"],"summary":"Event invoice.created","operationId":"webhookInvoiceCreated","description":"An invoice or a credit note (data.type = credit_note) was created.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `invoices:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"invoice.created"},"data":{"$ref":"#/components/schemas/WebhookInvoiceData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["invoices:read"]}},"invoice.updated":{"post":{"tags":["Webhook events"],"summary":"Event invoice.updated","operationId":"webhookInvoiceUpdated","description":"An invoice or credit note was changed (its updatedAt moved).\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `invoices:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"invoice.updated"},"data":{"$ref":"#/components/schemas/WebhookInvoiceData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["invoices:read"]}},"invoice.payment_recorded":{"post":{"tags":["Webhook events"],"summary":"Event invoice.payment_recorded","operationId":"webhookInvoicePaymentRecorded","description":"The settled amount of an invoice rose by a payment (amountSettled). Not sent for credit notes, for credited or cancelled invoices, or when a credit note settles part of the balance (see invoice.credited).\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `invoices:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"invoice.payment_recorded"},"data":{"$ref":"#/components/schemas/WebhookInvoiceData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["invoices:read"]}},"invoice.paid":{"post":{"tags":["Webhook events"],"summary":"Event invoice.paid","operationId":"webhookInvoicePaid","description":"The payment status of an invoice became paid by a payment. Not sent for credit notes, nor when an invoice is fully credited or cancelled, or a credit note settles the rest of it (see invoice.credited).\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `invoices:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"invoice.paid"},"data":{"$ref":"#/components/schemas/WebhookInvoiceData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["invoices:read"]}},"invoice.credited":{"post":{"tags":["Webhook events"],"summary":"Event invoice.credited","operationId":"webhookInvoiceCredited","description":"A credit note was issued against the invoice; data.id is the credited invoice and data.creditNoteId the new credit note.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `invoices:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"invoice.credited"},"data":{"$ref":"#/components/schemas/WebhookInvoiceData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["invoices:read"]}},"quote.created":{"post":{"tags":["Webhook events"],"summary":"Event quote.created","operationId":"webhookQuoteCreated","description":"A quote was created.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `quotes:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"quote.created"},"data":{"$ref":"#/components/schemas/WebhookQuoteData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["quotes:read"]}},"quote.updated":{"post":{"tags":["Webhook events"],"summary":"Event quote.updated","operationId":"webhookQuoteUpdated","description":"A quote was changed (its updatedAt moved).\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `quotes:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"quote.updated"},"data":{"$ref":"#/components/schemas/WebhookQuoteData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["quotes:read"]}},"quote.sent":{"post":{"tags":["Webhook events"],"summary":"Event quote.sent","operationId":"webhookQuoteSent","description":"A quote was marked as sent. Not sent when it is already past validUntil (its status is then expired).\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `quotes:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"quote.sent"},"data":{"$ref":"#/components/schemas/WebhookQuoteData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["quotes:read"]}},"quote.accepted":{"post":{"tags":["Webhook events"],"summary":"Event quote.accepted","operationId":"webhookQuoteAccepted","description":"A quote was accepted.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `quotes:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"quote.accepted"},"data":{"$ref":"#/components/schemas/WebhookQuoteData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["quotes:read"]}},"quote.rejected":{"post":{"tags":["Webhook events"],"summary":"Event quote.rejected","operationId":"webhookQuoteRejected","description":"A quote was rejected.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `quotes:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"quote.rejected"},"data":{"$ref":"#/components/schemas/WebhookQuoteData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["quotes:read"]}},"quote.converted":{"post":{"tags":["Webhook events"],"summary":"Event quote.converted","operationId":"webhookQuoteConverted","description":"A quote was converted into an order.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `quotes:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"quote.converted"},"data":{"$ref":"#/components/schemas/WebhookQuoteData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["quotes:read"]}},"order.created":{"post":{"tags":["Webhook events"],"summary":"Event order.created","operationId":"webhookOrderCreated","description":"An order was created.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `orders:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"order.created"},"data":{"$ref":"#/components/schemas/WebhookOrderData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["orders:read"]}},"order.updated":{"post":{"tags":["Webhook events"],"summary":"Event order.updated","operationId":"webhookOrderUpdated","description":"An order was changed (its updatedAt moved).\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `orders:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"order.updated"},"data":{"$ref":"#/components/schemas/WebhookOrderData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["orders:read"]}},"order.cancelled":{"post":{"tags":["Webhook events"],"summary":"Event order.cancelled","operationId":"webhookOrderCancelled","description":"The status of an order became cancelled.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `orders:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"order.cancelled"},"data":{"$ref":"#/components/schemas/WebhookOrderData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["orders:read"]}},"order.invoiced":{"post":{"tags":["Webhook events"],"summary":"Event order.invoiced","operationId":"webhookOrderInvoiced","description":"An order became fully invoiced (invoicingStatus = full).\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `orders:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"order.invoiced"},"data":{"$ref":"#/components/schemas/WebhookOrderData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["orders:read"]}},"expense.created":{"post":{"tags":["Webhook events"],"summary":"Event expense.created","operationId":"webhookExpenseCreated","description":"An expense (a supplier bill or credit note) was recorded.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `expenses:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"expense.created"},"data":{"$ref":"#/components/schemas/WebhookExpenseData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["expenses:read"]}},"expense.updated":{"post":{"tags":["Webhook events"],"summary":"Event expense.updated","operationId":"webhookExpenseUpdated","description":"An expense was changed (its updatedAt moved).\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `expenses:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"expense.updated"},"data":{"$ref":"#/components/schemas/WebhookExpenseData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["expenses:read"]}},"expense.posted":{"post":{"tags":["Webhook events"],"summary":"Event expense.posted","operationId":"webhookExpensePosted","description":"The status of an expense became posted.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `expenses:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"expense.posted"},"data":{"$ref":"#/components/schemas/WebhookExpenseData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["expenses:read"]}},"expense.deleted":{"post":{"tags":["Webhook events"],"summary":"Event expense.deleted","operationId":"webhookExpenseDeleted","description":"An expense was deleted.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `expenses:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"expense.deleted"},"data":{"$ref":"#/components/schemas/WebhookExpenseData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["expenses:read"]}},"expense_document.completed":{"post":{"tags":["Webhook events"],"summary":"Event expense_document.completed","operationId":"webhookExpenseDocumentCompleted","description":"A submitted document was read and recorded as an expense (status completed).\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `expenses:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"expense_document.completed"},"data":{"$ref":"#/components/schemas/WebhookExpenseDocumentData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["expenses:read"]}},"expense_document.failed":{"post":{"tags":["Webhook events"],"summary":"Event expense_document.failed","operationId":"webhookExpenseDocumentFailed","description":"Processing of a submitted document failed (status failed).\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `expenses:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"expense_document.failed"},"data":{"$ref":"#/components/schemas/WebhookExpenseDocumentData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["expenses:read"]}},"work_order.created":{"post":{"tags":["Webhook events"],"summary":"Event work_order.created","operationId":"webhookWorkOrderCreated","description":"A work order was created.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `work-orders:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"work_order.created"},"data":{"$ref":"#/components/schemas/WebhookWorkOrderData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["work-orders:read"]}},"work_order.updated":{"post":{"tags":["Webhook events"],"summary":"Event work_order.updated","operationId":"webhookWorkOrderUpdated","description":"A work order or its hours, materials, attachments or notes changed (its updatedAt moved).\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `work-orders:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"work_order.updated"},"data":{"$ref":"#/components/schemas/WebhookWorkOrderData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["work-orders:read"]}},"work_order.status_changed":{"post":{"tags":["Webhook events"],"summary":"Event work_order.status_changed","operationId":"webhookWorkOrderStatusChanged","description":"The status of a work order changed; data.previousStatus is the status before.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `work-orders:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"work_order.status_changed"},"data":{"$ref":"#/components/schemas/WebhookWorkOrderData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["work-orders:read"]}},"work_order.deleted":{"post":{"tags":["Webhook events"],"summary":"Event work_order.deleted","operationId":"webhookWorkOrderDeleted","description":"A work order was deleted.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `work-orders:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"work_order.deleted"},"data":{"$ref":"#/components/schemas/WebhookWorkOrderData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["work-orders:read"]}},"time_clock_entry.clocked_in":{"post":{"tags":["Webhook events"],"summary":"Event time_clock_entry.clocked_in","operationId":"webhookTimeClockEntryClockedIn","description":"An employee clocked in (a time clock entry without a clock-out was created).\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `time-clock:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"time_clock_entry.clocked_in"},"data":{"$ref":"#/components/schemas/WebhookTimeClockEntryData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["time-clock:read"]}},"time_clock_entry.clocked_out":{"post":{"tags":["Webhook events"],"summary":"Event time_clock_entry.clocked_out","operationId":"webhookTimeClockEntryClockedOut","description":"An open time clock entry was clocked out.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `time-clock:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"time_clock_entry.clocked_out"},"data":{"$ref":"#/components/schemas/WebhookTimeClockEntryData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["time-clock:read"]}},"time_clock_entry.updated":{"post":{"tags":["Webhook events"],"summary":"Event time_clock_entry.updated","operationId":"webhookTimeClockEntryUpdated","description":"A time clock entry was changed (its updatedAt moved).\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `time-clock:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"time_clock_entry.updated"},"data":{"$ref":"#/components/schemas/WebhookTimeClockEntryData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["time-clock:read"]}},"time_clock_entry.deleted":{"post":{"tags":["Webhook events"],"summary":"Event time_clock_entry.deleted","operationId":"webhookTimeClockEntryDeleted","description":"A time clock entry was deleted.\n\nSent to the webhooks that chose this event, and only while the company could read the resource with the `time-clock:read` scope. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"time_clock_entry.deleted"},"data":{"$ref":"#/components/schemas/WebhookTimeClockEntryData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[],"x-required-scopes":["time-clock:read"]}},"webhook.test":{"post":{"tags":["Webhook events"],"summary":"Event webhook.test","operationId":"webhookWebhookTest","description":"A test event, sent when an administrator tests a webhook in the settings.\n\nSent only when an administrator presses \"Send test\" in the settings, to that one webhook. It cannot be chosen. The request is signed: verify `PayGo-Signature` against the raw body before you read it. Answer with any 2xx status within 10 seconds; anything else is retried (9 attempts over about 2.7 days). See https://paygo.is/developers/webhooks.","parameters":[{"$ref":"#/components/parameters/WebhookSignature"},{"$ref":"#/components/parameters/WebhookEventId"},{"$ref":"#/components/parameters/WebhookEventType"},{"$ref":"#/components/parameters/WebhookDeliveryId"},{"$ref":"#/components/parameters/WebhookDeliveryAttempt"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"properties":{"type":{"const":"webhook.test"},"data":{"$ref":"#/components/schemas/WebhookTestData"}},"type":"object"}]}}},"required":true},"responses":{"2XX":{"description":"The event was received. The response body is not read."}},"security":[]}}},"components":{"headers":{"IdempotentReplayed":{"description":"`true` when this is the stored answer of an earlier request with the same `Idempotency-Key`; the operation did not run again.","schema":{"enum":["true"],"type":"string"}},"RateLimitLimit":{"description":"Requests allowed per minute in the bucket that has the fewest requests left: the API key's limit for the rate class of this operation (read 600, write 120, heavy 30 by default) or the company-wide ceiling across all of its keys (by default three times that: 1,800, 360 and 90).","schema":{"minimum":1,"type":"integer"}},"RateLimitRemaining":{"description":"Requests left in the current one-minute window of the bucket `RateLimit-Limit` describes.","schema":{"minimum":0,"type":"integer"}},"RateLimitReset":{"description":"Seconds until the current window of that bucket ends.","schema":{"minimum":0,"type":"integer"}},"RetryAfter":{"description":"Seconds to wait before retrying.","schema":{"minimum":0,"type":"integer"}},"WwwAuthenticate":{"description":"Challenge of the 401 (RFC 6750): `Bearer` when the request carried no bearer credentials, `Bearer error=\"invalid_token\"` when the key is malformed, unknown, expired or revoked.","schema":{"examples":["Bearer error=\"invalid_token\""],"type":"string"}}},"parameters":{"IdempotencyKeyOptional":{"description":"Optional. A unique value per operation (1–255 visible ASCII characters, e.g. a UUID), kept for 24 hours per API key. Repeating a request with the same key returns the stored answer with the header `Idempotent-Replayed: true` and does not run the operation again. The same key with a different request: 422 `idempotency_key_reused`; while the first request is still running: 409 `idempotency_in_progress`. A 5xx answer frees the key for a retry, unless the operation had already been saved: the retry then answers 409 `conflict` naming the saved record.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}},"IdempotencyKeyRequired":{"description":"Required. A unique value per operation (1–255 visible ASCII characters, e.g. a UUID), kept for 24 hours per API key. Repeating a request with the same key returns the stored answer with the header `Idempotent-Replayed: true` and does not run the operation again. The same key with a different request: 422 `idempotency_key_reused`; while the first request is still running: 409 `idempotency_in_progress`. A 5xx answer frees the key for a retry, unless the operation had already been saved: the retry then answers 409 `conflict` naming the saved record.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"minLength":1,"type":"string"}},"WebhookDeliveryAttempt":{"description":"The number of the attempt, 1 for the first delivery.","in":"header","name":"PayGo-Delivery-Attempt","required":true,"schema":{"example":"1","type":"string"}},"WebhookDeliveryId":{"description":"The id of this delivery to this webhook.","in":"header","name":"PayGo-Delivery-Id","required":true,"schema":{"type":"string"}},"WebhookEventId":{"description":"The id of the event (the `id` of the body). The same in every attempt: deduplicate on it.","in":"header","name":"PayGo-Event-Id","required":true,"schema":{"type":"string"}},"WebhookEventType":{"description":"The event type (the `type` of the body).","in":"header","name":"PayGo-Event-Type","required":true,"schema":{"type":"string"}},"WebhookSignature":{"description":"`t=<unix seconds>,v1=<hex>`: HMAC-SHA256 of `<t>.` followed by the raw request body, keyed with the webhook secret. While a secret rotation overlaps there are two `v1=` values, the new secret first. Reject a `t` older than five minutes.","in":"header","name":"PayGo-Signature","required":true,"schema":{"example":"t=1764000000,v1=71c0749c8b0e87ab6c8feb64374a182705332213c4431733a63a6481528f9373","type":"string"}}},"responses":{"BadRequest":{"content":{"application/problem+json":{"example":{"code":"idempotency_key_required","detail":"idempotency_key_required","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":400,"title":"idempotency_key_required","type":"https://paygo.is/developers/errors/idempotency_key_required"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The request is malformed. `code`: `idempotency_key_required`."},"Conflict":{"content":{"application/problem+json":{"example":{"code":"conflict","detail":"conflict","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":409,"title":"conflict","type":"https://paygo.is/developers/errors/conflict"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The request conflicts with the current state of a resource. On a POST with an `Idempotency-Key`: `conflict` also means the original request saved its record but the server failed before answering (the detail names the created resource: read it instead of creating it again), and `idempotency_in_progress` means the first request with that key is still running. `code`: `conflict`, `idempotency_in_progress`.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"Forbidden":{"content":{"application/problem+json":{"example":{"code":"ip_not_allowed","detail":"ip_not_allowed","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":403,"title":"ip_not_allowed","type":"https://paygo.is/developers/errors/ip_not_allowed"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is valid but the request is not allowed. `code`: `ip_not_allowed`, `insufficient_scope`, `tenant_inactive`, `not_available_in_test_mode`."},"InternalServerError":{"content":{"application/problem+json":{"example":{"code":"internal_error","detail":"internal_error","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":500,"title":"internal_error","type":"https://paygo.is/developers/errors/internal_error"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unexpected error on the server. Quote `errorId` when asking for help. `code`: `internal_error`."},"NotFound":{"content":{"application/problem+json":{"example":{"code":"not_found","detail":"not_found","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":404,"title":"not_found","type":"https://paygo.is/developers/errors/not_found"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The resource does not exist (or belongs to another company). `code`: `not_found`.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"PayloadTooLarge":{"content":{"application/problem+json":{"example":{"code":"payload_too_large","detail":"payload_too_large","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":413,"title":"payload_too_large","type":"https://paygo.is/developers/errors/payload_too_large"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The request body is larger than 1 MB. `code`: `payload_too_large`."},"ServiceUnavailable":{"content":{"application/problem+json":{"example":{"code":"maintenance","detail":"maintenance","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":503,"title":"maintenance","type":"https://paygo.is/developers/errors/maintenance"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The service is temporarily unavailable. Wait `Retry-After` seconds and retry. `rate_limit_unavailable` (with `Retry-After: 30`) is answered to writes and heavy operations while the rate limiter cannot be reached; reads are still served. `service_unavailable` (with `Retry-After`) means a write could not be completed right now and nothing was saved: retry it with the same `Idempotency-Key`. `code`: `maintenance`, `rate_limit_unavailable`, `service_unavailable`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"TooManyRequests":{"content":{"application/problem+json":{"example":{"code":"rate_limited","detail":"rate_limited","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":429,"title":"rate_limited","type":"https://paygo.is/developers/errors/rate_limited"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"A rate limit is used up: that of the API key, or the ceiling of the whole company across all of its keys (by default three times the per-key limit). Wait `Retry-After` seconds. `code`: `rate_limited`.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"Unauthorized":{"content":{"application/problem+json":{"example":{"code":"invalid_api_key","detail":"invalid_api_key","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":401,"title":"invalid_api_key","type":"https://paygo.is/developers/errors/invalid_api_key"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is missing, malformed, unknown, expired or revoked. `code`: `invalid_api_key`, `key_expired`, `key_revoked`.","headers":{"WWW-Authenticate":{"$ref":"#/components/headers/WwwAuthenticate"}}},"UnprocessableEntity":{"content":{"application/problem+json":{"example":{"code":"validation_failed","detail":"validation_failed","errorId":"ERR-20261121-ABC123","instance":"/v1/example","status":422,"title":"validation_failed","type":"https://paygo.is/developers/errors/validation_failed"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The request is well-formed but cannot be processed. On a POST with an `Idempotency-Key`: `idempotency_key_reused` means the key was already used with a different request. `code`: `validation_failed`, `idempotency_key_reused`.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}}},"schemas":{"AccountDto":{"properties":{"id":{"description":"Id of the account.","examples":["2c9d4e1f-6a7b-4c8d-9e0f-1a2b3c4d5e6f"],"format":"uuid","type":"string"},"number":{"description":"Account number.","examples":["7900"],"type":"string"},"name":{"description":"Account name.","examples":["Skrifstofukostnaður"],"type":"string"},"type":{"description":"Account type.","enum":["asset","liability","equity","revenue","expense"],"examples":["expense"],"type":"string"},"isActive":{"description":"False when the account is closed for new postings.","examples":[true],"type":"boolean"},"isExpenseAccount":{"description":"True when the account can be chosen as the account of an expense (`?isExpenseAccount=true`).","examples":[true],"type":"boolean"},"vatRate":{"description":"VAT rate in percent the account is set up with, or null when it has none.","examples":[24],"type":["number","null"]}},"required":["id","number","name","type","isActive","isExpenseAccount","vatRate"],"type":"object"},"CancelOrderRequestDto":{"additionalProperties":false,"properties":{"reason":{"description":"Why the order is cancelled, kept in the order's change history.","examples":["Viðskiptavinur hætti við"],"maxLength":500,"type":"string"}},"required":["reason"],"type":"object"},"ChangeWorkOrderStatusRequestDto":{"additionalProperties":false,"properties":{"status":{"description":"The new status. `invoiced` cannot be set (422 `status_not_settable`): only invoicing the work order in PayGo sets it.","enum":["new","assigned","in_progress","on_hold","ready_to_invoice","completed","invoiced","cancelled"],"examples":["completed"],"type":"string"}},"required":["status"],"type":"object"},"ClockInRequestDto":{"additionalProperties":false,"properties":{"employeeId":{"description":"Id of the employee to clock in (see `GET /v1/employees`).","examples":["7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"},"note":{"description":"Note on the shift.","examples":["Mætti á verkstað"],"maxLength":500,"type":["string","null"]}},"required":["employeeId"],"type":"object"},"ClockOutRequestDto":{"additionalProperties":false,"properties":{"employeeId":{"description":"Id of the employee to clock out.","examples":["7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"},"description":{"description":"What was done. REQUIRED while the employee is working on a work order in the shift (or one waits for its description): it is saved on that work time. Otherwise it becomes the shift note unless `note` is sent.","examples":["Skipti um dælu og prófaði kerfið"],"maxLength":5000,"type":["string","null"]},"note":{"description":"Note on the shift (replaces the note).","examples":["Fór heim kl. 16"],"maxLength":500,"type":["string","null"]}},"required":["employeeId"],"type":"object"},"ConvertQuoteRequestDto":{"additionalProperties":false,"properties":{"orderDate":{"description":"Order date (YYYY-MM-DD), default today (UTC).","examples":["2026-11-24"],"format":"date","type":"string"},"deliveryDate":{"description":"Delivery date of the order (YYYY-MM-DD), default 7 days after the order date. Before the order date → 422 `delivery_date_before_order_date`.","examples":["2026-12-01"],"format":"date","type":"string"},"externalId":{"description":"Your own id of the new ORDER, unique among the company's orders. A duplicate → 409 `conflict` naming the existing order.","examples":["SHOP-ORDER-5521"],"maxLength":255,"type":"string"}},"type":"object"},"CreateCreditNoteRequestDto":{"additionalProperties":false,"properties":{"amount":{"description":"Amount to credit including VAT, in the currency of the invoice, as a decimal string above zero (at most 9999999999.99). At most what is left to credit (`totals.total − creditedAmount`, 422 `exceeds_creditable`). An amount below that is a price reduction (proportional lines, nothing back in stock); the amount that completes the invoice brings the units not yet returned back in stock. Not together with `lines`. Leave both out to credit the rest of the invoice.","examples":["2480.00"],"pattern":"^\\d{1,10}(\\.\\d{1,2})?$","type":"string"},"lines":{"description":"Lines of the invoice to return, each at most once, with the quantity of each. The credit note credits those units at their invoiced price and brings them back in stock. Not together with `amount`.","items":{"$ref":"#/components/schemas/CreditNoteLineInputDto"},"maxItems":500,"minItems":1,"type":"array"},"reason":{"description":"Why the invoice is credited; shown on the credit note.","examples":["Vöru skilað."],"maxLength":500,"type":["string","null"]},"creditDate":{"description":"Date of the credit note (YYYY-MM-DD), default today. It is the posting date, so it must fall in an open fiscal period (422 `fiscal_period_closed`).","examples":["2026-11-22"],"format":"date","type":"string"},"externalId":{"description":"Your own id of the credit note, unique within the company among invoices and credit notes. A duplicate → 409 `conflict` naming the existing one.","examples":["SHOP-RMA-2231"],"maxLength":255,"type":"string"}},"type":"object"},"CreateExpenseRequestDto":{"additionalProperties":false,"properties":{"type":{"default":"bill","description":"`bill`: a supplier invoice. `credit_note`: a supplier credit note; send its amounts POSITIVE, PayGo records them negative (as `GET /v1/expenses` shows them).","enum":["bill","credit_note"],"type":"string"},"supplier":{"allOf":[{"$ref":"#/components/schemas/SupplierRefInputDto"}],"description":"The supplier, named by exactly one of `id`, `kennitala` or `externalId` (none or more → 422 `exactly_one_required`). No such supplier in the company → 422 `supplier_not_found`; an inactive supplier → 422 `supplier_inactive`."},"invoiceNumber":{"description":"The supplier's invoice number. Used to recognise a possible duplicate (see `possibleDuplicate`).","examples":["2026-118"],"maxLength":100,"type":["string","null"]},"reference":{"description":"Your reference, e.g. a purchase order number.","examples":["PO-4471"],"maxLength":255,"type":["string","null"]},"description":{"description":"Description of the expense.","examples":["Skrifstofuvörur í nóvember"],"maxLength":2000,"type":["string","null"]},"invoiceDate":{"description":"Date of the supplier's invoice (YYYY-MM-DD), default today (UTC). It becomes the posting date when a bookkeeper approves the expense.","examples":["2026-11-01"],"format":"date","type":"string"},"dueDate":{"description":"Due date (gjalddagi), default `invoiceDate`. Before `invoiceDate` → 422 `due_date_before_invoice_date`.","examples":["2026-11-15"],"format":"date","type":"string"},"finalDueDate":{"description":"Final due date (eindagi), the last day to pay without late interest; PayGo decides overdue by it. Default `dueDate`. Before `invoiceDate` → 422 `final_due_date_before_invoice_date`; before `dueDate` → 422 `final_due_date_before_due_date`.","examples":["2026-12-01"],"format":"date","type":"string"},"currency":{"default":"ISK","description":"Currency of the expense. Only `ISK` for now: any other currency → 422 `currency_not_supported`.","examples":["ISK"],"type":"string"},"expenseCategoryId":{"description":"An active expense category of the company; otherwise 422 `expense_category_not_found`.","examples":["5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b"],"format":"uuid","type":"string"},"paidWith":{"description":"How it is or was paid, a hint for the bookkeeper. Recording a payment is not part of the API.","enum":["invoice","personal","bank_transfer"],"examples":["invoice"],"type":"string"},"creditedExpenseId":{"description":"Only on a `credit_note`: the expense (a bill of the same supplier) it credits. On a bill → 422 `credited_expense_requires_credit_note`; not a bill of the company → 422 `credited_expense_not_found`; another supplier's → 422 `credited_expense_supplier_mismatch`.","examples":["2f3a4b5c-6d7e-4f8a-9b0c-1d2e3f4a5b6c"],"format":"uuid","type":"string"},"lines":{"description":"The lines, in order. PayGo computes the VAT and the totals from them.","items":{"$ref":"#/components/schemas/ExpenseLineInputDto"},"maxItems":100,"minItems":1,"type":"array"},"total":{"description":"Optional control sum: the total WITH VAT as printed on the invoice (positive on a credit note too). PayGo computes the total from the lines (rounded to whole ISK, as expenses are recorded); more than 2 kr. off → 422 `total_mismatch`.","examples":["12400.00"],"pattern":"^\\d{1,10}(\\.\\d{1,2})?$","type":"string"},"externalId":{"description":"Your own id of the expense, unique within the company. A duplicate → 409 `conflict` naming the existing expense.","examples":["AP-2026-11-0042"],"maxLength":255,"type":"string"}},"required":["supplier","lines"],"type":"object"},"CreateInvoicePaymentRequestDto":{"additionalProperties":false,"properties":{"amount":{"description":"Amount received, in ISK, as a decimal string above zero (at most 9999999999.99). It may not exceed the invoice `balance` (422 `exceeds_balance`): there is no overpayment, and credit is not taken through this call.","examples":["12400.00"],"pattern":"^\\d{1,10}(\\.\\d{1,2})?$","type":"string"},"paymentDate":{"description":"Date the money was received (YYYY-MM-DD). It is the posting date, so it must fall in an open fiscal period (422 `fiscal_period_closed`).","examples":["2026-11-22"],"format":"date","type":"string"},"paymentMethodId":{"description":"Id of an active payment method of the company that can record invoice payments (`canRecordInvoicePayment: true` in `GET /v1/payment-methods`). It decides the bank account the payment is posted to.","examples":["7d8e9f0a-1b2c-4d3e-8f4a-5b6c7d8e9f0a"],"format":"uuid","type":"string"},"reference":{"description":"Reference of the payment, e.g. the bank transfer reference. Default: the invoice number.","examples":["MILLIF-88213"],"maxLength":255,"type":["string","null"]},"notes":{"description":"Internal note on the payment.","examples":["Greitt með millifærslu."],"maxLength":2000,"type":["string","null"]}},"required":["amount","paymentDate","paymentMethodId"],"type":"object"},"CreateInvoiceRequestDto":{"additionalProperties":false,"properties":{"customer":{"allOf":[{"$ref":"#/components/schemas/CustomerRefInputDto"}],"description":"The customer, named by exactly one of `id`, `kennitala` or `externalId`. None or more than one → 422 `exactly_one_required`; no such customer in the company → 422 `customer_not_found`; a deactivated customer → 422 `customer_inactive`."},"invoiceDate":{"description":"Invoice date (YYYY-MM-DD), default today (UTC). It is also the posting date, so it must fall in an open fiscal period (422 `fiscal_period_closed`).","examples":["2026-11-22"],"format":"date","type":"string"},"dueDate":{"description":"Due date (gjalddagi). In PayGo it is always the invoice date: leave it out, or send the same date as `invoiceDate` (any other date → 422 `due_date_must_equal_invoice_date`).","examples":["2026-11-22"],"format":"date","type":"string"},"finalDueDate":{"description":"Final due date (eindagi), the last day to pay without late interest. Default: the invoice date plus the customer's payment terms. Before the invoice date → 422 `final_due_date_before_invoice_date`.","examples":["2026-12-22"],"format":"date","type":"string"},"currency":{"description":"Currency of the invoice, default the customer's default currency, else ISK. A currency other than ISK is only accepted when invoicing in foreign currencies is enabled for the company (422 `feature_disabled` otherwise).","enum":["ISK","EUR","USD","GBP","DKK","NOK","SEK","CHF","JPY","CAD"],"examples":["ISK"],"type":"string"},"vatExempt":{"default":false,"description":"Invoice without VAT: every line at 0 %. Only when enabled for the company (422 `feature_disabled` otherwise).","type":"boolean"},"lines":{"description":"The lines, in order. Prices are WITHOUT VAT and are used exactly as sent: no price list, tier or customer price is applied. A product line carries the product's VAT rate (another `vatRate` → 422 `vat_rate_mismatch`); products tracked by serial number or lot are not supported (422 `tracked_product_not_supported`). A free-text line must carry `description` and `vatRate`; for now it only accepts the rate of the company's default revenue account (24 %): other rates → 422 `vat_rate_not_supported_on_free_line`, use a product with that rate instead.","items":{"$ref":"#/components/schemas/DocumentLineInputDto"},"maxItems":500,"minItems":1,"type":"array"},"reference":{"description":"Your reference (e.g. a purchase order number), printed on the invoice.","examples":["PO-4471"],"maxLength":2000,"type":["string","null"]},"notes":{"description":"Note printed on the invoice.","examples":["Takk fyrir viðskiptin."],"maxLength":2000,"type":["string","null"]},"terms":{"description":"Payment terms text printed on the invoice.","examples":["Greiðist innan 30 daga."],"maxLength":2000,"type":["string","null"]},"externalId":{"description":"Your own id of the invoice, unique within the company. A duplicate → 409 `conflict` naming the existing invoice.","examples":["SHOP-100045"],"maxLength":255,"type":"string"},"acknowledgeOpenOrders":{"default":false,"description":"The customer has an order that was delivered but not fully invoiced; invoicing the same goods again would move the stock twice, so that is refused with 409 `conflict` (`open_delivered_order`). Send `true` to invoice anyway.","type":"boolean"},"delivery":{"allOf":[{"$ref":"#/components/schemas/InvoiceDeliveryInputDto"}],"description":"Delivery to the customer; both default to `auto`."},"createBankClaim":{"default":false,"description":"Create a claim in the customer's online bank for the invoice, with the company's active online-bank payment method; none → 422 `bank_claim_not_available`. A claim may carry a bank fee, so it is only created when asked for. Never on an invoice in a foreign currency.","type":"boolean"}},"required":["customer","lines"],"type":"object"},"CreateOrderRequestDto":{"additionalProperties":false,"properties":{"customer":{"allOf":[{"$ref":"#/components/schemas/CustomerRefInputDto"}],"description":"The customer, named by exactly one of `id`, `kennitala` or `externalId`. None or more than one → 422 `exactly_one_required`; no such customer in the company → 422 `customer_not_found`; a deactivated customer → 422 `customer_inactive`."},"orderDate":{"description":"Order date (YYYY-MM-DD), default today (UTC).","examples":["2026-11-22"],"format":"date","type":"string"},"deliveryDate":{"description":"Requested delivery date (YYYY-MM-DD), default the order date.","examples":["2026-11-25"],"format":"date","type":"string"},"shippingAddress":{"description":"Delivery address, as printed on the order.","examples":["Laugavegur 1, 101 Reykjavík"],"maxLength":2000,"type":["string","null"]},"reference":{"description":"Your reference (e.g. a purchase order number), printed on the order.","examples":["PO-4471"],"maxLength":2000,"type":["string","null"]},"notes":{"description":"Note on the order.","examples":["Afhendist við bakdyr."],"maxLength":2000,"type":["string","null"]},"lines":{"description":"The lines, in order. Prices are WITHOUT VAT and are used exactly as sent: no price list, tier or customer price is applied. A line `description` is at most 255 characters on an order. A product line carries the product's VAT rate (another `vatRate` → 422 `vat_rate_mismatch`). Each product line reserves its quantity on the company's default warehouse; the available quantity may go below zero (an order is never refused for stock). A free-text line must carry `description` and `vatRate`; for now it only accepts the rate of the company's default revenue account (24 %), as on an invoice: other rates → 422 `vat_rate_not_supported_on_free_line`, use a product with that rate instead.","items":{"$ref":"#/components/schemas/DocumentLineInputDto"},"maxItems":500,"minItems":1,"type":"array"},"externalId":{"description":"Your own id of the order, unique within the company. A duplicate → 409 `conflict` naming the existing order.","examples":["SHOP-100045"],"maxLength":255,"type":"string"}},"required":["customer","lines"],"type":"object"},"CreateQuoteRequestDto":{"additionalProperties":false,"properties":{"customer":{"allOf":[{"$ref":"#/components/schemas/CustomerRefInputDto"}],"description":"The customer, named by exactly one of `id`, `kennitala` or `externalId`. None or more than one → 422 `exactly_one_required`; no such customer in the company → 422 `customer_not_found`; a deactivated customer → 422 `customer_inactive`."},"quoteDate":{"description":"Quote date (YYYY-MM-DD), default today (UTC).","examples":["2026-11-22"],"format":"date","type":"string"},"validUntil":{"description":"Last day the quote is valid (YYYY-MM-DD), default the quote date plus 30 days. Before the quote date → 422 `valid_until_before_quote_date`. A sent quote past this day is `expired` and can no longer be accepted or converted.","examples":["2026-12-22"],"format":"date","type":"string"},"lines":{"description":"The lines, in order. Prices are WITHOUT VAT and are used exactly as sent: no price list, tier or customer price is applied, now or when the quote becomes an order. A product line carries the product's VAT rate (another `vatRate` → 422 `vat_rate_mismatch`). A free-text line must carry `description` and `vatRate`; for now it only accepts the rate of the company's default revenue account (24 %): other rates → 422 `vat_rate_not_supported_on_free_line`, use a product with that rate instead. A line description is at most 255 characters (422 `max_length`).","items":{"$ref":"#/components/schemas/DocumentLineInputDto"},"maxItems":500,"minItems":1,"type":"array"},"reference":{"description":"Your reference (e.g. a request for quotation number), printed on the quote.","examples":["RFQ-2201"],"maxLength":2000,"type":["string","null"]},"notes":{"description":"Note printed on the quote.","examples":["Afhending innan tveggja vikna frá pöntun."],"maxLength":2000,"type":["string","null"]},"terms":{"description":"Terms printed on the quote. Not carried over to the order a quote becomes.","examples":["Verð gilda í 30 daga."],"maxLength":2000,"type":["string","null"]},"externalId":{"description":"Your own id of the quote, unique within the company. A duplicate → 409 `conflict` naming the existing quote.","examples":["CRM-88231"],"maxLength":255,"type":"string"}},"required":["customer","lines"],"type":"object"},"CreateWorkOrderMaterialRequestDto":{"additionalProperties":false,"properties":{"productId":{"description":"The product (`/v1/products`), an active product of the company. Not together with `sku`.","examples":["7d2e9f1a-3b4c-4d5e-8f6a-1b2c3d4e5f6a"],"format":"uuid","type":"string"},"sku":{"description":"The product by its product number (SKU). Not together with `productId` (422 `exclusive_with`).","examples":["VARA-100"],"maxLength":50,"type":"string"},"name":{"description":"Name of the line. Required on a free-text line; on a product line the product name is used when it is left out.","examples":["Dæla 25-60"],"maxLength":200,"type":"string"},"quantity":{"description":"Quantity, above 0, at most two decimals.","examples":[1],"exclusiveMinimum":0,"maximum":99999999.99,"type":"number"},"unitPrice":{"description":"Sale price per unit WITHOUT VAT, in ISK, as a decimal string (at most 9999999999.99). Required: no price is taken from the product.","examples":["45900.00"],"pattern":"^\\d{1,10}(\\.\\d{1,2})?$","type":"string"},"discountPercent":{"description":"Discount in percent of the unit price. Default 0.","examples":[10],"maximum":100,"minimum":0,"type":"number"},"isBillable":{"description":"Whether the line is billed to the customer. Default true.","examples":[true],"type":"boolean"},"notes":{"description":"Notes on the line.","examples":["Gamla dælan tekin."],"maxLength":2000,"type":["string","null"]}},"required":["quantity","unitPrice"],"type":"object"},"CreateWorkOrderNoteRequestDto":{"additionalProperties":false,"properties":{"text":{"description":"The note, as plain text (line breaks are kept; markup is stored and shown as typed, never as HTML). Leading and trailing white space is removed.","examples":["Skipt um þéttingu undir vaski."],"maxLength":10000,"type":"string"},"isInternal":{"default":false,"description":"`true`: internal, for the company only. `false` (default): printed on the work order report the customer gets.","examples":[false],"type":"boolean"}},"required":["text"],"type":"object"},"CreateWorkOrderRequestDto":{"additionalProperties":false,"properties":{"customer":{"allOf":[{"$ref":"#/components/schemas/CustomerRefInputDto"}],"description":"The customer, named by exactly one of `id`, `kennitala` or `externalId`. None or more than one → 422 `exactly_one_required`; no such customer in the company → 422 `customer_not_found`; a deactivated customer → 422 `customer_inactive`. Optional: a work order may be created without a customer."},"assignedEmployeeIds":{"description":"Ids of the employees doing the job (`GET /v1/employees`), at most 20, each an active employee of the company. The first is shown as the main assignee in PayGo.","examples":[["1e2d3c4b-5a69-4788-9a6b-5c4d3e2f1a0b"]],"items":{"format":"uuid","type":"string"},"maxItems":20,"type":"array"},"jobType":{"description":"Type of job, free text as in PayGo. The names offered in PayGo are listed by `GET /v1/work-order-types`.","examples":["Viðgerð"],"maxLength":100,"type":["string","null"]},"priority":{"default":"normal","description":"Priority of the job.","enum":["low","normal","high","urgent"],"examples":["high"],"type":"string"},"description":{"description":"Description of the job, plain text: line breaks are kept, and markup is shown as the characters you sent, never as formatting.","examples":["Lekur undir eldhúsvaski."],"maxLength":10000,"type":["string","null"]},"scheduledStart":{"description":"Planned start, an ISO 8601 timestamp with a zone (`Z` or `+00:00`).","examples":["2026-11-24T09:00:00Z"],"format":"date-time","type":["string","null"]},"scheduledEnd":{"description":"Planned end, an ISO 8601 timestamp with a zone; not before `scheduledStart` (422 `scheduled_end_before_start`).","examples":["2026-11-24T12:00:00Z"],"format":"date-time","type":["string","null"]},"location":{"anyOf":[{"$ref":"#/components/schemas/WorkOrderLocationInputDto"},{"type":"null"}],"description":"Where the job is done. `latitude` and `longitude` go together (422 `coordinates_incomplete` with only one)."},"estimatedHours":{"description":"Estimated hours of work, at most 2 decimals.","examples":[3.5],"maximum":999999.99,"minimum":0,"type":["number","null"]},"externalId":{"description":"Your own id of the work order, unique within the company (deleted work orders count). A duplicate → 409 `conflict` naming the existing work order. Cannot be changed later.","examples":["CRM-JOB-2291"],"maxLength":255,"type":"string"}},"type":"object"},"CreateWorkOrderTimeEntryRequestDto":{"additionalProperties":false,"properties":{"employeeId":{"description":"The employee who did the work (`GET /v1/employees`): an active employee of the company. The hours are paid to this employee.","examples":["1e2d3c4b-5a69-4788-9a6b-5c4d3e2f1a0b"],"format":"uuid","type":"string"},"type":{"description":"Kind of work: `workshop`, `on_site`, `consulting`, `travel` or `other`.","enum":["workshop","on_site","consulting","travel","other"],"examples":["on_site"],"type":"string"},"startTime":{"description":"Start of the work, an ISO 8601 timestamp with a zone (`Z` or `+00:00`).","examples":["2026-11-24T09:00:00Z"],"format":"date-time","type":"string"},"endTime":{"description":"End of the work, an ISO 8601 timestamp with a zone (`Z` or `+00:00`): after `startTime`, at most 168 hours later and not in the future.","examples":["2026-11-24T11:30:00Z"],"format":"date-time","type":"string"},"description":{"description":"Description of the work.","examples":["Skipti um dælu."],"maxLength":500,"type":["string","null"]}},"required":["employeeId","type","startTime","endTime"],"type":"object"},"CreditNoteLineInputDto":{"additionalProperties":false,"properties":{"lineId":{"description":"Id of a line of the invoice (`lines[].id` of the invoice).","examples":["0b1c2d3e-4f5a-4b6c-8d7e-9f0a1b2c3d4e"],"format":"uuid","type":"string"},"quantity":{"description":"Quantity to return, above zero and at most what is left to return on the line (`quantity − returnedQuantity`, 422 `exceeds_returnable`). The units go back in stock.","examples":[1],"type":"number"}},"required":["lineId","quantity"],"type":"object"},"CreditNoteRefDto":{"properties":{"id":{"description":"Id of the credit note (`/v1/invoices/{id}`).","examples":["1f2e3d4c-5b6a-4978-8a9b-0c1d2e3f4a5b"],"format":"uuid","type":"string"},"invoiceNumber":{"description":"Number of the credit note.","examples":["K-1007"],"type":"string"}},"required":["id","invoiceNumber"],"type":"object"},"CustomerContactDto":{"properties":{"id":{"description":"Id of the contact person.","examples":["3f1c2a9e-8d4b-4c1e-9a7f-2b6d5e4c3a21"],"format":"uuid","type":"string"},"name":{"description":"Name of the contact person.","examples":["Jóna Jónsdóttir"],"type":"string"},"email":{"description":"E-mail address of the contact person.","examples":["jona@daemi.is"],"type":["string","null"]},"phone":{"description":"Phone number of the contact person.","examples":["+354 555 1234"],"type":["string","null"]},"jobTitle":{"description":"Job title of the contact person.","examples":["Fjármálastjóri"],"type":["string","null"]}},"required":["id","name","email","phone","jobTitle"],"type":"object"},"CustomerCreate":{"additionalProperties":false,"properties":{"externalId":{"description":"Your own id for this customer. Must be unique within the company: a second customer with the same value is refused with 409 conflict.","examples":["CRM-10042"],"maxLength":255,"type":["string","null"]},"kennitala":{"description":"Icelandic national id (kennitala), 10 digits; a hyphen after the sixth digit is accepted and removed. Unique within the company: an existing kennitala is refused with 409 conflict.","examples":["5501012340"],"type":["string","null"]},"name":{"description":"Name of the customer.","examples":["Dæmi ehf."],"maxLength":255,"type":"string"},"email":{"description":"E-mail address invoices are sent to.","examples":["bokhald@daemi.is"],"format":"email","maxLength":255,"type":["string","null"]},"phone":{"description":"Phone number.","examples":["+354 555 1234"],"maxLength":50,"type":["string","null"]},"addressLine1":{"description":"First address line.","examples":["Laugavegur 1"],"maxLength":255,"type":["string","null"]},"addressLine2":{"description":"Second address line.","examples":["2. hæð"],"maxLength":255,"type":["string","null"]},"postalCode":{"description":"Postal code.","examples":["101"],"maxLength":10,"type":["string","null"]},"city":{"description":"City or town.","examples":["Reykjavík"],"maxLength":100,"type":["string","null"]},"country":{"default":"IS","description":"Country, ISO 3166-1 alpha-2 (case-insensitive). Default `IS`.","examples":["IS"],"type":"string"},"language":{"default":"is","description":"Language of the documents and e-mails the customer receives. Default `is`.","enum":["is","en"],"examples":["is"],"type":"string"},"paymentTermsDays":{"default":30,"description":"Days from invoice date to due date on new invoices. Default 30.","examples":[30],"maximum":365,"minimum":0,"type":"integer"},"defaultCurrency":{"description":"Currency new invoices to this customer default to (ISO 4217, case-insensitive). `null` or `ISK` means ISK. A foreign currency is only accepted when invoicing in foreign currencies is enabled for the company (422 otherwise).","enum":["ISK","EUR","USD","GBP","DKK","NOK","SEK","CHF","JPY","CAD",null],"examples":["ISK"],"type":["string","null"]},"isActive":{"default":true,"description":"False creates the customer deactivated. Default true.","examples":[true],"type":"boolean"}},"required":["name"],"type":"object"},"CustomerDetailDto":{"properties":{"id":{"description":"Id of the customer in PayGo.","examples":["9b2e7c1a-4f3d-4e8a-b6c5-1d2e3f4a5b6c"],"format":"uuid","type":"string"},"externalId":{"description":"Your own id for this customer, unique within the company. Use it to find the customer with `?externalId=`.","examples":["CRM-10042"],"maxLength":255,"type":["string","null"]},"kennitala":{"description":"Icelandic national id (kennitala) of the customer, 10 digits without a hyphen. Unique within the company.","examples":["5501012340"],"pattern":"^\\d{10}$","type":["string","null"]},"name":{"description":"Name of the customer.","examples":["Dæmi ehf."],"maxLength":255,"type":"string"},"email":{"description":"E-mail address invoices are sent to.","examples":["bokhald@daemi.is"],"format":"email","type":["string","null"]},"phone":{"description":"Phone number.","examples":["+354 555 1234"],"maxLength":50,"type":["string","null"]},"addressLine1":{"description":"First address line.","examples":["Laugavegur 1"],"maxLength":255,"type":["string","null"]},"addressLine2":{"description":"Second address line.","examples":["2. hæð"],"maxLength":255,"type":["string","null"]},"postalCode":{"description":"Postal code.","examples":["101"],"maxLength":10,"type":["string","null"]},"city":{"description":"City or town.","examples":["Reykjavík"],"maxLength":100,"type":["string","null"]},"country":{"description":"Country, ISO 3166-1 alpha-2.","examples":["IS"],"pattern":"^[A-Z]{2}$","type":"string"},"language":{"description":"Language of the documents and e-mails the customer receives (invoices, quotes, statements).","enum":["is","en"],"examples":["is"],"type":"string"},"paymentTermsDays":{"description":"Days from invoice date to due date on new invoices.","examples":[30],"minimum":0,"type":"integer"},"defaultCurrency":{"description":"Currency new invoices to this customer default to (ISO 4217). `ISK` unless a foreign currency is set.","examples":["ISK"],"pattern":"^[A-Z]{3}$","type":"string"},"isActive":{"description":"False for a deactivated customer, who is hidden from the selection lists in PayGo.","examples":[true],"type":"boolean"},"createdAt":{"description":"When the customer was created (ISO 8601, UTC).","examples":["2026-11-21T08:30:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the customer was last changed (ISO 8601, UTC).","examples":["2026-11-21T09:15:00.000Z"],"format":"date-time","type":"string"},"contacts":{"description":"Contact people of the customer, sorted by name.","items":{"$ref":"#/components/schemas/CustomerContactDto"},"type":"array"},"balance":{"allOf":[{"$ref":"#/components/schemas/MoneyAmountDto"}],"description":"What the customer owes now, from posted accounting entries: accounts receivable minus unused customer credit (prepayments and credit). Negative when the company owes the customer. The same figure as the balance on the customer page in PayGo."}},"required":["id","externalId","kennitala","name","email","phone","addressLine1","addressLine2","postalCode","city","country","language","paymentTermsDays","defaultCurrency","isActive","createdAt","updatedAt","contacts","balance"],"type":"object"},"CustomerDto":{"properties":{"id":{"description":"Id of the customer in PayGo.","examples":["9b2e7c1a-4f3d-4e8a-b6c5-1d2e3f4a5b6c"],"format":"uuid","type":"string"},"externalId":{"description":"Your own id for this customer, unique within the company. Use it to find the customer with `?externalId=`.","examples":["CRM-10042"],"maxLength":255,"type":["string","null"]},"kennitala":{"description":"Icelandic national id (kennitala) of the customer, 10 digits without a hyphen. Unique within the company.","examples":["5501012340"],"pattern":"^\\d{10}$","type":["string","null"]},"name":{"description":"Name of the customer.","examples":["Dæmi ehf."],"maxLength":255,"type":"string"},"email":{"description":"E-mail address invoices are sent to.","examples":["bokhald@daemi.is"],"format":"email","type":["string","null"]},"phone":{"description":"Phone number.","examples":["+354 555 1234"],"maxLength":50,"type":["string","null"]},"addressLine1":{"description":"First address line.","examples":["Laugavegur 1"],"maxLength":255,"type":["string","null"]},"addressLine2":{"description":"Second address line.","examples":["2. hæð"],"maxLength":255,"type":["string","null"]},"postalCode":{"description":"Postal code.","examples":["101"],"maxLength":10,"type":["string","null"]},"city":{"description":"City or town.","examples":["Reykjavík"],"maxLength":100,"type":["string","null"]},"country":{"description":"Country, ISO 3166-1 alpha-2.","examples":["IS"],"pattern":"^[A-Z]{2}$","type":"string"},"language":{"description":"Language of the documents and e-mails the customer receives (invoices, quotes, statements).","enum":["is","en"],"examples":["is"],"type":"string"},"paymentTermsDays":{"description":"Days from invoice date to due date on new invoices.","examples":[30],"minimum":0,"type":"integer"},"defaultCurrency":{"description":"Currency new invoices to this customer default to (ISO 4217). `ISK` unless a foreign currency is set.","examples":["ISK"],"pattern":"^[A-Z]{3}$","type":"string"},"isActive":{"description":"False for a deactivated customer, who is hidden from the selection lists in PayGo.","examples":[true],"type":"boolean"},"createdAt":{"description":"When the customer was created (ISO 8601, UTC).","examples":["2026-11-21T08:30:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the customer was last changed (ISO 8601, UTC).","examples":["2026-11-21T09:15:00.000Z"],"format":"date-time","type":"string"}},"required":["id","externalId","kennitala","name","email","phone","addressLine1","addressLine2","postalCode","city","country","language","paymentTermsDays","defaultCurrency","isActive","createdAt","updatedAt"],"type":"object"},"CustomerRefDto":{"properties":{"id":{"description":"Id of the customer in PayGo (`/v1/customers/{id}`).","examples":["9b2e7c1a-4f3d-4e8a-b6c5-1d2e3f4a5b6c"],"format":"uuid","type":"string"},"name":{"description":"Current name of the customer.","examples":["Dæmi ehf."],"type":"string"},"kennitala":{"description":"Current kennitala of the customer, 10 digits.","examples":["5501012340"],"pattern":"^\\d{10}$","type":["string","null"]}},"required":["id","name","kennitala"],"type":"object"},"CustomerRefInputDto":{"additionalProperties":false,"properties":{"id":{"description":"Id of the customer in PayGo.","examples":["9b2e7c1a-4f3d-4e8a-b6c5-1d2e3f4a5b6c"],"format":"uuid","type":"string"},"kennitala":{"description":"Kennitala of the customer, 10 digits (a hyphen after the sixth digit is accepted). Unique within the company.","examples":["5501012340"],"type":"string"},"externalId":{"description":"Your own id of the customer (`externalId` on `/v1/customers`). Unique within the company.","examples":["CRM-10042"],"maxLength":255,"type":"string"}},"type":"object"},"CustomerUpdate":{"additionalProperties":false,"properties":{"externalId":{"description":"Your own id for this customer. Must be unique within the company: a second customer with the same value is refused with 409 conflict.","examples":["CRM-10042"],"maxLength":255,"type":["string","null"]},"kennitala":{"description":"Icelandic national id (kennitala), 10 digits; a hyphen after the sixth digit is accepted and removed. Unique within the company: an existing kennitala is refused with 409 conflict.","examples":["5501012340"],"type":["string","null"]},"name":{"description":"Name of the customer.","examples":["Dæmi ehf."],"maxLength":255,"type":"string"},"email":{"description":"E-mail address invoices are sent to.","examples":["bokhald@daemi.is"],"format":"email","maxLength":255,"type":["string","null"]},"phone":{"description":"Phone number.","examples":["+354 555 1234"],"maxLength":50,"type":["string","null"]},"addressLine1":{"description":"First address line.","examples":["Laugavegur 1"],"maxLength":255,"type":["string","null"]},"addressLine2":{"description":"Second address line.","examples":["2. hæð"],"maxLength":255,"type":["string","null"]},"postalCode":{"description":"Postal code.","examples":["101"],"maxLength":10,"type":["string","null"]},"city":{"description":"City or town.","examples":["Reykjavík"],"maxLength":100,"type":["string","null"]},"country":{"default":"IS","description":"Country, ISO 3166-1 alpha-2 (case-insensitive). Default `IS`.","examples":["IS"],"type":"string"},"language":{"default":"is","description":"Language of the documents and e-mails the customer receives. Default `is`.","enum":["is","en"],"examples":["is"],"type":"string"},"paymentTermsDays":{"default":30,"description":"Days from invoice date to due date on new invoices. Default 30.","examples":[30],"maximum":365,"minimum":0,"type":"integer"},"defaultCurrency":{"description":"Currency new invoices to this customer default to (ISO 4217, case-insensitive). `null` or `ISK` means ISK. A foreign currency is only accepted when invoicing in foreign currencies is enabled for the company (422 otherwise).","enum":["ISK","EUR","USD","GBP","DKK","NOK","SEK","CHF","JPY","CAD",null],"examples":["ISK"],"type":["string","null"]},"isActive":{"default":true,"description":"False creates the customer deactivated. Default true.","examples":[true],"type":"boolean"}},"type":"object"},"DocumentLineDto":{"properties":{"id":{"description":"Id of the line.","examples":["4c8f1e2a-7b3d-4f6e-9a1c-2d3e4f5a6b7c"],"format":"uuid","type":"string"},"position":{"description":"Position of the line on the document; lines are listed in this order.","examples":[0],"type":"integer"},"productId":{"description":"The product of the line; null on a free-text line.","examples":["7d2e9f1a-3b4c-4d5e-8f6a-1b2c3d4e5f6a"],"format":"uuid","type":["string","null"]},"sku":{"description":"Product number (SKU) of the product; null on a free-text line.","examples":["VARA-100"],"type":["string","null"]},"unit":{"description":"Unit of the product (e.g. `stk`, `kg`); null on a free-text line or a product without one.","examples":["stk"],"type":["string","null"]},"description":{"description":"Description of the line, as printed.","examples":["Ráðgjöf"],"type":"string"},"subDescription":{"description":"Second line printed under the description.","examples":["Nóvember 2026"],"type":["string","null"]},"quantity":{"description":"Quantity, at most two decimals.","examples":[2],"type":"number"},"unitPrice":{"description":"Price per unit WITHOUT VAT, before the discount.","examples":["5000.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"discountPercent":{"description":"Discount in percent of the unit price.","examples":[0],"maximum":100,"minimum":0,"type":"number"},"vatRate":{"description":"VAT rate in percent.","examples":[24],"type":"number"},"netAmount":{"description":"Line amount without VAT, after the discount (`totalAmount − vatAmount`).","examples":["10000.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"vatAmount":{"description":"VAT of the line.","examples":["2400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"totalAmount":{"description":"Line amount including VAT.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["id","position","productId","sku","unit","description","subDescription","quantity","unitPrice","discountPercent","vatRate","netAmount","vatAmount","totalAmount"],"type":"object"},"DocumentLineInputDto":{"additionalProperties":false,"properties":{"productId":{"description":"The product (`/v1/products`). Not together with `sku`.","examples":["7d2e9f1a-3b4c-4d5e-8f6a-1b2c3d4e5f6a"],"format":"uuid","type":"string"},"sku":{"description":"The product by its product number (SKU), unique within the company. Not together with `productId` (422 `exclusive_with`).","examples":["VARA-100"],"maxLength":50,"type":"string"},"description":{"description":"Description of the line. Required on a free-text line; on a product line the product name is used when it is left out.","examples":["Ráðgjöf"],"maxLength":2000,"type":"string"},"subDescription":{"description":"Second line printed under the description.","examples":["Nóvember 2026"],"maxLength":2000,"type":["string","null"]},"quantity":{"description":"Quantity, above 0, at most two decimals.","examples":[2],"exclusiveMinimum":0,"maximum":99999999.99,"type":"number"},"unitPrice":{"description":"Price per unit WITHOUT VAT, in the document currency, as a decimal string (at most 9999999999.99).","examples":["5000.00"],"pattern":"^\\d{1,10}(\\.\\d{1,2})?$","type":"string"},"discountPercent":{"default":0,"description":"Discount in percent of the unit price, at most four decimals.","examples":[10],"maximum":100,"minimum":0,"type":"number"},"vatRate":{"description":"VAT rate in percent, one of the rates of `/v1/vat-rates`. Required on a free-text line. On a product line it may be left out; if sent it must equal the product's rate.","examples":[24],"maximum":100,"minimum":0,"type":"number"}},"required":["quantity","unitPrice"],"type":"object"},"EmployeeDto":{"properties":{"id":{"description":"Id of the employee.","examples":["1e2d3c4b-5a69-4788-9a6b-5c4d3e2f1a0b"],"format":"uuid","type":"string"},"name":{"description":"Name of the employee.","examples":["Anna Jónsdóttir"],"type":"string"},"isActive":{"description":"False when the employee has left or is otherwise inactive.","examples":[true],"type":"boolean"}},"required":["id","name","isActive"],"type":"object"},"ExpenseAccountRefDto":{"properties":{"id":{"description":"Id of the account in the chart of accounts (`/v1/accounts`).","examples":["7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d"],"format":"uuid","type":"string"},"accountNumber":{"description":"Account number.","examples":["6110"],"type":"string"},"name":{"description":"Account name.","examples":["Rekstrarvörur"],"type":"string"}},"required":["id","accountNumber","name"],"type":"object"},"ExpenseAccountRefInputDto":{"additionalProperties":false,"properties":{"id":{"description":"Id of the account (`/v1/accounts`).","examples":["7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d"],"format":"uuid","type":"string"},"accountNumber":{"description":"Number of the account in the company's chart of accounts.","examples":["6110"],"maxLength":50,"type":"string"}},"type":"object"},"ExpenseAttachmentDto":{"properties":{"id":{"description":"Id of the file on the expense: `receipt` for the main document, else the id of a supplementary document.","examples":["7c9e6679-7425-40de-944b-e07fc1f90ae7"],"type":"string"},"kind":{"description":"`receipt`: the main document (the receipt or invoice the expense was recorded from; at most one). `attachment`: a supplementary document, which can be added at any stage.","enum":["receipt","attachment"],"examples":["attachment"],"type":"string"},"fileName":{"description":"File name to save the file as. The receipt is named after the expense number.","examples":["Afhendingarseðill.pdf"],"type":"string"},"mimeType":{"description":"Media type the download is served with: `application/pdf`, `image/jpeg`, `image/png`, `image/gif`, `image/webp`, a Word or Excel type, or `application/octet-stream`.","examples":["application/pdf"],"type":"string"},"size":{"description":"Size in bytes, or null when unknown.","examples":[48213],"type":["number","null"]},"description":{"description":"Description given with a supplementary document. Null on the receipt.","examples":[null],"type":["string","null"]},"createdAt":{"description":"When the file was added (ISO 8601, UTC). The receipt has the time the expense was recorded.","examples":["2026-11-02T10:00:00.000Z"],"format":"date-time","type":"string"},"available":{"description":"False when the file cannot be downloaded through the API (for example a receipt recorded as a link to another website, or a file that is no longer stored); downloading it answers 404.","examples":[true],"type":"boolean"}},"required":["id","kind","fileName","mimeType","size","description","createdAt","available"],"type":"object"},"ExpenseAttachmentListDto":{"properties":{"data":{"description":"The receipt first (when the expense has one), then supplementary documents, oldest first.","items":{"$ref":"#/components/schemas/ExpenseAttachmentDto"},"type":"array"}},"required":["data"],"type":"object"},"ExpenseCategoryDto":{"properties":{"id":{"description":"Id of the expense category.","examples":["4d3c2b1a-0f9e-4d8c-8b7a-6f5e4d3c2b1a"],"format":"uuid","type":"string"},"name":{"description":"Name of the category.","examples":["Ferðakostnaður"],"type":"string"},"description":{"description":"Description of the category.","examples":["Flug, gisting og akstur"],"type":["string","null"]},"isActive":{"description":"False when the category is no longer offered.","examples":[true],"type":"boolean"}},"required":["id","name","description","isActive"],"type":"object"},"ExpenseCategoryRefDto":{"properties":{"id":{"description":"Id of the expense category.","examples":["5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b"],"format":"uuid","type":"string"},"name":{"description":"Name of the expense category.","examples":["Rekstrarvörur"],"type":"string"}},"required":["id","name"],"type":"object"},"ExpenseCreatedDto":{"properties":{"id":{"description":"Id of the expense in PayGo.","examples":["2f3a4b5c-6d7e-4f8a-9b0c-1d2e3f4a5b6c"],"format":"uuid","type":"string"},"expenseNumber":{"description":"Number of the expense in PayGo, unique within the company.","examples":["EXP-2026-00133"],"type":"string"},"externalId":{"description":"Your own id for this expense, unique within the company. Find it with `?externalId=`.","examples":["AP-2026-0042"],"maxLength":255,"type":["string","null"]},"type":{"description":"`bill`, or `credit_note` for a supplier credit note (its amounts are negative).","enum":["bill","credit_note"],"examples":["bill"],"type":"string"},"status":{"description":"`pending`: recorded but NOT posted: no journal entry, no VAT and no payable yet; a bookkeeper reviews and approves it in PayGo. `posted`: approved and posted to the general ledger. Only a posted expense can be paid in PayGo.","enum":["pending","posted"],"examples":["posted"],"type":"string"},"paymentStatus":{"description":"Computed from the payments that are not reversed, as PayGo shows it. A bill: `paid` when at most 1 kr is left (on a foreign-currency bill: at most 0.01 of its currency), otherwise `partially_paid` when more than 1 kr (0.01) is paid, otherwise `unpaid`. A credit note: `credit_open` while some of the credit is not yet applied or refunded, `paid` once it is.","enum":["unpaid","partially_paid","paid","credit_open"],"examples":["unpaid"],"type":"string"},"supplier":{"anyOf":[{"$ref":"#/components/schemas/SupplierRefDto"},{"type":"null"}],"description":"The supplier, with its current name and kennitala. Null when none is set."},"invoiceNumber":{"description":"The supplier's invoice number.","examples":["2026-118"],"maxLength":100,"type":["string","null"]},"reference":{"description":"The buyer's reference on the invoice (e.g. a purchase order number).","examples":["PO-4471"],"maxLength":255,"type":["string","null"]},"description":{"description":"Description of the expense.","examples":["Skrifstofuvörur, nóvember"],"type":["string","null"]},"invoiceDate":{"description":"Invoice date (YYYY-MM-DD): the date of the supplier's invoice, and the date the expense is posted on.","examples":["2026-11-01"],"format":"date","type":"string"},"dueDate":{"description":"Due date (gjalddagi, YYYY-MM-DD): the day the payment falls due. On older expenses that never recorded one it is `invoiceDate`.","examples":["2026-11-15"],"format":"date","type":"string"},"finalDueDate":{"description":"Final due date (eindagi, YYYY-MM-DD): the last day to pay without late interest. PayGo decides overdue, payment matching and payables aging by this date. On older expenses that never recorded one it is `dueDate`.","examples":["2026-12-01"],"format":"date","type":"string"},"currency":{"description":"Currency of the supplier's invoice (ISO 4217). `amountPaid` and `balance` are in it; `totals` and lines are in ISK.","examples":["ISK"],"pattern":"^[A-Z]{3}$","type":"string"},"originalTotal":{"description":"On a foreign-currency expense: the total of the supplier's invoice in `currency`. Null on an ISK expense.","examples":[null],"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"exchangeRate":{"description":"On a foreign-currency expense: ISK per one unit of `currency`, four decimals. Null on an ISK expense.","examples":[null],"pattern":"^\\d+\\.\\d{4}$","type":["string","null"]},"exchangeRateDate":{"description":"Date of `exchangeRate` (YYYY-MM-DD). Null on an ISK expense.","examples":[null],"format":"date","type":["string","null"]},"expenseCategory":{"anyOf":[{"$ref":"#/components/schemas/ExpenseCategoryRefDto"},{"type":"null"}],"description":"The expense category, or null."},"paidWith":{"description":"How the person who recorded the expense says it was paid: `invoice` (to be paid to the supplier), `personal` (paid out of pocket by an employee, to be reimbursed), `card` (a company card) or `bank_transfer`. A hint for the bookkeeper, not a payment. Null when not given.","enum":["invoice","personal","card","bank_transfer",null],"examples":["invoice"],"type":["string","null"]},"lines":{"description":"Booking lines of the expense, in `position` order.","items":{"$ref":"#/components/schemas/ExpenseLineDto"},"type":"array"},"totals":{"allOf":[{"$ref":"#/components/schemas/ExpenseTotalsDto"}],"description":"Totals of the expense in ISK, with VAT per rate."},"amountPaid":{"description":"Paid so far by payments that are not reversed, in `currency`.","examples":["0.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"balance":{"description":"What is still owed, in `currency`: the total less `amountPaid`. Negative on a credit note while credit is open.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"creditedExpenseId":{"description":"On a credit note: the expense it credits, when known. Null otherwise.","examples":[null],"format":"uuid","type":["string","null"]},"hasReceipt":{"description":"True when a receipt or invoice file (the main document) is attached to the expense.","examples":[true],"type":"boolean"},"attachmentCount":{"description":"Number of supplementary documents attached to the expense, besides the receipt.","examples":[0],"type":"number"},"createdAt":{"description":"When the expense was recorded (ISO 8601, UTC).","examples":["2026-11-01T10:12:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the expense was last changed (ISO 8601, UTC): an edit that changes the expense's own fields, its approval (posting), the reversal of its posting, and recording or reversing a payment of it, so `updatedSince` also catches a change of `paymentStatus`, `amountPaid` or `balance`.","examples":["2026-11-03T08:00:00.000Z"],"format":"date-time","type":"string"},"payments":{"description":"Payments of the expense (reversed ones too, with `voided: true`), oldest first. Bank fees recorded with a payment are not listed.","items":{"$ref":"#/components/schemas/ExpensePaymentDto"},"type":"array"},"possibleDuplicate":{"description":"`true` when PayGo found an expense or posted document that looks like the same invoice (same supplier and invoice number, amount, date). The expense IS recorded either way; the bookkeeper resolves the duplicate flag in PayGo before approving. Use `Idempotency-Key` and `externalId` to never send the same expense twice.","examples":[false],"type":"boolean"}},"required":["id","expenseNumber","externalId","type","status","paymentStatus","supplier","invoiceNumber","reference","description","invoiceDate","dueDate","finalDueDate","currency","originalTotal","exchangeRate","exchangeRateDate","expenseCategory","paidWith","lines","totals","amountPaid","balance","creditedExpenseId","hasReceipt","attachmentCount","createdAt","updatedAt","payments","possibleDuplicate"],"type":"object"},"ExpenseDetailDto":{"properties":{"id":{"description":"Id of the expense in PayGo.","examples":["2f3a4b5c-6d7e-4f8a-9b0c-1d2e3f4a5b6c"],"format":"uuid","type":"string"},"expenseNumber":{"description":"Number of the expense in PayGo, unique within the company.","examples":["EXP-2026-00133"],"type":"string"},"externalId":{"description":"Your own id for this expense, unique within the company. Find it with `?externalId=`.","examples":["AP-2026-0042"],"maxLength":255,"type":["string","null"]},"type":{"description":"`bill`, or `credit_note` for a supplier credit note (its amounts are negative).","enum":["bill","credit_note"],"examples":["bill"],"type":"string"},"status":{"description":"`pending`: recorded but NOT posted: no journal entry, no VAT and no payable yet; a bookkeeper reviews and approves it in PayGo. `posted`: approved and posted to the general ledger. Only a posted expense can be paid in PayGo.","enum":["pending","posted"],"examples":["posted"],"type":"string"},"paymentStatus":{"description":"Computed from the payments that are not reversed, as PayGo shows it. A bill: `paid` when at most 1 kr is left (on a foreign-currency bill: at most 0.01 of its currency), otherwise `partially_paid` when more than 1 kr (0.01) is paid, otherwise `unpaid`. A credit note: `credit_open` while some of the credit is not yet applied or refunded, `paid` once it is.","enum":["unpaid","partially_paid","paid","credit_open"],"examples":["unpaid"],"type":"string"},"supplier":{"anyOf":[{"$ref":"#/components/schemas/SupplierRefDto"},{"type":"null"}],"description":"The supplier, with its current name and kennitala. Null when none is set."},"invoiceNumber":{"description":"The supplier's invoice number.","examples":["2026-118"],"maxLength":100,"type":["string","null"]},"reference":{"description":"The buyer's reference on the invoice (e.g. a purchase order number).","examples":["PO-4471"],"maxLength":255,"type":["string","null"]},"description":{"description":"Description of the expense.","examples":["Skrifstofuvörur, nóvember"],"type":["string","null"]},"invoiceDate":{"description":"Invoice date (YYYY-MM-DD): the date of the supplier's invoice, and the date the expense is posted on.","examples":["2026-11-01"],"format":"date","type":"string"},"dueDate":{"description":"Due date (gjalddagi, YYYY-MM-DD): the day the payment falls due. On older expenses that never recorded one it is `invoiceDate`.","examples":["2026-11-15"],"format":"date","type":"string"},"finalDueDate":{"description":"Final due date (eindagi, YYYY-MM-DD): the last day to pay without late interest. PayGo decides overdue, payment matching and payables aging by this date. On older expenses that never recorded one it is `dueDate`.","examples":["2026-12-01"],"format":"date","type":"string"},"currency":{"description":"Currency of the supplier's invoice (ISO 4217). `amountPaid` and `balance` are in it; `totals` and lines are in ISK.","examples":["ISK"],"pattern":"^[A-Z]{3}$","type":"string"},"originalTotal":{"description":"On a foreign-currency expense: the total of the supplier's invoice in `currency`. Null on an ISK expense.","examples":[null],"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"exchangeRate":{"description":"On a foreign-currency expense: ISK per one unit of `currency`, four decimals. Null on an ISK expense.","examples":[null],"pattern":"^\\d+\\.\\d{4}$","type":["string","null"]},"exchangeRateDate":{"description":"Date of `exchangeRate` (YYYY-MM-DD). Null on an ISK expense.","examples":[null],"format":"date","type":["string","null"]},"expenseCategory":{"anyOf":[{"$ref":"#/components/schemas/ExpenseCategoryRefDto"},{"type":"null"}],"description":"The expense category, or null."},"paidWith":{"description":"How the person who recorded the expense says it was paid: `invoice` (to be paid to the supplier), `personal` (paid out of pocket by an employee, to be reimbursed), `card` (a company card) or `bank_transfer`. A hint for the bookkeeper, not a payment. Null when not given.","enum":["invoice","personal","card","bank_transfer",null],"examples":["invoice"],"type":["string","null"]},"lines":{"description":"Booking lines of the expense, in `position` order.","items":{"$ref":"#/components/schemas/ExpenseLineDto"},"type":"array"},"totals":{"allOf":[{"$ref":"#/components/schemas/ExpenseTotalsDto"}],"description":"Totals of the expense in ISK, with VAT per rate."},"amountPaid":{"description":"Paid so far by payments that are not reversed, in `currency`.","examples":["0.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"balance":{"description":"What is still owed, in `currency`: the total less `amountPaid`. Negative on a credit note while credit is open.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"creditedExpenseId":{"description":"On a credit note: the expense it credits, when known. Null otherwise.","examples":[null],"format":"uuid","type":["string","null"]},"hasReceipt":{"description":"True when a receipt or invoice file (the main document) is attached to the expense.","examples":[true],"type":"boolean"},"attachmentCount":{"description":"Number of supplementary documents attached to the expense, besides the receipt.","examples":[0],"type":"number"},"createdAt":{"description":"When the expense was recorded (ISO 8601, UTC).","examples":["2026-11-01T10:12:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the expense was last changed (ISO 8601, UTC): an edit that changes the expense's own fields, its approval (posting), the reversal of its posting, and recording or reversing a payment of it, so `updatedSince` also catches a change of `paymentStatus`, `amountPaid` or `balance`.","examples":["2026-11-03T08:00:00.000Z"],"format":"date-time","type":"string"},"payments":{"description":"Payments of the expense (reversed ones too, with `voided: true`), oldest first. Bank fees recorded with a payment are not listed.","items":{"$ref":"#/components/schemas/ExpensePaymentDto"},"type":"array"}},"required":["id","expenseNumber","externalId","type","status","paymentStatus","supplier","invoiceNumber","reference","description","invoiceDate","dueDate","finalDueDate","currency","originalTotal","exchangeRate","exchangeRateDate","expenseCategory","paidWith","lines","totals","amountPaid","balance","creditedExpenseId","hasReceipt","attachmentCount","createdAt","updatedAt","payments"],"type":"object"},"ExpenseDocumentDto":{"properties":{"id":{"examples":["5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d"],"format":"uuid","type":"string"},"externalId":{"description":"Your own id of the upload, unique in the company.","examples":["RCPT-2026-0042"],"maxLength":255,"type":["string","null"]},"source":{"description":"Where the document came from: this API, the PayGo dashboard or the app.","enum":["api","dashboard","mobile"],"type":"string"},"status":{"description":"`status`: `queued` (waiting), `processing` (being read), `completed` (an expense was recorded from the data read off the document; fetch it with `GET /v1/expenses/{expenseId}`), `needs_review` (an expense was recorded WITHOUT the data, because the document could not be read: amount 0, a bookkeeper fills it in), `not_an_expense` (the document was a customs declaration and was recorded as one; no expense, see `note`), `failed` (nothing was recorded; `failureCode` says why, and the same file may be uploaded again).","enum":["queued","processing","completed","needs_review","not_an_expense","failed"],"type":"string"},"fileName":{"description":"The file name as uploaded.","examples":["kvittun-olis.pdf"],"type":"string"},"mimeType":{"examples":["application/pdf"],"type":"string"},"size":{"description":"Size in bytes.","examples":[48213],"type":"number"},"sha256":{"description":"SHA-256 of the file (hex). The same file again returns this document.","examples":["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"],"type":["string","null"]},"description":{"description":"The description given with the upload; it prefixes the description of the expense.","examples":["Eldsneyti á þjónustubíl"],"type":["string","null"]},"createdAt":{"description":"When it was uploaded (UTC).","examples":["2026-11-22T09:15:00.000Z"],"format":"date-time","type":"string"},"startedAt":{"description":"When reading started (UTC).","examples":["2026-11-22T09:15:04.000Z"],"format":"date-time","type":["string","null"]},"finishedAt":{"description":"When it was done, read or not (UTC).","examples":["2026-11-22T09:15:31.000Z"],"format":"date-time","type":["string","null"]},"expenseId":{"description":"The expense recorded from it (`completed`, `needs_review`); null when none, or when that expense was deleted since.","examples":["8b9c0d1e-2f3a-4b4c-9d5e-6f7a8b9c0d1e"],"format":"uuid","type":["string","null"]},"expenseNumber":{"description":"Number of that expense.","examples":["EXP-2026-00042"],"type":["string","null"]},"note":{"description":"Only for `not_an_expense`: what PayGo recorded instead (e.g. the customs declaration).","examples":[null],"type":["string","null"]},"failureCode":{"description":"Only for `failed`: `file_missing` (the stored file was gone when it was its turn) or `processing_failed`.","enum":["file_missing","processing_failed",null],"examples":[null],"type":["string","null"]}},"required":["id","externalId","source","status","fileName","mimeType","size","sha256","description","createdAt","startedAt","finishedAt","expenseId","expenseNumber","note","failureCode"],"type":"object"},"ExpenseDocumentUploadDto":{"properties":{"id":{"examples":["5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d"],"format":"uuid","type":"string"},"externalId":{"description":"Your own id of the upload, unique in the company.","examples":["RCPT-2026-0042"],"maxLength":255,"type":["string","null"]},"source":{"description":"Where the document came from: this API, the PayGo dashboard or the app.","enum":["api","dashboard","mobile"],"type":"string"},"status":{"description":"`status`: `queued` (waiting), `processing` (being read), `completed` (an expense was recorded from the data read off the document; fetch it with `GET /v1/expenses/{expenseId}`), `needs_review` (an expense was recorded WITHOUT the data, because the document could not be read: amount 0, a bookkeeper fills it in), `not_an_expense` (the document was a customs declaration and was recorded as one; no expense, see `note`), `failed` (nothing was recorded; `failureCode` says why, and the same file may be uploaded again).","enum":["queued","processing","completed","needs_review","not_an_expense","failed"],"type":"string"},"fileName":{"description":"The file name as uploaded.","examples":["kvittun-olis.pdf"],"type":"string"},"mimeType":{"examples":["application/pdf"],"type":"string"},"size":{"description":"Size in bytes.","examples":[48213],"type":"number"},"sha256":{"description":"SHA-256 of the file (hex). The same file again returns this document.","examples":["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"],"type":["string","null"]},"description":{"description":"The description given with the upload; it prefixes the description of the expense.","examples":["Eldsneyti á þjónustubíl"],"type":["string","null"]},"createdAt":{"description":"When it was uploaded (UTC).","examples":["2026-11-22T09:15:00.000Z"],"format":"date-time","type":"string"},"startedAt":{"description":"When reading started (UTC).","examples":["2026-11-22T09:15:04.000Z"],"format":"date-time","type":["string","null"]},"finishedAt":{"description":"When it was done, read or not (UTC).","examples":["2026-11-22T09:15:31.000Z"],"format":"date-time","type":["string","null"]},"expenseId":{"description":"The expense recorded from it (`completed`, `needs_review`); null when none, or when that expense was deleted since.","examples":["8b9c0d1e-2f3a-4b4c-9d5e-6f7a8b9c0d1e"],"format":"uuid","type":["string","null"]},"expenseNumber":{"description":"Number of that expense.","examples":["EXP-2026-00042"],"type":["string","null"]},"note":{"description":"Only for `not_an_expense`: what PayGo recorded instead (e.g. the customs declaration).","examples":[null],"type":["string","null"]},"failureCode":{"description":"Only for `failed`: `file_missing` (the stored file was gone when it was its turn) or `processing_failed`.","enum":["file_missing","processing_failed",null],"examples":[null],"type":["string","null"]},"duplicate":{"description":"`true` when this file (same SHA-256) was uploaded before: the existing document is returned (200), nothing new is read or recorded.","examples":[false],"type":"boolean"}},"required":["id","externalId","source","status","fileName","mimeType","size","sha256","description","createdAt","startedAt","finishedAt","expenseId","expenseNumber","note","failureCode","duplicate"],"type":"object"},"ExpenseDto":{"properties":{"id":{"description":"Id of the expense in PayGo.","examples":["2f3a4b5c-6d7e-4f8a-9b0c-1d2e3f4a5b6c"],"format":"uuid","type":"string"},"expenseNumber":{"description":"Number of the expense in PayGo, unique within the company.","examples":["EXP-2026-00133"],"type":"string"},"externalId":{"description":"Your own id for this expense, unique within the company. Find it with `?externalId=`.","examples":["AP-2026-0042"],"maxLength":255,"type":["string","null"]},"type":{"description":"`bill`, or `credit_note` for a supplier credit note (its amounts are negative).","enum":["bill","credit_note"],"examples":["bill"],"type":"string"},"status":{"description":"`pending`: recorded but NOT posted: no journal entry, no VAT and no payable yet; a bookkeeper reviews and approves it in PayGo. `posted`: approved and posted to the general ledger. Only a posted expense can be paid in PayGo.","enum":["pending","posted"],"examples":["posted"],"type":"string"},"paymentStatus":{"description":"Computed from the payments that are not reversed, as PayGo shows it. A bill: `paid` when at most 1 kr is left (on a foreign-currency bill: at most 0.01 of its currency), otherwise `partially_paid` when more than 1 kr (0.01) is paid, otherwise `unpaid`. A credit note: `credit_open` while some of the credit is not yet applied or refunded, `paid` once it is.","enum":["unpaid","partially_paid","paid","credit_open"],"examples":["unpaid"],"type":"string"},"supplier":{"anyOf":[{"$ref":"#/components/schemas/SupplierRefDto"},{"type":"null"}],"description":"The supplier, with its current name and kennitala. Null when none is set."},"invoiceNumber":{"description":"The supplier's invoice number.","examples":["2026-118"],"maxLength":100,"type":["string","null"]},"reference":{"description":"The buyer's reference on the invoice (e.g. a purchase order number).","examples":["PO-4471"],"maxLength":255,"type":["string","null"]},"description":{"description":"Description of the expense.","examples":["Skrifstofuvörur, nóvember"],"type":["string","null"]},"invoiceDate":{"description":"Invoice date (YYYY-MM-DD): the date of the supplier's invoice, and the date the expense is posted on.","examples":["2026-11-01"],"format":"date","type":"string"},"dueDate":{"description":"Due date (gjalddagi, YYYY-MM-DD): the day the payment falls due. On older expenses that never recorded one it is `invoiceDate`.","examples":["2026-11-15"],"format":"date","type":"string"},"finalDueDate":{"description":"Final due date (eindagi, YYYY-MM-DD): the last day to pay without late interest. PayGo decides overdue, payment matching and payables aging by this date. On older expenses that never recorded one it is `dueDate`.","examples":["2026-12-01"],"format":"date","type":"string"},"currency":{"description":"Currency of the supplier's invoice (ISO 4217). `amountPaid` and `balance` are in it; `totals` and lines are in ISK.","examples":["ISK"],"pattern":"^[A-Z]{3}$","type":"string"},"originalTotal":{"description":"On a foreign-currency expense: the total of the supplier's invoice in `currency`. Null on an ISK expense.","examples":[null],"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"exchangeRate":{"description":"On a foreign-currency expense: ISK per one unit of `currency`, four decimals. Null on an ISK expense.","examples":[null],"pattern":"^\\d+\\.\\d{4}$","type":["string","null"]},"exchangeRateDate":{"description":"Date of `exchangeRate` (YYYY-MM-DD). Null on an ISK expense.","examples":[null],"format":"date","type":["string","null"]},"expenseCategory":{"anyOf":[{"$ref":"#/components/schemas/ExpenseCategoryRefDto"},{"type":"null"}],"description":"The expense category, or null."},"paidWith":{"description":"How the person who recorded the expense says it was paid: `invoice` (to be paid to the supplier), `personal` (paid out of pocket by an employee, to be reimbursed), `card` (a company card) or `bank_transfer`. A hint for the bookkeeper, not a payment. Null when not given.","enum":["invoice","personal","card","bank_transfer",null],"examples":["invoice"],"type":["string","null"]},"lines":{"description":"Booking lines of the expense, in `position` order.","items":{"$ref":"#/components/schemas/ExpenseLineDto"},"type":"array"},"totals":{"allOf":[{"$ref":"#/components/schemas/ExpenseTotalsDto"}],"description":"Totals of the expense in ISK, with VAT per rate."},"amountPaid":{"description":"Paid so far by payments that are not reversed, in `currency`.","examples":["0.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"balance":{"description":"What is still owed, in `currency`: the total less `amountPaid`. Negative on a credit note while credit is open.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"creditedExpenseId":{"description":"On a credit note: the expense it credits, when known. Null otherwise.","examples":[null],"format":"uuid","type":["string","null"]},"hasReceipt":{"description":"True when a receipt or invoice file (the main document) is attached to the expense.","examples":[true],"type":"boolean"},"attachmentCount":{"description":"Number of supplementary documents attached to the expense, besides the receipt.","examples":[0],"type":"number"},"createdAt":{"description":"When the expense was recorded (ISO 8601, UTC).","examples":["2026-11-01T10:12:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the expense was last changed (ISO 8601, UTC): an edit that changes the expense's own fields, its approval (posting), the reversal of its posting, and recording or reversing a payment of it, so `updatedSince` also catches a change of `paymentStatus`, `amountPaid` or `balance`.","examples":["2026-11-03T08:00:00.000Z"],"format":"date-time","type":"string"}},"required":["id","expenseNumber","externalId","type","status","paymentStatus","supplier","invoiceNumber","reference","description","invoiceDate","dueDate","finalDueDate","currency","originalTotal","exchangeRate","exchangeRateDate","expenseCategory","paidWith","lines","totals","amountPaid","balance","creditedExpenseId","hasReceipt","attachmentCount","createdAt","updatedAt"],"type":"object"},"ExpenseLineDto":{"properties":{"id":{"description":"Id of the line.","examples":["8b9c0d1e-2f3a-4b4c-9d5e-6f7a8b9c0d1e"],"format":"uuid","type":"string"},"position":{"description":"Position of the line on the expense, from 1.","examples":[1],"type":"number"},"account":{"anyOf":[{"$ref":"#/components/schemas/ExpenseAccountRefDto"},{"type":"null"}],"description":"The account the line is booked to."},"description":{"description":"Text of the line.","examples":["Prentarapappír"],"type":["string","null"]},"netAmount":{"description":"Amount of the line without VAT, in ISK.","examples":["10000.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"vatRate":{"description":"VAT rate of the line in percent (0 when the line carries no VAT).","examples":[24],"type":"number"},"vatAmount":{"description":"VAT of the line, in ISK.","examples":["2400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"useInputVat":{"description":"True when the VAT is input VAT the company deducts (booked to the input VAT account); false when the VAT is part of the expense (booked with the net amount to the line's account).","examples":[true],"type":"boolean"}},"required":["id","position","account","description","netAmount","vatRate","vatAmount","useInputVat"],"type":"object"},"ExpenseLineInputDto":{"additionalProperties":false,"properties":{"account":{"allOf":[{"$ref":"#/components/schemas/ExpenseAccountRefInputDto"}],"description":"The cost account, by exactly one of `id` or `accountNumber` (none or both → 422 `exactly_one_required`). Only an active expense account of the company (`isExpenseAccount: true` on `/v1/accounts`): no such account → 422 `account_not_found`; an inactive account or one of another kind (assets, liabilities, revenue) → 422 `account_not_allowed`; a VAT account → 422 `vat_account_not_allowed` (input VAT is posted by PayGo from `vatRate`)."},"description":{"description":"Text of the line.","examples":["Prentarapappír"],"maxLength":500,"type":["string","null"]},"netAmount":{"description":"Amount of the line WITHOUT VAT, in ISK, as a decimal string above zero (at most 9999999999.99). On a credit note it is sent positive too.","examples":["10000.00"],"pattern":"^\\d{1,10}(\\.\\d{1,2})?$","type":"string"},"vatRate":{"description":"VAT rate in percent: 24, 11 or 0. Any other rate → 422 `invalid_vat_rate`.","enum":[24,11,0],"examples":[24],"type":"number"},"vatAmount":{"description":"VAT of the line as printed on the supplier's invoice. Default: computed by PayGo, `netAmount × vatRate / 100` rounded to two decimals. When sent it is used as printed, but only within 2 kr. of the computed VAT (more → 422 `vat_amount_mismatch`); at 0 % it must be 0.","examples":["2400.00"],"pattern":"^\\d{1,10}(\\.\\d{1,2})?$","type":"string"},"useInputVat":{"default":true,"description":"`true`: the VAT is input VAT, posted to the company's input-VAT account of the rate (none for the rate → 422 `input_vat_account_missing`). `false`: the VAT is not deductible and is posted to the cost account with the net amount.","type":"boolean"}},"required":["account","netAmount","vatRate"],"type":"object"},"ExpensePaymentDto":{"properties":{"id":{"description":"Id of the payment.","examples":["9c0d1e2f-3a4b-4c5d-8e6f-7a8b9c0d1e2f"],"format":"uuid","type":"string"},"paymentNumber":{"description":"Payment number.","examples":["EXPPMT-2026-00042"],"type":"string"},"paymentDate":{"description":"Payment date (YYYY-MM-DD).","examples":["2026-11-20"],"format":"date","type":"string"},"amount":{"description":"Amount paid, in ISK. Negative for a refund of a supplier credit note.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"originalAmount":{"description":"On a foreign-currency expense: the amount paid in the expense `currency`. Null on an ISK expense.","examples":[null],"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"reference":{"description":"Reference of the payment (e.g. bank reference).","examples":["MILLIF-88213"],"type":["string","null"]},"voided":{"description":"True when the payment was reversed; it no longer counts towards `amountPaid`.","examples":[false],"type":"boolean"}},"required":["id","paymentNumber","paymentDate","amount","originalAmount","reference","voided"],"type":"object"},"ExpenseTotalsDto":{"properties":{"currency":{"description":"Currency of the totals and of every line amount: always ISK, the amounts as booked.","examples":["ISK"],"pattern":"^[A-Z]{3}$","type":"string"},"net":{"description":"Sum of the net amounts (without VAT) of the lines.","examples":["10000.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"vat":{"description":"Net and VAT per VAT rate, one entry per rate, highest rate first. The entries add up to `net` and `vatTotal`.","items":{"$ref":"#/components/schemas/VatBreakdownDto"},"type":"array"},"vatTotal":{"description":"Total VAT of the lines.","examples":["2400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rounding":{"description":"`total − (net + vatTotal)`: the rounding of the total to a whole ISK amount. A `pending` expense may not add up yet (e.g. one read from a receipt and not yet reviewed); it cannot be posted until it does.","examples":["0.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"total":{"description":"Total of the expense including VAT, in ISK.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["currency","net","vat","vatTotal","rounding","total"],"type":"object"},"InvoiceDeliveryInputDto":{"additionalProperties":false,"properties":{"email":{"default":"auto","description":"`auto`: e-mailed with its PDF when the company sends invoices automatically or the customer is set to receive invoices by e-mail, exactly as from the PayGo dashboard. `none`: no e-mail.","enum":["auto","none"],"type":"string"},"electronicInvoice":{"default":"auto","description":"`auto`: sent as an electronic invoice (XML) when the customer is set to receive them. `none`: not sent.","enum":["auto","none"],"type":"string"}},"type":"object"},"InvoiceDetailDto":{"properties":{"id":{"description":"Id of the invoice in PayGo.","examples":["6a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"},"type":{"description":"`invoice`, or `credit_note` for a credit note (its amounts are negative).","enum":["invoice","credit_note"],"examples":["invoice"],"type":"string"},"invoiceNumber":{"description":"Invoice number, unique within the company. Credit notes have their own number series.","examples":["1042"],"type":"string"},"externalId":{"description":"Your own id for this invoice, unique within the company. Find it with `?externalId=`.","examples":["SHOP-ORDER-77812"],"maxLength":255,"type":["string","null"]},"status":{"description":"`posted`: issued and posted to the ledger (credit notes too). `credited`: fully credited by credit notes; a partly credited invoice stays `posted` with `creditedAmount` above 0. `cancelled`: old cancelled invoices only.","enum":["posted","credited","cancelled"],"examples":["posted"],"type":"string"},"paymentStatus":{"description":"Computed from the amounts: `paid` when `balance` is 0 (on a foreign-currency invoice within 0.01), otherwise `partially_paid` when `amountSettled` is not 0, otherwise `unpaid`.","enum":["unpaid","partially_paid","paid"],"examples":["unpaid"],"type":"string"},"isOverdue":{"description":"True when the invoice is not paid, its balance is above 0 and `finalDueDate` is before today (UTC). Never true on a credit note.","examples":[false],"type":"boolean"},"customer":{"allOf":[{"$ref":"#/components/schemas/CustomerRefDto"}],"description":"The customer, with its current name and kennitala."},"buyerKennitala":{"description":"Kennitala of the buyer as printed on the invoice when it was issued.","examples":["5501012340"],"type":["string","null"]},"buyerVatNumber":{"description":"VAT number of the buyer as printed on the invoice when it was issued.","examples":["123456"],"type":["string","null"]},"invoiceDate":{"description":"Invoice date (YYYY-MM-DD): the date of the invoice and of its posting.","examples":["2026-11-01"],"format":"date","type":"string"},"dueDate":{"description":"Due date (gjalddagi, YYYY-MM-DD). In PayGo the due date is always the invoice date, so this equals `invoiceDate`. The last day to pay without late interest is `finalDueDate`.","examples":["2026-11-01"],"format":"date","type":"string"},"finalDueDate":{"description":"Final due date (eindagi, YYYY-MM-DD): the last day to pay without late interest, also the final due date of the bank claim. Overdue is decided by this date.","examples":["2026-12-01"],"format":"date","type":"string"},"paidDate":{"description":"Date the invoice was paid in full (YYYY-MM-DD); null until then.","examples":[null],"format":"date","type":["string","null"]},"currency":{"description":"Currency of the invoice and of every amount on it (ISO 4217).","examples":["ISK"],"pattern":"^[A-Z]{3}$","type":"string"},"vatExempt":{"description":"True when the invoice is issued without VAT (all lines at 0 %).","examples":[false],"type":"boolean"},"reference":{"description":"The buyer's reference (e.g. purchase order number), printed on the invoice.","examples":["PO-2211"],"type":["string","null"]},"notes":{"description":"Note on the invoice.","examples":[null],"type":["string","null"]},"terms":{"description":"Payment terms text of the invoice.","examples":[null],"type":["string","null"]},"totals":{"allOf":[{"$ref":"#/components/schemas/TotalsDto"}],"description":"Totals of the invoice, with VAT per rate."},"amountSettled":{"description":"Amount paid or settled by a credit note (a credit note first settles the open balance of its invoice). In the invoice currency.","examples":["0.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"balance":{"description":"What is still owed: `totals.total − amountSettled`. In the invoice currency.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"creditedAmount":{"description":"Amount credited by credit notes so far, in the invoice currency. 0.00 on a credit note.","examples":["0.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"creditedInvoiceId":{"description":"On a credit note: the invoice it credits. Null on an invoice.","examples":[null],"format":"uuid","type":["string","null"]},"creditNotes":{"description":"Credit notes issued for this invoice, oldest first. Empty on a credit note.","items":{"$ref":"#/components/schemas/CreditNoteRefDto"},"type":"array"},"orderId":{"description":"The sales order the invoice was made from, or null.","examples":[null],"format":"uuid","type":["string","null"]},"isHistorical":{"description":"True for an invoice imported from an earlier system (not posted by PayGo).","examples":[false],"type":"boolean"},"electronicInvoiceSentAt":{"description":"When the invoice was last sent as an electronic invoice (ISO 8601, UTC); null if never.","examples":[null],"format":"date-time","type":["string","null"]},"createdAt":{"description":"When the invoice was created (ISO 8601, UTC).","examples":["2026-11-01T10:12:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the invoice was last changed (ISO 8601, UTC), including by a payment or a credit note. Use it with `updatedSince` for incremental sync.","examples":["2026-11-03T08:00:00.000Z"],"format":"date-time","type":"string"},"lines":{"description":"Lines of the invoice, in `position` order.","items":{"$ref":"#/components/schemas/InvoiceLineDto"},"type":"array"}},"required":["id","type","invoiceNumber","externalId","status","paymentStatus","isOverdue","customer","buyerKennitala","buyerVatNumber","invoiceDate","dueDate","finalDueDate","paidDate","currency","vatExempt","reference","notes","terms","totals","amountSettled","balance","creditedAmount","creditedInvoiceId","creditNotes","orderId","isHistorical","electronicInvoiceSentAt","createdAt","updatedAt","lines"],"type":"object"},"InvoiceDto":{"properties":{"id":{"description":"Id of the invoice in PayGo.","examples":["6a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"},"type":{"description":"`invoice`, or `credit_note` for a credit note (its amounts are negative).","enum":["invoice","credit_note"],"examples":["invoice"],"type":"string"},"invoiceNumber":{"description":"Invoice number, unique within the company. Credit notes have their own number series.","examples":["1042"],"type":"string"},"externalId":{"description":"Your own id for this invoice, unique within the company. Find it with `?externalId=`.","examples":["SHOP-ORDER-77812"],"maxLength":255,"type":["string","null"]},"status":{"description":"`posted`: issued and posted to the ledger (credit notes too). `credited`: fully credited by credit notes; a partly credited invoice stays `posted` with `creditedAmount` above 0. `cancelled`: old cancelled invoices only.","enum":["posted","credited","cancelled"],"examples":["posted"],"type":"string"},"paymentStatus":{"description":"Computed from the amounts: `paid` when `balance` is 0 (on a foreign-currency invoice within 0.01), otherwise `partially_paid` when `amountSettled` is not 0, otherwise `unpaid`.","enum":["unpaid","partially_paid","paid"],"examples":["unpaid"],"type":"string"},"isOverdue":{"description":"True when the invoice is not paid, its balance is above 0 and `finalDueDate` is before today (UTC). Never true on a credit note.","examples":[false],"type":"boolean"},"customer":{"allOf":[{"$ref":"#/components/schemas/CustomerRefDto"}],"description":"The customer, with its current name and kennitala."},"buyerKennitala":{"description":"Kennitala of the buyer as printed on the invoice when it was issued.","examples":["5501012340"],"type":["string","null"]},"buyerVatNumber":{"description":"VAT number of the buyer as printed on the invoice when it was issued.","examples":["123456"],"type":["string","null"]},"invoiceDate":{"description":"Invoice date (YYYY-MM-DD): the date of the invoice and of its posting.","examples":["2026-11-01"],"format":"date","type":"string"},"dueDate":{"description":"Due date (gjalddagi, YYYY-MM-DD). In PayGo the due date is always the invoice date, so this equals `invoiceDate`. The last day to pay without late interest is `finalDueDate`.","examples":["2026-11-01"],"format":"date","type":"string"},"finalDueDate":{"description":"Final due date (eindagi, YYYY-MM-DD): the last day to pay without late interest, also the final due date of the bank claim. Overdue is decided by this date.","examples":["2026-12-01"],"format":"date","type":"string"},"paidDate":{"description":"Date the invoice was paid in full (YYYY-MM-DD); null until then.","examples":[null],"format":"date","type":["string","null"]},"currency":{"description":"Currency of the invoice and of every amount on it (ISO 4217).","examples":["ISK"],"pattern":"^[A-Z]{3}$","type":"string"},"vatExempt":{"description":"True when the invoice is issued without VAT (all lines at 0 %).","examples":[false],"type":"boolean"},"reference":{"description":"The buyer's reference (e.g. purchase order number), printed on the invoice.","examples":["PO-2211"],"type":["string","null"]},"notes":{"description":"Note on the invoice.","examples":[null],"type":["string","null"]},"terms":{"description":"Payment terms text of the invoice.","examples":[null],"type":["string","null"]},"totals":{"allOf":[{"$ref":"#/components/schemas/TotalsDto"}],"description":"Totals of the invoice, with VAT per rate."},"amountSettled":{"description":"Amount paid or settled by a credit note (a credit note first settles the open balance of its invoice). In the invoice currency.","examples":["0.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"balance":{"description":"What is still owed: `totals.total − amountSettled`. In the invoice currency.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"creditedAmount":{"description":"Amount credited by credit notes so far, in the invoice currency. 0.00 on a credit note.","examples":["0.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"creditedInvoiceId":{"description":"On a credit note: the invoice it credits. Null on an invoice.","examples":[null],"format":"uuid","type":["string","null"]},"creditNotes":{"description":"Credit notes issued for this invoice, oldest first. Empty on a credit note.","items":{"$ref":"#/components/schemas/CreditNoteRefDto"},"type":"array"},"orderId":{"description":"The sales order the invoice was made from, or null.","examples":[null],"format":"uuid","type":["string","null"]},"isHistorical":{"description":"True for an invoice imported from an earlier system (not posted by PayGo).","examples":[false],"type":"boolean"},"electronicInvoiceSentAt":{"description":"When the invoice was last sent as an electronic invoice (ISO 8601, UTC); null if never.","examples":[null],"format":"date-time","type":["string","null"]},"createdAt":{"description":"When the invoice was created (ISO 8601, UTC).","examples":["2026-11-01T10:12:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the invoice was last changed (ISO 8601, UTC), including by a payment or a credit note. Use it with `updatedSince` for incremental sync.","examples":["2026-11-03T08:00:00.000Z"],"format":"date-time","type":"string"}},"required":["id","type","invoiceNumber","externalId","status","paymentStatus","isOverdue","customer","buyerKennitala","buyerVatNumber","invoiceDate","dueDate","finalDueDate","paidDate","currency","vatExempt","reference","notes","terms","totals","amountSettled","balance","creditedAmount","creditedInvoiceId","creditNotes","orderId","isHistorical","electronicInvoiceSentAt","createdAt","updatedAt"],"type":"object"},"InvoiceEmailDto":{"properties":{"id":{"description":"Id of the email; its status is read by this id.","examples":["2f6c8e1a-3b4d-4c5e-9f7a-8b9c0d1e2f3a"],"format":"uuid","type":"string"},"status":{"description":"`queued`: waiting for the mail server (the usual answer of `send`). `sent`: accepted by the mail server, which is not proof that it reached the inbox. `retrying`: an attempt failed and the email will be tried again. `failed`: every attempt failed. `suppressed`: PayGo did not send it (for example a blocked address). `unknown`: the delivery status was not recorded (emails sent before PayGo recorded delivery, or an email that has waited in the queue for over an hour). New values may be added.","enum":["queued","sent","failed","retrying","suppressed","unknown"],"examples":["queued"],"type":"string"},"to":{"description":"The recipients.","examples":[["bokhald@example.is"]],"items":{"type":"string"},"type":"array"},"createdAt":{"description":"When the email was queued (ISO 8601, UTC).","examples":["2026-11-22T10:15:00.000Z"],"format":"date-time","type":"string"},"sentAt":{"description":"When the mail server accepted the email (`status: sent`); `null` otherwise.","examples":[null],"format":"date-time","type":["string","null"]},"invoiceId":{"description":"Id of the invoice or credit note that was emailed.","examples":["6a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"}},"required":["id","status","to","createdAt","sentAt","invoiceId"],"type":"object"},"InvoiceLineDto":{"properties":{"id":{"description":"Id of the line.","examples":["4c8f1e2a-7b3d-4f6e-9a1c-2d3e4f5a6b7c"],"format":"uuid","type":"string"},"position":{"description":"Position of the line on the document; lines are listed in this order.","examples":[0],"type":"integer"},"productId":{"description":"The product of the line; null on a free-text line.","examples":["7d2e9f1a-3b4c-4d5e-8f6a-1b2c3d4e5f6a"],"format":"uuid","type":["string","null"]},"sku":{"description":"Product number (SKU) of the product; null on a free-text line.","examples":["VARA-100"],"type":["string","null"]},"unit":{"description":"Unit of the product (e.g. `stk`, `kg`); null on a free-text line or a product without one.","examples":["stk"],"type":["string","null"]},"description":{"description":"Description of the line, as printed.","examples":["Ráðgjöf"],"type":"string"},"subDescription":{"description":"Second line printed under the description.","examples":["Nóvember 2026"],"type":["string","null"]},"quantity":{"description":"Quantity, at most two decimals.","examples":[2],"type":"number"},"unitPrice":{"description":"Price per unit WITHOUT VAT, before the discount.","examples":["5000.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"discountPercent":{"description":"Discount in percent of the unit price.","examples":[0],"maximum":100,"minimum":0,"type":"number"},"vatRate":{"description":"VAT rate in percent.","examples":[24],"type":"number"},"netAmount":{"description":"Line amount without VAT, after the discount (`totalAmount − vatAmount`).","examples":["10000.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"vatAmount":{"description":"VAT of the line.","examples":["2400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"totalAmount":{"description":"Line amount including VAT.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"returnedQuantity":{"description":"Quantity of this line already returned or credited by credit notes.","examples":[0],"type":"number"},"creditedLineId":{"description":"On a credit note: the line of the credited invoice this line credits. Null otherwise.","examples":[null],"format":"uuid","type":["string","null"]}},"required":["id","position","productId","sku","unit","description","subDescription","quantity","unitPrice","discountPercent","vatRate","netAmount","vatAmount","totalAmount","returnedQuantity","creditedLineId"],"type":"object"},"InvoiceOrderRequestDto":{"additionalProperties":false,"properties":{"lines":{"description":"Invoice only these lines and quantities (partial invoicing); each line at most once. Left out: everything not yet invoiced on the lines of the order.","items":{"$ref":"#/components/schemas/OrderInvoiceLineInputDto"},"maxItems":500,"minItems":1,"type":"array"},"invoiceDate":{"description":"Invoice date, also the posting date; must be in an open fiscal period. Defaults to today.","examples":["2026-11-22"],"format":"date","type":"string"},"dueDate":{"description":"Due date (gjalddagi). In PayGo it is always the invoice date: leave it out, or send the same date as `invoiceDate` (any other date → 422 `due_date_must_equal_invoice_date`).","examples":["2026-11-22"],"format":"date","type":"string"},"finalDueDate":{"description":"Final due date (eindagi). Defaults to the invoice date plus the customer's payment terms in days; before the invoice date → 422 `final_due_date_before_invoice_date`.","examples":["2026-12-06"],"format":"date","type":"string"},"externalId":{"description":"Your own id of the invoice, unique within the company. A duplicate → 409 `conflict` naming the existing invoice.","examples":["SHOP-100045-INV"],"maxLength":255,"type":"string"},"delivery":{"allOf":[{"$ref":"#/components/schemas/InvoiceDeliveryInputDto"}],"description":"Delivery to the customer; both default to `auto`."},"createBankClaim":{"default":false,"description":"Create a claim in the customer's online bank for the invoice, with the company's active online-bank payment method; none → 422 `bank_claim_not_available`. Made after the invoice is booked: a claim that cannot be made (for example the order already has a claim, or deposits cover the invoice) is logged and the invoice stands.","type":"boolean"}},"type":"object"},"InvoicePaymentCreatedDto":{"properties":{"id":{"description":"Id of the payment.","examples":["2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e"],"format":"uuid","type":"string"},"paymentNumber":{"description":"Payment number.","examples":["GR-2041"],"type":"string"},"paymentDate":{"description":"Payment date (YYYY-MM-DD).","examples":["2026-11-15"],"format":"date","type":"string"},"amount":{"description":"Part of the payment allocated to this invoice, in `currency`.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"paymentTotal":{"description":"The whole payment, which may cover several invoices, in `currency`.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"currency":{"description":"Currency of `amount` and `paymentTotal`: the invoice currency (ISK on an ISK invoice).","examples":["ISK"],"pattern":"^[A-Z]{3}$","type":"string"},"paymentMethod":{"anyOf":[{"$ref":"#/components/schemas/PaymentMethodRefDto"},{"type":"null"}],"description":"How it was paid."},"reference":{"description":"Reference of the payment.","examples":["1042"],"type":["string","null"]},"status":{"description":"`pending`, `cleared`, `reconciled` (matched to a bank transaction) or `void` (reversed; it no longer counts).","enum":["pending","cleared","reconciled","void"],"examples":["cleared"],"type":"string"},"createdAt":{"description":"When the payment was recorded (ISO 8601, UTC).","examples":["2026-11-15T09:30:00.000Z"],"format":"date-time","type":"string"},"warnings":{"description":"Empty when nothing was left undone.","items":{"$ref":"#/components/schemas/InvoicePaymentWarningDto"},"type":"array"}},"required":["id","paymentNumber","paymentDate","amount","paymentTotal","currency","paymentMethod","reference","status","createdAt","warnings"],"type":"object"},"InvoicePaymentDto":{"properties":{"id":{"description":"Id of the payment.","examples":["2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e"],"format":"uuid","type":"string"},"paymentNumber":{"description":"Payment number.","examples":["GR-2041"],"type":"string"},"paymentDate":{"description":"Payment date (YYYY-MM-DD).","examples":["2026-11-15"],"format":"date","type":"string"},"amount":{"description":"Part of the payment allocated to this invoice, in `currency`.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"paymentTotal":{"description":"The whole payment, which may cover several invoices, in `currency`.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"currency":{"description":"Currency of `amount` and `paymentTotal`: the invoice currency (ISK on an ISK invoice).","examples":["ISK"],"pattern":"^[A-Z]{3}$","type":"string"},"paymentMethod":{"anyOf":[{"$ref":"#/components/schemas/PaymentMethodRefDto"},{"type":"null"}],"description":"How it was paid."},"reference":{"description":"Reference of the payment.","examples":["1042"],"type":["string","null"]},"status":{"description":"`pending`, `cleared`, `reconciled` (matched to a bank transaction) or `void` (reversed; it no longer counts).","enum":["pending","cleared","reconciled","void"],"examples":["cleared"],"type":"string"},"createdAt":{"description":"When the payment was recorded (ISO 8601, UTC).","examples":["2026-11-15T09:30:00.000Z"],"format":"date-time","type":"string"}},"required":["id","paymentNumber","paymentDate","amount","paymentTotal","currency","paymentMethod","reference","status","createdAt"],"type":"object"},"InvoicePaymentListDto":{"properties":{"data":{"description":"Payments allocated to the invoice, oldest first.","items":{"$ref":"#/components/schemas/InvoicePaymentDto"},"type":"array"}},"required":["data"],"type":"object"},"InvoicePaymentWarningDto":{"properties":{"code":{"description":"`bank_claim_update_failed`: the invoice has a claim in the online bank that could not be lowered or cancelled after the payment. The company must correct it in the bank so the customer does not pay twice.","enum":["bank_claim_update_failed"],"examples":["bank_claim_update_failed"],"type":"string"},"message":{"description":"The warning in words, in the language of the request.","examples":["The payment is recorded, but the claim of the invoice in the online bank could not be updated."],"type":"string"}},"required":["code","message"],"type":"object"},"IskEquivalentDto":{"properties":{"net":{"description":"Net total in ISK.","examples":["1435000.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"vatTotal":{"description":"VAT total in ISK.","examples":["344400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"total":{"description":"Total in ISK, as posted to the ledger.","examples":["1779400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"exchangeRate":{"description":"ISK per one unit of the document currency, four decimals (the rate of the document date).","examples":["143.5000"],"pattern":"^\\d+\\.\\d{4}$","type":["string","null"]},"exchangeRateDate":{"description":"Date of the exchange rate (YYYY-MM-DD).","examples":["2026-11-21"],"format":"date","type":["string","null"]}},"required":["net","vatTotal","total","exchangeRate","exchangeRateDate"],"type":"object"},"MoneyAmountDto":{"properties":{"amount":{"description":"Amount as a decimal string with exactly two decimals. Negative amounts start with a minus sign.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"currency":{"description":"ISO 4217 currency code of the amount.","examples":["ISK"],"type":"string"}},"required":["amount","currency"],"type":"object"},"OrderDetailDto":{"properties":{"id":{"description":"Id of the order in PayGo.","examples":["3e4f5a6b-7c8d-4e9f-8a0b-1c2d3e4f5a6b"],"format":"uuid","type":"string"},"orderNumber":{"description":"Order number, unique within the company.","examples":["P-2026-0042"],"type":"string"},"externalId":{"description":"Your own id for this order, unique within the company. Find it with `?externalId=`.","examples":["SHOP-ORDER-77812"],"maxLength":255,"type":["string","null"]},"source":{"description":"Where the order came from: `woocommerce` or `shopify` (synced from that shop), `storefront` (the PayGo web shop), `portal` (the customer portal), `api` (this API), `quote` (converted from a quote), `work_order` (from a work order), `manual` (entered in PayGo).","enum":["woocommerce","shopify","storefront","portal","api","quote","work_order","manual"],"examples":["manual"],"type":"string"},"status":{"description":"Status of the order. New values may be added; treat an unknown value like `processing`. `invoiced` does not mean delivered: invoicing an order does not move stock, which happens when goods are delivered (`deliveryStatus`).","enum":["pending","confirmed","awaiting_payment","awaiting_stock","processing","in_assembly","shipped","awaiting_pickup","delivered","partially_delivered","invoiced","partially_invoiced","cancelled"],"examples":["confirmed"],"type":"string"},"deliveryStatus":{"description":"How much of the order has been delivered.","enum":["none","partial","full"],"examples":["none"],"type":"string"},"invoicingStatus":{"description":"How much of the order has been invoiced.","enum":["none","partial","full"],"examples":["none"],"type":"string"},"customer":{"allOf":[{"$ref":"#/components/schemas/CustomerRefDto"}],"description":"The customer, with its current name and kennitala."},"orderDate":{"description":"Order date (YYYY-MM-DD).","examples":["2026-11-22"],"format":"date","type":"string"},"deliveryDate":{"description":"Requested delivery date (YYYY-MM-DD).","examples":["2026-11-25"],"format":"date","type":"string"},"shippingAddress":{"description":"Shipping address, as free text.","examples":["Laugavegur 1, 101 Reykjavík"],"type":["string","null"]},"reference":{"description":"The customer's reference (e.g. purchase order number), printed on the order.","examples":["PO-5521"],"type":["string","null"]},"notes":{"description":"Notes on the order.","examples":[null],"type":["string","null"]},"currency":{"description":"Currency of the order and of every amount on it. Orders are always in ISK.","enum":["ISK"],"examples":["ISK"],"type":"string"},"totals":{"allOf":[{"$ref":"#/components/schemas/OrderTotalsDto"}],"description":"Totals of the order, with VAT per rate. Supplementary orders are not included."},"quoteId":{"description":"The quote the order was converted from.","examples":[null],"format":"uuid","type":["string","null"]},"parentOrderId":{"description":"On a supplementary order: the order it adds to. A supplementary order is an order of its own, listed separately.","examples":[null],"format":"uuid","type":["string","null"]},"invoices":{"description":"Invoices made from the order, oldest first.","items":{"$ref":"#/components/schemas/OrderInvoiceRefDto"},"type":"array"},"createdAt":{"description":"When the order was created (UTC).","examples":["2026-11-22T10:15:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the order was last changed (UTC): its header, its status or a delivery. An invoice that changes neither `status` nor `invoicingStatus` does not change it yet.","examples":["2026-11-22T10:15:00.000Z"],"format":"date-time","type":"string"},"lines":{"description":"Lines of the order, in order of `position`. Fully cancelled lines are included with `quantity` 0.","items":{"$ref":"#/components/schemas/OrderLineDto"},"type":"array"}},"required":["id","orderNumber","externalId","source","status","deliveryStatus","invoicingStatus","customer","orderDate","deliveryDate","shippingAddress","reference","notes","currency","totals","quoteId","parentOrderId","invoices","createdAt","updatedAt","lines"],"type":"object"},"OrderDto":{"properties":{"id":{"description":"Id of the order in PayGo.","examples":["3e4f5a6b-7c8d-4e9f-8a0b-1c2d3e4f5a6b"],"format":"uuid","type":"string"},"orderNumber":{"description":"Order number, unique within the company.","examples":["P-2026-0042"],"type":"string"},"externalId":{"description":"Your own id for this order, unique within the company. Find it with `?externalId=`.","examples":["SHOP-ORDER-77812"],"maxLength":255,"type":["string","null"]},"source":{"description":"Where the order came from: `woocommerce` or `shopify` (synced from that shop), `storefront` (the PayGo web shop), `portal` (the customer portal), `api` (this API), `quote` (converted from a quote), `work_order` (from a work order), `manual` (entered in PayGo).","enum":["woocommerce","shopify","storefront","portal","api","quote","work_order","manual"],"examples":["manual"],"type":"string"},"status":{"description":"Status of the order. New values may be added; treat an unknown value like `processing`. `invoiced` does not mean delivered: invoicing an order does not move stock, which happens when goods are delivered (`deliveryStatus`).","enum":["pending","confirmed","awaiting_payment","awaiting_stock","processing","in_assembly","shipped","awaiting_pickup","delivered","partially_delivered","invoiced","partially_invoiced","cancelled"],"examples":["confirmed"],"type":"string"},"deliveryStatus":{"description":"How much of the order has been delivered.","enum":["none","partial","full"],"examples":["none"],"type":"string"},"invoicingStatus":{"description":"How much of the order has been invoiced.","enum":["none","partial","full"],"examples":["none"],"type":"string"},"customer":{"allOf":[{"$ref":"#/components/schemas/CustomerRefDto"}],"description":"The customer, with its current name and kennitala."},"orderDate":{"description":"Order date (YYYY-MM-DD).","examples":["2026-11-22"],"format":"date","type":"string"},"deliveryDate":{"description":"Requested delivery date (YYYY-MM-DD).","examples":["2026-11-25"],"format":"date","type":"string"},"shippingAddress":{"description":"Shipping address, as free text.","examples":["Laugavegur 1, 101 Reykjavík"],"type":["string","null"]},"reference":{"description":"The customer's reference (e.g. purchase order number), printed on the order.","examples":["PO-5521"],"type":["string","null"]},"notes":{"description":"Notes on the order.","examples":[null],"type":["string","null"]},"currency":{"description":"Currency of the order and of every amount on it. Orders are always in ISK.","enum":["ISK"],"examples":["ISK"],"type":"string"},"totals":{"allOf":[{"$ref":"#/components/schemas/OrderTotalsDto"}],"description":"Totals of the order, with VAT per rate. Supplementary orders are not included."},"quoteId":{"description":"The quote the order was converted from.","examples":[null],"format":"uuid","type":["string","null"]},"parentOrderId":{"description":"On a supplementary order: the order it adds to. A supplementary order is an order of its own, listed separately.","examples":[null],"format":"uuid","type":["string","null"]},"invoices":{"description":"Invoices made from the order, oldest first.","items":{"$ref":"#/components/schemas/OrderInvoiceRefDto"},"type":"array"},"createdAt":{"description":"When the order was created (UTC).","examples":["2026-11-22T10:15:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the order was last changed (UTC): its header, its status or a delivery. An invoice that changes neither `status` nor `invoicingStatus` does not change it yet.","examples":["2026-11-22T10:15:00.000Z"],"format":"date-time","type":"string"}},"required":["id","orderNumber","externalId","source","status","deliveryStatus","invoicingStatus","customer","orderDate","deliveryDate","shippingAddress","reference","notes","currency","totals","quoteId","parentOrderId","invoices","createdAt","updatedAt"],"type":"object"},"OrderEmailDto":{"properties":{"id":{"description":"Id of the email; its status is read by this id.","examples":["2f6c8e1a-3b4d-4c5e-9f7a-8b9c0d1e2f3a"],"format":"uuid","type":"string"},"status":{"description":"`queued`: waiting for the mail server (the usual answer of `send`). `sent`: accepted by the mail server, which is not proof that it reached the inbox. `retrying`: an attempt failed and the email will be tried again. `failed`: every attempt failed. `suppressed`: PayGo did not send it (for example a blocked address). `unknown`: the delivery status was not recorded (emails sent before PayGo recorded delivery, or an email that has waited in the queue for over an hour). New values may be added.","enum":["queued","sent","failed","retrying","suppressed","unknown"],"examples":["queued"],"type":"string"},"to":{"description":"The recipients.","examples":[["bokhald@example.is"]],"items":{"type":"string"},"type":"array"},"createdAt":{"description":"When the email was queued (ISO 8601, UTC).","examples":["2026-11-22T10:15:00.000Z"],"format":"date-time","type":"string"},"sentAt":{"description":"When the mail server accepted the email (`status: sent`); `null` otherwise.","examples":[null],"format":"date-time","type":["string","null"]},"orderId":{"description":"Id of the sales order that was emailed.","examples":["3e4f5a6b-7c8d-4e9f-8a0b-1c2d3e4f5a6b"],"format":"uuid","type":"string"}},"required":["id","status","to","createdAt","sentAt","orderId"],"type":"object"},"OrderInvoiceCreatedDto":{"properties":{"id":{"description":"Id of the invoice in PayGo.","examples":["6a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"},"type":{"description":"`invoice`, or `credit_note` for a credit note (its amounts are negative).","enum":["invoice","credit_note"],"examples":["invoice"],"type":"string"},"invoiceNumber":{"description":"Invoice number, unique within the company. Credit notes have their own number series.","examples":["1042"],"type":"string"},"externalId":{"description":"Your own id for this invoice, unique within the company. Find it with `?externalId=`.","examples":["SHOP-ORDER-77812"],"maxLength":255,"type":["string","null"]},"status":{"description":"`posted`: issued and posted to the ledger (credit notes too). `credited`: fully credited by credit notes; a partly credited invoice stays `posted` with `creditedAmount` above 0. `cancelled`: old cancelled invoices only.","enum":["posted","credited","cancelled"],"examples":["posted"],"type":"string"},"paymentStatus":{"description":"Computed from the amounts: `paid` when `balance` is 0 (on a foreign-currency invoice within 0.01), otherwise `partially_paid` when `amountSettled` is not 0, otherwise `unpaid`.","enum":["unpaid","partially_paid","paid"],"examples":["unpaid"],"type":"string"},"isOverdue":{"description":"True when the invoice is not paid, its balance is above 0 and `finalDueDate` is before today (UTC). Never true on a credit note.","examples":[false],"type":"boolean"},"customer":{"allOf":[{"$ref":"#/components/schemas/CustomerRefDto"}],"description":"The customer, with its current name and kennitala."},"buyerKennitala":{"description":"Kennitala of the buyer as printed on the invoice when it was issued.","examples":["5501012340"],"type":["string","null"]},"buyerVatNumber":{"description":"VAT number of the buyer as printed on the invoice when it was issued.","examples":["123456"],"type":["string","null"]},"invoiceDate":{"description":"Invoice date (YYYY-MM-DD): the date of the invoice and of its posting.","examples":["2026-11-01"],"format":"date","type":"string"},"dueDate":{"description":"Due date (gjalddagi, YYYY-MM-DD). In PayGo the due date is always the invoice date, so this equals `invoiceDate`. The last day to pay without late interest is `finalDueDate`.","examples":["2026-11-01"],"format":"date","type":"string"},"finalDueDate":{"description":"Final due date (eindagi, YYYY-MM-DD): the last day to pay without late interest, also the final due date of the bank claim. Overdue is decided by this date.","examples":["2026-12-01"],"format":"date","type":"string"},"paidDate":{"description":"Date the invoice was paid in full (YYYY-MM-DD); null until then.","examples":[null],"format":"date","type":["string","null"]},"currency":{"description":"Currency of the invoice and of every amount on it (ISO 4217).","examples":["ISK"],"pattern":"^[A-Z]{3}$","type":"string"},"vatExempt":{"description":"True when the invoice is issued without VAT (all lines at 0 %).","examples":[false],"type":"boolean"},"reference":{"description":"The buyer's reference (e.g. purchase order number), printed on the invoice.","examples":["PO-2211"],"type":["string","null"]},"notes":{"description":"Note on the invoice.","examples":[null],"type":["string","null"]},"terms":{"description":"Payment terms text of the invoice.","examples":[null],"type":["string","null"]},"totals":{"allOf":[{"$ref":"#/components/schemas/TotalsDto"}],"description":"Totals of the invoice, with VAT per rate."},"amountSettled":{"description":"Amount paid or settled by a credit note (a credit note first settles the open balance of its invoice). In the invoice currency.","examples":["0.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"balance":{"description":"What is still owed: `totals.total − amountSettled`. In the invoice currency.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"creditedAmount":{"description":"Amount credited by credit notes so far, in the invoice currency. 0.00 on a credit note.","examples":["0.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"creditedInvoiceId":{"description":"On a credit note: the invoice it credits. Null on an invoice.","examples":[null],"format":"uuid","type":["string","null"]},"creditNotes":{"description":"Credit notes issued for this invoice, oldest first. Empty on a credit note.","items":{"$ref":"#/components/schemas/CreditNoteRefDto"},"type":"array"},"orderId":{"description":"The sales order the invoice was made from, or null.","examples":[null],"format":"uuid","type":["string","null"]},"isHistorical":{"description":"True for an invoice imported from an earlier system (not posted by PayGo).","examples":[false],"type":"boolean"},"electronicInvoiceSentAt":{"description":"When the invoice was last sent as an electronic invoice (ISO 8601, UTC); null if never.","examples":[null],"format":"date-time","type":["string","null"]},"createdAt":{"description":"When the invoice was created (ISO 8601, UTC).","examples":["2026-11-01T10:12:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the invoice was last changed (ISO 8601, UTC), including by a payment or a credit note. Use it with `updatedSince` for incremental sync.","examples":["2026-11-03T08:00:00.000Z"],"format":"date-time","type":"string"},"lines":{"description":"Lines of the invoice, in `position` order.","items":{"$ref":"#/components/schemas/InvoiceLineDto"},"type":"array"},"warnings":{"description":"Empty when nothing was left undone.","items":{"$ref":"#/components/schemas/OrderInvoiceWarningDto"},"type":"array"}},"required":["id","type","invoiceNumber","externalId","status","paymentStatus","isOverdue","customer","buyerKennitala","buyerVatNumber","invoiceDate","dueDate","finalDueDate","paidDate","currency","vatExempt","reference","notes","terms","totals","amountSettled","balance","creditedAmount","creditedInvoiceId","creditNotes","orderId","isHistorical","electronicInvoiceSentAt","createdAt","updatedAt","lines","warnings"],"type":"object"},"OrderInvoiceLineInputDto":{"additionalProperties":false,"properties":{"lineId":{"description":"Id of a line of THIS order (`lines[].id`).","examples":["4c8f1e2a-7b3d-4f6e-9a1c-2d3e4f5a6b7c"],"format":"uuid","type":"string"},"quantity":{"description":"Quantity to invoice now, at most two decimals: more than 0 and at most what is not yet invoiced on the line (`quantity − invoicedQuantity`); more → 422 `exceeds_invoiceable`.","examples":[2],"exclusiveMinimum":0,"maximum":99999999.99,"type":"number"}},"required":["lineId","quantity"],"type":"object"},"OrderInvoiceRefDto":{"properties":{"id":{"description":"Id of the invoice (`/v1/invoices/{id}`).","examples":["6a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"},"invoiceNumber":{"description":"Number of the invoice.","examples":["1042"],"type":"string"}},"required":["id","invoiceNumber"],"type":"object"},"OrderInvoiceWarningDto":{"properties":{"code":{"description":"`deposit_not_applied`: the deposits paid on the order could not be applied to the invoice, so it shows the full amount unpaid although the customer has paid a deposit. No e-mail, electronic invoice or bank claim was sent for it, even when asked for: each would demand the full amount. The company must apply the deposit to the invoice in PayGo before the invoice is sent. `post_processing_incomplete`: the invoice is booked, but a step after the booking failed: whether the deposit was applied to it is unknown, and no e-mail, electronic invoice or bank claim was sent for it. Do not invoice again; check the invoice in PayGo.","enum":["deposit_not_applied","post_processing_incomplete"],"examples":["deposit_not_applied"],"type":"string"},"message":{"description":"The warning in words, in the language of the request.","examples":["The invoice is booked, but the deposit of the order was not applied to it. Nothing was sent to the customer; apply the deposit in PayGo before the invoice is sent."],"type":"string"}},"required":["code","message"],"type":"object"},"OrderLineChangesDto":{"additionalProperties":false,"properties":{"add":{"description":"Lines to add, with the same rules as when an order is created (prices used exactly as sent, the product's VAT rate, a description of at most 255 characters). Each product line reserves its quantity on the company's default warehouse. Send an `Idempotency-Key` header with every request that adds lines.","items":{"$ref":"#/components/schemas/DocumentLineInputDto"},"maxItems":500,"type":"array"},"update":{"description":"Changes to existing lines; a field left out is not changed.","items":{"$ref":"#/components/schemas/OrderLineUpdateDto"},"maxItems":500,"type":"array"},"remove":{"description":"Lines to remove. A removed line stays on the order with its whole quantity cancelled, and its reservation is released. A line with a delivered or invoiced quantity cannot be removed (422 `quantity_below_fulfilled`).","items":{"$ref":"#/components/schemas/OrderLineRemoveDto"},"maxItems":500,"type":"array"}},"type":"object"},"OrderLineDto":{"properties":{"id":{"description":"Id of the line.","examples":["4c8f1e2a-7b3d-4f6e-9a1c-2d3e4f5a6b7c"],"format":"uuid","type":"string"},"position":{"description":"Position of the line on the document; lines are listed in this order.","examples":[0],"type":"integer"},"productId":{"description":"The product of the line; null on a free-text line.","examples":["7d2e9f1a-3b4c-4d5e-8f6a-1b2c3d4e5f6a"],"format":"uuid","type":["string","null"]},"sku":{"description":"Product number (SKU) of the product; null on a free-text line.","examples":["VARA-100"],"type":["string","null"]},"unit":{"description":"Unit of the product (e.g. `stk`, `kg`); null on a free-text line or a product without one.","examples":["stk"],"type":["string","null"]},"description":{"description":"Description of the line, as printed.","examples":["Ráðgjöf"],"type":"string"},"subDescription":{"description":"Second line printed under the description.","examples":["Nóvember 2026"],"type":["string","null"]},"quantity":{"description":"Effective quantity: ordered minus cancelled (`cancelledQuantity`). Lowering the quantity of a line cancels part of it, so this is what the customer still gets. The line amounts are computed on this quantity.","examples":[2],"type":"number"},"unitPrice":{"description":"Price per unit WITHOUT VAT, before the discount.","examples":["5000.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"discountPercent":{"description":"Discount in percent of the unit price.","examples":[0],"maximum":100,"minimum":0,"type":"number"},"vatRate":{"description":"VAT rate in percent.","examples":[24],"type":"number"},"netAmount":{"description":"Line amount without VAT, after the discount (`totalAmount − vatAmount`).","examples":["10000.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"vatAmount":{"description":"VAT of the line.","examples":["2400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"totalAmount":{"description":"Line amount including VAT.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cancelledQuantity":{"description":"Quantity of the line cancelled so far; not included in `quantity`.","examples":[0],"type":"number"},"deliveredQuantity":{"description":"Quantity delivered to the customer so far (delivery notes).","examples":[0],"type":"number"},"invoicedQuantity":{"description":"Quantity invoiced so far.","examples":[0],"type":"number"}},"required":["id","position","productId","sku","unit","description","subDescription","quantity","unitPrice","discountPercent","vatRate","netAmount","vatAmount","totalAmount","cancelledQuantity","deliveredQuantity","invoicedQuantity"],"type":"object"},"OrderLineRemoveDto":{"additionalProperties":false,"properties":{"lineId":{"description":"Id of a line of THIS order (`lines[].id`).","examples":["4c8f1e2a-7b3d-4f6e-9a1c-2d3e4f5a6b7c"],"format":"uuid","type":"string"}},"required":["lineId"],"type":"object"},"OrderLineUpdateDto":{"additionalProperties":false,"properties":{"lineId":{"description":"Id of a line of THIS order (`lines[].id`).","examples":["4c8f1e2a-7b3d-4f6e-9a1c-2d3e4f5a6b7c"],"format":"uuid","type":"string"},"quantity":{"description":"The new quantity of the line, as `lines[].quantity` shows it (ordered minus cancelled), at most two decimals. A higher quantity reserves the difference, a lower one cancels the difference and releases its reservation; it cannot go below what was delivered or invoiced on the line (422 `quantity_below_fulfilled`).","examples":[4],"maximum":99999999.99,"minimum":0,"type":"number"},"unitPrice":{"description":"New price per unit WITHOUT VAT, used exactly as sent.","examples":["990.00"],"pattern":"^\\d{1,10}(\\.\\d{1,2})?$","type":"string"},"discountPercent":{"description":"New discount in percent of the unit price, at most four decimals.","examples":[0],"maximum":100,"minimum":0,"type":"number"},"vatRate":{"description":"New VAT rate in percent. On a product line it must equal the product's rate; a free-text line takes the same rates as when it is added.","examples":[24],"maximum":100,"minimum":0,"type":"number"},"description":{"description":"New description of the line.","examples":["Ráðgjöf"],"maxLength":255,"type":"string"},"subDescription":{"description":"New second line under the description; `null` clears it.","examples":["Nóvember 2026"],"maxLength":2000,"type":["string","null"]}},"required":["lineId"],"type":"object"},"OrderShippingDto":{"properties":{"gross":{"description":"Shipping including VAT.","examples":["1500.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["gross"],"type":"object"},"OrderTotalsDto":{"properties":{"currency":{"description":"Currency of the document and of every amount here (ISO 4217).","examples":["ISK"],"pattern":"^[A-Z]{3}$","type":"string"},"net":{"description":"Sum of the net amounts (without VAT) of the lines.","examples":["10000.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"vat":{"description":"Net and VAT per VAT rate, one entry per rate, highest rate first. The entries add up to `net` and `vatTotal`.","items":{"$ref":"#/components/schemas/VatBreakdownDto"},"type":"array"},"vatTotal":{"description":"Total VAT.","examples":["2400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rounding":{"description":"`total − (net + vatTotal + shipping.gross)`: the total is rounded to a whole number of ISK, so this can be up to ±0.50.","examples":["0.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"total":{"description":"Total including VAT.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"iskEquivalent":{"anyOf":[{"$ref":"#/components/schemas/IskEquivalentDto"},{"type":"null"}],"description":"On a document in a foreign currency: the same totals in ISK and the exchange rate used. Null on an ISK document."},"shipping":{"anyOf":[{"$ref":"#/components/schemas/OrderShippingDto"},{"type":"null"}],"description":"Shipping recorded on the order header and not as a line (web shop orders), included in `total` but not in `net` or `vat`. Null when there is none, or when the shipping is one of the lines."}},"required":["currency","net","vat","vatTotal","rounding","total","iskEquivalent","shipping"],"type":"object"},"PaymentMethodDto":{"properties":{"id":{"description":"Id of the payment method.","examples":["9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"],"format":"uuid","type":"string"},"code":{"description":"Code of the payment method, as set up in PayGo.","examples":["BANK_TRANSFER"],"type":"string"},"name":{"description":"Name of the payment method.","examples":["Millifærsla"],"type":"string"},"type":{"description":"How the payment is taken: `manual` (recorded by hand), `heimabanki` (claim in the payer's online bank), `terminal` (card terminal), `card_online` (online card payment) or `payment_link`.","enum":["manual","heimabanki","terminal","payment_link","card_online"],"examples":["manual"],"type":"string"},"isActive":{"description":"False when the method is no longer offered.","examples":[true],"type":"boolean"},"isDefault":{"description":"True for the company's default payment method.","examples":[false],"type":"boolean"},"canRecordInvoicePayment":{"description":"Whether an invoice payment can be recorded with this method. False for a method that settles the payment from the customer's prepaid credit instead of bringing money in; such a method is refused for invoice payments.","examples":[true],"type":"boolean"}},"required":["id","code","name","type","isActive","isDefault","canRecordInvoicePayment"],"type":"object"},"PaymentMethodRefDto":{"properties":{"id":{"description":"Id of the payment method.","examples":["0d1e2f3a-4b5c-4d6e-8f7a-9b0c1d2e3f4a"],"format":"uuid","type":"string"},"name":{"description":"Name of the payment method.","examples":["Millifærsla"],"type":"string"}},"required":["id","name"],"type":"object"},"PingKeyDto":{"properties":{"name":{"description":"Name the key was given when it was created.","examples":["Webshop sync"],"type":"string"},"scopes":{"description":"Scopes the key holds. Scopes this server does not know are left out.","examples":[["customers:read"]],"items":{"enum":["customers:read","customers:write","suppliers:read","suppliers:write","products:read","reference:read","invoices:read","invoices:write","invoices:send","invoices:credit","payments:write","quotes:read","quotes:write","quotes:send","orders:read","orders:write","orders:send","orders:invoice","expenses:read","expenses:write","work-orders:read","work-orders:write","work-orders:time","time-clock:read","time-clock:write"],"type":"string"},"type":"array"},"expiresAt":{"description":"When the key expires (ISO 8601, UTC), or null if it does not expire.","examples":["2027-11-21T00:00:00.000Z"],"format":"date-time","type":["string","null"]}},"required":["name","scopes","expiresAt"],"type":"object"},"PingResponseDto":{"properties":{"ok":{"description":"Always true: the key is valid.","enum":[true],"examples":[true],"type":"boolean"},"apiVersion":{"description":"Version of the API that answered.","enum":["v1"],"examples":["v1"],"type":"string"},"serverTime":{"description":"Server time when the request was answered (ISO 8601, UTC).","examples":["2026-11-21T12:00:00.000Z"],"format":"date-time","type":"string"},"tenant":{"allOf":[{"$ref":"#/components/schemas/PingTenantDto"}],"description":"The company the key acts for. Every request with this key reads and writes its data only."},"key":{"allOf":[{"$ref":"#/components/schemas/PingKeyDto"}],"description":"The key that made the request."},"mode":{"description":"Present only for a test key: \"test\". The key then acts on the shared sample company, never on your own data, and tenant is the sample company.","enum":["test"],"examples":["test"],"type":"string"}},"required":["ok","apiVersion","serverTime","tenant","key"],"type":"object"},"PingTenantDto":{"properties":{"id":{"description":"Id of the company the API key belongs to.","format":"uuid","type":"string"},"name":{"description":"Name of the company.","examples":["Dæmi ehf."],"type":"string"},"kennitala":{"description":"Icelandic national id (kennitala) of the company, 10 digits without a hyphen, or null if none is on file.","examples":["5501012340"],"type":["string","null"]}},"required":["id","name","kennitala"],"type":"object"},"Problem":{"description":"Every error of the API: `application/problem+json` (RFC 9457). Branch on `code` (stable, language-independent) and the HTTP status; `title`, `detail` and `errors[].message` follow `Accept-Language` (is by default, or en).","properties":{"type":{"description":"Link to the description of the error code.","examples":["https://paygo.is/developers/errors/not_found"],"format":"uri","type":"string"},"title":{"description":"Short summary of the error type.","type":"string"},"status":{"description":"HTTP status of the response.","examples":[404],"type":"integer"},"detail":{"description":"What went wrong in this case.","type":"string"},"code":{"description":"Stable error code. `invalid_api_key` is 401; `key_expired` is 401; `key_revoked` is 401; `ip_not_allowed` is 403; `insufficient_scope` is 403; `tenant_inactive` is 403; `maintenance` is 503; `not_found` is 404; `validation_failed` is 422; `conflict` is 409; `idempotency_key_required` is 400; `idempotency_key_reused` is 422; `idempotency_in_progress` is 409; `rate_limited` is 429; `payload_too_large` is 413; `internal_error` is 500; `rate_limit_unavailable` is 503; `service_unavailable` is 503; `not_available_in_test_mode` is 403.","enum":["invalid_api_key","key_expired","key_revoked","ip_not_allowed","insufficient_scope","tenant_inactive","maintenance","not_found","validation_failed","conflict","idempotency_key_required","idempotency_key_reused","idempotency_in_progress","rate_limited","payload_too_large","internal_error","rate_limit_unavailable","service_unavailable","not_available_in_test_mode"],"type":"string"},"errorId":{"description":"Identifier of this occurrence; quote it when contacting support.","type":"string"},"instance":{"description":"Path of the request (without the query string).","examples":["/v1/customers/0b6f0a1e"],"type":"string"},"errors":{"description":"The invalid fields; present on `validation_failed`.","items":{"$ref":"#/components/schemas/ProblemFieldError"},"type":"array"}},"required":["type","title","status","detail","code","errorId","instance"],"type":"object"},"ProblemFieldError":{"description":"One invalid field of a request.","properties":{"field":{"description":"Name of the field (or header / query parameter).","examples":["name"],"type":"string"},"code":{"description":"Stable name of the violated rule in snake_case, e.g. `is_not_empty`; `unknown_field` for a field the API does not know.","examples":["is_not_empty"],"type":"string"},"message":{"description":"Human-readable explanation in the language of the request (`Accept-Language`: is or en).","type":"string"}},"required":["field","code","message"],"type":"object"},"ProductBarcodeDto":{"properties":{"barcode":{"description":"The barcode.","examples":["5690527000017"],"type":"string"},"type":{"description":"Barcode type.","enum":["ean","upc","supplier","internal","sku","custom"],"examples":["ean"],"type":"string"},"quantityMultiplier":{"description":"How many units of the product one scan of this barcode stands for (e.g. `12` for a box of 12).","examples":[1],"type":"number"},"isPrimary":{"description":"True for the product's main barcode.","examples":[true],"type":"boolean"}},"required":["barcode","type","quantityMultiplier","isPrimary"],"type":"object"},"ProductCategoryRefDto":{"properties":{"id":{"description":"Id of the category.","examples":["3d8e2f1a-5b6c-4d7e-8f9a-0b1c2d3e4f5a"],"format":"uuid","type":"string"},"name":{"description":"Name of the category.","examples":["Kaffi"],"type":"string"}},"required":["id","name"],"type":"object"},"ProductDetailDto":{"properties":{"id":{"description":"Id of the product in PayGo.","examples":["1f2e3d4c-5b6a-4978-8a9b-0c1d2e3f4a5b"],"format":"uuid","type":"string"},"sku":{"description":"Product number (SKU), unique within the company.","examples":["KAF-1001"],"type":"string"},"name":{"description":"Product name.","examples":["Kaffibaunir 1 kg"],"type":"string"},"description":{"description":"Description.","examples":[null],"type":["string","null"]},"unit":{"description":"Unit of measure, e.g. `stk`, `kg`, `klst`.","examples":["stk"],"type":["string","null"]},"type":{"description":"`product`: a stocked item. `service`: no stock (labour, shipping). `kit`: a bundle of other products whose components are reserved and delivered, not the kit itself.","enum":["product","service","kit"],"examples":["product"],"type":"string"},"price":{"allOf":[{"$ref":"#/components/schemas/MoneyAmountDto"}],"description":"Sales price per unit **excluding VAT**, in ISK: the same basis as `unitPrice` on a document line. The price including VAT is `price` × (1 + `vatRate` / 100), rounded to two decimals."},"vatRate":{"description":"The product's VAT rate in percent (see `GET /v1/vat-rates`). A document line with this product always carries this rate.","examples":[24],"type":"number"},"barcodes":{"description":"Barcodes of the product, the main one first.","items":{"$ref":"#/components/schemas/ProductBarcodeDto"},"type":"array"},"category":{"anyOf":[{"$ref":"#/components/schemas/ProductCategoryRefDto"},{"type":"null"}],"description":"Category, or null."},"tracking":{"description":"Serial or lot tracking. Products tracked by serial or lot number need the number on delivery.","enum":["none","serial","lot"],"examples":["none"],"type":"string"},"isActive":{"description":"False when the product is no longer sold. A product can be set to deactivate itself when its stock reaches zero.","examples":[true],"type":"boolean"},"stock":{"anyOf":[{"$ref":"#/components/schemas/ProductStockDto"},{"type":"null"}],"description":"Stock totals and the split per warehouse; null for services and kits. Live stock from the warehouse records (goods in and out, reservations), not a stock count. `available` = `onHand` − `reserved` and may be negative when orders reserve more than is on hand."},"createdAt":{"description":"When the product was created (UTC).","examples":["2026-11-21T08:15:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the product last changed (UTC): its own fields, goods in and out, and reservations. A move between warehouses does not change it.","examples":["2026-11-21T09:30:00.000Z"],"format":"date-time","type":"string"}},"required":["id","sku","name","description","unit","type","price","vatRate","barcodes","category","tracking","isActive","stock","createdAt","updatedAt"],"type":"object"},"ProductDto":{"properties":{"id":{"description":"Id of the product in PayGo.","examples":["1f2e3d4c-5b6a-4978-8a9b-0c1d2e3f4a5b"],"format":"uuid","type":"string"},"sku":{"description":"Product number (SKU), unique within the company.","examples":["KAF-1001"],"type":"string"},"name":{"description":"Product name.","examples":["Kaffibaunir 1 kg"],"type":"string"},"description":{"description":"Description.","examples":[null],"type":["string","null"]},"unit":{"description":"Unit of measure, e.g. `stk`, `kg`, `klst`.","examples":["stk"],"type":["string","null"]},"type":{"description":"`product`: a stocked item. `service`: no stock (labour, shipping). `kit`: a bundle of other products whose components are reserved and delivered, not the kit itself.","enum":["product","service","kit"],"examples":["product"],"type":"string"},"price":{"allOf":[{"$ref":"#/components/schemas/MoneyAmountDto"}],"description":"Sales price per unit **excluding VAT**, in ISK: the same basis as `unitPrice` on a document line. The price including VAT is `price` × (1 + `vatRate` / 100), rounded to two decimals."},"vatRate":{"description":"The product's VAT rate in percent (see `GET /v1/vat-rates`). A document line with this product always carries this rate.","examples":[24],"type":"number"},"barcodes":{"description":"Barcodes of the product, the main one first.","items":{"$ref":"#/components/schemas/ProductBarcodeDto"},"type":"array"},"category":{"anyOf":[{"$ref":"#/components/schemas/ProductCategoryRefDto"},{"type":"null"}],"description":"Category, or null."},"tracking":{"description":"Serial or lot tracking. Products tracked by serial or lot number need the number on delivery.","enum":["none","serial","lot"],"examples":["none"],"type":"string"},"isActive":{"description":"False when the product is no longer sold. A product can be set to deactivate itself when its stock reaches zero.","examples":[true],"type":"boolean"},"stock":{"anyOf":[{"$ref":"#/components/schemas/ProductStockSummaryDto"},{"type":"null"}],"description":"Stock totals over all warehouses; null for services and kits. Live stock from the warehouse records (goods in and out, reservations), not a stock count. `available` = `onHand` − `reserved` and may be negative when orders reserve more than is on hand. The split per warehouse is on `GET /v1/products/{id}`."},"createdAt":{"description":"When the product was created (UTC).","examples":["2026-11-21T08:15:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the product last changed (UTC): its own fields, goods in and out, and reservations. A move between warehouses does not change it.","examples":["2026-11-21T09:30:00.000Z"],"format":"date-time","type":"string"}},"required":["id","sku","name","description","unit","type","price","vatRate","barcodes","category","tracking","isActive","stock","createdAt","updatedAt"],"type":"object"},"ProductStockDto":{"properties":{"onHand":{"description":"Quantity on hand, summed over all warehouses.","examples":[42],"type":"number"},"reserved":{"description":"Quantity reserved for open orders, summed over all warehouses.","examples":[5],"type":"number"},"available":{"description":"`onHand` − `reserved`. May be negative.","examples":[37],"type":"number"},"warehouses":{"description":"Stock per warehouse, one item for each warehouse that has had stock of the product.","items":{"$ref":"#/components/schemas/ProductWarehouseStockDto"},"type":"array"}},"required":["onHand","reserved","available","warehouses"],"type":"object"},"ProductStockSummaryDto":{"properties":{"onHand":{"description":"Quantity on hand, summed over all warehouses.","examples":[42],"type":"number"},"reserved":{"description":"Quantity reserved for open orders, summed over all warehouses.","examples":[5],"type":"number"},"available":{"description":"`onHand` − `reserved`. May be negative.","examples":[37],"type":"number"}},"required":["onHand","reserved","available"],"type":"object"},"ProductWarehouseStockDto":{"properties":{"warehouseId":{"description":"Id of the warehouse (see `GET /v1/warehouses`).","examples":["7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"},"onHand":{"description":"Quantity on hand in this warehouse.","examples":[30],"type":"number"},"reserved":{"description":"Quantity reserved in this warehouse.","examples":[5],"type":"number"},"available":{"description":"`onHand` − `reserved` in this warehouse. May be negative.","examples":[25],"type":"number"}},"required":["warehouseId","onHand","reserved","available"],"type":"object"},"QuoteDetailDto":{"properties":{"id":{"description":"Id of the quote in PayGo.","examples":["3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f"],"format":"uuid","type":"string"},"quoteNumber":{"description":"Quote number, unique within the company.","examples":["QUO-2026-00042"],"type":"string"},"externalId":{"description":"Your own id for this quote, unique within the company. Find it with `?externalId=`.","examples":["CRM-DEAL-5521"],"maxLength":255,"type":["string","null"]},"status":{"description":"`draft`: being prepared, can be changed. `sent`: sent to the customer and still valid. `accepted` / `rejected`: the customer's answer. `expired`: sent, but `validUntil` has passed (a sent quote whose `validUntil` is before today, UTC, is `expired` from the next day on). `converted_to_order`: a sales order was made from the quote (`orderId`).","enum":["draft","sent","accepted","rejected","expired","converted_to_order"],"examples":["sent"],"type":"string"},"customer":{"allOf":[{"$ref":"#/components/schemas/CustomerRefDto"}],"description":"The customer, with its current name and kennitala."},"quoteDate":{"description":"Date of the quote (YYYY-MM-DD).","examples":["2026-11-20"],"format":"date","type":"string"},"validUntil":{"description":"Last day the quote is valid (YYYY-MM-DD), inclusive.","examples":["2026-12-20"],"format":"date","type":"string"},"acceptedAt":{"description":"When the quote was accepted (ISO 8601, UTC); null until then.","examples":[null],"format":"date-time","type":["string","null"]},"currency":{"description":"Currency of the quote and of every amount on it. Quotes are always in ISK.","enum":["ISK"],"examples":["ISK"],"type":"string"},"reference":{"description":"The buyer's reference (e.g. a request number), printed on the quote.","examples":["RFQ-118"],"type":["string","null"]},"notes":{"description":"Note on the quote.","examples":[null],"type":["string","null"]},"terms":{"description":"Terms text of the quote.","examples":[null],"type":["string","null"]},"totals":{"allOf":[{"$ref":"#/components/schemas/TotalsDto"}],"description":"Totals of the quote, with VAT per rate. `iskEquivalent` is always null."},"orderId":{"description":"The sales order made from this quote, or null.","examples":[null],"format":"uuid","type":["string","null"]},"revisedFromQuoteId":{"description":"The quote this one was revised from (a revision is a new quote with its own number), or null.","examples":[null],"format":"uuid","type":["string","null"]},"createdAt":{"description":"When the quote was created (ISO 8601, UTC).","examples":["2026-11-20T10:12:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the quote was last changed (ISO 8601, UTC): an edit, a status change or the conversion to an order. Use it with `updatedSince` for incremental sync. A quote that only passed its `validUntil` keeps its `updatedAt`.","examples":["2026-11-21T08:00:00.000Z"],"format":"date-time","type":"string"},"lines":{"description":"Lines of the quote, in `position` order.","items":{"$ref":"#/components/schemas/DocumentLineDto"},"type":"array"}},"required":["id","quoteNumber","externalId","status","customer","quoteDate","validUntil","acceptedAt","currency","reference","notes","terms","totals","orderId","revisedFromQuoteId","createdAt","updatedAt","lines"],"type":"object"},"QuoteDto":{"properties":{"id":{"description":"Id of the quote in PayGo.","examples":["3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f"],"format":"uuid","type":"string"},"quoteNumber":{"description":"Quote number, unique within the company.","examples":["QUO-2026-00042"],"type":"string"},"externalId":{"description":"Your own id for this quote, unique within the company. Find it with `?externalId=`.","examples":["CRM-DEAL-5521"],"maxLength":255,"type":["string","null"]},"status":{"description":"`draft`: being prepared, can be changed. `sent`: sent to the customer and still valid. `accepted` / `rejected`: the customer's answer. `expired`: sent, but `validUntil` has passed (a sent quote whose `validUntil` is before today, UTC, is `expired` from the next day on). `converted_to_order`: a sales order was made from the quote (`orderId`).","enum":["draft","sent","accepted","rejected","expired","converted_to_order"],"examples":["sent"],"type":"string"},"customer":{"allOf":[{"$ref":"#/components/schemas/CustomerRefDto"}],"description":"The customer, with its current name and kennitala."},"quoteDate":{"description":"Date of the quote (YYYY-MM-DD).","examples":["2026-11-20"],"format":"date","type":"string"},"validUntil":{"description":"Last day the quote is valid (YYYY-MM-DD), inclusive.","examples":["2026-12-20"],"format":"date","type":"string"},"acceptedAt":{"description":"When the quote was accepted (ISO 8601, UTC); null until then.","examples":[null],"format":"date-time","type":["string","null"]},"currency":{"description":"Currency of the quote and of every amount on it. Quotes are always in ISK.","enum":["ISK"],"examples":["ISK"],"type":"string"},"reference":{"description":"The buyer's reference (e.g. a request number), printed on the quote.","examples":["RFQ-118"],"type":["string","null"]},"notes":{"description":"Note on the quote.","examples":[null],"type":["string","null"]},"terms":{"description":"Terms text of the quote.","examples":[null],"type":["string","null"]},"totals":{"allOf":[{"$ref":"#/components/schemas/TotalsDto"}],"description":"Totals of the quote, with VAT per rate. `iskEquivalent` is always null."},"orderId":{"description":"The sales order made from this quote, or null.","examples":[null],"format":"uuid","type":["string","null"]},"revisedFromQuoteId":{"description":"The quote this one was revised from (a revision is a new quote with its own number), or null.","examples":[null],"format":"uuid","type":["string","null"]},"createdAt":{"description":"When the quote was created (ISO 8601, UTC).","examples":["2026-11-20T10:12:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the quote was last changed (ISO 8601, UTC): an edit, a status change or the conversion to an order. Use it with `updatedSince` for incremental sync. A quote that only passed its `validUntil` keeps its `updatedAt`.","examples":["2026-11-21T08:00:00.000Z"],"format":"date-time","type":"string"}},"required":["id","quoteNumber","externalId","status","customer","quoteDate","validUntil","acceptedAt","currency","reference","notes","terms","totals","orderId","revisedFromQuoteId","createdAt","updatedAt"],"type":"object"},"QuoteEmailDto":{"properties":{"id":{"description":"Id of the email; its status is read by this id.","examples":["2f6c8e1a-3b4d-4c5e-9f7a-8b9c0d1e2f3a"],"format":"uuid","type":"string"},"status":{"description":"`queued`: waiting for the mail server (the usual answer of `send`). `sent`: accepted by the mail server, which is not proof that it reached the inbox. `retrying`: an attempt failed and the email will be tried again. `failed`: every attempt failed. `suppressed`: PayGo did not send it (for example a blocked address). `unknown`: the delivery status was not recorded (emails sent before PayGo recorded delivery, or an email that has waited in the queue for over an hour). New values may be added.","enum":["queued","sent","failed","retrying","suppressed","unknown"],"examples":["queued"],"type":"string"},"to":{"description":"The recipients.","examples":[["bokhald@example.is"]],"items":{"type":"string"},"type":"array"},"createdAt":{"description":"When the email was queued (ISO 8601, UTC).","examples":["2026-11-22T10:15:00.000Z"],"format":"date-time","type":"string"},"sentAt":{"description":"When the mail server accepted the email (`status: sent`); `null` otherwise.","examples":[null],"format":"date-time","type":["string","null"]},"quoteId":{"description":"Id of the quote that was emailed.","examples":["3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f"],"format":"uuid","type":"string"}},"required":["id","status","to","createdAt","sentAt","quoteId"],"type":"object"},"SendDocumentEmailRequestDto":{"additionalProperties":false,"properties":{"to":{"description":"Recipients, 1–10 email addresses (trimmed and lower-cased; each once). Default: the email address of the customer. Without either the request is refused with 422 `no_recipient` on `to`.","examples":[["bokhald@example.is"]],"items":{"type":"string"},"maxItems":10,"minItems":1,"type":"array"},"bcc":{"description":"Blind copies, 0–5 email addresses (trimmed and lower-cased; each once).","examples":[["skjalasafn@example.is"]],"items":{"type":"string"},"maxItems":5,"type":"array"}},"type":"object"},"SupplierContactDto":{"properties":{"id":{"description":"Id of the contact person.","examples":["3f1c2a9e-8d4b-4c1e-9a7f-2b6d5e4c3a21"],"format":"uuid","type":"string"},"name":{"description":"Name of the contact person.","examples":["Jón Jónsson"],"type":"string"},"email":{"description":"E-mail address of the contact person.","examples":["jon@voruhus.is"],"type":["string","null"]},"phone":{"description":"Phone number of the contact person.","examples":["+354 555 6789"],"type":["string","null"]},"jobTitle":{"description":"Job title of the contact person.","examples":["Sölustjóri"],"type":["string","null"]}},"required":["id","name","email","phone","jobTitle"],"type":"object"},"SupplierCreate":{"additionalProperties":false,"properties":{"externalId":{"description":"Your own id for this supplier. Must be unique within the company: a second supplier with the same value is refused with 409 conflict.","examples":["ERP-20017"],"maxLength":255,"type":["string","null"]},"kennitala":{"description":"Icelandic national id (kennitala), 10 digits; a hyphen after the sixth digit is accepted and removed. Unique within the company: an existing kennitala is refused with 409 conflict.","examples":["4501692839"],"type":["string","null"]},"name":{"description":"Name of the supplier.","examples":["Vöruhús ehf."],"maxLength":255,"type":"string"},"contactPerson":{"description":"Name of the main contact person at the supplier.","examples":["Jón Jónsson"],"maxLength":255,"type":["string","null"]},"email":{"description":"E-mail address of the supplier. Unique within the company: an address another supplier has is refused with 409 conflict.","examples":["reikningar@voruhus.is"],"format":"email","maxLength":255,"type":["string","null"]},"phone":{"description":"Phone number.","examples":["+354 555 6789"],"maxLength":25,"type":["string","null"]},"addressLine1":{"description":"First address line.","examples":["Iðnaðarsvæði 5"],"maxLength":255,"type":["string","null"]},"addressLine2":{"description":"Second address line.","examples":["Hús B"],"maxLength":255,"type":["string","null"]},"postalCode":{"description":"Postal code.","examples":["110"],"maxLength":10,"type":["string","null"]},"city":{"description":"City or town.","examples":["Reykjavík"],"maxLength":100,"type":["string","null"]},"country":{"default":"IS","description":"Country, ISO 3166-1 alpha-2 (case-insensitive). Default `IS`.","examples":["IS"],"type":"string"},"paymentTermsDays":{"default":30,"description":"Days from the supplier's invoice date to its due date. Default 30.","examples":[30],"maximum":365,"minimum":0,"type":"integer"},"isActive":{"default":true,"description":"False creates the supplier deactivated. Default true.","examples":[true],"type":"boolean"}},"required":["name"],"type":"object"},"SupplierDetailDto":{"properties":{"id":{"description":"Id of the supplier in PayGo.","examples":["7c4e1b2a-9d3f-4a6e-8b5c-2d1e3f4a5b6c"],"format":"uuid","type":"string"},"externalId":{"description":"Your own id for this supplier, unique within the company. Use it to find the supplier with `?externalId=`.","examples":["ERP-20017"],"maxLength":255,"type":["string","null"]},"kennitala":{"description":"Icelandic national id (kennitala) of the supplier, 10 digits without a hyphen (a kennitala stored with a hyphen is returned without it). Unique within the company. A supplier registered in PayGo with a foreign registration number returns that number as stored.","examples":["4501692839"],"maxLength":15,"type":["string","null"]},"name":{"description":"Name of the supplier.","examples":["Vöruhús ehf."],"maxLength":255,"type":"string"},"contactPerson":{"description":"Name of the main contact person at the supplier.","examples":["Jón Jónsson"],"maxLength":255,"type":["string","null"]},"email":{"description":"E-mail address of the supplier. Unique within the company.","examples":["reikningar@voruhus.is"],"format":"email","maxLength":255,"type":["string","null"]},"phone":{"description":"Phone number.","examples":["+354 555 6789"],"maxLength":25,"type":["string","null"]},"addressLine1":{"description":"First address line.","examples":["Iðnaðarsvæði 5"],"maxLength":255,"type":["string","null"]},"addressLine2":{"description":"Second address line.","examples":["Hús B"],"maxLength":255,"type":["string","null"]},"postalCode":{"description":"Postal code.","examples":["110"],"maxLength":10,"type":["string","null"]},"city":{"description":"City or town.","examples":["Reykjavík"],"maxLength":100,"type":["string","null"]},"country":{"description":"Country, ISO 3166-1 alpha-2.","examples":["IS"],"pattern":"^[A-Z]{2}$","type":"string"},"paymentTermsDays":{"description":"Days from the supplier's invoice date to its due date.","examples":[30],"minimum":0,"type":"integer"},"isActive":{"description":"False for a deactivated supplier, who is hidden from the selection lists in PayGo.","examples":[true],"type":"boolean"},"createdAt":{"description":"When the supplier was created (ISO 8601, UTC).","examples":["2026-11-21T08:30:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the supplier was last changed (ISO 8601, UTC).","examples":["2026-11-21T09:15:00.000Z"],"format":"date-time","type":"string"},"contacts":{"description":"Contact people of the supplier, sorted by name.","items":{"$ref":"#/components/schemas/SupplierContactDto"},"type":"array"},"balance":{"allOf":[{"$ref":"#/components/schemas/MoneyAmountDto"}],"description":"What the company owes the supplier now: approved supplier invoices minus their payments and minus manual accounting entries on the supplier. Negative when the supplier owes the company (a prepayment or credit). The same figure as the balance in the creditors list and on the supplier page in PayGo."}},"required":["id","externalId","kennitala","name","contactPerson","email","phone","addressLine1","addressLine2","postalCode","city","country","paymentTermsDays","isActive","createdAt","updatedAt","contacts","balance"],"type":"object"},"SupplierDto":{"properties":{"id":{"description":"Id of the supplier in PayGo.","examples":["7c4e1b2a-9d3f-4a6e-8b5c-2d1e3f4a5b6c"],"format":"uuid","type":"string"},"externalId":{"description":"Your own id for this supplier, unique within the company. Use it to find the supplier with `?externalId=`.","examples":["ERP-20017"],"maxLength":255,"type":["string","null"]},"kennitala":{"description":"Icelandic national id (kennitala) of the supplier, 10 digits without a hyphen (a kennitala stored with a hyphen is returned without it). Unique within the company. A supplier registered in PayGo with a foreign registration number returns that number as stored.","examples":["4501692839"],"maxLength":15,"type":["string","null"]},"name":{"description":"Name of the supplier.","examples":["Vöruhús ehf."],"maxLength":255,"type":"string"},"contactPerson":{"description":"Name of the main contact person at the supplier.","examples":["Jón Jónsson"],"maxLength":255,"type":["string","null"]},"email":{"description":"E-mail address of the supplier. Unique within the company.","examples":["reikningar@voruhus.is"],"format":"email","maxLength":255,"type":["string","null"]},"phone":{"description":"Phone number.","examples":["+354 555 6789"],"maxLength":25,"type":["string","null"]},"addressLine1":{"description":"First address line.","examples":["Iðnaðarsvæði 5"],"maxLength":255,"type":["string","null"]},"addressLine2":{"description":"Second address line.","examples":["Hús B"],"maxLength":255,"type":["string","null"]},"postalCode":{"description":"Postal code.","examples":["110"],"maxLength":10,"type":["string","null"]},"city":{"description":"City or town.","examples":["Reykjavík"],"maxLength":100,"type":["string","null"]},"country":{"description":"Country, ISO 3166-1 alpha-2.","examples":["IS"],"pattern":"^[A-Z]{2}$","type":"string"},"paymentTermsDays":{"description":"Days from the supplier's invoice date to its due date.","examples":[30],"minimum":0,"type":"integer"},"isActive":{"description":"False for a deactivated supplier, who is hidden from the selection lists in PayGo.","examples":[true],"type":"boolean"},"createdAt":{"description":"When the supplier was created (ISO 8601, UTC).","examples":["2026-11-21T08:30:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the supplier was last changed (ISO 8601, UTC).","examples":["2026-11-21T09:15:00.000Z"],"format":"date-time","type":"string"}},"required":["id","externalId","kennitala","name","contactPerson","email","phone","addressLine1","addressLine2","postalCode","city","country","paymentTermsDays","isActive","createdAt","updatedAt"],"type":"object"},"SupplierRefDto":{"properties":{"id":{"description":"Id of the supplier in PayGo (`/v1/suppliers/{id}`).","examples":["3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f"],"format":"uuid","type":"string"},"name":{"description":"Current name of the supplier.","examples":["Heildsalan ehf."],"type":"string"},"kennitala":{"description":"Current kennitala of the supplier, 10 digits (a foreign registration number as stored), as `/v1/suppliers` shows it.","examples":["4602070880"],"maxLength":15,"type":["string","null"]}},"required":["id","name","kennitala"],"type":"object"},"SupplierRefInputDto":{"additionalProperties":false,"properties":{"id":{"description":"Id of the supplier in PayGo (`/v1/suppliers/{id}`).","examples":["3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f"],"format":"uuid","type":"string"},"kennitala":{"description":"Kennitala of the supplier, 10 digits (a hyphen after the sixth digit is accepted).","examples":["4602070880"],"type":"string"},"externalId":{"description":"Your own id of the supplier (`externalId` on `/v1/suppliers`). Unique within the company.","examples":["ERP-V-2041"],"maxLength":255,"type":"string"}},"type":"object"},"SupplierUpdate":{"additionalProperties":false,"properties":{"externalId":{"description":"Your own id for this supplier. Must be unique within the company: a second supplier with the same value is refused with 409 conflict.","examples":["ERP-20017"],"maxLength":255,"type":["string","null"]},"kennitala":{"description":"Icelandic national id (kennitala), 10 digits; a hyphen after the sixth digit is accepted and removed. Unique within the company: an existing kennitala is refused with 409 conflict.","examples":["4501692839"],"type":["string","null"]},"name":{"description":"Name of the supplier.","examples":["Vöruhús ehf."],"maxLength":255,"type":"string"},"contactPerson":{"description":"Name of the main contact person at the supplier.","examples":["Jón Jónsson"],"maxLength":255,"type":["string","null"]},"email":{"description":"E-mail address of the supplier. Unique within the company: an address another supplier has is refused with 409 conflict.","examples":["reikningar@voruhus.is"],"format":"email","maxLength":255,"type":["string","null"]},"phone":{"description":"Phone number.","examples":["+354 555 6789"],"maxLength":25,"type":["string","null"]},"addressLine1":{"description":"First address line.","examples":["Iðnaðarsvæði 5"],"maxLength":255,"type":["string","null"]},"addressLine2":{"description":"Second address line.","examples":["Hús B"],"maxLength":255,"type":["string","null"]},"postalCode":{"description":"Postal code.","examples":["110"],"maxLength":10,"type":["string","null"]},"city":{"description":"City or town.","examples":["Reykjavík"],"maxLength":100,"type":["string","null"]},"country":{"default":"IS","description":"Country, ISO 3166-1 alpha-2 (case-insensitive). Default `IS`.","examples":["IS"],"type":"string"},"paymentTermsDays":{"default":30,"description":"Days from the supplier's invoice date to its due date. Default 30.","examples":[30],"maximum":365,"minimum":0,"type":"integer"},"isActive":{"default":true,"description":"False creates the supplier deactivated. Default true.","examples":[true],"type":"boolean"}},"type":"object"},"TimeClockActiveWorkOrderDto":{"properties":{"id":{"description":"Id of the work order.","examples":["4b5c6d7e-8f9a-4b0c-9d1e-2f3a4b5c6d7e"],"format":"uuid","type":"string"},"workOrderNumber":{"description":"Number of the work order.","examples":["WO-1042"],"type":["string","null"]}},"required":["id","workOrderNumber"],"type":"object"},"TimeClockBreakDto":{"properties":{"id":{"description":"Id of the break.","examples":["1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f"],"format":"uuid","type":"string"},"startTime":{"description":"When the break started (UTC).","examples":["2026-11-22T12:00:00.000Z"],"format":"date-time","type":"string"},"endTime":{"description":"When the break ended (UTC); `null` while it runs.","examples":["2026-11-22T12:30:00.000Z"],"format":"date-time","type":["string","null"]},"paid":{"description":"True for a paid break.","examples":[false],"type":"boolean"}},"required":["id","startTime","endTime","paid"],"type":"object"},"TimeClockEmployeeDto":{"properties":{"id":{"description":"Id of the employee (see `GET /v1/employees`).","examples":["7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"],"format":"uuid","type":"string"},"name":{"description":"Name of the employee.","examples":["Anna Jónsdóttir"],"type":"string"}},"required":["id","name"],"type":"object"},"TimeClockEntryDto":{"properties":{"id":{"description":"Id of the time clock entry (one shift).","examples":["9d8c7b6a-5f4e-4d3c-8b2a-1f0e9d8c7b6a"],"format":"uuid","type":"string"},"employee":{"allOf":[{"$ref":"#/components/schemas/TimeClockEmployeeDto"}],"description":"The employee whose shift it is."},"clockIn":{"description":"Clock-in time (UTC). Set by the PayGo server, never by the client.","examples":["2026-11-22T08:00:00.000Z"],"format":"date-time","type":"string"},"clockOut":{"description":"Clock-out time (UTC); `null` while the shift is open.","examples":["2026-11-22T16:00:00.000Z"],"format":"date-time","type":["string","null"]},"source":{"description":"`clock`: stamped in and out at the time of the stamp (also through this API). `manual`: times entered or corrected by hand in PayGo.","enum":["clock","manual"],"examples":["clock"],"type":"string"},"note":{"description":"Note on the shift.","examples":["Mætti á verkstað"],"maxLength":500,"type":["string","null"]},"minutes":{"description":"Length of the shift in whole minutes from clock-in to clock-out, breaks included (gross); `null` while the shift is open. Subtract unpaid `breaks` for the time worked.","examples":[480],"type":["integer","null"]},"breaks":{"description":"Breaks taken on the shift, in time order.","items":{"$ref":"#/components/schemas/TimeClockBreakDto"},"type":"array"},"approved":{"description":"True when a manager has approved the shift in PayGo. Only approved shifts go into payroll; a shift stamped through the API is never approved automatically.","examples":[false],"type":"boolean"},"approvedAt":{"description":"When the shift was approved (UTC); `null` when not approved.","examples":[null],"format":"date-time","type":["string","null"]},"createdByApi":{"description":"True when the shift was clocked in through the PayGo API.","examples":[true],"type":"boolean"},"createdAt":{"description":"When the entry was created (UTC).","examples":["2026-11-22T08:00:00.120Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the entry last changed (UTC): clock-out, breaks, work on the shift, corrections, review, approval or deletion.","examples":["2026-11-22T16:00:00.250Z"],"format":"date-time","type":"string"},"deletedAt":{"description":"When the entry was deleted (UTC); `null` unless listed with `includeDeleted=true`.","examples":[null],"format":"date-time","type":["string","null"]}},"required":["id","employee","clockIn","clockOut","source","note","minutes","breaks","approved","approvedAt","createdByApi","createdAt","updatedAt","deletedAt"],"type":"object"},"TimeClockStatusDto":{"properties":{"employee":{"allOf":[{"$ref":"#/components/schemas/TimeClockEmployeeDto"}],"description":"The employee."},"clockedIn":{"description":"True while the employee has an open shift.","examples":[true],"type":"boolean"},"entry":{"anyOf":[{"$ref":"#/components/schemas/TimeClockEntryDto"},{"type":"null"}],"description":"The open shift; `null` when not clocked in."},"onBreak":{"description":"True while a break runs on the open shift.","examples":[false],"type":"boolean"},"breakStartedAt":{"description":"When the running break started (UTC); `null` when not on a break.","examples":[null],"format":"date-time","type":["string","null"]},"activeWorkOrder":{"anyOf":[{"$ref":"#/components/schemas/TimeClockActiveWorkOrderDto"},{"type":"null"}],"description":"The work order the employee is working on in the open shift; `null` when none."},"serverTime":{"description":"The PayGo server time of the answer (UTC): the time a clock-in or clock-out now would get.","examples":["2026-11-22T10:15:00.000Z"],"format":"date-time","type":"string"}},"required":["employee","clockedIn","entry","onBreak","breakStartedAt","activeWorkOrder","serverTime"],"type":"object"},"TotalsDto":{"properties":{"currency":{"description":"Currency of the document and of every amount here (ISO 4217).","examples":["ISK"],"pattern":"^[A-Z]{3}$","type":"string"},"net":{"description":"Sum of the net amounts (without VAT) of the lines.","examples":["10000.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"vat":{"description":"Net and VAT per VAT rate, one entry per rate, highest rate first. The entries add up to `net` and `vatTotal`.","items":{"$ref":"#/components/schemas/VatBreakdownDto"},"type":"array"},"vatTotal":{"description":"Total VAT.","examples":["2400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rounding":{"description":"`total − (net + vatTotal)`. An ISK total is rounded to a whole number, so this can be up to ±0.50; on other currencies it is normally 0.00.","examples":["0.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"total":{"description":"Total including VAT.","examples":["12400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"iskEquivalent":{"anyOf":[{"$ref":"#/components/schemas/IskEquivalentDto"},{"type":"null"}],"description":"On a document in a foreign currency: the same totals in ISK and the exchange rate used. Null on an ISK document."}},"required":["currency","net","vat","vatTotal","rounding","total","iskEquivalent"],"type":"object"},"UpdateOrderRequestDto":{"additionalProperties":false,"properties":{"orderDate":{"description":"Order date (YYYY-MM-DD).","examples":["2026-11-22"],"format":"date","type":"string"},"deliveryDate":{"description":"Requested delivery date (YYYY-MM-DD).","examples":["2026-11-27"],"format":"date","type":"string"},"shippingAddress":{"description":"Delivery address; `null` clears it.","examples":["Laugavegur 1, 101 Reykjavík"],"maxLength":2000,"type":["string","null"]},"reference":{"description":"Your reference; `null` clears it.","examples":["PO-4471"],"maxLength":2000,"type":["string","null"]},"notes":{"description":"Note on the order; `null` clears it.","examples":["Afhendist við bakdyr."],"maxLength":2000,"type":["string","null"]},"reason":{"description":"Why the order changes, kept in the order's change history. REQUIRED when `lineChanges` is sent.","examples":["Viðskiptavinur bætti við"],"maxLength":500,"type":"string"},"lineChanges":{"allOf":[{"$ref":"#/components/schemas/OrderLineChangesDto"}],"description":"Changes to the lines as operations on single lines, never a full list: lines not named are left as they are. All of them apply together or none does."}},"type":"object"},"UpdateQuoteRequestDto":{"additionalProperties":false,"properties":{"customer":{"allOf":[{"$ref":"#/components/schemas/CustomerRefInputDto"}],"description":"Move the draft to another customer. The customer, named by exactly one of `id`, `kennitala` or `externalId`. None or more than one → 422 `exactly_one_required`; no such customer in the company → 422 `customer_not_found`; a deactivated customer → 422 `customer_inactive`."},"quoteDate":{"description":"Quote date (YYYY-MM-DD).","examples":["2026-11-23"],"format":"date","type":"string"},"validUntil":{"description":"Last day the quote is valid (YYYY-MM-DD). Before the quote date (the one sent, else the stored one) → 422 `valid_until_before_quote_date`.","examples":["2026-12-23"],"format":"date","type":"string"},"lines":{"description":"When sent, the COMPLETE new list of lines: it replaces every line of the quote (a quote reserves no stock, so nothing else changes), and the lines get new ids. The lines, in order. Prices are WITHOUT VAT and are used exactly as sent: no price list, tier or customer price is applied, now or when the quote becomes an order. A product line carries the product's VAT rate (another `vatRate` → 422 `vat_rate_mismatch`). A free-text line must carry `description` and `vatRate`; for now it only accepts the rate of the company's default revenue account (24 %): other rates → 422 `vat_rate_not_supported_on_free_line`, use a product with that rate instead. A line description is at most 255 characters (422 `max_length`).","items":{"$ref":"#/components/schemas/DocumentLineInputDto"},"maxItems":500,"minItems":1,"type":"array"},"reference":{"description":"Your reference; `null` clears it.","examples":["RFQ-2201"],"maxLength":2000,"type":["string","null"]},"notes":{"description":"Note printed on the quote; `null` clears it.","examples":["Afhending innan tveggja vikna frá pöntun."],"maxLength":2000,"type":["string","null"]},"terms":{"description":"Terms printed on the quote; `null` clears them.","examples":["Verð gilda í 30 daga."],"maxLength":2000,"type":["string","null"]}},"type":"object"},"UpdateWorkOrderMaterialRequestDto":{"additionalProperties":false,"properties":{"name":{"description":"New name of the line.","examples":["Dæla 25-60 (ný gerð)"],"maxLength":200,"type":"string"},"quantity":{"description":"New quantity, above 0.","examples":[2],"exclusiveMinimum":0,"maximum":99999999.99,"type":"number"},"unitPrice":{"description":"New sale price per unit WITHOUT VAT, in ISK, as a decimal string.","examples":["42000.00"],"pattern":"^\\d{1,10}(\\.\\d{1,2})?$","type":"string"},"discountPercent":{"description":"New discount in percent.","examples":[0],"maximum":100,"minimum":0,"type":"number"},"isBillable":{"description":"Whether the line is billed to the customer.","examples":[false],"type":"boolean"},"notes":{"description":"New notes; null clears them.","examples":[null],"maxLength":2000,"type":["string","null"]}},"type":"object"},"UpdateWorkOrderRequestDto":{"additionalProperties":false,"properties":{"customer":{"anyOf":[{"$ref":"#/components/schemas/CustomerRefInputDto"},{"type":"null"}],"description":"The customer, named by exactly one of `id`, `kennitala` or `externalId`. None or more than one → 422 `exactly_one_required`; no such customer in the company → 422 `customer_not_found`; a deactivated customer → 422 `customer_inactive`. `null` clears it. Refused (409 `customer_locked`) once hours or materials of the work order were moved to an order or invoice."},"assignedEmployeeIds":{"description":"Ids of the employees doing the job (`GET /v1/employees`), at most 20, each an active employee of the company. The first is shown as the main assignee in PayGo. The WHOLE new list: `[]` removes everyone.","examples":[["1e2d3c4b-5a69-4788-9a6b-5c4d3e2f1a0b"]],"items":{"format":"uuid","type":"string"},"maxItems":20,"type":"array"},"jobType":{"description":"Type of job, free text as in PayGo. The names offered in PayGo are listed by `GET /v1/work-order-types`. `null` clears it.","examples":["Viðgerð"],"maxLength":100,"type":["string","null"]},"priority":{"description":"Priority of the job.","enum":["low","normal","high","urgent"],"examples":["urgent"],"type":"string"},"description":{"description":"Description of the job, plain text: line breaks are kept, and markup is shown as the characters you sent, never as formatting. `null` clears it.","examples":["Skipta um blöndunartæki."],"maxLength":10000,"type":["string","null"]},"scheduledStart":{"description":"Planned start, an ISO 8601 timestamp with a zone (`Z` or `+00:00`). `null` clears it. Checked against the stored `scheduledEnd` when only one is sent.","examples":["2026-11-25T09:00:00Z"],"format":"date-time","type":["string","null"]},"scheduledEnd":{"description":"Planned end, an ISO 8601 timestamp with a zone; not before `scheduledStart` (422 `scheduled_end_before_start`). `null` clears it.","examples":["2026-11-25T12:00:00Z"],"format":"date-time","type":["string","null"]},"location":{"anyOf":[{"$ref":"#/components/schemas/WorkOrderLocationInputDto"},{"type":"null"}],"description":"Where the job is done. `latitude` and `longitude` go together (422 `coordinates_incomplete` with only one). When sent it REPLACES the whole location (a part left out is cleared); `null` clears it."},"estimatedHours":{"description":"Estimated hours of work, at most 2 decimals. `null` clears it.","examples":[4],"maximum":999999.99,"minimum":0,"type":["number","null"]}},"type":"object"},"UpdateWorkOrderTimeEntryRequestDto":{"additionalProperties":false,"properties":{"type":{"description":"Kind of work: `workshop`, `on_site`, `consulting`, `travel` or `other`.","enum":["workshop","on_site","consulting","travel","other"],"examples":["travel"],"type":"string"},"startTime":{"description":"New start, an ISO 8601 timestamp with a zone (`Z` or `+00:00`).","examples":["2026-11-24T08:30:00Z"],"format":"date-time","type":"string"},"endTime":{"description":"New end, an ISO 8601 timestamp with a zone (`Z` or `+00:00`), with the rules of `createWorkOrderTimeEntry`.","examples":["2026-11-24T11:30:00Z"],"format":"date-time","type":"string"},"description":{"description":"New description; null clears it.","examples":["Skipti um dælu og síu."],"maxLength":500,"type":["string","null"]}},"type":"object"},"VatBreakdownDto":{"properties":{"rate":{"description":"VAT rate in percent.","examples":[24],"type":"number"},"net":{"description":"Sum of the net amounts (without VAT) of the lines with this rate.","examples":["10000.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"vat":{"description":"Sum of the VAT of the lines with this rate.","examples":["2400.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["rate","net","vat"],"type":"object"},"VatRateDto":{"properties":{"id":{"description":"Id of the VAT rate.","examples":["5b0c7d2e-1f3a-4c5d-8e9f-0a1b2c3d4e5f"],"format":"uuid","type":"string"},"name":{"description":"Name of the rate.","examples":["Fullt hlutfall (24%)"],"type":"string"},"rate":{"description":"The rate in percent (0–100, up to two decimals). Document lines carry the rate itself, e.g. `24`.","examples":[24],"type":"number"},"isActive":{"description":"False when the rate is no longer offered for new documents.","examples":[true],"type":"boolean"},"isDefault":{"description":"True for the rate new lines get by default.","examples":[true],"type":"boolean"}},"required":["id","name","rate","isActive","isDefault"],"type":"object"},"WarehouseDto":{"properties":{"id":{"description":"Id of the warehouse.","examples":["6f5e4d3c-2b1a-4f9e-8d7c-6b5a4f3e2d1c"],"format":"uuid","type":"string"},"name":{"description":"Name of the warehouse.","examples":["Aðallager"],"type":"string"},"code":{"description":"Short code of the warehouse.","examples":["MAIN"],"type":"string"},"isDefault":{"description":"True for the company's default warehouse.","examples":[true],"type":"boolean"},"isActive":{"description":"False when the warehouse is closed.","examples":[true],"type":"boolean"}},"required":["id","name","code","isDefault","isActive"],"type":"object"},"WebhookCustomerData":{"description":"The data of `customer.*` events.","properties":{"object":{"const":"customer","description":"Always `customer`.","type":"string"},"id":{"description":"The id of the customer. Fetch the resource with `GET` for its current state.","format":"uuid","type":"string"},"externalId":{"description":"Your own id of the record (`externalId`), or null.","maxLength":255,"type":["string","null"]}},"required":["object","id","externalId"],"type":"object"},"WebhookEvent":{"description":"The body of every webhook request: a thin envelope that says what happened and to which resource. It carries ids, document numbers, `externalId` and status, never amounts, costs or personal data. `data` is the state when the change was recorded, not the state now: fetch the resource with `GET`. Delivery is at least once and in no guaranteed order: deduplicate on `id`. See https://paygo.is/developers/webhooks.","properties":{"id":{"description":"The id of the event. The same value as the `PayGo-Event-Id` header, and the same in every attempt: deduplicate on it.","format":"uuid","type":"string"},"type":{"description":"The event type.","enum":["customer.created","customer.updated","supplier.created","supplier.updated","invoice.created","invoice.updated","invoice.payment_recorded","invoice.paid","invoice.credited","quote.created","quote.updated","quote.sent","quote.accepted","quote.rejected","quote.converted","order.created","order.updated","order.cancelled","order.invoiced","expense.created","expense.updated","expense.posted","expense.deleted","expense_document.completed","expense_document.failed","work_order.created","work_order.updated","work_order.status_changed","work_order.deleted","time_clock_entry.clocked_in","time_clock_entry.clocked_out","time_clock_entry.updated","time_clock_entry.deleted","webhook.test"],"type":"string"},"apiVersion":{"const":"v1","description":"Always `v1`.","type":"string"},"createdAt":{"description":"When the change was recorded (ISO 8601, UTC).","format":"date-time","type":"string"},"tenant":{"description":"The company the event belongs to.","properties":{"id":{"description":"The id of the company.","format":"uuid","type":"string"}},"required":["id"],"type":"object"},"data":{"description":"The resource the event is about. Its schema depends on `type`: see the webhook of that event.","oneOf":[{"$ref":"#/components/schemas/WebhookCustomerData"},{"$ref":"#/components/schemas/WebhookSupplierData"},{"$ref":"#/components/schemas/WebhookInvoiceData"},{"$ref":"#/components/schemas/WebhookQuoteData"},{"$ref":"#/components/schemas/WebhookOrderData"},{"$ref":"#/components/schemas/WebhookExpenseData"},{"$ref":"#/components/schemas/WebhookExpenseDocumentData"},{"$ref":"#/components/schemas/WebhookWorkOrderData"},{"$ref":"#/components/schemas/WebhookTimeClockEntryData"},{"$ref":"#/components/schemas/WebhookTestData"}]}},"required":["id","type","apiVersion","createdAt","tenant","data"],"type":"object"},"WebhookExpenseData":{"description":"The data of `expense.*` events.","properties":{"object":{"const":"expense","description":"Always `expense`.","type":"string"},"id":{"description":"The id of the expense. Fetch the resource with `GET` for its current state.","format":"uuid","type":"string"},"expenseNumber":{"description":"The expense number.","type":["string","null"]},"externalId":{"description":"Your own id of the record (`externalId`), or null.","maxLength":255,"type":["string","null"]},"status":{"description":"`pending`: recorded but NOT posted: no journal entry, no VAT and no payable yet; a bookkeeper reviews and approves it in PayGo. `posted`: approved and posted to the general ledger. Only a posted expense can be paid in PayGo.","enum":["pending","posted"],"type":"string"},"previousStatus":{"description":"Only on the events that change the status (`expense.posted`): the value before the change.","enum":["pending","posted"],"type":"string"}},"required":["object","id","expenseNumber","externalId","status"],"type":"object"},"WebhookExpenseDocumentData":{"description":"The data of `expense_document.*` events. Fetch the document with `GET /v1/expense-documents/{id}`.","properties":{"object":{"const":"expense_document","description":"Always `expense_document`.","type":"string"},"id":{"description":"The id of the expense document. Fetch the resource with `GET` for its current state.","format":"uuid","type":"string"},"externalId":{"description":"Your own id of the record (`externalId`), or null.","maxLength":255,"type":["string","null"]},"status":{"description":"`status`: `queued` (waiting), `processing` (being read), `completed` (an expense was recorded from the data read off the document; fetch it with `GET /v1/expenses/{expenseId}`), `needs_review` (an expense was recorded WITHOUT the data, because the document could not be read: amount 0, a bookkeeper fills it in), `not_an_expense` (the document was a customs declaration and was recorded as one; no expense, see `note`), `failed` (nothing was recorded; `failureCode` says why, and the same file may be uploaded again).","enum":["queued","processing","completed","needs_review","not_an_expense","failed"],"type":"string"},"previousStatus":{"description":"Only on the events that change the status (`expense_document.completed`, `expense_document.failed`): the value before the change.","enum":["queued","processing","completed","needs_review","not_an_expense","failed"],"type":"string"}},"required":["object","id","externalId","status"],"type":"object"},"WebhookInvoiceData":{"description":"The data of `invoice.*` events. On `invoice.credited` only `object`, `id` (the credited invoice) and `creditNoteId` are present; every other invoice event carries the fields above except `creditNoteId`.","properties":{"object":{"const":"invoice","description":"Always `invoice`.","type":"string"},"id":{"description":"The id of the invoice. Fetch the resource with `GET` for its current state.","format":"uuid","type":"string"},"invoiceNumber":{"description":"The invoice number.","type":["string","null"]},"externalId":{"description":"Your own id of the record (`externalId`), or null.","maxLength":255,"type":["string","null"]},"type":{"description":"`invoice`, or `credit_note` for a credit note (its amounts are negative).","enum":["invoice","credit_note"],"type":"string"},"status":{"description":"`posted`: issued and posted to the ledger (credit notes too). `credited`: fully credited by credit notes; a partly credited invoice stays `posted` with `creditedAmount` above 0. `cancelled`: old cancelled invoices only.","enum":["posted","credited","cancelled"],"type":"string"},"paymentStatus":{"description":"Computed from the amounts: `paid` when `balance` is 0 (on a foreign-currency invoice within 0.01), otherwise `partially_paid` when `amountSettled` is not 0, otherwise `unpaid`.","enum":["unpaid","partially_paid","paid"],"type":"string"},"previousPaymentStatus":{"description":"Only on the events that change the payment status (`invoice.payment_recorded`, `invoice.paid`): the value before the change.","enum":["unpaid","partially_paid","paid"],"type":"string"},"creditNoteId":{"description":"Only on `invoice.credited`: the id of the new credit note.","format":"uuid","type":"string"}},"required":["object","id"],"type":"object"},"WebhookOrderData":{"description":"The data of `order.*` events.","properties":{"object":{"const":"order","description":"Always `order`.","type":"string"},"id":{"description":"The id of the order. Fetch the resource with `GET` for its current state.","format":"uuid","type":"string"},"orderNumber":{"description":"The order number.","type":["string","null"]},"externalId":{"description":"Your own id of the record (`externalId`), or null.","maxLength":255,"type":["string","null"]},"status":{"description":"Status of the order. New values may be added; treat an unknown value like `processing`. `invoiced` does not mean delivered: invoicing an order does not move stock, which happens when goods are delivered (`deliveryStatus`).","enum":["pending","confirmed","awaiting_payment","awaiting_stock","processing","in_assembly","shipped","awaiting_pickup","delivered","partially_delivered","invoiced","partially_invoiced","cancelled"],"type":"string"},"invoicingStatus":{"description":"How much of the order has been invoiced.","enum":["none","partial","full"],"type":"string"},"previousStatus":{"description":"Only on the events that change the status (`order.cancelled`): the value before the change.","enum":["pending","confirmed","awaiting_payment","awaiting_stock","processing","in_assembly","shipped","awaiting_pickup","delivered","partially_delivered","invoiced","partially_invoiced","cancelled"],"type":"string"},"previousInvoicingStatus":{"description":"Only on the events that change the invoicing status (`order.invoiced`): the value before the change.","enum":["none","partial","full"],"type":"string"}},"required":["object","id","orderNumber","externalId","status","invoicingStatus"],"type":"object"},"WebhookQuoteData":{"description":"The data of `quote.*` events.","properties":{"object":{"const":"quote","description":"Always `quote`.","type":"string"},"id":{"description":"The id of the quote. Fetch the resource with `GET` for its current state.","format":"uuid","type":"string"},"quoteNumber":{"description":"The quote number.","type":["string","null"]},"externalId":{"description":"Your own id of the record (`externalId`), or null.","maxLength":255,"type":["string","null"]},"status":{"description":"`draft`: being prepared, can be changed. `sent`: sent to the customer and still valid. `accepted` / `rejected`: the customer's answer. `expired`: sent, but `validUntil` has passed (a sent quote whose `validUntil` is before today, UTC, is `expired` from the next day on). `converted_to_order`: a sales order was made from the quote (`orderId`).","enum":["draft","sent","accepted","rejected","expired","converted_to_order"],"type":"string"},"previousStatus":{"description":"Only on the events that change the status (`quote.sent`, `quote.accepted`, `quote.rejected`, `quote.converted`): the value before the change.","enum":["draft","sent","accepted","rejected","expired","converted_to_order"],"type":"string"}},"required":["object","id","quoteNumber","externalId","status"],"type":"object"},"WebhookSupplierData":{"description":"The data of `supplier.*` events.","properties":{"object":{"const":"supplier","description":"Always `supplier`.","type":"string"},"id":{"description":"The id of the supplier. Fetch the resource with `GET` for its current state.","format":"uuid","type":"string"},"externalId":{"description":"Your own id of the record (`externalId`), or null.","maxLength":255,"type":["string","null"]}},"required":["object","id","externalId"],"type":"object"},"WebhookTestData":{"description":"The data of the `webhook.test` event: the webhook that was tested.","properties":{"object":{"const":"webhook_endpoint","description":"Always `webhook_endpoint`.","type":"string"},"id":{"description":"The id of the webhook endpoint. Fetch the resource with `GET` for its current state.","format":"uuid","type":"string"}},"required":["object","id"],"type":"object"},"WebhookTimeClockEntryData":{"description":"The data of `time_clock_entry.*` events: only the employee. No times, no names, no pay.","properties":{"object":{"const":"time_clock_entry","description":"Always `time_clock_entry`.","type":"string"},"id":{"description":"The id of the time clock entry. Fetch the resource with `GET` for its current state.","format":"uuid","type":"string"},"employeeId":{"description":"The id of the employee (as in `GET /v1/employees`). Nothing else about the entry is carried: fetch it with `GET /v1/time-clock/entries`.","format":"uuid","type":["string","null"]}},"required":["object","id","employeeId"],"type":"object"},"WebhookWorkOrderData":{"description":"The data of `work_order.*` events.","properties":{"object":{"const":"work_order","description":"Always `work_order`.","type":"string"},"id":{"description":"The id of the work order. Fetch the resource with `GET` for its current state.","format":"uuid","type":"string"},"workOrderNumber":{"description":"The work order number.","type":["string","null"]},"externalId":{"description":"Your own id of the record (`externalId`), or null.","maxLength":255,"type":["string","null"]},"status":{"description":"Status: `new`, `assigned`, `in_progress`, `on_hold`, `ready_to_invoice` (work done, waiting to be invoiced), `completed`, `invoiced` or `cancelled`. PayGo has no fixed order between them: any status can follow any other.","enum":["new","assigned","in_progress","on_hold","ready_to_invoice","completed","invoiced","cancelled"],"type":"string"},"previousStatus":{"description":"Only on the events that change the status (`work_order.status_changed`): the value before the change.","enum":["new","assigned","in_progress","on_hold","ready_to_invoice","completed","invoiced","cancelled"],"type":"string"}},"required":["object","id","workOrderNumber","externalId","status"],"type":"object"},"WorkOrderAttachmentDto":{"properties":{"id":{"description":"Id of the file on the work order.","examples":["7c9e6679-7425-40de-944b-e07fc1f90ae7"],"format":"uuid","type":"string"},"kind":{"description":"`photo`, `pdf`, `video` or `other`, as PayGo filed it. The API takes photos and PDF only; a video added in PayGo is listed and downloaded as `application/octet-stream`.","enum":["photo","video","pdf","other"],"examples":["photo"],"type":"string"},"fileName":{"description":"File name to save the file as.","examples":["Mynd af tengigrind.jpg"],"type":"string"},"mimeType":{"description":"Media type the download is served with: `application/pdf`, `image/jpeg`, `image/png`, `image/gif`, `image/webp`, or `application/octet-stream` for anything else.","examples":["image/jpeg"],"type":"string"},"size":{"description":"Size in bytes, or null when unknown.","examples":[184213],"type":["number","null"]},"description":{"description":"Description given in PayGo, if any.","examples":[null],"type":["string","null"]},"createdAt":{"description":"When the file was added (ISO 8601, UTC).","examples":["2026-11-24T10:15:00.000Z"],"format":"date-time","type":"string"},"available":{"description":"False when the file cannot be downloaded through the API (for example a file that is no longer stored, or one stored outside the company's work order folder); downloading it answers 404.","examples":[true],"type":"boolean"}},"required":["id","kind","fileName","mimeType","size","description","createdAt","available"],"type":"object"},"WorkOrderAttachmentListDto":{"properties":{"data":{"description":"The files of the work order, oldest first.","items":{"$ref":"#/components/schemas/WorkOrderAttachmentDto"},"type":"array"}},"required":["data"],"type":"object"},"WorkOrderDto":{"properties":{"id":{"description":"Id of the work order in PayGo.","examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"},"workOrderNumber":{"description":"Number of the work order, `WO-YYYY-NNNNN`, assigned by PayGo.","examples":["WO-2026-00042"],"type":"string"},"externalId":{"description":"Your own id of the work order, unique within the company.","examples":["JOB-7781"],"maxLength":255,"type":["string","null"]},"status":{"description":"Status: `new`, `assigned`, `in_progress`, `on_hold`, `ready_to_invoice` (work done, waiting to be invoiced), `completed`, `invoiced` or `cancelled`. PayGo has no fixed order between them: any status can follow any other.","enum":["new","assigned","in_progress","on_hold","ready_to_invoice","completed","invoiced","cancelled"],"examples":["in_progress"],"type":"string"},"priority":{"description":"Priority of the work order.","enum":["low","normal","high","urgent"],"examples":["normal"],"type":"string"},"jobType":{"description":"Type of job, free text. The names offered in PayGo are listed by `GET /v1/work-order-types`.","examples":["Viðgerð"],"maxLength":100,"type":["string","null"]},"description":{"description":"Description of the job, plain text with line breaks; formatting added in PayGo is left out.","examples":["Lekur undir eldhúsvaski."],"type":["string","null"]},"customer":{"anyOf":[{"$ref":"#/components/schemas/CustomerRefDto"},{"type":"null"}],"description":"The customer, as it is now in PayGo, or null when the work order has none."},"assignedEmployees":{"description":"Employees assigned to the work order (id and name only).","items":{"$ref":"#/components/schemas/WorkOrderEmployeeDto"},"type":"array"},"scheduledStart":{"description":"Planned start (ISO 8601, UTC).","examples":["2026-11-24T09:00:00.000Z"],"format":"date-time","type":["string","null"]},"scheduledEnd":{"description":"Planned end (ISO 8601, UTC).","examples":["2026-11-24T12:00:00.000Z"],"format":"date-time","type":["string","null"]},"location":{"allOf":[{"$ref":"#/components/schemas/WorkOrderLocationDto"}],"description":"Where the work is done."},"estimatedHours":{"description":"Estimated hours of work.","examples":[3.5],"type":["number","null"]},"orders":{"description":"Sales orders the work order has been transferred to.","items":{"$ref":"#/components/schemas/WorkOrderOrderRefDto"},"type":"array"},"invoices":{"description":"Invoices made from the work order.","items":{"$ref":"#/components/schemas/WorkOrderInvoiceRefDto"},"type":"array"},"createdAt":{"description":"When the work order was created (ISO 8601, UTC).","examples":["2026-11-22T10:15:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"Last activity on the work order (ISO 8601, UTC): a change to the work order itself (status included) or to its hours, materials, attachments, notes or assigned employees. `sort=updatedAt` and `updatedSince` use this value.","examples":["2026-11-23T14:02:11.000Z"],"format":"date-time","type":"string"},"deletedAt":{"description":"When the work order was deleted in PayGo (ISO 8601, UTC). Only listed with `includeDeleted=true`; null otherwise.","examples":[null],"format":"date-time","type":["string","null"]}},"required":["id","workOrderNumber","externalId","status","priority","jobType","description","customer","assignedEmployees","scheduledStart","scheduledEnd","location","estimatedHours","orders","invoices","createdAt","updatedAt","deletedAt"],"type":"object"},"WorkOrderEmployeeDto":{"properties":{"id":{"description":"Id of the employee (`/v1/employees`).","examples":["1e2d3c4b-5a69-4788-9a6b-5c4d3e2f1a0b"],"format":"uuid","type":"string"},"name":{"description":"Current name of the employee.","examples":["Anna Jónsdóttir"],"type":"string"}},"required":["id","name"],"type":"object"},"WorkOrderInvoiceRefDto":{"properties":{"id":{"description":"Id of the invoice (`/v1/invoices/{id}`).","examples":["4a5b6c7d-8e9f-4a0b-9c1d-2e3f4a5b6c7d"],"format":"uuid","type":"string"},"invoiceNumber":{"description":"Number of the invoice.","examples":["2026-00118"],"type":"string"}},"required":["id","invoiceNumber"],"type":"object"},"WorkOrderLineBilledOnDto":{"properties":{"orderId":{"description":"The sales order (`/v1/orders`) the line was moved to, or null.","examples":[null],"format":"uuid","type":["string","null"]},"invoiceId":{"description":"The invoice (`/v1/invoices`) the line was moved to, or null.","examples":["8a9b0c1d-2e3f-4a4b-8c5d-6e7f8a9b0c1d"],"format":"uuid","type":["string","null"]}},"required":["orderId","invoiceId"],"type":"object"},"WorkOrderLocationDto":{"properties":{"address":{"description":"Address of the work site.","examples":["Laugavegur 1, 101 Reykjavík"],"maxLength":500,"type":["string","null"]},"latitude":{"description":"Latitude of the work site (WGS 84).","examples":[64.1466],"type":["number","null"]},"longitude":{"description":"Longitude of the work site (WGS 84).","examples":[-21.9426],"type":["number","null"]}},"required":["address","latitude","longitude"],"type":"object"},"WorkOrderLocationInputDto":{"additionalProperties":false,"properties":{"address":{"description":"Address of the job.","examples":["Laugavegur 1, 101 Reykjavík"],"maxLength":500,"type":["string","null"]},"latitude":{"description":"Latitude in decimal degrees (WGS 84), up to 8 decimals. Send it together with `longitude`.","examples":[64.1466],"maximum":90,"minimum":-90,"type":["number","null"]},"longitude":{"description":"Longitude in decimal degrees (WGS 84), up to 8 decimals. Send it together with `latitude`.","examples":[-21.9426],"maximum":180,"minimum":-180,"type":["number","null"]}},"type":"object"},"WorkOrderMaterialDto":{"properties":{"id":{"description":"Id of the material line.","examples":["9e8d7c6b-5a49-4382-8170-6f5e4d3c2b1a"],"format":"uuid","type":"string"},"workOrderId":{"description":"The work order of the line.","examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"},"productId":{"description":"The product (`/v1/products`), or null on a free-text line.","examples":["7d2e9f1a-3b4c-4d5e-8f6a-1b2c3d4e5f6a"],"format":"uuid","type":["string","null"]},"sku":{"description":"Product number (SKU) of the product, or null.","examples":["VARA-100"],"type":["string","null"]},"name":{"description":"Name of the line.","examples":["Dæla 25-60"],"type":["string","null"]},"unit":{"description":"Unit of the product (e.g. `stk`), or null.","examples":["stk"],"type":["string","null"]},"quantity":{"description":"Quantity, at most two decimals.","examples":[1],"type":"number"},"unitPrice":{"description":"Sale price per unit WITHOUT VAT, before the discount.","examples":["45900.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"discountPercent":{"description":"Discount in percent of the unit price.","examples":[0],"maximum":100,"minimum":0,"type":"number"},"totalAmount":{"description":"Line amount WITHOUT VAT, after the discount.","examples":["45900.00"],"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"currency":{"description":"Currency of the amounts (always ISK).","examples":["ISK"],"type":"string"},"isBillable":{"description":"Whether the line is billed to the customer.","examples":[true],"type":"boolean"},"billed":{"description":"Whether the line was moved to a sales order or invoice; a billed line cannot be changed or deleted.","examples":[false],"type":"boolean"},"billedOn":{"allOf":[{"$ref":"#/components/schemas/WorkOrderLineBilledOnDto"}],"description":"The order or invoice the line was moved to."},"notes":{"description":"Notes on the line.","examples":[null],"type":["string","null"]},"usedAt":{"description":"When the material was used (UTC).","examples":["2026-11-24T11:31:02.000Z"],"format":"date-time","type":"string"},"createdAt":{"description":"When the line was recorded (UTC).","examples":["2026-11-24T11:31:02.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the line last changed (UTC).","examples":["2026-11-24T11:31:02.000Z"],"format":"date-time","type":"string"}},"required":["id","workOrderId","productId","sku","name","unit","quantity","unitPrice","discountPercent","totalAmount","currency","isBillable","billed","billedOn","notes","usedAt","createdAt","updatedAt"],"type":"object"},"WorkOrderNoteDto":{"properties":{"id":{"description":"Id of the note.","examples":["3f2b8c1e-6d4a-4b7e-9c2f-1a0b9d8e7f6a"],"format":"uuid","type":"string"},"text":{"description":"The note as written: plain text, line breaks kept. PayGo shows it as text, never as HTML.","examples":["Skipt um þéttingu undir vaski. Viðskiptavinur vill fá tilboð í nýjan blöndunartæki."],"type":"string"},"isInternal":{"description":"`true`: internal, for the company only. `false`: printed on the work order report the customer gets.","examples":[false],"type":"boolean"},"source":{"description":"`api`: written through the API. `paygo`: written in PayGo.","enum":["api","paygo"],"examples":["paygo"],"type":"string"},"createdAt":{"description":"When the note was written (ISO 8601, UTC).","examples":["2026-11-24T10:15:00.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the note was last changed (ISO 8601, UTC).","examples":["2026-11-24T10:15:00.000Z"],"format":"date-time","type":"string"}},"required":["id","text","isInternal","source","createdAt","updatedAt"],"type":"object"},"WorkOrderNoteListDto":{"properties":{"data":{"description":"The notes of the work order, oldest first.","items":{"$ref":"#/components/schemas/WorkOrderNoteDto"},"type":"array"}},"required":["data"],"type":"object"},"WorkOrderOrderRefDto":{"properties":{"id":{"description":"Id of the order (`/v1/orders/{id}`).","examples":["3e4f5a6b-7c8d-4e9f-8a0b-1c2d3e4f5a6b"],"format":"uuid","type":"string"},"orderNumber":{"description":"Number of the order.","examples":["SO-2026-00042"],"type":"string"}},"required":["id","orderNumber"],"type":"object"},"WorkOrderTimeEntryDto":{"properties":{"id":{"description":"Id of the time entry.","examples":["5d6e7f8a-9b0c-4d1e-8f2a-3b4c5d6e7f8a"],"format":"uuid","type":"string"},"workOrderId":{"description":"The work order of the entry.","examples":["6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f"],"format":"uuid","type":"string"},"employee":{"anyOf":[{"$ref":"#/components/schemas/WorkOrderEmployeeDto"},{"type":"null"}],"description":"The employee who did the work; null on old entries recorded only for a PayGo user."},"type":{"description":"Kind of work: `workshop`, `on_site`, `consulting`, `travel` or `other`.","enum":["workshop","on_site","consulting","travel","other"],"examples":["on_site"],"type":"string"},"startTime":{"description":"Start of the work (UTC).","examples":["2026-11-24T09:00:00.000Z"],"format":"date-time","type":"string"},"endTime":{"description":"End of the work (UTC); null while the entry is running (started in PayGo).","examples":["2026-11-24T11:30:00.000Z"],"format":"date-time","type":["string","null"]},"minutes":{"description":"Length in minutes: the hours set in PayGo when they were, otherwise end − start; null while running.","examples":[150],"type":["integer","null"]},"description":{"description":"Description of the work.","examples":["Skipti um dælu."],"type":["string","null"]},"isBillable":{"description":"Whether the hours are billed to the customer.","examples":[true],"type":"boolean"},"billed":{"description":"Whether the entry was moved to a sales order or invoice; a billed entry cannot be changed or deleted.","examples":[false],"type":"boolean"},"billedOn":{"allOf":[{"$ref":"#/components/schemas/WorkOrderLineBilledOnDto"}],"description":"The order or invoice the entry was moved to."},"rate":{"anyOf":[{"$ref":"#/components/schemas/WorkOrderTimeEntryRateDto"},{"type":"null"}],"description":"The named rate of the entry (its name only), or null when none applies yet."},"source":{"description":"Where the entry was recorded: `api` (through this API), `time_clock` (a segment of a time clock shift) or `paygo` (in PayGo).","enum":["api","paygo","time_clock"],"examples":["api"],"type":"string"},"timeClockEntryId":{"description":"The time clock shift (`/v1/time-clock/entries`) the entry is a segment of, or null.","examples":[null],"format":"uuid","type":["string","null"]},"createdAt":{"description":"When the entry was recorded (UTC).","examples":["2026-11-24T11:31:02.000Z"],"format":"date-time","type":"string"},"updatedAt":{"description":"When the entry last changed (UTC).","examples":["2026-11-24T11:31:02.000Z"],"format":"date-time","type":"string"}},"required":["id","workOrderId","employee","type","startTime","endTime","minutes","description","isBillable","billed","billedOn","rate","source","timeClockEntryId","createdAt","updatedAt"],"type":"object"},"WorkOrderTimeEntryRateDto":{"properties":{"id":{"description":"Id of the rate in PayGo.","examples":["0b1c2d3e-4f5a-4b6c-8d7e-9f0a1b2c3d4e"],"format":"uuid","type":"string"},"name":{"description":"Name of the rate.","examples":["Dagvinna"],"type":"string"}},"required":["id","name"],"type":"object"},"WorkOrderTypeDto":{"properties":{"id":{"description":"Id of the work order type.","examples":["7d8e9f0a-1b2c-4d3e-9f4a-5b6c7d8e9f0a"],"format":"uuid","type":"string"},"name":{"description":"Name of the type; a work order stores this name as its `jobType`.","examples":["Viðgerð"],"type":"string"},"isActive":{"description":"False when the type is no longer offered for new work orders.","examples":[true],"type":"boolean"}},"required":["id","name","isActive"],"type":"object"}},"securitySchemes":{"apiKey":{"bearerFormat":"paygo_live_…","description":"A secret API key of the company, created by its administrator under Settings. Send it as `Authorization: Bearer <key>`. A key looks like `paygo_live_…` and works on https://api.paygo.is. Keep keys on your server: never put one in a browser or a mobile app.","scheme":"bearer","type":"http"}}}}