Skip to main content
May 6, 2024 7:51 PM UTC
Solved

Standard Import API error message: Invalid shape type

Hi! I am trying to use the Lucid Standard Import to create a document with an org chart. The org chart is the only shape in the 1-page document. In the shape object, I have:

"type": "orgChart"

and I am getting a “badRequest” error with the following details:

{
"error": "Count: 1, message: Invalid shape type",
"import_error_code": "invalid_file"
}

 

Trevor JAnswer
Lucid product team
May 6, 2024 8:13 PM UTC

Hello cfitz,

Thank you for your interest in our APIs! I believe I’ve identified the problem. Since org charts must be created from data, we’ve separated them into a object called “dataBackedShapes” rather than “shapes” to show the distinction. Here’s an example of what an org chart json file might look like:

{
"version": 1,
"collections": [
{
"id": "org-chart-data",
"dataSource": "org-chart.csv"
}
],
"pages": [
{
"id": "page1",
"title": "Page 1",
"dataBackedShapes": [
{
"type": "orgChart",
"id": "my-org-chart",
"position": {
"x": 0,
"y": 0
},
"collectionId": "org-chart-data",
"idField": "Employee ID",
"foreignKeyField": "Supervisor ID",
"nameField": "Name",
"roleField": "Role",
"imageUrlField": "Image URL",
"extraFields": ["Email", "Cell", "Location"]
}
]
}
]
}

Note that the only page object has the fields “id”, “title”, and “dataBackedShapes”.

 

Let me know if this doesn’t fix the issue!

Comments

Trevor JAnswer
Lucid product team
May 6, 2024 8:13 PM UTC

Hello cfitz,

Thank you for your interest in our APIs! I believe I’ve identified the problem. Since org charts must be created from data, we’ve separated them into a object called “dataBackedShapes” rather than “shapes” to show the distinction. Here’s an example of what an org chart json file might look like:

{
"version": 1,
"collections": [
{
"id": "org-chart-data",
"dataSource": "org-chart.csv"
}
],
"pages": [
{
"id": "page1",
"title": "Page 1",
"dataBackedShapes": [
{
"type": "orgChart",
"id": "my-org-chart",
"position": {
"x": 0,
"y": 0
},
"collectionId": "org-chart-data",
"idField": "Employee ID",
"foreignKeyField": "Supervisor ID",
"nameField": "Name",
"roleField": "Role",
"imageUrlField": "Image URL",
"extraFields": ["Email", "Cell", "Location"]
}
]
}
]
}

Note that the only page object has the fields “id”, “title”, and “dataBackedShapes”.

 

Let me know if this doesn’t fix the issue!

Translate
cfitzAuthor
May 6, 2024 9:28 PM UTC

Thank you! I am no longer getting that error.

Translate