EN
Español
English
Português
    Add Task

    Petition Details

    • URL: api/v8.6/item/add/{itemType}?caseType={caseType}
    • Type: POST
    • Required headings:

    • content-type: application/json
    • Authorization: TOKEN

    Parameters

    Name Data type Obligatory Description
    ItemType Number Yes Parameter where the task id is sent, which is 5.
    caseType Number Yes Parameter where the type of case where I am going to add the task is indicated.


    Example:



    Body of the petition

    [
        {
            "Field": "NAME",
            "Value": "Nombre de la tarea"
        },
        {
            "Field": "DESCRIPTION",
            "Value": "Descripción de la tarea"
        },
        {
            "Field": "DURATION",
            "Value": "Duración de la tarea"
        },
        {
            "Field": "CALENDARID",
            "Value": "Id del calendario de la tarea"
        },
        {
            "Field": "GROUPID",
            "Value": "Id del grupo de especialista"
        },
        {
            "Field": "SPECIALISTID",
            "Value": "Id del especialista"
        },
        {
            "Field": " ITEMID",
            "Value": "Id compuesto o id global de caso"
        }
    ]
    

    When adding tasks, it is not necessary to include the specialist’s id, so if you are not going to include this data, you can remove the SPECIALISTID field from the request body.

    Answer

    [
    {
    "Field": "itemId",
    "Value": "1082"
    },
    {
    "Field": "qs", "Value":
    "?64B24DED26791A23A2236DE9AA1B0624E8392DF4F6D06BD2CA54C0AD758FA8771D623F 834B05D08DDAA70273F5EF66A00E79018EC9E711AF1B"
    },
    {
    "Field": "composedItemId", "Value": null
    },
    {
    "Field": "isClosed",
    "Value": "False"
    },
    {
    "Field": "result",
    "Value": "True"
    }
    ]
    
    

    Error messages

    Code HTTP status Error Message
    400 BadRequest InvalidItemId
    400 BadRequest InvalidCalendarId
    400 BadRequest InvalidGroupId
    400 BadRequest InvalidDuration
    400 BadRequest InvalidName
    400 BadRequest InvalidDescription
    400 BadRequest InvalidSpecialist
    403 Forbidden UnauthorizedCreateItem
    403 Forbidden UnauthorizedCreateTaskInCasesOfOtherSpecialist
    500 InternalServerError FailureAddItem


    Validating task creation permissions (ADD NEW TASK IN CASE TYPE and CREATE TASK IN CASES OF OTHER SPECIALIST) is done as in the Specialists Web Console (ASDKV8).