Rest Api to add address, delete address and get address

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
traiyani75
Advanced
Posts: 114
Joined: 08 Nov 2019, 11:56

Rest Api to add address, delete address and get address

Post by traiyani75 » 05 Dec 2019, 07:53

Hello, we need REST APIs for addresses.
Like
1. Add new address
2. Delete address
3. Get all addresses

Additional
4. Get last orders
5. add a review on orders
6. get reviews of a product
7. check the product is available in stocks

I need all those above APIs. Will you please help me to discover them?

User avatar
aimeos
Administrator
Posts: 7881
Joined: 01 Jan 1970, 00:00

Re: Rest Api to add address, delete address and get address

Post by aimeos » 06 Dec 2019, 08:35

Did you read the documentation of the JSON REST API?
https://aimeos.org/docs/Developers/Client/JSONAPI
traiyani75 wrote: 05 Dec 2019, 07:53 Hello, we need REST APIs for addresses.
Like
1. Add new address
2. Delete address
3. Get all addresses
https://aimeos.org/docs/Developers/Clie ... _addresses

If customers are logged in, you can also manage their addresses using the ".../jsonapi/customer/address" endpoint:
https://github.com/aimeos/ai-client-jso ... andard.php
traiyani75 wrote: 05 Dec 2019, 07:53 Additional
4. Get last orders
For logged in customers, you have access to the last orders using a GET request to the ".../jsonapi/order" endpoint:
https://github.com/aimeos/ai-client-jso ... andard.php
traiyani75 wrote: 05 Dec 2019, 07:53 5. add a review on orders
6. get reviews of a product
Reviews are not yet implemented in Aimeos.
traiyani75 wrote: 05 Dec 2019, 07:53 7. check the product is available in stocks
https://aimeos.org/docs/Developers/Clie ... r_products
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

traiyani75
Advanced
Posts: 114
Joined: 08 Nov 2019, 11:56

Re: Rest Api to add address, delete address and get address

Post by traiyani75 » 07 Dec 2019, 06:46

hello,
In this link, https://aimeos.org/docs/Developers/Clie ... _addresses
It only shows to set the address on an existing cart.
But, We need to add/delete the address for the user base only. Then he can use address from an already added address

User avatar
aimeos
Administrator
Posts: 7881
Joined: 01 Jan 1970, 00:00

Re: Rest Api to add address, delete address and get address

Post by aimeos » 07 Dec 2019, 10:49

If customers are logged in, you can also manage their addresses using the ".../jsonapi/customer/address" endpoint:
https://github.com/aimeos/ai-client-jso ... andard.php
There is no explicit documentation for that yet, but it works by using the "customer/address" endpoint and GET/POST/PATCH request like for other endpoints. If you use a GET request to ".../jsonapi/customer/address" for a logged in user, you will get back the already stored delivery addresses. Each contains a link to delete it if necessary. Use an OPTIONS request to ".../jsonapi/customer/address" to see what properties you have to POST.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

traiyani75
Advanced
Posts: 114
Joined: 08 Nov 2019, 11:56

Re: Rest Api to add address, delete address and get address

Post by traiyani75 » 13 Dec 2019, 10:43

How do i call options call on this.
http://ebdaa-ecommerce-dev.mzadqatar.co ... er/address

it returns me, 404 error code

User avatar
aimeos
Administrator
Posts: 7881
Joined: 01 Jan 1970, 00:00

Re: Rest Api to add address, delete address and get address

Post by aimeos » 14 Dec 2019, 16:13

Sorry, this is the correct link for Laravel which is also returned by the customer endpoint for logged in users:
http://ebdaa-ecommerce-dev.mzadqatar.co ... ed=address
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply