{"id":31052701,"url":"https://github.com/getconversio/node-woocommerce","last_synced_at":"2025-09-15T01:05:40.076Z","repository":{"id":31847122,"uuid":"35414321","full_name":"getconversio/node-woocommerce","owner":"getconversio","description":"Connects NodeJS to the glorious world of the WooCommerce API","archived":false,"fork":false,"pushed_at":"2020-04-04T15:06:06.000Z","size":170,"stargazers_count":25,"open_issues_count":6,"forks_count":15,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-08-09T19:29:16.966Z","etag":null,"topics":["nodejs","woocommerce-api"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getconversio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-11T09:27:11.000Z","updated_at":"2022-12-29T17:38:38.000Z","dependencies_parsed_at":"2022-09-10T19:40:55.478Z","dependency_job_id":null,"html_url":"https://github.com/getconversio/node-woocommerce","commit_stats":null,"previous_names":["receiptful/node-woocommerce"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/getconversio/node-woocommerce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getconversio%2Fnode-woocommerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getconversio%2Fnode-woocommerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getconversio%2Fnode-woocommerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getconversio%2Fnode-woocommerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getconversio","download_url":"https://codeload.github.com/getconversio/node-woocommerce/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getconversio%2Fnode-woocommerce/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275189901,"owners_count":25420672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nodejs","woocommerce-api"],"created_at":"2025-09-15T01:05:35.383Z","updated_at":"2025-09-15T01:05:40.060Z","avatar_url":"https://github.com/getconversio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEPRECATION NOTICE\nThis packages has been deprecated in favour of the official https://github.com/woocommerce/wc-api-node. Please update your dependencies.\n\n# node-woocommerce\nConnects NodeJS to the glorious world of the WooCommerce API\n\n[![Build Status](https://travis-ci.org/Receiptful/node-woocommerce.svg?branch=master)](https://travis-ci.org/Receiptful/node-woocommerce)\n\n## Important v2.0 Changes\n\nTo keep this plugin as up to date as possible v2 requires node v4+. To take advantage of the new features of node the module now utilises ES6 code.\n\nTo allow for some automation surrounding the authentication it is now required to pass the url's protocol (http/https). This allows the module to automatically choose from basic auth or OAuth when sending requests. This can be forced by using the `ssl` option.\n\nUse of promises are now available, legacy support for callbacks is still included. To use `node-woocommerce` with promises you can do the following:\n```javascript\nwooCommerce.get('/products')\n  .then(data =\u003e {\n    // data will contain the body content from the request\n  })\n  .catch(err =\u003e {\n    // Log the error message\n    console.log(err.message);\n\n    // Log the body returned from the server\n    console.log(err.body);\n\n    // Log the full response object and status code\n    console.log(err.response, err.response.statusCode);\n  });\n```\n\n## Installation\n\nTo install the module using NPM:\n\n```\nnpm install woocommerce --save\n```\n\n## Setup\n\nYou will need a consumer key and consumer secret to call your store's WooCommerce API. You can find instructions [here](http://docs.woothemes.com/document/woocommerce-rest-api/)\n\nInclude the 'woocommerce' module within your script and instantiate it with a config:\n\n```javascript\nvar WooCommerce = require('woocommerce');\n\nvar wooCommerce = new WooCommerce({\n  url: 'http://mystore.com',\n  ssl: true,\n  consumerKey: 'ck_123456789abcd',\n  secret: 'cs_abcdefg12345'\n});\n```\n\n**Instantiating a WooCommerce instace without a url, consumerKey or secret will result in an error being thrown**\n\n## Options\n\nWhen instantiating the WooCommerce object you have a choice of the following configuration options:\n\n| option      | type    | required | description                                                                                                                         |\n|-------------|---------|----------|-------------------------------------------------------------------------------------------------------------------------------------|\n| url         | string  | yes      | The url of your store including the protocol: http://mystore.com, https://securestore.com                                                                       |\n| consumerKey | string  | yes      | The consumer key generated in the store admin                                                                                       |\n| secret      | string  | yes      | The consumer secret generated in the store admin                                                                                    |\n| ssl         | boolean | no       | (default: based on protocol, https = true, http = false) this is automatically set by default, but can be forced by setting the ssl option                                                               |\n| logLevel    | number  | no       | (default: 0) 0 shows errors only, 1 shows info and errors for debugging                                                             |\n| apiPath     | string  | no       | (default: '/wc-api/v2') The path to your API, it should contain a leading slash and no trailing slash                               |\n\n## Calling the API\n\nYour WooCommerce API can be called once the WooCommerce object has been instantiated (see above).\n\n### GET\n\nAssuming you have already [instantiated](#setup).\n\n```javascript\nwooCommerce.get('/products', function(err, data, res){\n  // err will return any errors that occur\n  // data will contain the body content from the request\n  // res is the full response object, use this to get headers etc\n});\n```\n\n### POST\n\nAssuming you have already [instantiated](#setup) and for this example you have a [coupon object](http://woothemes.github.io/woocommerce-rest-api-docs/#create-a-coupon).\n\n```javascript\nwooCommerce.post('/coupons', couponObject, function(err, data, res){\n  // err will return any errors that occur\n  // data will contain the body content from the request\n  // res is the full response object, use this to get headers etc\n});\n```\n\n### PUT\n\nAssuming you have already [instantiated](#setup).\n\n```javascript\nvar couponUpdate = {\n  amount: 5\n};\n\nwooCommerce.put('/coupons/1234', couponUpdate, function(err, data, res){\n  // err will return any errors that occur\n  // data will contain the body content from the request\n  // res is the full response object, use this to get headers etc\n});\n```\n\n### DELETE\n\nAssuming you have already [instantiated](#setup).\n\n```javascript\nwooCommerce.delete('/coupons/1234', function(err, data, res){\n  // err will return any errors that occur\n  // data will contain the body content from the request\n  // res is the full response object, use this to get headers etc\n});\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Contributing\n\nThis module was originally written to be used with [Receiptful](https://receiptful.com) and is used in a production environment currently. This will ensure that this module is well maintained, bug free and as up to date as possible.\n\nReceiptful's developers will continue to make updates as often as required to have a consistently bug free platform, but we are happy to review any feature requests or issues and are accepting constructive pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetconversio%2Fnode-woocommerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetconversio%2Fnode-woocommerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetconversio%2Fnode-woocommerce/lists"}