{"id":1287,"date":"2021-06-24T09:02:52","date_gmt":"2021-06-24T09:02:52","guid":{"rendered":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/?p=1287"},"modified":"2023-10-07T09:37:36","modified_gmt":"2023-10-07T09:37:36","slug":"rest-api","status":"publish","type":"post","link":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/","title":{"rendered":"REST API"},"content":{"rendered":"\n<p>From version 2.4, YITH Subscription supports REST API.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><b>Requirements<\/b><\/h4>\n\n\n\n<p><span style=\"font-weight: 400;\">It is essential to enable WordPress permalinks in <\/span><b>Settings &gt; Permalinks<\/b>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><b>How to generate API keys<\/b><\/h4>\n\n\n\n<p><span style=\"font-weight: 400;\">The WooCommerce REST API works on a key system to control access. These keys are linked to WordPress users on your website.<\/span><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-content\/uploads\/sites\/325\/2021\/06\/restapi-addkey-e1624524452200.jpg\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"393\" src=\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-content\/uploads\/sites\/325\/2021\/06\/restapi-addkey-e1624524452200.jpg\" alt=\"REST API key\" class=\"wp-image-1288\"\/><\/a><\/figure><\/div>\n\n\n<p><span style=\"font-weight: 400;\">To create or manage keys for a specific WordPress user:<\/span><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">Go to: <\/span><b>WooCommerce &gt; Settings &gt; Advanced &gt; REST API<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Select<b> Add Key<\/b>. You will be redirected to the <b>Key Details<\/b> screen.<br><\/span><\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-content\/uploads\/sites\/325\/2021\/06\/api-keydetails-e1624524642996.jpg\" data-rel=\"lightbox-image-1\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"445\" src=\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-content\/uploads\/sites\/325\/2021\/06\/api-keydetails-e1624524642996.jpg\" alt=\"API key details\" class=\"wp-image-1289\"\/><\/a><\/figure><\/div>\n\n\n<p><span style=\"font-weight: 400;\">3. Add a <\/span><b>Description<\/b><span style=\"font-weight: 400;\">.<\/span><br><span style=\"font-weight: 400;\">4. Select the <\/span><b>User<\/b><span style=\"font-weight: 400;\"> you would like to generate a key for in the dropdown.<\/span><br><span style=\"font-weight: 400;\">5. Select a level of access for this API key \u2014 <\/span><b>Read<\/b><span style=\"font-weight: 400;\"> access, <\/span><b>Write<\/b><span style=\"font-weight: 400;\"> access or <\/span><b>Read\/Write<\/b><span style=\"font-weight: 400;\"> access.<\/span><br><span style=\"font-weight: 400;\">6. Select <\/span><b>Generate API Key<\/b><span style=\"font-weight: 400;\">, and WooCommerce will create API keys for that user.<\/span><br><span style=\"font-weight: 400;\">&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Now that keys have been generated, you should see <\/span><b>Consumer Key<\/b><span style=\"font-weight: 400;\"> and <\/span><b>Consumer Secret<\/b><span style=\"font-weight: 400;\">, a <strong>QRCode<\/strong>, and a <strong>Revoke API Key<\/strong> button.<\/span><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-content\/uploads\/sites\/325\/2021\/06\/restapi-keygeneration-e1624525186849.jpg\" data-rel=\"lightbox-image-2\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"493\" src=\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-content\/uploads\/sites\/325\/2021\/06\/restapi-keygeneration-e1624525186849.jpg\" alt=\"REST API key generated\" class=\"wp-image-1290\"\/><\/a><\/figure><\/div>\n\n\n<p><span style=\"font-weight: 400;\">The <\/span><b>Consumer Key<\/b><span style=\"font-weight: 400;\"> and <\/span><b>Consumer Secret<\/b><span style=\"font-weight: 400;\"> may be entered in the application using the WooCommerce API, and the app should also request your URL.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">You can find the REST API documentation at <\/span><a href=\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription-rest-api\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/docs.yithemes.com\/yith-woocommerce-subscription-rest-api\/<\/span><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>From version 2.4, YITH Subscription supports REST API. Requirements It is essential to enable WordPress permalinks in Settings &gt; Permalinks. How to generate API keys The WooCommerce REST API works on a key system to control access. These keys are linked to WordPress users on your website. To create or manage keys for a specific &hellip; <a href=\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">REST API<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1287","post","type-post","status-publish","format-standard","hentry","category-premium-settings"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>YITH WooCommerce Subscription: REST API<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"YITH WooCommerce Subscription: REST API\" \/>\n<meta property=\"og:description\" content=\"From version 2.4, YITH Subscription supports REST API. Requirements It is essential to enable WordPress permalinks in Settings &gt; Permalinks. How to generate API keys The WooCommerce REST API works on a key system to control access. These keys are linked to WordPress users on your website. To create or manage keys for a specific &hellip; Continue reading REST API\" \/>\n<meta property=\"og:url\" content=\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/\" \/>\n<meta property=\"og:site_name\" content=\"YITH WooCommerce Subscription\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-24T09:02:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-07T09:37:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-content\/uploads\/sites\/325\/2021\/06\/restapi-addkey-e1624524452200.jpg\" \/>\n<meta name=\"author\" content=\"alessandra\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"alessandra\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/\",\"url\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/\",\"name\":\"YITH WooCommerce Subscription: REST API\",\"isPartOf\":{\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-content\/uploads\/sites\/325\/2021\/06\/restapi-addkey-e1624524452200.jpg\",\"datePublished\":\"2021-06-24T09:02:52+00:00\",\"dateModified\":\"2023-10-07T09:37:36+00:00\",\"author\":{\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/#\/schema\/person\/526d0e378b94e5d769cc699423a893fd\"},\"breadcrumb\":{\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/#primaryimage\",\"url\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-content\/uploads\/sites\/325\/2021\/06\/restapi-addkey-e1624524452200.jpg\",\"contentUrl\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-content\/uploads\/sites\/325\/2021\/06\/restapi-addkey-e1624524452200.jpg\",\"width\":900,\"height\":393,\"caption\":\"REST API key\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"REST API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/#website\",\"url\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/\",\"name\":\"YITH WooCommerce Subscription\",\"description\":\"Plugin documentation\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/#\/schema\/person\/526d0e378b94e5d769cc699423a893fd\",\"name\":\"alessandra\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7a82076030fd86df0a1c777be78906d9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7a82076030fd86df0a1c777be78906d9?s=96&d=mm&r=g\",\"caption\":\"alessandra\"},\"url\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/author\/alessandra\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"YITH WooCommerce Subscription: REST API","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/","og_locale":"en_US","og_type":"article","og_title":"YITH WooCommerce Subscription: REST API","og_description":"From version 2.4, YITH Subscription supports REST API. Requirements It is essential to enable WordPress permalinks in Settings &gt; Permalinks. How to generate API keys The WooCommerce REST API works on a key system to control access. These keys are linked to WordPress users on your website. To create or manage keys for a specific &hellip; Continue reading REST API","og_url":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/","og_site_name":"YITH WooCommerce Subscription","article_published_time":"2021-06-24T09:02:52+00:00","article_modified_time":"2023-10-07T09:37:36+00:00","og_image":[{"url":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-content\/uploads\/sites\/325\/2021\/06\/restapi-addkey-e1624524452200.jpg","type":"","width":"","height":""}],"author":"alessandra","twitter_card":"summary_large_image","twitter_misc":{"Written by":"alessandra","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/","url":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/","name":"YITH WooCommerce Subscription: REST API","isPartOf":{"@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/#website"},"primaryImageOfPage":{"@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/#primaryimage"},"image":{"@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/#primaryimage"},"thumbnailUrl":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-content\/uploads\/sites\/325\/2021\/06\/restapi-addkey-e1624524452200.jpg","datePublished":"2021-06-24T09:02:52+00:00","dateModified":"2023-10-07T09:37:36+00:00","author":{"@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/#\/schema\/person\/526d0e378b94e5d769cc699423a893fd"},"breadcrumb":{"@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/#primaryimage","url":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-content\/uploads\/sites\/325\/2021\/06\/restapi-addkey-e1624524452200.jpg","contentUrl":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-content\/uploads\/sites\/325\/2021\/06\/restapi-addkey-e1624524452200.jpg","width":900,"height":393,"caption":"REST API key"},{"@type":"BreadcrumbList","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/premium-settings\/rest-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/"},{"@type":"ListItem","position":2,"name":"REST API"}]},{"@type":"WebSite","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/#website","url":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/","name":"YITH WooCommerce Subscription","description":"Plugin documentation","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/#\/schema\/person\/526d0e378b94e5d769cc699423a893fd","name":"alessandra","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7a82076030fd86df0a1c777be78906d9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7a82076030fd86df0a1c777be78906d9?s=96&d=mm&r=g","caption":"alessandra"},"url":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/author\/alessandra\/"}]}},"_links":{"self":[{"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-json\/wp\/v2\/posts\/1287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-json\/wp\/v2\/comments?post=1287"}],"version-history":[{"count":2,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-json\/wp\/v2\/posts\/1287\/revisions"}],"predecessor-version":[{"id":1743,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-json\/wp\/v2\/posts\/1287\/revisions\/1743"}],"wp:attachment":[{"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-json\/wp\/v2\/media?parent=1287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-json\/wp\/v2\/categories?post=1287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-subscription\/wp-json\/wp\/v2\/tags?post=1287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}