Title: Rest Api Problem
Last modified: January 29, 2019

---

# Rest Api Problem

 *  Resolved [erkan41](https://wordpress.org/support/users/erkan41/)
 * (@erkan41)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/rest-api-problem/)
 * Hi,
    I’m getting the following error when loading category, brand and image.
 * {
    “code”: “rest_invalid_param”, “message”: “Invalid parameter: categories”, “
   data”: { “status”: 400, “params”: { “categories”: “categories[0] not object type.”}}}

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/rest-api-problem/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/rest-api-problem/page/2/?output_format=md)

 *  [Edi Amin](https://wordpress.org/support/users/ediamin/)
 * (@ediamin)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/rest-api-problem/#post-11144532)
 * [@erkan41](https://wordpress.org/support/users/erkan41/) Please share your REST
   endpoint and request body/params.
 *  Thread Starter [erkan41](https://wordpress.org/support/users/erkan41/)
 * (@erkan41)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/rest-api-problem/#post-11144636)
 * POST /wp-json/dokan/v1/products/?name=Test 1326&type=simple&regular_price=100&
   description&short_description=kisa&manage_stock=true&stock_quantity=1&categories
   =589 HTTP/1.1
    Host: localhost Authorization: Basic YWRtaW46MTIzNDU2QWE= Cache-
   Control: no-cache Content-Type: multipart/form-data; boundary=—-WebKitFormBoundary7MA4YWxkTrZu0gW
   Postman-Token: 812d7618-7c95-4779-f0ad-5612e6ef5ad7
 *  [Edi Amin](https://wordpress.org/support/users/ediamin/)
 * (@ediamin)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/rest-api-problem/#post-11144736)
 * The `categories` param must be an array of objects. You have to send it like `
   categories[0][id]` in Postman. Take a look at this screenshot [https://photos.app.goo.gl/3Qvzu1qctCemFH958](https://photos.app.goo.gl/3Qvzu1qctCemFH958)
 *  Thread Starter [erkan41](https://wordpress.org/support/users/erkan41/)
 * (@erkan41)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/rest-api-problem/#post-11145011)
 * Thanks product added but not added to my chosen category. is adding to the non-
   category products section.
 *  [Edi Amin](https://wordpress.org/support/users/ediamin/)
 * (@ediamin)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/rest-api-problem/#post-11146888)
 * [@erkan41](https://wordpress.org/support/users/erkan41/) make sure you’re category
   ID exists and it belongs to a product category before you make the post request.
   You can also test this endpoint in postman `wc/v3/products/categories/{category_id}`.
 *  Thread Starter [erkan41](https://wordpress.org/support/users/erkan41/)
 * (@erkan41)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/rest-api-problem/#post-11147426)
 * Hi,
    I am getting the following error when uploading the image. localhost/wp-
   json/wp/v2/media
 * [https://ibb.co/9VPZYft](https://ibb.co/9VPZYft)
 *  [Edi Amin](https://wordpress.org/support/users/ediamin/)
 * (@ediamin)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/rest-api-problem/#post-11147741)
 * From postman you can upload an image using form-data. Use a `file` key and choose
   your file and send the request. Take a look at their documentation and screenshot
   [https://learning.getpostman.com/docs/postman/sending_api_requests/requests/#form-data](https://learning.getpostman.com/docs/postman/sending_api_requests/requests/#form-data)
 *  Thread Starter [erkan41](https://wordpress.org/support/users/erkan41/)
 * (@erkan41)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/rest-api-problem/#post-11154226)
 * Hi,
    I want to list the main categories and subcategories, how can I do that?
 *  [Edi Amin](https://wordpress.org/support/users/ediamin/)
 * (@ediamin)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/rest-api-problem/#post-11155890)
 * [@erkan41](https://wordpress.org/support/users/erkan41/) for any WC REST API 
   reference, checkout their documentation here: [https://woocommerce.github.io/woocommerce-rest-api-docs/#product-categories](https://woocommerce.github.io/woocommerce-rest-api-docs/#product-categories)
 *  Thread Starter [erkan41](https://wordpress.org/support/users/erkan41/)
 * (@erkan41)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/rest-api-problem/#post-11155951)
 * I couldn’t see a code that separates the subcategory or the main category. only
   have all categories. please provide a method for separating categories.
 *  [Edi Amin](https://wordpress.org/support/users/ediamin/)
 * (@ediamin)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/rest-api-problem/#post-11156023)
 * You can use `/wp-json/wc/v3/products/categories` endpoint with `parent_id: 0`
   to fetch all main categories.
 * I think you should ask any help related directly to WooCommerce in their own 
   support forum.
 *  Thread Starter [erkan41](https://wordpress.org/support/users/erkan41/)
 * (@erkan41)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/rest-api-problem/#post-11163390)
 * Hi,
    dokan rest api document does not have a method to add bank account information
   how can I do it? I would like to post the name surname and iban number.
 *  Thread Starter [erkan41](https://wordpress.org/support/users/erkan41/)
 * (@erkan41)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/rest-api-problem/#post-11168343)
 * please answer my question
 *  [Edi Amin](https://wordpress.org/support/users/ediamin/)
 * (@ediamin)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/rest-api-problem/#post-11169056)
 * [@erkan41](https://wordpress.org/support/users/erkan41/) We’re currently working
   on it. Hopefully we’ll update Dokan at the end of this week. But it’ll be only
   for site admin. Keep an eye on our Github repo to get the update.
 *  Thread Starter [erkan41](https://wordpress.org/support/users/erkan41/)
 * (@erkan41)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/rest-api-problem/#post-11180853)
 * Hi,
    /wp-json/wc/v3/products/categories
 * My site has 10 main categories. But when I run the query, only 3 main categories
   and their subcategories are listed. Other categories don’t come up with what 
   could be the problem?

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/rest-api-problem/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/rest-api-problem/page/2/?output_format=md)

The topic ‘Rest Api Problem’ is closed to new replies.

 * ![](https://ps.w.org/dokan-lite/assets/icon-256x256.gif?rev=3239229)
 * [Dokan: AI Powered WooCommerce Multivendor Marketplace Solution – Build Your Own Amazon, eBay, Etsy](https://wordpress.org/plugins/dokan-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dokan-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dokan-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/dokan-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dokan-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dokan-lite/reviews/)

 * 22 replies
 * 3 participants
 * Last reply from: [erkan41](https://wordpress.org/support/users/erkan41/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/rest-api-problem/page/2/#post-11204486)
 * Status: resolved