{"id":19947708,"url":"https://github.com/spencerlepine/printify-sdk-js","last_synced_at":"2025-05-03T18:30:46.658Z","repository":{"id":249279492,"uuid":"827463185","full_name":"spencerlepine/printify-sdk-js","owner":"spencerlepine","description":"Node.js SDK for the Printify API.","archived":false,"fork":false,"pushed_at":"2025-04-16T03:20:43.000Z","size":4753,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-01T16:59:14.785Z","etag":null,"topics":["javascript","nodejs","nodejs-sdk","printify","printify-api","printify-sdk","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/printify-sdk-js","language":"TypeScript","has_issues":true,"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/spencerlepine.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"spencerlepine"}},"created_at":"2024-07-11T17:35:24.000Z","updated_at":"2025-04-19T22:19:48.000Z","dependencies_parsed_at":"2024-09-11T20:38:39.226Z","dependency_job_id":"eb019166-3038-4075-a3b5-135a459cefe1","html_url":"https://github.com/spencerlepine/printify-sdk-js","commit_stats":null,"previous_names":["spencerlepine/spencerlepine-sdk-js"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencerlepine%2Fprintify-sdk-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencerlepine%2Fprintify-sdk-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencerlepine%2Fprintify-sdk-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencerlepine%2Fprintify-sdk-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spencerlepine","download_url":"https://codeload.github.com/spencerlepine/printify-sdk-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252235127,"owners_count":21716169,"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","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":["javascript","nodejs","nodejs-sdk","printify","printify-api","printify-sdk","typescript"],"created_at":"2024-11-13T00:37:08.146Z","updated_at":"2025-05-03T18:30:46.650Z","avatar_url":"https://github.com/spencerlepine.png","language":"TypeScript","funding_links":["https://github.com/sponsors/spencerlepine"],"categories":[],"sub_categories":[],"readme":"# Printify SDK for Node.js (TypeScript)\n\n[![NPM Version](https://img.shields.io/npm/v/printify-sdk-js)](https://www.npmjs.com/package/printify-sdk-js)\n![Coverage](https://img.shields.io/badge/Coverage-100%25-brightgreen.svg) ![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)\n![Project Status Badge](./.github/status-maintained-badge.svg)\n\nThe Printify Node SDK provides convenient access to the Printify API from applications written in server-side JavaScript.\n\nGuidelines and source endpoints can be found here: [developers.printify.com](https://developers.printify.com).\n\n## Documentation\n\nSee the [`API.md`](./docs/API.md) docs\n\n- [Shops](./docs/API.md#shops) - `printify.shops.*`\n- [Catalog](./docs/API.md#catalog) - `printify.catalog.*`\n- [Catalog V2](./docs/API.md#catalog-v2) - `printify.v2.catalog.*`\n- [Products](./docs/API.md#products) - `printify.products.*`\n- [Orders](./docs/API.md#orders) - `printify.orders.*`\n- [Uploads](./docs/API.md#uploads) - `printify.uploads.*`\n- [Webhooks](./docs/API.md#webhooks) - `printify.webhooks.*`\n\n## Installation\n\n```sh\nnpm install printify-sdk-js\n# or\nyarn add printify-sdk-js\n# or\npnpm add printify-sdk-js\n```\n\n## Usage\n\nThe package needs to be configured with your account's Personal Access Token (create one [here](https://printify.com/app/account/api)).\n\n```js\nimport Printify from 'printify-sdk-js';\n\nconst printify = new Printify({\n  accessToken: process.env.PRINTIFY_API_TOKEN, // generate a token: https://printify.com/app/account/api\n  shopId: '123456', // (optional) find using `printify.shops.list()`\n  enableLogging: true,\n});\n\nconst orders = await printify.orders.list({ limit: 5, status: 'fulfilled' });\nconsole.log(orders); // { current_page: 1, data: [{ id: \"5a9\", address_to: {}, line_items: [], total_price: 2200, status: \"fulfilled\"  } ]\n```\n\n### Usage with TypeScript\n\n```typescript\nimport Printify, { Webhook } from 'printify-sdk-js';\n\nconst printify = new Printify({\n  accessToken: process.env.PRINTIFY_API_TOKEN,\n  shopId: '123456',\n});\n\nconst webhooks: Webhook[] = await printify.webhooks.list();\nconsole.log(webhooks[0]); // { \"topic\": \"order:created\", \"url\": \"https://example.com/webhooks/order/created\", \"shop_id\": \"1\", \"id\": \"5cb87a8cd490a2ccb256cec4\" }\n```\n\n### Usage with CommonJS\n\n```js\nconst Printify = require('printify-sdk-js');\n\nconst printify = new Printify({\n  accessToken: process.env.PRINTIFY_API_TOKEN,\n  shopId: '123456',\n});\n\nprintify.orders\n  .list({ limit: 5, status: 'fulfilled' })\n  .then(orders =\u003e console.log(orders))\n  .catch(error =\u003e console.error(error));\n```\n\n## Configuration\n\n```js\nimport Printify from 'printify-sdk-js';\n\nconst printify = new Printify({\n  accessToken: process.env.PRINTIFY_API_TOKEN,\n  shopId: '123456',\n  enableLogging: true,\n  host: 'api.printify.com',\n  timeout: 5000, // in ms\n});\n```\n\n| Option          | Default              | Description                                                                                                             |\n| --------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| `accessToken`   | `null`               | The API access token for authenticating requests. Generate one at [Printify API](https://printify.com/app/account/api). |\n| `shopId`        | `null`               | (optional) Your personal shop ID. Can be found using `printify.shops.list()`.                                           |\n| `enableLogging` | `true`               | (optional) Enables logging of API requests and errors. Enabled by default.                                              |\n| `host`          | `'api.printify.com'` | (optional) The host for API requests.                                                                                   |\n| `timeout`       | `5000`               | (optional) Request timeout in ms.                                                                                       |\n\n## Development\n\n```sh\nyarn install\nyarn test\n```\n\n\u003e If you do not have yarn installed, you can get it with `npm install --global yarn`.\n\n```sh\n# (optional) test the bundle locally\ncd examples/typescript \u0026\u0026 yarn \u0026\u0026 cd ../../\nyarn build\nrm -rf examples/typescript/node_modules/printify-sdk-js/dist \u0026\u0026 mv dist examples/typescript/node_modules/printify-sdk-js\ncd examples/typescript\nyarn start\n```\n\n## Contributing\n\nWe welcome contributions from the community! If you're interested in contributing to this project, please read the [CONTRIBUTING.md](./CONTRIBUTING.md) file to get started.\n\n## Disclaimer\n\nThis SDK is a third-party library and is not officially endorsed or maintained by Printify. It is provided \"as is\" without warranty of any kind. For official information and\nguidelines on using the Printify API, please refer to the [Printify Developer Documentation](https://developers.printify.com/).\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspencerlepine%2Fprintify-sdk-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspencerlepine%2Fprintify-sdk-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspencerlepine%2Fprintify-sdk-js/lists"}