Please how can i create a vendor, from a rest API

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM Marketplace – REST API Please how can i create a vendor, from a rest API

Viewing 4 reply threads
  • Author
    Posts
    • #98654
      legendchyke
      Participant

      Hi,
      Please, how can I create a vendor, from a rest API? The default WordPress user registers customer. and I need this to be able to create vendor directly from a rest API but I cannot seem to find any resources to help out.

    • #99668
      Sayan Naskar
      Keymaster

      Hello,
      WCFM rest api doesn’t have any route of itself to create users or even vendors you must use the default wordpress user creation route.
      https://developer.wordpress.org/rest-api/reference/users/

      You must enter the correct user roles for in the api data for creating different user roles other than customers.

    • #99693
      Sayan Naskar
      Keymaster

      Hello again,
      For your convenience the user role for vendors is wcfm_vendor

    • #104190
      arjunmurali1993
      Participant

      Hi,

      We already have an app to create products using the Woocommerce REST API. I was wondering if I could assign this product to a particular vendor when creating the product through the API. If possible, could you please explain how I can achieve this?

      Regards,
      Arjun

    • #104477
      Sayan Naskar
      Keymaster

      Hello,
      If you create a product through WCFM Rest api the product will automatically get assigned to the vendor already logged in.
      But if you are using Woocommerce rest api you need to set the user id of the vendor and pass it as the author of the product to assign the vendor as the vendor of the product.

      Thank you.

Viewing 4 reply threads
  • You must be logged in to reply to this topic.