# Ver campos disponibles por tarea

### Ver todos los campos  


Este servicio permite crear tareas por medio de webservice.

**Consumo:**

`<strong>POST:</strong> /<span style="color: rgb(33, 33, 33); font-family: Inter, system-ui, -apple-system, 'system-ui', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"><span style="color: rgb(33, 33, 33); font-family: Inter, system-ui, -apple-system, 'system-ui', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">tareas/ver-campos</span></span>`

```json
{
	"token": "845240e09011715621764"
}
```

**Respuesta:**

El servicio devolverá un JSON indicando la creación de la tarea, así mismo el token de la tarea y su identificador. El token servirá en la edición de tareas.

```json
{
    "status": 1,
    "msg": "Campos api éxito",
    "data": [
        {
            "nombre": null,
            "campos": {
                "campo1": {
                    "type": "text",
                    "label": "Campo de prueba",
                    "seccion": 0,
                    "id": "campo1"
                },
                "campo2": {
                    "type": "text",
                    "label": "Campo dos",
                    "seccion": 0,
                    "id": "campo2"
                },
                "campo3": {
                    "type": "select",
                    "label": "Campo tres",
                    "seccion": 0,
                    "id": "campo3"
                },
                "Firma_de_cliente": {
                    "type": "signature",
                    "label": "Firma de prueba",
                    "seccion": 0,
                    "id": "Firma_de_cliente"
                },
                "campofile": {
                    "type": "file",
                    "label": "Test",
                    "seccion": 0,
                    "id": "campofile"
                },
                "campos2": {
                    "type": "text",
                    "label": "Campo s2",
                    "seccion": 0,
                    "id": "campos2"
                }
            }
        }
    ]
}
```

### Campos por sección  


Este servicio permite crear cambiar de etapa una tarea. Atención: el parámetro "token" corresponde al token devuelto por la creación de tareas.

**Consumo:**

`<strong>POST:</strong> /<span style="color: rgb(33, 33, 33); font-family: Inter, system-ui, -apple-system, 'system-ui', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"><span style="color: rgb(33, 33, 33); font-family: Inter, system-ui, -apple-system, 'system-ui', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">tareas/ver-campos-por-seccion</span></span>`

```json
{
	"token": "845240e09011715621764"
}
```

**Respuesta:**

El servicio devolverá un JSON el estatus de la actualización. Internamente, el sistema cambiará de estado la tarea y llenará los campos enviados.

```json
{
    "status": 1,
    "msg": "Campos api éxito",
    "data": {
        "seccion_1": {
            "campo1": {
                "type": "text",
                "label": "Campo de prueba",
                "seccion": 0,
                "id": "campo1",
                "value": "test 1"
            },
            "campo2": {
                "type": "text",
                "label": "Campo dos",
                "seccion": 0,
                "id": "campo2",
                "value": "Un valor 2"
            },
            "campo3": {
                "type": "select",
                "label": "Campo tres",
                "seccion": 0,
                "id": "campo3",
                "value": ""
            },
            "Firma_de_cliente": {
                "type": "signature",
                "label": "Firma de prueba",
                "seccion": 0,
                "id": "Firma_de_cliente",
                "value": ""
            },
            "campofile": {
                "type": "file",
                "label": "Test",
                "seccion": 0,
                "id": "campofile",
                "value": ""
            }
        },
        "seccion_2": {
            "campos2": {
                "type": "text",
                "label": "Campo s2",
                "seccion": 0,
                "id": "campos2",
                "value": "Un valor 1"
            }
        }
    }
}
```