• Resolved kmgreek

    (@kmgreek)


    I’m trying to send new orders using the woocommerce Rest API to my clients external fulfillment application call Extensiv. I generate API credentials and provided the consumer key, consumer secret and site url, but they have not been able to receive the orders. Originally I provide the site url “mysite”.com/wp-json/wc/v3/orders which did not work. Extensiv support said the url should just be “mysite”.com, which I tried, but did not work either.

    Is there any other information I need to provide to send the orders?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Thanks for reaching out! I’ll be happy to help clarify the WooCommerce REST API setup for your integration with Extensiv.

    First, the URL for the WooCommerce REST API must include the /wp-json/wc/v3/ path, as this is the endpoint where WooCommerce exposes its data. For orders, the correct URL would indeed be:
    https://yoursite.com/wp-json/wc/v3/orders

    Also, In order to access the REST API using the standard endpoint URI structure (e.g.?wc/v3/products), you must have your WordPress permalinks configured to something other than “Plain”. Go to?Settings > Permalinks?and choose an option.

    Permalinks options

    For more details on how to use the REST API you can use this article https://developer.woocommerce.com/docs/getting-started-with-the-woocommerce-rest-api/#4-make-a-basic-request

    To help troubleshoot further, could you share any error messages or issues you’re encountering when using the API? This will help us understand if the problem is related to the WooCommerce setup or if it might require assistance from Extensiv’s support team or a developer.

    Thank you

    Thread Starter kmgreek

    (@kmgreek)

    The site currently uses Post Name permalinks. Below is the error message we are receiving (I altered the consumer key & secret.) Let me know if this helps troubleshoot our problem.

    2024/12/17 12:07?? ?OrderTransportGetHandler-1?? ?ERROR?? ?TPL: 1631|CUST: 49|MSG_1: FAILED: ?WooCommerce GET request.?? ?StatusCode: 404?? ?ResponseReasonPhrase: Not Found?? ?Request: https://mysite.com/wp-json/wc/v3/orders/index.php/wp-json/wc/v2/orders?consumer_key=ck_1111111111111111111111111#38;consumer_secret=cs_1111111111111111111111111#38;per_page=1?? ?ErrMsg: {“code”:”rest_no_route”,”message”:”No route was found matching the URL and request method.”,”data”:{“status”:404}}||TRACE_1: ? ?at ViaSub.WMS.OrderTransport.WooCommHelper.GetOrderIdByAscOrDesc(Boolean asc) in c:\jenkins\workspace\wms-release_24.11\WMS\OrderTransport\WebServiceHelpers\WooCommHelper.cs:line 219
    ? ?at ViaSub.WMS.OrderTransport.WooCommHelper.FetchOrders(Int32 lastOrderIdReceived, List1 ordersToRetry) in c:\jenkins\workspace\wms-release_24.11\WMS\OrderTransport\WebServiceHelpers\WooCommHelper.cs:line 84    at ViaSub.WMS.OrderTransport.WooCommerceTransport.GetOrders(IList1 filesToSkip, IEnumerable1& failureMessages, Dictionary2& groupedPackages, Int32& bytesIn, List`1& failedFiles, String callerName) in c:\jenkins\workspace\wms-release_24.11\WMS\OrderTransport\Transports\WooCommerceTransport.cs:line 96|?? ?17?? ?OrderFtpID?? ?EC2AMAZ-TV969AU??

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello kmgreek,

    Thank you for your reply.

    I noticed that there is “index.php” in the site URL:
    https://mysite.com/wp-json/wc/v3/orders/index.php/wp-json/wc/v2/orders
    Have you tried the URL without index.php?

    To help you further, I’d like to understand more about your setup.
    Please send me a copy of your site’s System Status Report.
    You can find it via WooCommerce > Status.
    Select Get system report and then Copy for support.

    Looking forward to your response. ??

    Thread Starter kmgreek

    (@kmgreek)

    We will try that. Should the url contains both wp-json/wc/v3/orders & wp-json/wc/v2/orders? so the url would be: https://mysite.com/wp-json/wc/v3/orders/wp-json/wc/v2/orders

    Plugin Support Reynier (a11n)

    (@reynierc)

    Hi @kmgreek

    You’re on the right track with checking the URL. You just need one correct API endpoint. If you’re using the latest version of WooCommerce, it should be: https://mysite.com/wp-json/wc/v3/orders

    Let us know how it goes.

    Thread Starter kmgreek

    (@kmgreek)

    Blow is our system report. I apologize, you asked for this previously and I did not provide it.

    WordPress Environment<br><br>WordPress address (URL): https://enjoybelizebreeze.com<br>Site address (URL): https://enjoybelizebreeze.com<br>WC Version: 9.5.1<br>Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site.<br>Action Scheduler Version: ? 3.8.2<br>Log Directory Writable: ?<br>WP Version: 6.7.1<br>WP Multisite: –<br>WP Memory Limit: 768 MB<br>WP Debug Mode: –<br>WP Cron: ?<br>Language: en_US<br>External object cache: – Server Environment<br><br>Server Info: Apache<br>PHP Version: 8.2.26<br>PHP Post Max Size: 256 MB<br>PHP Time Limit: 120<br>PHP Max Input Vars: 3000<br>cURL Version: 8.2.1<br>OpenSSL/3.1.4<br><br>SUHOSIN Installed: –<br>MySQL Version: 8.0.39-30<br>Max Upload Size: 256 MB<br>Default Timezone is UTC: ?<br>fsockopen/cURL: ?<br>SoapClient: ?<br>DOMDocument: ?<br>GZip: ?<br>Multibyte String: ?<br>Remote Post: ?<br>Remote Get: ? Database<br><br>WC Database Version: 9.4.3<br>WC Database Prefix: cwo_<br>Total Database Size: 103.09MB<br>Database Data Size: 92.76MB<br>Database Index Size: 10.33MB<br>cwo_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>cwo_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_woocommerce_order_itemmeta: Data: 0.06MB + Index: 0.03MB + Engine InnoDB<br>cwo_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>cwo_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>cwo_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>cwo_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_actionscheduler_actions: Data: 0.30MB + Index: 0.23MB + Engine InnoDB<br>cwo_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_actionscheduler_logs: Data: 0.23MB + Index: 0.16MB + Engine InnoDB<br>cwo_awb_critical_css: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_cky_banners: Data: 0.05MB + Index: 0.00MB + Engine InnoDB<br>cwo_cky_cookie_categories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_cky_cookies: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>cwo_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB<br>cwo_fusion_form_entries: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_fusion_form_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_fusion_form_submissions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_fusion_forms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_gla_attribute_mapping_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>cwo_gla_budget_recommendations: Data: 0.19MB + Index: 0.14MB + Engine InnoDB<br>cwo_gla_merchant_issues: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>cwo_gla_shipping_rates: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_gla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_jetpack_sync_queue: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>cwo_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>cwo_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>cwo_options: Data: 5.16MB + Index: 0.09MB + Engine InnoDB<br>cwo_pda_passwords: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>cwo_postmeta: Data: 1.52MB + Index: 0.30MB + Engine InnoDB<br>cwo_posts: Data: 72.52MB + Index: 0.31MB + Engine InnoDB<br>cwo_pp_activity_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>cwo_sgs_log_events: Data: 11.02MB + Index: 7.05MB + Engine InnoDB<br>cwo_sgs_log_visitors: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_usermeta: Data: 0.16MB + Index: 0.06MB + Engine InnoDB<br>cwo_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>cwo_wc_admin_note_actions: Data: 0.06MB + Index: 0.02MB + Engine InnoDB<br>cwo_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB<br>cwo_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>cwo_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>cwo_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>cwo_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>cwo_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB<br>cwo_wc_orders_meta: Data: 0.08MB + Index: 0.13MB + Engine InnoDB<br>cwo_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_wc_product_meta_lookup: Data: 0.02MB + Index: 0.11MB + Engine InnoDB<br>cwo_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>cwo_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_wcpdf_invoice_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>cwo_yoast_indexable: Data: 0.08MB + Index: 0.09MB + Engine InnoDB<br>cwo_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>cwo_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>cwo_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>cwo_yoast_seo_links: Data: 0.05MB + Index: 0.03MB + Engine InnoDB Post Type Counts<br><br>acf-field: 1<br>acf-field-group: 1<br>af_default_field: 10<br>af_reg_field: 2<br>af_reg_form: 2<br>attachment: 91<br>avada_faq: 8<br>avada_portfolio: 6<br>awb_off_canvas: 5<br>cc_restriction: 1<br>fusion_element: 49<br>fusion_form: 8<br>fusion_icons: 2<br>fusion_tb_layout: 19<br>fusion_tb_section: 30<br>nav_menu_item: 56<br>page: 26<br>ppwp-section: 1<br>product: 22<br>product_variation: 12<br>revision: 896<br>shop_coupon: 1<br>shop_order_placehold: 26<br>wc_whsm: 2<br>wp_font_face: 33<br>wp_font_family: 12<br>wp_navigation: 2<br>wp_template: 2<br>yith-wcbm-badge: 1 Security<br><br>Secure connection (HTTPS): ?<br>Hide errors from visitors: ? Active Plugins (19)<br><br>Custom Registration Forms Builder: by Addify – 1.2.1<br>Advanced Custom Fields PRO: by WP Engine – 6.3.11<br>Age Gate: by Phil Baker – 3.5.2<br>CookieYes | GDPR Cookie Consent: by CookieYes – 3.2.8<br>Avada Builder: by ThemeFusion – 3.11.13<br>Avada Core: by ThemeFusion – 5.11.13<br>Google for WooCommerce: by WooCommerce – 2.9.4<br>Hide Shipping Method For WooCommerce: by theDotstore – 1.5.0<br>Quantity Discounts & Pricing For Woocommerce: by Plugify – 5.0.2<br>Speed Optimizer: by SiteGround – 7.7.2<br>Security Optimizer: by SiteGround – 1.5.7<br>WooCommerce.com Update Manager: by Automattic – 1.0.3<br>WooCommerce Authorize.Net Gateway: by SkyVerge – 3.10.9<br>PDF Invoices & Packing Slips for WooCommerce: by WP Overnight – 3.9.4<br>WooCommerce Shipping & Tax: by WooCommerce – 2.8.5<br>WooCommerce: by Automattic – 9.5.1<br>Yoast SEO: by Team Yoast – 24.1<br>SiteGround Central: by SiteGround – 3.3.1<br>YITH WooCommerce Badge Management: by YITH – 3.12.0 Inactive Plugins (5)<br><br>Jetpack: by Automattic – 14.1<br>Mailchimp for WooCommerce: by Mailchimp – 5.0<br>Password Protect WordPress Lite: by BWPS – 1.9.6<br>Pinterest for WooCommerce: by WooCommerce – 1.4.14<br>TikTok: by TikTok – 1.3.0 Settings<br><br>Legacy API Enabled: –<br>Force SSL: –<br>Currency: USD ($)<br>Currency Position: left<br>Thousand Separator: ,<br>Decimal Separator: .<br>Number of Decimals: 2<br>Taxonomies: Product Types: external (external)<br>grouped (grouped)<br>simple (simple)<br>variable (variable)<br><br>Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)<br>exclude-from-search (exclude-from-search)<br>featured (featured)<br>outofstock (outofstock)<br>rated-1 (rated-1)<br>rated-2 (rated-2)<br>rated-3 (rated-3)<br>rated-4 (rated-4)<br>rated-5 (rated-5)<br><br>Connected to WooCommerce.com: ?<br>Enforce Approved Product Download Directories: ?<br>HPOS feature enabled: ?<br>Order datastore: Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore<br>HPOS data sync enabled: – Logging<br><br>Enabled: ?<br>Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2<br>Retention period: 30 days<br>Level threshold: –<br>Log directory size: 55 KB WC Pages<br><br>Shop base: #10 - /shop/<br>Cart: ? Page does not contain the [woocommerce_cart] shortcode or the woocommerce/cart block.<br>Checkout: ? Page does not contain the [woocommerce_checkout] shortcode or the woocommerce/checkout block.<br>My account: #13 - /my-account/<br>Terms and conditions: #3555 - /terms-conditions/ Theme<br><br>Name: Avada Child<br>Version: 1.0.0<br>Author URL: https://theme-fusion.com<br>Child Theme: ?<br>Parent Theme Name: Avada<br>Parent Theme Version: 7.11.13<br>Parent Theme Author URL: https://themeforest.net/user/ThemeFusion<br>Theme type: Classic theme<br>WooCommerce Support: ? Templates<br><br>Overrides: Avada/woocommerce/cart/cart.php<br>Avada/woocommerce/checkout/form-pay.php<br>Avada/woocommerce/checkout/review-order.php<br>Avada-Child-Theme/woocommerce/emails/customer-completed-order.php<br>Avada/woocommerce/single-product/short-description.php<br>Avada/woocommerce/single-product/tabs/additional-information.php<br>Avada/woocommerce/single-product/tabs/description.php Authorize.Net Credit Card<br><br>Environment: Production<br>Tokenization Enabled: –<br>Debug Mode: Off<br>Webhooks Enabled: ?<br>Not generated Admin<br><br>Enabled Features: activity-panels<br>analytics<br>product-block-editor<br>coupons<br>core-profiler<br>customize-store<br>customer-effort-score-tracks<br>import-products-task<br>experimental-fashion-sample-products<br>shipping-smart-defaults<br>shipping-setting-tour<br>homescreen<br>marketing<br>mobile-app-banner<br>onboarding<br>onboarding-tasks<br>pattern-toolkit-full-composability<br>product-custom-fields<br>remote-inbox-notifications<br>remote-free-extensions<br>payment-gateway-suggestions<br>printful<br>shipping-label-banner<br>subscriptions<br>store-alerts<br>transient-notices<br>woo-mobile-welcome<br>wc-pay-promotion<br>wc-pay-welcome-page<br>launch-your-store<br><br>Disabled Features: product-data-views<br>experimental-blocks<br>coming-soon-newsletter-template<br>minified-js<br>product-pre-publish-modal<br>settings<br>async-product-editor-category-field<br>product-editor-template-system<br>blueprint<br>reactify-classic-payments-settings<br>use-wp-horizon<br>add-to-cart-with-options-stepper-layout<br><br>Daily Cron: ? Next scheduled: 2024-12-27 02:12:45 +00:00<br>Options: ?<br>Notes: 84<br>Onboarding: completed Action Scheduler<br><br>Complete: 126<br>Oldest: 2024-11-25 15:54:16 +0000<br>Newest: 2024-12-25 16:14:17 +0000<br><br>Failed: 528<br>Oldest: 2024-08-06 19:32:22 +0000<br>Newest: 2024-09-17 19:54:13 +0000<br><br>Pending: 6<br>Oldest: 2024-12-26 11:23:00 +0000<br>Newest: 2025-01-14 15:41:20 +0000 Status report information<br><br>Generated at: 2024-12-26 11:23:14 +00:00<br>
    Plugin Support Reynier (a11n)

    (@reynierc)

    Hi @kmgreek

    Thanks for sending the system status report. Looking at the system report you’ve provided, everything seems to be in order with your WooCommerce and WordPress setup. You’re running WooCommerce version 9.5.1, which is recent, and your server environment meets all the necessary requirements with PHP 8.2.26 and MySQL 8.0.39-30.

    The report doesn’t show any direct issues with REST API. The 404 error mentioned earlier often results from incorrect endpoint URLs or server rewrites not being properly configured. If you are using any security plugins or have strict server rules, make sure they’re not inadvertently blocking the REST API paths.

    You just need one correct API endpoint. If you’re using the latest version of WooCommerce, it should be: https://mysite.com/wp-json/wc/v3/orders

    Circling back on our last response, were you able to try modifying the API endpoint?

    If everything is configured properly along with the suggested API endpoint and you’re still experiencing issues, it might be worth reaching out to your hosting provider to confirm that there are no server-side restrictions preventing the API requests from being received. They might also assist in checking the server access logs for any related errors.

    Let us know how it goes after this.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.