Updating a product by its sku?


#1

Hello experts,

According to the docs, a product can be updated through https://api.molt.in/v1/products/{id of the product}. However, is it possible to update it by using its sku (bare code), instead of the id?

I already implemented a code that searches the id of a product by its sku, and then uses this id for the update. But I was wondering if there is something more direct.

Thank you in advance.

Best regards,
Frédéric


#2

Hi Frédéric :wave:

Updating a product by sku is not supported. While the sku is unique, it’s not something you can update by.

/v2/products/{PRODUCT_ID} is endpoint to update a product.

I’m really interested to hear what you’re building with Moltin - Do you have anything online I could view? Please DM if it’s something that’s not officially ready yet :slight_smile:


#3

Hello Notrab

Thank you for your answer. I’ve developed something using the API v1. It consists in synchronizing articles between SAP Business One and Moltin. Unfortunately, it uses Moltin-id that are known to change from one shop to another. Hence, my question about updating by the sku. I’m considering searching the article by sku in order to get their Moltin-id. Then updating them by using their Moltin-id.

Unfortunately, I have nothing ready and online to show yet. :slight_smile:


#4

Hey @fhoffert

I imagine you’re aware we’re in the process of shutting down V1 of our API. I’d hate for you to lose any of the data you’ve already input, so please let us know by email if you wish to migrate to V2 and we can help.

I’ll definitely ask the engineering team about updating by SKU and see if there are any plans to update by fields other than id in the future.

Please let us know if you wish to upgrade to V2, if you haven’t already :grinning: