How to add new product via JSON Admin?

Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules
Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
paravista
Posts: 4
Joined: 15 Feb 2017, 20:41

How to add new product via JSON Admin?

Post by paravista » 07 Nov 2019, 17:33

Hi,

I am trying to use the Aimeos JSON API (TYPO3 9.5.8 / Aimeos 19.10.1).

GET works well, but I have problems using POST and controller "Jsonadm" for example to add a new product.

I tried to follow the instructions on: https://aimeos.org/docs/Developers/Admi ... _resources
The request body is a JSON encoded array with "data" on root level and type "product" where I am trying to set some attributes.

As a response I get a 401 "Not allowed for this resource". Any idea what is causing this issue? Are there maybe some mandatory attributes to set per product I am missing here?

Any help is appreciated!

Thanks a lot,
Michael

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

Re: How to add new product via JSON Admin?

Post by aimeos » 09 Nov 2019, 10:37

The reason is that you are not authenticated. Before using the JsonAdm API, you have to login your client in your TYPO3 instance somehow.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply