does anyone know why structured data
# general-english
b
does anyone know why structured data does not appear to be working with the VAPI API? What exactly does the schema need to look like for a successful request? For example, with the following structure:
Copy code
...
 "schema": {
          "type": "object",
          "required": [
            "sale_price"
          ],
          "properties": {
            "sale_price": "{\n  \"type\": \"number\",\n  \"nullable\": true\n}"
          }
        }
...
which throws the following error:
"assistantOverrides.analysisPlan.structuredDataPlan.schema.properties.each value in nested property properties must be either object or array"
s
@bsolo Can you please create a support ticket with the call ID? This support ticket along with the call ID will help me understand what went wrong for you.
b
Hey! I think I just figured it out
It was the formatting of the properties field
if I remove the special characters, it works just fine 🙂
i also guess it assumes my object is a string when it starts with
"
Copy code
json
"schema": {
          "type": "object",
          "properties": {
            "sale_amt": {
              "type": "string",
              "description": "Sale amount that was discussed on the phone"
            }
          },
          "required": [
            "sale_amt"
          ]
        }
this worked for me