{"library":"node-sellsy","title":"Sellsy API Wrapper","description":"The `node-sellsy` library serves as a JavaScript wrapper for the Sellsy API, designed for both Node.js and browser environments. It provides a promise-based interface to interact with Sellsy's largely PHP-centric API, facilitating automation of tasks within the Sellsy platform. Developers can utilize a generic `sellsy.api({ method, params })` call for direct access to all documented Sellsy API methods, alongside higher-level abstractions for common operations on customer and document entities, such as `sellsy.customers.create` or `sellsy.documents.getList`. The latest stable version is 1.5.5, with the last update released in November 2021. A key differentiator is enabling JavaScript developers to integrate with Sellsy without relying on PHP, offering features like OAuth private app authentication. It handles the underlying HTTP requests and response parsing, returning data in a structured JavaScript object format.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install node-sellsy"],"cli":null},"imports":["const Sellsy = require('node-sellsy');","// For ESM, you might need a wrapper or dynamic import: const Sellsy = (await import('node-sellsy')).default;","// No named exports are provided by this CommonJS module."],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const Sellsy = require(\"node-sellsy\");\n\nconst sellsy = new Sellsy({\n  creds: {\n    consumerKey: process.env.SELLSY_CONSUMER_KEY ?? \"YOUR_CONSUMER_KEY\",\n    consumerSecret: process.env.SELLSY_CONSUMER_SECRET ?? \"YOUR_CONSUMER_SECRET\",\n    userToken: process.env.SELLSY_USER_TOKEN ?? \"YOUR_USER_TOKEN\",\n    userSecret: process.env.SELLSY_USER_SECRET ?? \"YOUR_USER_SECRET\",\n  },\n});\n\nconst params = {\n  search: {\n    contains: \"test\",\n  },\n};\n\nsellsy\n  .api({\n    method: \"Client.getList\",\n    params: params,\n  })\n  .then((data) => {\n    console.log(\"Successfully fetched client data:\", data);\n  })\n  .catch((e) => {\n    console.error(\"Error fetching client data:\", e);\n  });","lang":"javascript","description":"Initializes the Sellsy API client with credentials from environment variables and fetches a list of clients matching a 'test' search term using the generic API method.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}