Create Accounts Through Api?

Hi, im trying to modify or create accounts via the API.

All GET commands, work perfectly fine. When i want to make a PUT allways give me error status 405

Image attached

the API is poorly documented about the PUT methods

Any help must be apreciated
Thanks in advance
JeMa

api-error-01.png

Hello

You should create account by method POST not PUT.

PUT is for updating.

Best regards

Robert

Hello

You should create account by method POST not PUT.

PUT is for updating.

Best regards

Robert

Hi Robert ! Thanks for your reply, same error with POST ... did you maneage to update the database over the api? did you have a formated post to check it out?

Best Regards !

JeMa

Please make sure you are using the API the right way and also have all required fields https://docs.cs-cart.com/latest/developer_guide/api/entities/vendors.html#create-a-vendor

Hello

Let us know if you have dealt with this problem or if we are to help you.

Best regards

Robert

Hi Robert ! Thanks for your reply, same error with POST ... did you maneage to update the database over the api? did you have a formated post to check it out?

Best Regards !

JeMa

I created account successfully using API POST method but I am Unable to update using PUT method.please help if you done already

Hello

What kind of request are you doing? Have you tried to do this through postaman?

Best regards

Robert

Hello

What kind of request are you doing? Have you tried to do this through postaman?

Best regards

Robert

https://prnt.sc/uisj6p

other method working even I passed user_id also here the parameter list email:dneqnvv@gmail.com

user_type:C
company_id:0
status:A
firstname:dev
lastname:dev
company:
company_name:no
password:123456phone:4444444999
user_id:19
profile_id:20

Hello,

You should send data as JSON, not as form-data.

Look into my Postman screenshots to see what I mean:

http://cs-cart.pl/images/postman1.png

http://cs-cart.pl/images/postman2.png

Best regards,

Robert

You are great Thanks its working fine :grin:

Hello

You are welcome :)

Best regards

Robert

Hello!

please guide me how I can get blocks data like(onsale,newset) in homepage API

{
"block_id": "178",
"type": "products",
"properties": {
"template": "blocks/products/products_scroller_advanced.tpl",
"show_price": "Y",
"enable_quick_view": "Y",
"not_scroll_automatically": "Y",
"scroll_per_page": "Y",
"speed": "400",
"pause_delay": "3",
"item_quantity": "5",
"outside_navigation": "N",
"hide_add_to_cart_button": "Y"
},
"company_id": "0",
"storefront_id": "1",
"abt__ut2_show_on_desktop": "Y",
"abt__ut2_show_on_mobile": "N",
"lang_code": "ar",
"name": "On Sale",
"content": {
"items": {
"filling": "on_sale",
"limit": "10",
"cid": ""
}
},
"availability": {
"phone": true,
"tablet": true,
"desktop": true
}
}
I am getting this data but products missing here

Thanks

Hello

Please explain the problem

Best regards

Robert

in above data I am not getting products I am only getting block info

Hello

I think the products are included when you have the block manual fill. Otherwise, it can only return a block structure.
But I would have to check it in code. These are my assumptions.
Best regards
Robert

DO I need to do custom code here