Skip to content

API TUTORIAL – REPORTS

Intro

We offer an endpoint that allows posting a list of report payloads. These payloads can have different formats. The system will attempt to retrieve the related designs by UUID, or failing that, by name.

The flow to obtain the report will be:

  1. Post the report payload and receive the UUIDs of the created report objects.
  2. Recursively check the status of the reports until they are ready.
  3. Once ready, use the pre-signed URL to download the report from AWS.

Post reports

The payload objects should hold almost the same info as the payload frontend sends when it creates a report. Each report is different and has some information that is dynamically added to the meta field.

Parts reports (like BoMs, machine files for parts, ...) can be selected by either a list of selected_assemblies or a list of part_batches. Both as uuids.

Panel reports (like mob2 files) have to be selected by the list of selected_assemblies.

Endpoint: https://back.produuz.it/api/v2/reports/bulk_launch/

  • Method: POST.
  • Request Body: List of payloads.
  • Response: List of created report objects.

Example Request Payload

json
[
  {
    "name": "my-test",
    "document_type": "panel_mob2",
    "project": "461f7d25-dea3-46b1-b908-5dd187e09ea0", // Direct project picking
    "project_name": "my_project_name", // If no uuid, you can provide a name for an existent or new project.
    "super_project": "my_project_folder", // If no uuid, you can provide a super_project name.
    "selected_assemblies": [
      "uuid-of-an-assembly"
      // ...
    ],
    "meta": {
      "production_line_uuid": "uuid-of-the-production-line", // Always needed for mob files
      "fill_mob2_defaults": true, // For auto mob defaults filling
      "part_batches": []
    }
  },
  {
    //... another report payload
  },
  {
    //... another report payload
  }
]
[
  {
    "name": "my-test",
    "document_type": "panel_mob2",
    "project": "461f7d25-dea3-46b1-b908-5dd187e09ea0", // Direct project picking
    "project_name": "my_project_name", // If no uuid, you can provide a name for an existent or new project.
    "super_project": "my_project_folder", // If no uuid, you can provide a super_project name.
    "selected_assemblies": [
      "uuid-of-an-assembly"
      // ...
    ],
    "meta": {
      "production_line_uuid": "uuid-of-the-production-line", // Always needed for mob files
      "fill_mob2_defaults": true, // For auto mob defaults filling
      "part_batches": []
    }
  },
  {
    //... another report payload
  },
  {
    //... another report payload
  }
]

Example Response Payload

