Announcement

Collapse
No announcement yet.

How to assign multiple teams via API POST

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

  • How to assign multiple teams via API POST

    Hello,

    I am trying to create some entries via the API. Its just for testing, so just ignore the names.
    I created an own base entity ( named: Test), where I can assign mutliple teams.

    When I call my POST "http://localhost/espocrm/api/v1/Test" I want to assign mutliple Teams. I tried 2 Payloads, but both didn't work.
    The entries were created, but the assignment to the teams failed.

    Here are the paylods I tried:

    Code:
    {
    "assignedUserId":"1",
    "name":"tempwd4hj",
    "teamsNames":["1","2"]
    }
    Code:
    {
    "assignedUserId":"1",
    "name":"tempwd4hj",
    "teamsNames":[{"name":"1"},{"name":"2"}]
    }
    best regards

  • #2
    Hello,

    I think maybe this is a wrong syntax call.
    Did you checked whether the call and the syntax of the call are correct?

    Comment


    • #3
      Hello,

      this is my question.
      I don't know if my syntax is correct or not. I don't get an error or something.
      The new entries are created, but the fields with multiple values are ignored.

      Comment


      • #4
        Hello,
        To assign mutliple Teams you need to send in request ther IDs. Example:
        Code:
        {
            "assignedUserId":"1",
            "name":"tempwd4hj",
            "teamsIds":["6092f3c47ae9f91c1","6092f3c8336f9ad84"]
        }

        Comment

        Working...
        X