API Export Error - Webflow: Request is Malformed (Pattern Error)

Hello again Parabola Community! Please allow me to apologize in advance as I’ve only been using Parabola for about a week and I’m still very inexperienced with API calls. I’m trying to “Create New Products and Default SKU” to Webflow using data from Airtable. (Webflow API Page: http://developers.webflow.com/?shell#create-new-product-and-default-sku) Using the Webflow API page I’ve discovered the example request and reformatted it to the best of my ability to fit my needs:

{
“product”: {
“fields”: {
“name”: “Cloak Of Invisibility”,
“slug”: “cloak-of-invisibility”,
“sku-properties”: [
{
“id”: null,
“name”: “Color”,
“enum”: [
{
“id”: null,
“name”: “Obsidian Black”,
“slug”: “obsidian-black”
},
{
“id”: null,
“name”: “Smoke Grey”,
“slug”: “smoke-grey”
},
{
“id”: null,
“name”: “Forest Green”,
“slug”: “forest-green”
}
]
}
],
“description”: “A cloak that renders the wearer invisible to the eye.”,
“shippable”: true,
“_archived”: false,
“_draft”: false
}
},
“sku”: {
“fields”: {
“name”: “Cloak Of Invisibility Color: Obsidian Black”,
“slug”: “cloak-of-invisibility-color-obsidian-black”,
“product”: “5e8518516e147040726cc415”,
“sku-values”: {},
“main-image”: “https://d1otoma47x30pg.cloudfront.net/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg”,
“more-images”: [
https://d1otoma47x30pg.cloudfront.net/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg”,
https://d1otoma47x30pg.cloudfront.net/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg
],
“price”: {
“unit”: “USD”,
“value”: 120000
},
“download-files”: [
{
“id”: null,
“name”: “The modern web design process - Webflow Ebook.pdf”,
“url”: “https://dropbox.com/files/modern-web-design-process.pdf
}
],
“width”: 56,
“length”: 0.3,
“height”: 72,
“weight”: 24,
“_archived”: false,
“_draft”: false
}
}
}

Here’s my body code from the API-Export Panel of Parabola:

{
“product”: {
“fields”: {
“name”: “{at_Product Names}”,
“slug”: “{Product Handle}”,
“description”: “{Product Description}”,
“inventoryType”: “finite”,
“quantity”:"{at_Variant Inventory}",
“category”:"{WF Category ID}",
“out-of-stock”:"{at_Out Of Stock}",
“section-display-name”:"{at_Section Ranking}",
“section-display-name-2”:"{at_Section Display Name}",
“which-party”:"{wf_mParty_id (from Party Events)}",
“ticket-type”:"{wf_ticketType_id}",
“shippable”:{Requires Shipping},
“_archived”: false,
“_draft”: false
}
},
“sku”: {
“fields”: {
“name”: “{at_Product Names}”,
“slug”: “{Product Handle}”,
“sku-values”: {},
“price”: {
“unit”: “USD”,
“value”:"{at_Variant Price}",
“_archived”: false,
“_draft”: false
}
}
}
}

As you can see, I’m not using all of the fields. You’ll also notice that there’s a few variables - those come from Airtable. I was getting 400 errors previously, saying things such as “this field (slug) is required”, to which I would correct. But after getting the fields to match, I’m now receiving the following error message:

{
“code”: 400,
“err”: “BadRequestError: Request is malformed: Value (product.fields.slug) should match pattern “^[_a-zA-Z0-9][-_a-zA-Z0-9]\"", "errorEnum": "BadRequest", "meta": { "code": "BadRequest", "details": [ { "params": { "pattern": "^[_a-zA-Z0-9][-_a-zA-Z0-9]*"
},
“path”: “.product.fields.slug”,
“type”: “pattern”
}
]
},
“msg”: "Request is malformed: Value (product.fields.slug) should match pattern "^[_a-zA-Z0-9][-_a-zA-Z0-9]
$””,
“name”: “BadRequestError”,
“path”: “/sites/5ecef3bb61ddd359a6d02fd1/products/”
}

It looks to me like this bit of code, “msg”: “Request is malformed: Value (product.fields.slug) should match pattern “^[_a-zA-Z0-9][-_a-zA-Z0-9]*$””, is my problem, but this looks like actual alien text and I have no idea what it means. Does anyone know why I’m receiving this error message, and what I can do to solve it? Please let me know if there is anything else that I can provide. Thanks a lot!
-Hunter

Hey @Hunter_Reynolds - Judging from that error message, it sounds like there’s a value you’re passing for the Product Slug field that Webflow is rejecting because it doesn’t follow the formatting they require. Can you make sure that you’re filtering for any rows where the Product Slug field might be blank? (You can use the Row Filter step for that.)

My advice would be to clean your data as much as possible before sending it to the API Export step. This should make managing the data input for the API Export a lot easier!