I can not add Entities over the API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Andorxor
    Member
    • May 2019
    • 65

    I can not add Entities over the API

    Whenever i try to add a entity over the API i get the following error in the log:
    Code:
    API [POST]:/:controller, Params:Array (     [controller] => Account ) , InputData: {"assignedUserId":"system","name":"XTestX"} -  [] []
    Display Error: , Code: 400 URL: /CRM/api/v1/Account [] []
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #2
    Hello.
    Error 400 means BadRequest. You have an incorrect parameter. Also, check this https://www.espocrm.com/documentation/development/api/.

    Comment

    • Andorxor
      Member
      • May 2019
      • 65

      #3
      I made a entity with only name as required field and got a 400 when i tried to create it with {"name":"test"} as payload.

      Comment

      • Maximus
        Senior Member
        • Nov 2018
        • 2731

        #4
        Also, you have to define the all fields with the 'required' status.

        Comment

        Working...