json
{
  "status": "successfully_enqueued",
  "reports": [
    {
      "uuid": "aa29c0b0-eb1a-4861-b5cc-e6c86a3bd665",
      "created": "2025-08-19T12:34:13.783598Z",
      "modified": "2025-08-19T12:34:13.783609Z",
      "name": "my-test",
      "username": "dev_fede",
      "document_status": "waiting",
      "document_type": "panel_mob2",
      "project": "461f7d25-dea3-46b1-b908-5dd187e09ea0",
      "meta": {
        "part_batches": [],
        "dynamic_forms": {
          /// This is automatically filled in this case for mob2 files.
        },
        "fill_mob2_defaults": true,
        "production_line_uuid": "uuid-of-the-production-line"
      },
      "selected_assemblies": [
        "uuid-of-an-assembly"
        // ...
      ],
      "selected_assembly_designs": [],
      "selected_modules": [],
      "selected_module_designs": [],
      "files": [
        {
          "uuid": "4599a741-79d9-4b23-b53d-2c6e1ca82507",
          "created": "2025-08-19T12:34:14.703943Z",
          "name": "waiting",
          "short_name": "waiting",
          "meta": {
            "status": "waiting",
            "version": 0
          },
          "cloud_folder": "461f7d25-dea3-46b1-b908-5dd187e09ea0/reports/aa29c0b0-eb1a-4861-b5cc-e6c86a3bd665/versions/0",
          "presigned_url": "https://example.file",
          "hash": ""
        }
      ],
      "last_file": {
        "uuid": "4599a741-79d9-4b23-b53d-2c6e1ca82507",
        "created": "2025-08-19T12:34:14.703943Z",
        "name": "waiting",
        "short_name": "waiting",
        "meta": {
          "status": "waiting",
          "version": 0
        },
        "cloud_folder": "461f7d25-dea3-46b1-b908-5dd187e09ea0/reports/aa29c0b0-eb1a-4861-b5cc-e6c86a3bd665/versions/0",
        "presigned_url": "https://example.file",
        "hash": ""
      }
    },
    {}, // Another report object
    {} // Another report object
  ]
}
{
  "status": "successfully_enqueued",
  "reports": [
    {
      "uuid": "aa29c0b0-eb1a-4861-b5cc-e6c86a3bd665",
      "created": "2025-08-19T12:34:13.783598Z",
      "modified": "2025-08-19T12:34:13.783609Z",
      "name": "my-test",
      "username": "dev_fede",
      "document_status": "waiting",
      "document_type": "panel_mob2",
      "project": "461f7d25-dea3-46b1-b908-5dd187e09ea0",
      "meta": {
        "part_batches": [],
        "dynamic_forms": {
          /// This is automatically filled in this case for mob2 files.
        },
        "fill_mob2_defaults": true,
        "production_line_uuid": "uuid-of-the-production-line"
      },
      "selected_assemblies": [
        "uuid-of-an-assembly"
        // ...
      ],
      "selected_assembly_designs": [],
      "selected_modules": [],
      "selected_module_designs": [],
      "files": [
        {
          "uuid": "4599a741-79d9-4b23-b53d-2c6e1ca82507",
          "created": "2025-08-19T12:34:14.703943Z",
          "name": "waiting",
          "short_name": "waiting",
          "meta": {
            "status": "waiting",
            "version": 0
          },
          "cloud_folder": "461f7d25-dea3-46b1-b908-5dd187e09ea0/reports/aa29c0b0-eb1a-4861-b5cc-e6c86a3bd665/versions/0",
          "presigned_url": "https://example.file",
          "hash": ""
        }
      ],
      "last_file": {
        "uuid": "4599a741-79d9-4b23-b53d-2c6e1ca82507",
        "created": "2025-08-19T12:34:14.703943Z",
        "name": "waiting",
        "short_name": "waiting",
        "meta": {
          "status": "waiting",
          "version": 0
        },
        "cloud_folder": "461f7d25-dea3-46b1-b908-5dd187e09ea0/reports/aa29c0b0-eb1a-4861-b5cc-e6c86a3bd665/versions/0",
        "presigned_url": "https://example.file",
        "hash": ""
      }
    },
    {}, // Another report object
    {} // Another report object
  ]
}

Report types ("document_type" field)

You can select from a list of document_types (boms, machine files, ...). Some of them need a production line selection, others a machine selection.

document_typeDescriptionNeeds PLNeeds machine
plates_bomPlates BoMNoNo
wood_bomWood BoMNoNo
designs_bomPer-Design BoMNoNo
accesories_bomAccesories BoMNoNo
custom_bomNo description availableNoNo
qr_stickersQR StickersNoNo
quality_controlQuality Control ReportNoNo
issuesIssues ReportNoNo
custom_woodcsvCustom Woods CSVNoNo
custom_platecsvCustom Plates CSVNoNo
custom_accesorycsvCustom Accesories CSVNoNo
wood_btlBTL File [Woods]NoYes
wood_bvxBVX File [Hundegger][Woods]NoYes
plates_xcsXCS Maestro File [Plates]NoYes
plates_ardisArdis File [Plates]NoYes
plates_dxfDXF File [Plates]NoYes
plates_ptxNo description availableNoYes
plates_cixCIX Biesse File [Plates]NoYes
frame_mtfMTF File [Roofs]NoYes
frame_nailer_csvFrame Nails csv fileNoYes
panel_mob1MOB v1 Machine FileYesNo
panel_mob2MOB v2 Machine FileYesNo

For panel_mob2, you can simply place a flag fill_mob2_defaults into the meta field to automatically load defaults from your machine setups. Otherwise you need to replicate the dynamic_forms field from a real life report object example.

Fetch report objects

Once a report is created, a job is enqueued to make the actual files.

You should fetch your report objects iteratively each N seconds until you find a response with status ready in the last_file. Once you have it, you can directly download the file from AWS through a presigned_url dynamically provided in the object.

Endpoint: https://back.produuz.it/api/v2/reports/uuid-of-the-report/

INFO

Please not that the presigned urls have expiracy. They are automatically refreshed when needed so you only need to fetch again the report object.