Andrew Keeling Posted January 28, 2021 Share Posted January 28, 2021 Hello, I hope someone can help me on this. When I am creating or updating a product via the API ( https://api.accounting.sage.com/v3.1/products/{key} Using Body data as per below:- I am able to update the "Description" successfully but the API seemingly ignores the catalog_item_type_id. I have validated the PRODUCT is a correct id. I also note the following:- The syntax for the body in the API Spec states "catalog_item_type_id" (Products & Services Endpoint Reference | Sage Developer | Accounting) However, the response file states it as catalog_item_type. I have tried resubmitting with either id/value and it seemingly ignores either (and doesn't not throw any error, the description updates just fine). So I know my connection and data is valid (well, the description) but I cannot get the catalog_item_type_id to update. This behaviour seems to be the same if I am posting a new product or just updating. Appreciate any help or pointers? Best Regards Andrew Link to comment Share on other sites More sharing options...
Andrew Keeling Posted January 28, 2021 Author Share Posted January 28, 2021 I noticed the "Body" text was filtered out by forum when posting so I've attached it below as an image. Thanks Link to comment Share on other sites More sharing options...
Administrators Ben Smith Posted January 29, 2021 Administrators Share Posted January 29, 2021 Hi Andrew, Thanks a lot for getting in touch. I've been investigating this today and can replicate the behaviour you have found. I'll escalate this to be looked at further by the development teams. It's important to consider the impact of changing the catalog type of a product, especially if it's already a stock item, with quantities recorded. In the UI you will receive a warning when attempting to do this, asking you to consider any existing stock etc. Similar considerations should be applied when doing this via the API (I will investigate our side of validation etc) - are you planning to validate this in your app? Thanks! Ben Link to comment Share on other sites More sharing options...
Andrew Keeling Posted January 29, 2021 Author Share Posted January 29, 2021 Hi Ben, Thanks for the reply - I don't actually plan to update the field. I only went down the path to update the field because my initial insert of catalog_item_type_id was ignored. So please note, the field seems to be ignored on the "Create Product" (and also, the update.) Thanks for the cautionary note. Best Regards Andrew Link to comment Share on other sites More sharing options...
Administrators Ben Smith Posted February 1, 2021 Administrators Share Posted February 1, 2021 Thanks a lot for the feedback Andrew, its really appreciated! Good luck with the rest of your integration, Ben Link to comment Share on other sites More sharing options...
Administrators Ben Smith Posted February 8, 2021 Administrators Share Posted February 8, 2021 *Update* Just so that anyone else looking at this post is made aware, If you are looking to make a POST request to create a product that should be a STOCK_ITEM, you must use the /stock_items endpoint. This means you don't need to pass a catalog_type_id and it will 100% be a stock item. When the endpoints were exposed we have different ones for products and stock items. The catalog_type_id isn't exposed via the /stock_items endpoint, but you can see the product also via the /products endpoint, which does expose the catalog_type_id and will show a "STOCK_ITEM". Any questions please reach out, Ben 1 Link to comment Share on other sites More sharing options...
Andrew Keeling Posted February 11, 2021 Author Share Posted February 11, 2021 (edited) Just to confirm, adding this using the "stock_items" endpoint worked for me just fine. Thanks Andrew Edited February 11, 2021 by Andrew Keeling 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now