Skip to content

API TUTORIAL – POST DESIGNS

Intro

This document provides a shallow guide on how to post designs and upload files

INFO

The base URL for the produuz.it API V2 is: https://back.produuz.it/api/v2/

Post a Design

Only a project uuid and a design name is needed. The project uuid can be also a standard library uuid, since internally stdlibs are also projects.

Endpoint: https://back.produuz.it/api/v2/constructibles/assembly_designs/

  • Method: POST.
  • Request Body: Design object.
  • Response: Serialized created design.

Example Request Payload

json
{
  "project": "uuid-of-the-project",
  "name": "D-10001", // Design name
  "meta": {}, // This will be filled by the system if needed
  "tipo": "timber_panel" // "timber_panel", "module_unit", ...
}
{
  "project": "uuid-of-the-project",
  "name": "D-10001", // Design name
  "meta": {}, // This will be filled by the system if needed
  "tipo": "timber_panel" // "timber_panel", "module_unit", ...
}

Example Response Payload

json
{
  "project": "uuid-of-the-project",
  "parent_designs": [],
  "from_stdlib": false,
  "uuid": "340c1149-7f85-4a83-bede-10089e462069",
  "created": "2025-09-15T17:11:59.548625Z",
  "modified": "2025-09-15T17:11:59.548641Z",
  "name": "D-10001",
  "revision": 0,
  "resources": {},
  "meta": {
    "analysis": "waiting",
    "bruto_area": 0,
    "ifc_assembly_name": "unknown"
  },
  "tipo": "timber_panel"
}
{
  "project": "uuid-of-the-project",
  "parent_designs": [],
  "from_stdlib": false,
  "uuid": "340c1149-7f85-4a83-bede-10089e462069",
  "created": "2025-09-15T17:11:59.548625Z",
  "modified": "2025-09-15T17:11:59.548641Z",
  "name": "D-10001",
  "revision": 0,
  "resources": {},
  "meta": {
    "analysis": "waiting",
    "bruto_area": 0,
    "ifc_assembly_name": "unknown"
  },
  "tipo": "timber_panel"
}

UPLOAD FILES

Get the resources package object:

Endpoint: https://back.produuz.it/api/v2/constructibles/assembly_designs/get_or_create/

Example Request Payload

json
{
  "name": "resources",
  "assembly_design": "340c1149-7f85-4a83-bede-10089e462069"
}
{
  "name": "resources",
  "assembly_design": "340c1149-7f85-4a83-bede-10089e462069"
}

Example Response Payload

json
{
  "uuid": "6d85a4b6-2c8d-4708-a6d5-5e78469c1029",
  "name": "resources",
  "meta": {},
  "assembly": null,
  "assembly_design": "340c1149-7f85-4a83-bede-10089e462069",
  "module": null,
  "module_design": null,
  "proof": null,
  "issue": null,
  "part": null,
  "part_design": null,
  "production_line": null,
  "project": null,
  "files": []
}
{
  "uuid": "6d85a4b6-2c8d-4708-a6d5-5e78469c1029",
  "name": "resources",
  "meta": {},
  "assembly": null,
  "assembly_design": "340c1149-7f85-4a83-bede-10089e462069",
  "module": null,
  "module_design": null,
  "proof": null,
  "issue": null,
  "part": null,
  "part_design": null,
  "production_line": null,
  "project": null,
  "files": []
}

Once you have the package uuid, you have to request a signed URL to upload a file to Google Cloud Storage (GCS).

Endpoint: https://back.produuz.it/api/v2/cloudstorage/packages/6d85a4b6-2c8d-4708-a6d5-5e78469c1029/presign_for_new_file/

Example Request Payload

json
{
  "name": "D-10001.ifc",
  "short_name": "D-10001",
  "type": "application/octet-stream",
  "meta": {
    "section": "assembly_ifc",
    "tipo": "timber_panel",
    "ext": "ifc",
    "status": ["uploaded"],
    "design_name": "D-10001"
  }
}
{
  "name": "D-10001.ifc",
  "short_name": "D-10001",
  "type": "application/octet-stream",
  "meta": {
    "section": "assembly_ifc",
    "tipo": "timber_panel",
    "ext": "ifc",
    "status": ["uploaded"],
    "design_name": "D-10001"
  }
}

Example Response Payload

json
{
  "url": "https://storage.googleapis.com/produuzit-test/60252ad1-60b5-4d49-92e8-12f159ddf47f/assembly_designs/340c1149-7f85-4a83-bede-10089e462069/resources/3/D-10001.ifc?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=service-account%40project.iam.gserviceaccount.com%2F20250915%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20250915T184331Z&X-Goog-Expires=3600&X-Goog-SignedHeaders=content-type%3Bhost&X-Goog-Signature=a1b2c3d4e5f6...",
  "method": "PUT",
  "fields": {},
  "headers": {
    "Content-Type": "application/octet-stream"
  }
}
{
  "url": "https://storage.googleapis.com/produuzit-test/60252ad1-60b5-4d49-92e8-12f159ddf47f/assembly_designs/340c1149-7f85-4a83-bede-10089e462069/resources/3/D-10001.ifc?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=service-account%40project.iam.gserviceaccount.com%2F20250915%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20250915T184331Z&X-Goog-Expires=3600&X-Goog-SignedHeaders=content-type%3Bhost&X-Goog-Signature=a1b2c3d4e5f6...",
  "method": "PUT",
  "fields": {},
  "headers": {
    "Content-Type": "application/octet-stream"
  }
}

With this payload you are able to upload the file to GCS by sending a PUT request to the signed url with the file content as the request body and the specified headers. For more details, see the Google Cloud Storage signed URLs documentation