Web API (official plugin)

2 年 前
Yes, the categoryName parameter is required, but if you pass an empty string into it, then filtering by this field will not occur and you can get all categories

Elicat1 wrote:
/api-backend/Category/GetAll

I would like to get the complete list of categories, but the CategoryName parameter is required.

http://localhost:65285/api-backend/Category/GetAll?categoryName=xx&storeId=0&pageIndex=0&pageSize=2147483647&showHidden=false

In "others GetAll methods" no parameter is required (ex. Customer/GetAll or Product/GetAll)

How can I get the complete list of categories (without the CategoryName parameter)?
2 年 前
I Tried:

1) http://localhost:65285/api-backend/Category/GetAll?categoryName=    --> ERROR
2) http://localhost:65285/api-backend/Category/GetAll?categoryName="" --> total count = 0

How can I pass the parameter CategoryName="empty_string"    ??

Sergei-k wrote:
Yes, the categoryName parameter is required, but if you pass an empty string into it, then filtering by this field will not occur and you can get all categories

/api-backend/Category/GetAll

I would like to get the complete list of categories, but the CategoryName parameter is required.

http://localhost:65285/api-backend/Category/GetAll?categoryName=xx&storeId=0&pageIndex=0&pageSize=2147483647&showHidden=false

In "others GetAll methods" no parameter is required (ex. Customer/GetAll or Product/GetAll)

How can I get the complete list of categories (without the CategoryName parameter)?
2 年 前
You may try this one http://localhost:65285/api-backend/Category/GetAll?categoryName or this http://localhost:65285/api-backend/Category/GetAll?categoryName=" "(the space)

Elicat1 wrote:
I Tried:

1) http://localhost:65285/api-backend/Category/GetAll?categoryName=    --> ERROR
2) http://localhost:65285/api-backend/Category/GetAll?categoryName="" --> total count = 0

How can I pass the parameter CategoryName="empty_string"    ??

Yes, the categoryName parameter is required, but if you pass an empty string into it, then filtering by this field will not occur and you can get all categories

/api-backend/Category/GetAll

I would like to get the complete list of categories, but the CategoryName parameter is required.

http://localhost:65285/api-backend/Category/GetAll?categoryName=xx&storeId=0&pageIndex=0&pageSize=2147483647&showHidden=false

In "others GetAll methods" no parameter is required (ex. Customer/GetAll or Product/GetAll)

How can I get the complete list of categories (without the CategoryName parameter)?
2 年 前
1) http://localhost:65285/api-backend/Category/GetAll?categoryName --> ERROR
     ("errors": {
        "categoryName": [
            "The categoryName field is required."
        ])

2) http://localhost:65285/api-backend/Category/GetAll?categoryName=" " --> total count = 0
   {
    "total_count": 0,
    "total_pages": 0,
    .....
   }
3) http://localhost:65285/api-backend/Category/GetAll?categoryName=a --> total count = 4
      --> All Categories that contains %a%   ...

There isn't a valid solution ?


Sergei-k wrote:
You may try this one http://localhost:65285/api-backend/Category/GetAll?categoryName or this http://localhost:65285/api-backend/Category/GetAll?categoryName=" "(the space)

I Tried:

1) http://localhost:65285/api-backend/Category/GetAll?categoryName=    --> ERROR
2) http://localhost:65285/api-backend/Category/GetAll?categoryName="" --> total count = 0

How can I pass the parameter CategoryName="empty_string"    ??

Yes, the categoryName parameter is required, but if you pass an empty string into it, then filtering by this field will not occur and you can get all categories

/api-backend/Category/GetAll

I would like to get the complete list of categories, but the CategoryName parameter is required.

http://localhost:65285/api-backend/Category/GetAll?categoryName=xx&storeId=0&pageIndex=0&pageSize=2147483647&showHidden=false

In "others GetAll methods" no parameter is required (ex. Customer/GetAll or Product/GetAll)

How can I get the complete list of categories (without the CategoryName parameter)?
2 年 前
Indeed, there is a problem with these requests, in the new version of the plugin we will change the behavior of this parameter and remove it from the list of required ones. Now I think the following request will work for you: http://localhost:65285//api-backend/Category/GetAll?categoryName=%00

Elicat1 wrote:
1) http://localhost:65285/api-backend/Category/GetAll?categoryName --> ERROR
     ("errors": {
        "categoryName": [
            "The categoryName field is required."
        ])

2) http://localhost:65285/api-backend/Category/GetAll?categoryName=" " --> total count = 0
   {
    "total_count": 0,
    "total_pages": 0,
    .....
   }
3) http://localhost:65285/api-backend/Category/GetAll?categoryName=a --> total count = 4
      --> All Categories that contains %a%   ...

There isn't a valid solution ?


You may try this one http://localhost:65285/api-backend/Category/GetAll?categoryName or this http://localhost:65285/api-backend/Category/GetAll?categoryName=" "(the space)

I Tried:

1) http://localhost:65285/api-backend/Category/GetAll?categoryName=    --> ERROR
2) http://localhost:65285/api-backend/Category/GetAll?categoryName="" --> total count = 0

How can I pass the parameter CategoryName="empty_string"    ??

Yes, the categoryName parameter is required, but if you pass an empty string into it, then filtering by this field will not occur and you can get all categories

/api-backend/Category/GetAll

I would like to get the complete list of categories, but the CategoryName parameter is required.

http://localhost:65285/api-backend/Category/GetAll?categoryName=xx&storeId=0&pageIndex=0&pageSize=2147483647&showHidden=false

In "others GetAll methods" no parameter is required (ex. Customer/GetAll or Product/GetAll)

How can I get the complete list of categories (without the CategoryName parameter)?
2 年 前
Hi, I have problem with testing API via swagger. If I open the link https://{myShopHost}/api-backend/index.html I get error:

Failed to load API definition.
Errors.  Fetch errorundefined https://{myShopHost}/api-backend/backend_v1.06/swagger.json

But if I call API via postman it works.
Please help to solve problem with swagger.
Thanks
2 年 前
Why don't you try to use https://{myShopHost}/api-backend/ (without specifying the index.html)?

Aidnet wrote:
Hi, I have problem with testing API via swagger. If I open the link https://{myShopHost}/api-backend/index.html I get error:

Failed to load API definition.
Errors.  Fetch errorundefined https://{myShopHost}/api-backend/backend_v1.06/swagger.json

But if I call API via postman it works.
Please help to solve problem with swagger.
Thanks
2 年 前
I, we are using webapi on a customer website, no problems until we are trying to user che pictureinsert method.....

how we must put the image in the call???
there is no specific documentation on the swager site....
2 年 前
[email protected] wrote:
I, we are using webapi on a customer website, no problems until we are trying to user che pictureinsert method.....

how we must put the image in the call???
there is no specific documentation on the swager site....


The picture must be passed as a binary array in the request body. For clarity, just call the GetByPictureId method of the PictureBinaryController and you will see how we return the image.
2 年 前
This request returns XML:

/api-backend/GenericAttribute/GetAttribute/10791?key=CustomCustomerAttributes&entityTypeName=Customer

"
<Attributes>
    <CustomerAttribute ID=\"1\">
        <CustomerAttributeValue>
            <Value>CFGERF12D234R44X</Value>
        </CustomerAttributeValue>
    </CustomerAttribute>
    <CustomerAttribute ID=\"2\">
        <CustomerAttributeValue>
            <Value>ABC45Z</Value>
        </CustomerAttributeValue>
    </CustomerAttribute>
</Attributes>"

I tried to use the "CustomerAttributeParser" endpoints without being able to get the single values ​​...

Is possibile to do extract only values by API ?