I’m having a weird issue with the Notion API when trying to update page properties. I can update fields individually but when I combine them it breaks.
I ran into this exact issue recently - super confusing! The problem is how you’re formatting the number property. With the Notion API, you need to wrap number values in an object that specifies the type. Here’s how your propertyData should look:
propertyData = {
"scoreField": {"number": 250},
"PageTitle": {"title": [{"text": {"content": "My New Title"}}]}
};
This tells the API what format to expect for the number field. Individual property updates might work with raw values, but when you’re updating multiple properties at once, you’ve got to follow the strict formatting rules.
Been dealing with API integrations for years. Yeah, the formatting issue is real, but manually handling these API quirks gets exhausting.
I automated my Notion updates with Latenode - it handles property formatting automatically. No more guessing if it wants {“number”: 250} or just 250. The platform sorts out the API structure for you.
Just set up a workflow that grabs your raw data and pushes it to Notion with correct formatting. Works every time, even with messy property combinations. You get error handling and retry logic without writing custom code.
Saved me tons of hours vs manually crafting API calls and debugging format problems.
Had this exact problem six months ago and it drove me crazy for hours. It’s not just the number formatting - though that’s definitely part of it. What caught me off guard was how Notion’s API acts differently with single property updates versus batch updates. Single updates are more forgiving with type inference, but batch updates need explicit type declarations for every property. Beyond wrapping your number in the object format, make sure you’re not mixing property types that might conflict. Sometimes certain property combinations just don’t work together in a single request, especially with formula fields or rollups that depend on what you’re updating. Try smaller batches if the formatting fix doesn’t solve everything.
Hit this exact issue three months ago on a client project. The inconsistent formatting between single and batch operations is definitely the culprit, but there’s another gotcha that almost killed my deadline. Double-check your property names in the Notion database - what shows as ‘scoreField’ in the UI might have a completely different internal name that the API wants. Run a pages.retrieve call first and check the properties object structure to get the real names. Also, if your database has required fields, the API gets picky about partial updates when you don’t include mandatory properties in batch requests. You need the explicit type formatting, but property name mismatches fail silently and make debugging hell.
totally feel u, had that issue as well. just remember, notion’s API is picky with batch updates. make sure to format ur number properly like this: "scoreField": {"number": 250}. it’s all about keeping it consistent with all your props or else it’ll throw an error.