{"id":13515580,"url":"https://github.com/MONEI/Shopify-api-node","last_synced_at":"2025-03-31T04:37:19.574Z","repository":{"id":2361023,"uuid":"3324676","full_name":"MONEI/Shopify-api-node","owner":"MONEI","description":"Node Shopify connector sponsored by MONEI","archived":false,"fork":false,"pushed_at":"2024-05-13T19:37:51.000Z","size":1282,"stargazers_count":932,"open_issues_count":26,"forks_count":276,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-05-22T09:02:46.065Z","etag":null,"topics":["ecommerce","javascript","monei","node","node-module","nodejs","polaris","pricing-rules","shopify","shopify-api","wholesaler"],"latest_commit_sha":null,"homepage":"https://monei.com/shopify-payment-gateway/","language":"JavaScript","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/MONEI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["alexandresaiz","lpinca"]}},"created_at":"2012-02-01T12:38:11.000Z","updated_at":"2024-06-18T12:19:15.269Z","dependencies_parsed_at":"2024-04-16T23:41:44.111Z","dependency_job_id":"833d9910-efaa-4885-a2a8-baf93a93a4b3","html_url":"https://github.com/MONEI/Shopify-api-node","commit_stats":{"total_commits":776,"total_committers":96,"mean_commits":8.083333333333334,"dds":0.4729381443298969,"last_synced_commit":"163fe80e4520f2a670973081dac68e106f4df707"},"previous_names":["microapps/nodify-shopify"],"tags_count":106,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MONEI%2FShopify-api-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MONEI%2FShopify-api-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MONEI%2FShopify-api-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MONEI%2FShopify-api-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MONEI","download_url":"https://codeload.github.com/MONEI/Shopify-api-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245061399,"owners_count":20554563,"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":["ecommerce","javascript","monei","node","node-module","nodejs","polaris","pricing-rules","shopify","shopify-api","wholesaler"],"created_at":"2024-08-01T05:01:13.093Z","updated_at":"2025-03-31T04:37:14.560Z","avatar_url":"https://github.com/MONEI.png","language":"JavaScript","readme":"# Shopify API Node.js\n\n[![Version npm][npm-shopify-api-node-badge]][npm-shopify-api-node]\n[![Build Status][ci-shopify-api-node-badge]][ci-shopify-api-node]\n[![Coverage Status][coverage-shopify-api-node-badge]][coverage-shopify-api-node]\n\nShopify API bindings for Node.js.\n\n## Installation:\n\n```shell\n$ npm install --save shopify-api-node\n```\n\n## API\n\nThis module exports a constructor function which takes an options object.\n\n### `Shopify(options)`\n\nCreates a new `Shopify` instance.\n\n#### Arguments\n\n- `options` - Required - A plain JavaScript object that contains the\n  configuration options.\n\n#### Options\n\n- `shopName` - Required - A string that specifies the shop name. The shop's\n  \"myshopify.com\" domain is also accepted.\n- `apiKey` - Required for [private][generate-private-app-credentials] apps - A\n  string that specifies the API key of the app. This option must be used in\n  conjunction with the `password` option and is mutually exclusive with the\n  `accessToken` option.\n- `password` - Required for [private][generate-private-app-credentials] apps - A\n  string that specifies the private app password. This option must be used in\n  conjunction with the `apiKey` option and is mutually exclusive with the\n  `accessToken` option.\n- `accessToken` - Required for public apps - A string representing the permanent\n  [OAuth 2.0][oauth] access token. This option is mutually exclusive with the\n  `apiKey` and `password` options. If you are looking for a premade solution to\n  obtain an access token, take a look at the [shopify-token][] module.\n- `agent` - Optional - An object that is passed as the `agent` option to `got`.\n  This allows to use a proxy server. See\n  [Got documentation](https://github.com/sindresorhus/got/tree/v11.8.6?tab=readme-ov-file#proxies)\n  for more details.\n- `apiVersion` - Optional - A string to specify the [Shopify API\n  version][api-versioning] to use for requests. Defaults to the oldest supported\n  stable version.\n- `autoLimit` - Optional - This option allows you to regulate the request rate\n  in order to avoid hitting the [rate limit][api-call-limit]. Requests are\n  limited using the token bucket algorithm. Accepted values are a boolean or a\n  plain JavaScript object. When using an object, the `calls` property and the\n  `interval` property specify the refill rate and the `bucketSize` property the\n  bucket size. For example `{ calls: 2, interval: 1000, bucketSize: 35 }`\n  specifies a limit of 2 requests per second with a burst of 35 requests. When\n  set to `true` requests are limited as specified in the above example. Defaults\n  to `false`. Mutually exclusive with the `maxRetries` option.\n- `hooks` - Optional - A list of `got`\n  [request hooks](https://github.com/sindresorhus/got/tree/v11.8.6#hooks) to\n  attach to all outgoing requests, like `beforeRetry`, `afterResponse`, etc.\n  Hooks should be provided in the same format that Got expects them and will\n  receive the same arguments Got passes unchanged.\n- `maxRetries` - Optional - The number of times to attempt to make the request\n  to Shopify before giving up. Defaults to `0`, which means no automatic\n  retries. If set to a value greater than `0`, `shopify-api-node` will make up\n  to that many retries. `shopify-api-node` will respect the `Retry-After` header\n  for requests to the REST API, and the throttled cost data for requests to the\n  GraphQL API, and retry the request after that time has elapsed. Mutually\n  exclusive with the `autoLimit` option.\n- `parseJson` - Optional - The function used to parse JSON. The function is\n  passed a single argument. This option allows the use of a custom JSON parser\n  that might be needed to properly handle long integer IDs. Defaults to\n  `JSON.parse()`.\n- `presentmentPrices` - Optional - Whether to include the header to pull\n  presentment prices for products. Defaults to `false`.\n- `stringifyJson` - Optional - The function used to serialize to JSON. The\n  function is passed a single argument. This option allows the use of a custom\n  JSON serializer that might be needed to properly handle long integer IDs.\n  Defaults to `JSON.stringify()`.\n- `timeout` - Optional - The number of milliseconds before the request times\n  out. If the request takes longer than `timeout`, it will be aborted. Defaults\n  to `60000`, or 1 minute.\n\n#### Return value\n\nA `Shopify` instance.\n\n#### Exceptions\n\nThrows an `Error` exception if the required options are missing.\n\n#### Example\n\n```js\nconst Shopify = require('shopify-api-node');\n\nconst shopify = new Shopify({\n  shopName: 'your-shop-name',\n  apiKey: 'your-api-key',\n  password: 'your-app-password'\n});\n```\n\n### `shopify.callLimits`\n\nThe `callLimits` property allows you to monitor the API call limit. The value is\nan object like this:\n\n```js\n{\n  remaining: 30,\n  current: 10,\n  max: 40\n}\n```\n\nValues start at `undefined` and are updated every time a request is made. After\nevery update the `callLimits` event is emitted with the updated limits as\nargument.\n\n```js\nshopify.on('callLimits', (limits) =\u003e console.log(limits));\n```\n\nWhen using the GraphQL API, a different property is used to track the API call\nlimit: `callGraphqlLimits`.\n\nKeep in mind that the `autoLimit` option is ignored while using GraphQL API.\n\n```js\nshopify.on('callGraphqlLimits', (limits) =\u003e console.log(limits));\n```\n\n## Resources\n\nEvery resource is accessed via your `shopify` instance:\n\n```js\nconst shopify = new Shopify({\n  shopName: 'your-shop-name',\n  accessToken: 'your-oauth-token'\n});\n\n// shopify.\u003cresource_name\u003e.\u003cmethod_name\u003e\n```\n\nEach method returns a `Promise` that resolves with the result:\n\n```js\nshopify.order\n  .list({ limit: 5 })\n  .then((orders) =\u003e console.log(orders))\n  .catch((err) =\u003e console.error(err));\n```\n\nThe Shopify API requires that you send a valid JSON string in the request body\nincluding the name of the resource. For example, the request body to create a\ncountry should be:\n\n```json\n{\n  \"country\": {\n    \"code\": \"FR\",\n    \"tax\": 0.25\n  }\n}\n```\n\nWhen using `shopify-api-node` you don't have to specify the full object but only\nthe nested one as the module automatically wraps the provided data. Using the\nabove example this translates to:\n\n```js\nshopify.country\n  .create({ code: 'FR', tax: 0.25 })\n  .then((country) =\u003e console.log(country))\n  .catch((err) =\u003e console.error(err));\n```\n\nSimilarly, the Shopify API includes the resource name in the JSON string that is\nreturned in the response body:\n\n```json\n{\n  \"country\": {\n    \"id\": 1070231510,\n    \"name\": \"France\",\n    \"tax\": 0.2,\n    \"code\": \"FR\",\n    \"tax_name\": \"TVA\",\n    \"provinces\": []\n  }\n}\n```\n\n`shopify-api-node` automatically unwraps the parsed object and returns:\n\n```js\n{\n  id: 1070231510,\n  name: 'France',\n  tax: 0.2,\n  code: 'FR',\n  tax_name: 'TVA',\n  provinces: []\n}\n```\n\nThis behavior is valid for all resources.\n\n## Metafields\n\nShopify allows for adding metafields to various resources. You can use the\n`owner_resource` and `owner_id` properties to work with metafields that belong\nto a particular resource as shown in the examples below.\n\nGet metafields that belong to a product:\n\n```js\nshopify.metafield\n  .list({\n    metafield: { owner_resource: 'product', owner_id: 632910392 }\n  })\n  .then(\n    (metafields) =\u003e console.log(metafields),\n    (err) =\u003e console.error(err)\n  );\n```\n\nCreate a new metafield for a product:\n\n```js\nshopify.metafield\n  .create({\n    key: 'warehouse',\n    value: 25,\n    type: 'integer',\n    namespace: 'inventory',\n    owner_resource: 'product',\n    owner_id: 632910392\n  })\n  .then(\n    (metafield) =\u003e console.log(metafield),\n    (err) =\u003e console.error(err)\n  );\n```\n\n## Pagination\n\n[Pagination][paginated-rest-results] in API version 2019-07 and above can be\ndone as shown in the following example:\n\n```js\n(async () =\u003e {\n  let params = { limit: 10 };\n\n  do {\n    const products = await shopify.product.list(params);\n\n    console.log(products);\n\n    params = products.nextPageParameters;\n  } while (params !== undefined);\n})().catch(console.error);\n```\n\nEach set of results may have the `nextPageParameters` and\n`previousPageParameters` properties. These properties specify respectively the\nparameters needed to fetch the next and previous page of results.\n\nThis feature is only available on version 2.24.0 and above.\n\n## Shopify rate limit avoidance\n\n`shopify-api-node` has two optional mechanisms for avoiding requests failing\nwith `429 Rate Limit Exceeded` errors from Shopify.\n\nThe `autoLimit` option implements a client side leaky bucket algorithm for\ndelaying requests until Shopify is likely to accept them. When `autoLimit` is\non, each `Shopify` instance will track how many requests have been made, and\ndelay sending subsequent requests if the rate limit has been exceeded.\n`autoLimit` is very efficient because it almost entirely avoids sending requests\nwhich will return 429 errors, but, it does not coordinate between multiple\n`Shopify` instances or across multiple processes. If you're using\n`shopify-api-node` in many different processes, `autoLimit` will not correctly\navoid 429 errors.\n\nThe `maxRetries` option implements a retry based strategy for getting requests\nto Shopify, where when a 429 error occurs, the request is automatically retried\nafter waiting. Shopify usually replies with a `Retry-After` header indicating to\nthe client when the rate limit is available, and so `shopify-api-node` will wait\nthat long before retrying. If you are using `shopify-api-node` in many different\nprocesses, they will all be competing to use the same rate limit shopify\nenforces, so there is no guarantee that retrying after the `Retry-After` header\ndelay will work. It is recommended to set `maxRetries` to a high value like `10`\nif you are making many concurrent requests in many processes to ensure each\nrequest is retried for long enough to succeed.\n\n`autoLimit` and `maxRetries` can't be used simultaneously. Both are off by\ndefault.\n\n## Available resources and methods\n\n- accessScope\n  - `list()`\n- apiPermission\n  - `delete()`\n- applicationCharge\n  - `activate(id[, params])`\n  - `create(params)`\n  - `get(id[, params])`\n  - `list([params])`\n- applicationCredit\n  - `create(params)`\n  - `get(id[, params])`\n  - `list([params])`\n- article\n  - `authors()`\n  - `count(blogId[, params])`\n  - `create(blogId, params)`\n  - `delete(blogId, id)`\n  - `get(blogId, id[, params])`\n  - `list(blogId[, params])`\n  - `tags([blogId][, params])`\n  - `update(blogId, id, params)`\n- asset\n  - `create(themeId, params)`\n  - `delete(themeId, params)`\n  - `get(themeId, params)`\n  - `list(themeId[, params])`\n  - `update(themeId, params)`\n- balance\n  - `list()`\n  - `transactions([params])`\n- blog\n  - `count()`\n  - `create(params)`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `update(id, params)`\n- cancellationRequest\n  - `accept(fulfillmentOrderId[, message])`\n  - `create(fulfillmentOrderId[, message])`\n  - `reject(fulfillmentOrderId[, message])`\n- carrierService\n  - `create(params)`\n  - `delete(id)`\n  - `get(id)`\n  - `list()`\n  - `update(id, params)`\n- checkout\n  - `complete(token)`\n  - `count([params])`\n  - `create(params)`\n  - `get(token)`\n  - `list([params])`\n  - `shippingRates(token)`\n  - `update(token, params)`\n- collect\n  - `count([params])`\n  - `create(params)`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n- collection\n  - `get(id[, params])`\n  - `products(id[, params])`\n- collectionListing\n  - `get(id)`\n  - `list([params])`\n  - `productIds(id[, params])`\n- comment\n  - `approve(id)`\n  - `count([params])`\n  - `create(params)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `notSpam(id)`\n  - `remove(id)`\n  - `restore(id)`\n  - `spam(id)`\n  - `update(id, params)`\n- country\n  - `count()`\n  - `create(params)`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `update(id, params)`\n- currency\n  - `list()`\n- customCollection\n  - `count([params])`\n  - `create(params)`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `update(id, params)`\n- customer\n  - `accountActivationUrl(id)`\n  - `count([params])`\n  - `create(params)`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `orders(id[, params])`\n  - `search(params)`\n  - `sendInvite(id[, params])`\n  - `update(id, params)`\n- customerAddress\n  - `create(customerId, params)`\n  - `default(customerId, id)`\n  - `delete(customerId, id)`\n  - `get(customerId, id)`\n  - `list(customerId[, params])`\n  - `set(customerId, params)`\n  - `update(customerId, id, params)`\n- customerSavedSearch\n  - `count([params])`\n  - `create(params)`\n  - `customers(id[, params])`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `update(id, params)`\n- deprecatedApiCall\n  - `list()`\n- discountCode\n  - `create(priceRuleId, params)`\n  - `delete(priceRuleId, id)`\n  - `get(priceRuleId, id)`\n  - `list(priceRuleId)`\n  - `lookup(params)`\n  - `update(priceRuleId, id, params)`\n- discountCodeCreationJob\n  - `create(priceRuleId, params)`\n  - `discountCodes(priceRuleId, id)`\n  - `get(priceRuleId, id)`\n- dispute\n  - `get(id)`\n  - `list([params])`\n- disputeEvidence\n  - `get(disputeId)`\n  - `update(disputeId, params)`\n- disputeFileUpload\n  - `create(disputeId, params)`\n  - `delete(disputeId, id)`\n- draftOrder\n  - `complete(id[, params])`\n  - `count()`\n  - `create(params)`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `sendInvoice(id[, params])`\n  - `update(id, params)`\n- event\n  - `count([params])`\n  - `get(id[, params])`\n  - `list([params])`\n- fulfillment\n  - `cancel(orderId, id)`\n  - `cancelV2(id)`\n  - `complete(orderId, id)`\n  - `count(orderId[, params)`\n  - `create(orderId, params)`\n  - `createV2(params)`\n  - `get(orderId, id[, params])`\n  - `list(orderId[, params])`\n  - `open(orderId, id)`\n  - `update(orderId, id, params)`\n  - `updateTracking(id, params)`\n- fulfillmentEvent\n  - `create(orderId, fulfillmentId, params)`\n  - `delete(orderId, fulfillmentId, id)`\n  - `get(orderId, fulfillmentId, id)`\n  - `list(orderId, fulfillmentId[, params])`\n  - `update(orderId, fulfillmentId, id, params)`\n- fulfillmentOrder\n  - `cancel(id)`\n  - `close(id[, message])`\n  - `fulfillments(id)`\n  - `get(id)`\n  - `hold(id, params)`\n  - `list([params])`\n  - `locationsForMove(id)`\n  - `move(id, locationId)`\n  - `releaseHold(id)`\n  - `reschedule(id, deadline)`\n  - `setFulfillmentOrdersDeadline(params)`\n- fulfillmentRequest\n  - `accept(fulfillmentOrderId[, message])`\n  - `create(fulfillmentOrderId, params)`\n  - `reject(fulfillmentOrderId[, message])`\n- fulfillmentService\n  - `create(params)`\n  - `delete(id)`\n  - `get(id)`\n  - `list([params])`\n  - `update(id, params)`\n- giftCard\n  - `count([params])`\n  - `create(params)`\n  - `disable(id)`\n  - `get(id)`\n  - `list([params])`\n  - `search(params)`\n  - `update(id, params)`\n- [giftCardAdjustment](https://shopify.dev/api/admin-rest/2022-04/resources/gift-card-adjustment)\n  - `create(giftCardId, params)`\n  - `get(giftCardId, id)`\n  - `list(giftCardId)`\n- inventoryItem\n  - `get(id)`\n  - `list(params)`\n  - `update(id, params)`\n- inventoryLevel\n  - `adjust(params)`\n  - `connect(params)`\n  - `delete(params)`\n  - `list(params)`\n  - `set(params)`\n- location\n  - `count`\n  - `get(id)`\n  - `inventoryLevels(id[, params])`\n  - `list()`\n- marketingEvent\n  - `count()`\n  - `create(params)`\n  - `delete(id)`\n  - `get(id)`\n  - `list([params])`\n  - `update(id, params)`\n  - `engagements(id, params)`\n- metafield\n  - `count([params])`\n  - `create(params)`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `update(id, params)`\n- order\n  - `cancel(id[, params])`\n  - `close(id)`\n  - `count([params])`\n  - `create(params)`\n  - `delete(id)`\n  - `fulfillmentOrders(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `open(id)`\n  - `update(id, params)`\n- orderRisk\n  - `create(orderId, params)`\n  - `delete(orderId, id)`\n  - `get(orderId, id)`\n  - `list(orderId)`\n  - `update(orderId, id, params)`\n- page\n  - `count([params])`\n  - `create(params)`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `update(id, params)`\n- payment\n  - `count(checkoutToken)`\n  - `create(checkoutToken, params)`\n  - `get(checkoutToken, id)`\n  - `list(checkoutToken)`\n- payout\n  - `get(id)`\n  - `list([params])`\n- policy\n  - `list([params])`\n- priceRule\n  - `create(params)`\n  - `delete(id)`\n  - `get(id)`\n  - `list([params])`\n  - `update(id, params)`\n- product\n  - `count([params])`\n  - `create(params)`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `update(id, params)`\n- productImage\n  - `count(productId[, params])`\n  - `create(productId, params)`\n  - `delete(productId, id)`\n  - `get(productId, id[, params])`\n  - `list(productId[, params])`\n  - `update(productId, id, params)`\n- productListing\n  - `count()`\n  - `create(productId[, params])`\n  - `delete(productId)`\n  - `get(productId)`\n  - `list([params])`\n  - `productIds([params])`\n- [productResourceFeedback](https://shopify.dev/api/admin-rest/2022-04/resources/product-resourcefeedback)\n  - `create(productId[, params])`\n  - `list(productId)`\n- productVariant\n  - `count(productId)`\n  - `create(productId, params)`\n  - `delete(productId, id)`\n  - `get(id[, params])`\n  - `list(productId[, params])`\n  - `update(id, params)`\n- province\n  - `count(countryId[, params])`\n  - `get(countryId, id[, params])`\n  - `list(countryId[, params])`\n  - `update(countryId, id, params)`\n- recurringApplicationCharge\n  - `activate(id, params)`\n  - `create(params)`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `customize(id, params)`\n- redirect\n  - `count([params])`\n  - `create(params)`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `update(id, params)`\n- refund\n  - `calculate(orderId, params)`\n  - `create(orderId, params)`\n  - `get(orderId, id[, params])`\n  - `list(orderId[, params])`\n- report\n  - `create(params)`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `update(id, params)`\n- resourceFeedback\n  - `create(params)`\n  - `list()`\n- scriptTag\n  - `count([params])`\n  - `create(params)`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `update(id, params)`\n- shippingZone\n  - `list([params])`\n- shop\n  - `get([params])`\n- smartCollection\n  - `count([params])`\n  - `create(params)`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `order(id, params)`\n  - `products(id[, params])`\n  - `update(id, params)`\n- storefrontAccessToken\n  - `create(params)`\n  - `delete(id)`\n  - `list()`\n- tenderTransaction\n  - `list([params])`\n- theme\n  - `create(params)`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `update(id, params)`\n- transaction\n  - `count(orderId)`\n  - `create(orderId, params)`\n  - `get(orderId, id[, params])`\n  - `list(orderId[, params])`\n- usageCharge\n  - `create(recurringApplicationChargeId, params)`\n  - `get(recurringApplicationChargeId, id[, params])`\n  - `list(recurringApplicationChargeId[, params])`\n- user\n  - `current()`\n  - `get(id)`\n  - `list()`\n- webhook\n  - `count([params])`\n  - `create(params)`\n  - `delete(id)`\n  - `get(id[, params])`\n  - `list([params])`\n  - `update(id, params)`\n\nwhere `params` is a plain JavaScript object. See the [Rest Admin API\nreference][reading-api-docs] for parameters details.\n\n## GraphQL\n\nThe `shopify` instance also allows to use the GraphQL API through the `graphql`\nmethod, which returns a promise that resolves with the result data:\n\n```js\nconst shopify = new Shopify({\n  shopName: 'your-shop-name',\n  accessToken: 'your-oauth-token'\n});\n\nconst query = `{\n  customers(first: 5) {\n    edges {\n      node {\n        displayName\n        totalSpent\n      }\n    }\n  }\n}`;\n\nshopify\n  .graphql(query)\n  .then((customers) =\u003e console.log(customers))\n  .catch((err) =\u003e console.error(err));\n```\n\n## Hooks\n\n`shopify-api-node` supports being passed hooks which are called by `got` (the\nunderlying HTTP library) during the request lifecycle.\n\nFor example, we can log every error that is encountered when using the\n`maxRetries` option:\n\n```js\nconst shopify = new Shopify({\n  shopName: 'your-shop-name',\n  accessToken: 'your-oauth-token',\n  maxRetries: 3,\n  // Pass the `beforeRetry` hook down to Got.\n  hooks: {\n    beforeRetry: [(options, error, retryCount) =\u003e console.error(error)]\n  }\n});\n```\n\nFor more information on the available `got` hooks, see the\n[`got` v11 hooks documentation](https://github.com/sindresorhus/got/tree/v11#hooks).\n\n## Become a master of the Shopify ecosystem by:\n\n- [Talking To Other Masters][talking-to-other-masters]\n- [Reading API Docs][reading-api-docs]\n- [Learning from others][learning-from-others]\n\n## Use Polaris, a React powered Frontend Framework which mimics the Shopify merchant admin:\n\n[Polaris][polaris]\n\n## Shopify Apps already using Shopify API node:\n\n(add yours!)\n\n- [Sample Node Express app by Shopify][sample-node-express-app-by-shopify]\n- [Youtube Traffic][youtube-traffic]\n- [Shipatron][shipatron]\n- [UPC Code Manager][upc-code-manager]\n- [Shopify Passwordless Login][dimension-software]\n\n## Supported by:\n\n[MONEI][monei]\n\n## License\n\n[MIT](LICENSE)\n\n[sample-node-express-app-by-shopify]:\n  https://github.com/Shopify/shopify-node-app\n[npm-shopify-api-node-badge]: https://img.shields.io/npm/v/shopify-api-node.svg\n[npm-shopify-api-node]: https://www.npmjs.com/package/shopify-api-node\n[ci-shopify-api-node-badge]:\n  https://img.shields.io/github/actions/workflow/status/MONEI/Shopify-api-node/ci.yml?branch=master\u0026label=CI\n[ci-shopify-api-node]:\n  https://github.com/MONEI/Shopify-api-node/actions?query=workflow%3ACI+branch%3Amaster\n[coverage-shopify-api-node-badge]:\n  https://img.shields.io/coveralls/MONEI/Shopify-api-node/master.svg\n[coverage-shopify-api-node]: https://coveralls.io/github/MONEI/Shopify-api-node\n[generate-private-app-credentials]:\n  https://shopify.dev/apps/auth/basic-http#step-2-generate-api-credentials\n[oauth]: https://shopify.dev/apps/auth/oauth\n[shopify-token]: https://github.com/lpinca/shopify-token\n[api-call-limit]: https://shopify.dev/api/usage/rate-limits\n[api-versioning]: https://shopify.dev/api/usage/versioning\n[talking-to-other-masters]: https://community.shopify.com/\n[reading-api-docs]: https://shopify.dev/api/admin-rest\n[learning-from-others]: https://stackoverflow.com/questions/tagged/shopify\n[paginated-rest-results]: https://shopify.dev/api/usage/pagination-rest\n[polaris]: https://polaris.shopify.com/?ref=microapps\n[monei]:\n  https://monei.com/?utm_source=shopify-api-node-module-repo-readme\u0026utm_medium=click\u0026utm_campaign=github\n[youtube-traffic]: https://apps.shopify.com/youtube-traffic?ref=microapps\n[shipatron]: https://shipatron.io\n[upc-code-manager]: https://apps.shopify.com/upc-code-manager-1\n[dimension-software]: https://login.dimensionsoftware.com\n","funding_links":["https://github.com/sponsors/alexandresaiz","https://github.com/sponsors/lpinca"],"categories":["JavaScript","Libraries","\u003ca name=\"Javascript\"\u003e\u003c/a\u003eJavascript","库","Node JS"],"sub_categories":["JavaScript"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMONEI%2FShopify-api-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMONEI%2FShopify-api-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMONEI%2FShopify-api-node/lists"}