REST API Returns 301 Permanently Moved
-
I’m using the WooCommerce plug-in to access data from within a 3rd party application (FileMaker Pro) using the REST API. A few weeks ago, this worked perfectly. Then I started getting a message, in HTML rather than JSON, saying “301 Permanently Moved”.
I’ve checked, double-checked, and triple-checked my code. I’m using the documentation located at:
https://woocommerce.github.io/woocommerce-rest-api-docs/
I’m following the documentation but nothing works.
I’m hoping someone can give me some input on how to resolve this or can point me in the right direction to get help.
Thanks,
—
Michael Frankel
Wizard Consulting Group, Inc.
-
@wizardconsultinggroup Something on either your server or one of your plugins must be causing the 301 redirect. We suggest following these steps to isolate the issue: https://docs.woocommerce.com/document/woocommerce-self-service-guide/#section-4
If you are not able to isolate the issue through that testing, please go to WooCommerce > Status and copy/paste your System Status Report here for us.
Hi Jessie –
The testing steps seem pretty logical. Unfortunately, this is an active site that cannot be disrupted or taken down for testing.
Here is the information from the WooCommerce Status Report you requested:
`
### WordPress Environment ###Home URL: https://www.cancunjazz.com
Site URL: https://www.cancunjazz.com
WC Version: 3.3.5
Log Directory Writable: ?
WP Version: 4.9.6
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ?
Language: en_US### Server Environment ###
Server Info: Flywheel/4.1.0
PHP Version: 7.1.16-1+ubuntu16.04.1+deb.sury.org+1
PHP Post Max Size: 300 MB
PHP Time Limit: 0
PHP Max Input Vars: 4000
cURL Version: 7.47.0
OpenSSL/1.0.2gSUHOSIN Installed: –
MySQL Version: 5.6.32
Max Upload Size: 300 MB
Default Timezone is UTC: ?
fsockopen/cURL: ?
SoapClient: ?
DOMDocument: ?
GZip: ?
Multibyte String: ?
Remote Post: ?
Remote Get: ?### Database ###
WC Database Version: 3.3.5
WC Database Prefix: wp_k7wyp9nwkn_
MaxMind GeoIP Database: ?
Total Database Size: 96.55MB
Database Data Size: 82.18MB
Database Index Size: 14.37MB
wp_k7wyp9nwkn_woocommerce_sessions: Data: 2.02MB + Index: 0.02MB
wp_k7wyp9nwkn_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.01MB
wp_k7wyp9nwkn_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_woocommerce_order_items: Data: 0.32MB + Index: 0.18MB
wp_k7wyp9nwkn_woocommerce_order_itemmeta: Data: 12.13MB + Index: 2.23MB
wp_k7wyp9nwkn_woocommerce_tax_rates: Data: 0.00MB + Index: 0.01MB
wp_k7wyp9nwkn_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB
wp_k7wyp9nwkn_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB
wp_k7wyp9nwkn_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB
wp_k7wyp9nwkn_woocommerce_payment_tokens: Data: 0.05MB + Index: 0.02MB
wp_k7wyp9nwkn_woocommerce_payment_tokenmeta: Data: 0.08MB + Index: 0.09MB
wp_k7wyp9nwkn_woocommerce_log: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_commentmeta: Data: 0.07MB + Index: 0.03MB
wp_k7wyp9nwkn_comments: Data: 0.70MB + Index: 0.33MB
wp_k7wyp9nwkn_et_bloom_stats: Data: 2.75MB + Index: 0.41MB
wp_k7wyp9nwkn_et_social_stats: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_ewwwio_images: Data: 0.02MB + Index: 0.02MB
wp_k7wyp9nwkn_image_mapper_object: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_image_mapper_object_meta: Data: 0.04MB + Index: 0.01MB
wp_k7wyp9nwkn_itsec_lockouts: Data: 0.02MB + Index: 0.08MB
wp_k7wyp9nwkn_itsec_log: Data: 1.52MB + Index: 0.34MB
wp_k7wyp9nwkn_itsec_logs: Data: 29.11MB + Index: 1.48MB
wp_k7wyp9nwkn_itsec_temp: Data: 0.06MB + Index: 0.06MB
wp_k7wyp9nwkn_links: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_nextend2_image_storage: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_nextend2_section_storage: Data: 0.00MB + Index: 0.01MB
wp_k7wyp9nwkn_nextend2_smartslider3_generators: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_nextend2_smartslider3_sliders: Data: 0.01MB + Index: 0.00MB
wp_k7wyp9nwkn_nextend2_smartslider3_sliders_xref: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_nextend2_smartslider3_slides: Data: 0.01MB + Index: 0.00MB
wp_k7wyp9nwkn_options: Data: 4.30MB + Index: 0.23MB
wp_k7wyp9nwkn_pmxi_files: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_pmxi_history: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_pmxi_imports: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_pmxi_posts: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_pmxi_templates: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_postmeta: Data: 8.12MB + Index: 4.60MB
wp_k7wyp9nwkn_posts: Data: 12.32MB + Index: 0.48MB
wp_k7wyp9nwkn_qsot_audit_msgs: Data: 0.02MB + Index: 0.00MB
wp_k7wyp9nwkn_qsot_audit_trail: Data: 0.02MB + Index: 0.03MB
wp_k7wyp9nwkn_qsot_event_zone_to_order: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_qsot_price_structures: Data: 0.02MB + Index: 0.02MB
wp_k7wyp9nwkn_qsot_price_structure_prices: Data: 0.02MB + Index: 0.03MB
wp_k7wyp9nwkn_qsot_reporting: Data: 0.02MB + Index: 0.05MB
wp_k7wyp9nwkn_qsot_reporting_payment_methods: Data: 0.02MB + Index: 0.00MB
wp_k7wyp9nwkn_qsot_seating_cache: Data: 3.52MB + Index: 0.03MB
wp_k7wyp9nwkn_qsot_seating_zonemeta: Data: 1.52MB + Index: 2.00MB
wp_k7wyp9nwkn_qsot_seating_zones: Data: 0.16MB + Index: 0.06MB
wp_k7wyp9nwkn_qsot_ticket_codes: Data: 0.00MB + Index: 0.01MB
wp_k7wyp9nwkn_termmeta: Data: 0.00MB + Index: 0.01MB
wp_k7wyp9nwkn_terms: Data: 0.00MB + Index: 0.01MB
wp_k7wyp9nwkn_term_relationships: Data: 0.01MB + Index: 0.02MB
wp_k7wyp9nwkn_term_taxonomy: Data: 0.00MB + Index: 0.01MB
wp_k7wyp9nwkn_ultimatetables: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_usermeta: Data: 2.94MB + Index: 1.24MB
wp_k7wyp9nwkn_users: Data: 0.12MB + Index: 0.11MB
wp_k7wyp9nwkn_wcpdf_invoice_number: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_wc_deposits_payment_plans: Data: 0.02MB + Index: 0.00MB
wp_k7wyp9nwkn_wc_deposits_payment_plans_schedule: Data: 0.02MB + Index: 0.02MB
wp_k7wyp9nwkn_wc_download_log: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_wc_webhooks: Data: 0.00MB + Index: 0.00MB
wp_k7wyp9nwkn_yoast_seo_links: Data: 0.03MB + Index: 0.01MB
wp_k7wyp9nwkn_yoast_seo_meta: Data: 0.01MB + Index: 0.02MB### Post Type Counts ###
attachment: 565
custom_css: 4
et_pb_layout: 20
global_product_addon: 2
jp_img_sitemap: 1
jp_sitemap: 1
jp_sitemap_master: 1
nav_menu_item: 26
oembed_cache: 2
page: 31
post: 8
product: 102
product_variation: 1348
project: 28
qsot-event: 2
qsot-event-area: 1
qsot-venue: 1
quantity-rule: 1
revision: 226
safecss: 1
shop_coupon: 913
shop_order: 1274
shop_order_refund: 1
shop_subscription: 74
wpcf7_contact_form: 2### Security ###
Secure connection (HTTPS): ?Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
Hide errors from visitors: ?### Active Plugins (36) ###
Akismet Anti-Spam: by Automattic – 4.0.3
All-in-One WP Migration Unlimited Extension: by ServMask – 2.15
All-in-One WP Migration: by ServMask – 6.67
Auto Terms of Service and Privacy Policy: by WPAutoTerms – 1.8.2
iThemes Security: by iThemes – 6.9.2
Bloom: by Elegant Themes – 1.2.24
Clear Local Storage: by Jonathan Bossenger – 1.0
Cloudflare: by John Wineman
Furkan Yilmaz
Junade Ali (Cloudflare Team) – 3.3.2Contact Form 7 MailChimp Extension: by Renzo Johnson – 0.4.50
Contact Form 7: by Takayuki Miyoshi – 5.0.1
ET Shortcodes: by Elegant Themes – 1.2.1
Pixel Cat Lite: by Fatcat Apps – 2.4.0
If Menu: by Layered – 0.8.3
Insert Headers and Footers: by WPBeginner – 1.4.2
Jetpack by WordPress.com: by Automattic – 6.0
Login Designer: by Rich Tabor from ThatPluginCompany – 1.1.7
Menu Icons: by ThemeIsle – 0.11.2
Smart Slider 3: by Nextend – 3.2.14
User Role Editor: by Vladimir Garagulya – 4.40.3
User Switching: by John Blackbourn – 1.3.0
Woo Deposit version 2.0: by EFE Technology – 2.0 – Not tested with the active version of WooCommerce
WooCommerce Checkout Field Editor: by WooCommerce – 1.5.4 – 1.5.13 is available – Not tested with the active version of WooCommerce
WooCommerce Composite Products: by SomewhereWarm – 3.12.1 – 3.13.10 is available – Not tested with the active version of WooCommerce
WooCommerce Customer/Order CSV Export: by SkyVerge – 4.3.7 – 4.4.6 is available – Not tested with the active version of WooCommerce
WooCommerce Stacked Product Layout: by SomewhereWarm – 1.1.7 – Not tested with the active version of WooCommerce
WooCommerce Authorize.Net AIM Gateway: by SkyVerge – 3.12.2 – 3.14.2 is available – Not tested with the active version of WooCommerce
WooCommerce Intuit Payments Gateway: by SkyVerge – 2.2.0 – 2.3.2 is available
WooCommerce Stripe Gateway: by WooCommerce – 4.1.1
WooCommerce Advanced Product Quantities: by WP BackOffice – 2.1.9 – Not tested with the active version of WooCommerce
WooCommerce Product Add-ons: by WooCommerce – 2.9.0 – 2.9.6 is available – Not tested with the active version of WooCommerce
WooCommerce Product Fees: by Caleb Burks – 1.3.0
WooCommerce Square: by WooCommerce – 1.0.29
WooCommerce: by Automattic – 3.3.5 – 3.4.3 is available
Yoast SEO: by Team Yoast – 7.3
WP All Import: by Soflyy – 3.4.7
WP Migrate DB: by Delicious Brains – 1.0.2### Settings ###
API Enabled: ?
Force SSL: ?
Currency: USD ($)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: composite (composite)
external (external)
grouped (grouped)
simple (simple)
subscription (subscription)
variable (variable)
variable subscription (variable-subscription)Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)### WC Pages ###
Shop base: ? Page ID is set
but the page does not existCart: #397 – /cart/
Checkout: #398 – /checkout/
My account: #399 – /my-account/
Terms and conditions: #453 – /terms-of-service/### Theme ###
Name: DiviChild
Version: – 0 is available
Author URL:
Child Theme: ?
Parent Theme Name: Divi
Parent Theme Version: 3.1
Parent Theme Author URL: https://www.elegantthemes.com
WooCommerce Support: ?### Templates ###
Overrides: divichild/woocommerce/checkout/payment.php version 2.5.0 is out of date. The core version is 3.3.0
Outdated Templates: ?Learn how to update### Authorize.Net AIM ###
Environment: Production
Debug Mode: Off### Customer/Order CSV Export ###
Order Export Format: custom
Customer Export Format: default
Automatically Export Orders: disabled
Automatically Export Customers: disabledThanks,
—
Michael Frankel
Wizard Consulting Group, Inc.Howdy ??
If you are unwilling to take the site down for this type of testing then I would suggest a staging site to test on and try to isolate the problem there. Many hosts provide an easy method to do this but if yours doesn’t you might want to look into this plugin: https://www.ads-software.com/plugins/wp-staging/
Kind regards,
We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.
- The topic ‘REST API Returns 301 Permanently Moved’ is closed to new replies.