{"_id":"@debitura/debt-collection","name":"@debitura/debt-collection","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@debitura/debt-collection","version":"1.0.0","description":"Official Debitura client for the Debt Collection (Customer) API.","author":{"name":"Debitura"},"repository":{"type":"git","url":"git+https://github.com/debitura/Debitura.SDK.git","directory":"typescript"},"keywords":["debitura","debt-collection","debt-recovery","api","sdk","openapi"],"license":"MIT","main":"./dist/index.js","typings":"./dist/index.d.ts","module":"./dist/esm/index.js","sideEffects":false,"scripts":{"build":"tsc && tsc -p tsconfig.esm.json","prepare":"npm run build"},"dependencies":{"axios":"^1.6.1"},"devDependencies":{"@types/node":"12.11.5 - 12.20.42","typescript":"^4.0 || ^5.0"},"homepage":"https://www.debitura.com/integration/debt-collection-api","bugs":{"url":"https://github.com/debitura/Debitura.SDK/issues"},"publishConfig":{"access":"public"},"_id":"@debitura/debt-collection@1.0.0","gitHead":"23e74646c12ba5ab6c06a250e0bc9afe23f7f50d","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Og6Ispm0zadxNAfUXdG4Mpl7aqayXqayoR1NZpNeyGn7VNYGiVO6v+vcWFNskddP67WBlGFK6AQjnvbQiGmi7Q==","shasum":"5d0155dac0dfb27a1184ad4b9f21d4a9e5864cfb","tarball":"https://registry.npmjs.org/@debitura/debt-collection/-/debt-collection-1.0.0.tgz","fileCount":478,"unpackedSize":2493658,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@debitura%2fdebt-collection@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICjvAYFvJlLl4ya7lbLvynDrJV3jM0LBKOFcTbwI7RiHAiEAzUwtR1mVKrYoIFontSkv5U1EK3nk9XwbCthUpn95P6Y="}]},"_npmUser":{"name":"larsholdgaard","email":"contact@debitura.com"},"directories":{},"maintainers":[{"name":"larsholdgaard","email":"contact@debitura.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/debt-collection_1.0.0_1782208435706_0.7937893909263773"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-23T09:53:55.568Z","1.0.0":"2026-06-23T09:53:55.833Z","modified":"2026-06-23T09:53:56.244Z"},"maintainers":[{"name":"larsholdgaard","email":"contact@debitura.com"}],"description":"Official Debitura client for the Debt Collection (Customer) API.","homepage":"https://www.debitura.com/integration/debt-collection-api","keywords":["debitura","debt-collection","debt-recovery","api","sdk","openapi"],"repository":{"type":"git","url":"git+https://github.com/debitura/Debitura.SDK.git","directory":"typescript"},"author":{"name":"Debitura"},"bugs":{"url":"https://github.com/debitura/Debitura.SDK/issues"},"license":"MIT","readme":"# @debitura/debt-collection\n\nOfficial **TypeScript / JavaScript** client for the [Debitura Debt Collection (Customer) API](https://www.debitura.com/integration/debt-collection-api).\n\nDebitura connects you with trusted, local debt collection firms in the debtor's country and recovers your overdue B2B/B2C claims on a no-cure-no-pay basis. This SDK lets you upload cases, preview pricing/eligibility, track status, and manage your collection workflow programmatically.\n\n- **Landing page:** https://www.debitura.com/integration/debt-collection-api\n- **Full docs & guides:** https://docs.debitura.com\n- **Source:** https://github.com/debitura/Debitura.SDK (`/typescript`)\n\nThis package is **generated from the OpenAPI spec** with [openapi-generator](https://openapi-generator.tech) (`typescript-axios`). The package version tracks the spec's `info.version`. Do not edit the generated files by hand — change the spec and regenerate.\n\n## Install\n\n```bash\nnpm install @debitura/debt-collection\n# or\nyarn add @debitura/debt-collection\n```\n\n## Authentication\n\nThe Debt Collection API is a gated, commercial API. You authenticate with an **API key** sent in the `XApiKey` HTTP header. Get your key from your Debitura account at https://app.debitura.com/CreditorApiKey.\n\nConfigure it once via the `Configuration` object:\n\n```ts\nimport { Configuration, CasesApi } from \"@debitura/debt-collection\";\n\nconst config = new Configuration({\n  // Debitura sends the API key in the `XApiKey` header.\n  apiKey: process.env.DEBITURA_API_KEY!,\n  basePath: \"https://api.debitura.com\", // your assigned Customer API base URL\n});\n\nconst cases = new CasesApi(config);\n```\n\n> The `apiKey` option wires up the `XApiKey` header for you (the spec's `ApiKey` security scheme). Referral partners using a bearer token should set `accessToken` instead.\n\n## Example — list and preview a case\n\n```ts\nimport { Configuration, CasesApi } from \"@debitura/debt-collection\";\n\nconst config = new Configuration({\n  apiKey: process.env.DEBITURA_API_KEY!,\n  basePath: \"https://api.debitura.com\",\n});\nconst cases = new CasesApi(config);\n\nasync function main() {\n  // List your existing cases. `casesGet` returns a paginated InvoiceListDto:\n  //   { page: { totalResults, pageSize, currentPage, ... }, cases: [...] }\n  const { data: result } = await cases.casesGet();\n  console.log(\n    `You have ${result.page?.totalResults ?? result.cases?.length ?? 0} case(s) ` +\n      `(page ${result.page?.currentPage ?? 1}).`\n  );\n\n  // Preview pricing / eligibility before creating a case.\n  // amountToRecover, currencyCode and debtor (type + countryAlpha2) are required.\n  const { data: preview } = await cases.casesPreviewPost({\n    debituraWebExternalApiContractsV1CasesRequestsPreviewCaseRequestApiViewModel: {\n      amountToRecover: 1000,\n      currencyCode: \"EUR\",\n      debtor: { type: \"Company\", countryAlpha2: \"DK\" },\n    },\n  });\n  console.log(\"Preview:\", preview);\n}\n\nmain().catch((err) => {\n  console.error(err);\n  process.exit(1);\n});\n```\n\nAlways `preview` for pricing and eligibility before you create a case — creating a case is a legal/financial action.\n\n## What's in the box\n\nGenerated API classes (one per tag): `CasesApi`, `CoverageApi`, `ContractsApi`, `DivisionsApi`, `PaymentsApi`, `WebhooksApi`, `MeApi`, `UsersApi`, and more. All request/response models are exported from the package root and under `./models`.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-5f6ad1b363c8ca31c1df5e42245215f5"}