Announcement

Collapse
No announcement yet.

API Rest QuoteItem not getting all payload data

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • API Rest QuoteItem not getting all payload data

    Hello!

    Im trying to create QuoteItems with api rest (api/v1/QuoteItems)

    I have disabled the /application/Espo/Modules/Advanced/Controllers/QuoteItem.php Restrictions that avoid to do modifications on this Entity so I can create and edit from a connected app


    PHP Code:
    use \Espo\Core\Exceptions\BadRequest;
    use 
    \Espo\Core\Exceptions\Error;
    use 
    \Espo\Core\Exceptions\Forbidden;

    class 
    QuoteItem extends \Espo\Core\Controllers\Record
    {
        
    /*public function actionCreate($params, $data, $request)
        {
            //throw new Forbidden('Quote Item can be created only within Quote record.');
        }

        public function actionDelete($params, $data, $request)
        {
            throw new Forbidden('Quote Item can be deleted only within Quote record.');
        }

        public function actionMassDelete($params, $data, $request)
        {
            throw new Forbidden('Quote Item can be deleted only within Quote record.');
        }*/



    But for some reason the api is not getting all the payload data, first I was getting "Bad request (required)" error with fields that was in the payload, then i removed the required option from that fields and noticed that for some reason fields like QuoteId and ProductId was ignored.

    Any idea what is happening or how i can fix this? Im missing some code or restriction?

    Thank you very much!


Working...
X