Moltin reserved words for field names


#1

We ran into an issue last night where one of the applications failed after one of the user’s of the source PIM system created a new property with the name “type” on one of the products, which then caused our ETL application to fail with the following error from Moltin:

{"errors":[

	{"title":"Invalid Slug","detail":"type is a reserved slug and cannot be used for custom fields"}

]}

We’ve now fixed that property to be “product_type” instead to work around the issue.

However, that got us to wondering: what are the other reserved words which Moltin won’t allow for field slugs that we should have our code check for so that we don’t run into a job failure of this nature in the future?


#2

hey @squinn

The following section of the docs shows which field names are reserved:

At the beginning of each section, we show the model for the object being queried
https://docs.moltin.com/catalog/products#the-product-object

Hope this helps


#3

That makes sense; thanks for the follow up on this @drew. We’ll update our application to use this list.


#4

Hi @drew,

We’ve now made this change on our side, and data seems to be flowing into Moltin nicely again. However, the following thread got us to wondering if this was a complete list? E.g. - per that thread it looks like there is also a special field called “stock”. Would that also be considered a reserved word? Any others?

We have no way to control the field names that the merchandisers create for products in the source PIM system (and many new fields are created on a fairly regular basis - we already have 400+), so we just want to make sure that the ETL processes don’t suddenly start failing when some arbitrary field gets created/updated.

Thanks,

-Shawn


#5

Hi @squinn

I have spoken with our engineers and there should be no more hidden attributes to worry about and the public representation are the fields here: https://docs.moltin.com/catalog/products

Going forward the inventory service will take precedence over this method and stock may be deprecated as inventory service matures.

Thanks

Drew


#6

Sounds good; I appreciate the follow up!