Obtener el JSON de una versión concreta de un proceso

Devuelve un JSON con la estructura, para el proceso con código processCode y la versión recibida.

Se utilizará para actualizar una solicitud que no está en la última versión publicada del proceso.

Si estuviera en la última versión pública del proceso, podemos usar la llamada a la API correspondiente para obtener el JSON.

TIPO: GET

URL: https://HOST_MODELA/public/external/{codeProcess}/{version}/getexternalrequestjson

Debemos enviar dos parámetros en la URL:

  • processCode: Código del proceso del que queremos obtener los datos.
  • version: Versión de la que queremos obtener el JSON

Para su uso necesitamos un token del tipo Creación petición.

Ejemplo de una llamada, donde {REPLACE_INSTANCE_GENERATED_TOKEN} debe ser el valor del token:

curl --location 'https://demo.getmodela.com/public/external/{codeProcess}/{version}/getexternalrequestjson' \
--header 'token: {REPLACE_INSTANCE_GENERATED_TOKEN}'
--header 'Company-Id: {REPLACE_COMPANY_ID}'

Ejemplo de JSON de respuesta:

{
   "success": true,
   "errorCode": null,
   "errorMessage": null,
   "result":    {
      "processCode": "testjose",
      "objectIdOwner": "User Object_Id who created the request. Must exist in Modela",
      "companyCode": "Company Code",
      "subject": "Subject",
      "summary": "Summary",
      "additionalComments": "Additional comments",
      "additionalInfoAttachments": [      {
         "fileName": "File name with extension",
         "content": "Contents of the attached file in base64",
         "mimeType": "File mime type",
         "description": "File description"
      }],
      "formField":       [
                  {
            "idInternal": "n1",
            "value": [{"value": "Number value with . as decimal separator"}]
         },
                  {
            "idInternal": "t1",
            "value": [{"value": "Text value"}]
         },
                  {
            "idInternal": "d1",
            "value": [{"value": "Date value with yyyy-MM-dd format"}]
         },
                  {
            "idInternal": "c1",
            "value": [{"value": "Selection option code"}]
         },
                  {
            "idInternal": "r1",
            "value": [{"value": "Selection option code"}]
         },
                  {
            "idInternal": "ch1",
            "value": [{"value": "Selection option code separated by ,"}]
         },
                  {
            "idInternal": "at1",
            "value": [            {
               "fileName": "File name with extension",
               "content": "Contents of the attached file in base64",
               "mimeType": "File mime type",
               "description": "File description"
            }]
         },
                  {
            "idInternal": "n2",
            "value": [{"value": "Number value with . as decimal separator. Field of a table, must contain an array of values in the order of the rows"}]
         },
                  {
            "idInternal": "t2",
            "value": [{"value": "Text value. Field of a table, must contain an array of values in the order of the rows"}]
         },
                  {
            "idInternal": "d2",
            "value": [{"value": "Date value with yyyy-MM-dd format. Field of a table, must contain an array of values in the order of the rows"}]
         },
                  {
            "idInternal": "c2",
            "value": [{"value": "Selection option code. Field of a table, must contain an array of values in the order of the rows"}]
         },
                  {
            "idInternal": "ch2",
            "value": [{"value": "Selection option code separated by ,. Field of a table, must contain an array of values in the order of the rows"}]
         },
                  {
            "idInternal": "us1",
            "value": [{"value": "User Object_Id. Must exist in Modela"}]
         },
                  {
            "idInternal": "us1m",
            "value": [{"value": "User Object_Id separated by ,. Must exist in Modela"}]
         },
                  {
            "idInternal": "el1",
            "value": [{"value": "code of the selected option. If you assemble a hierarchy, the different codes must be separated by /"}]
         },
                  {
            "idInternal": "us2",
            "value": [{"value": "User Object_Id. Must exist in Modela. Field of a table, must contain an array of values in the order of the rows"}]
         },
                  {
            "idInternal": "us2m",
            "value": [{"value": "User Object_Id separated by ,. Must exist in Modela. Field of a table, must contain an array of values in the order of the rows"}]
         },
                  {
            "idInternal": "ExternalList9664",
            "value": [{"value": "code of the selected option. If you assemble a hierarchy, the different codes must be separated by /. Field of a table, must contain an array of values in the order of the rows"}]
         }
      ],
      "action": "Acion to be executed. If empty, the request is created in Draft status."
   }
}
Was this article helpful?

Related Articles

¿Necesitas ayuda?

Contacta con nosotros.
Contacta con soporte