0

I'm trying to update the inventory of our products from our ERP using the rest api. I have run into an issue when the SKU has a pound "#" in it.

A URL like:

https://magento.xyx.com/rest/V1/products/3736924F5/stockItems/1

works fine but a URL of:

https://magento.xyx.com/rest/V1/products/3736924F5#M/stockItems/1

Returns the error:

( [message] => "%fieldName" is required. Enter and try again. [parameters] => stdClass Object ( [fieldName] => product )

)

I tried to URL encode the SKU but that didn't work. Any ideas?

1
  • It looks like my only option is to update the database directly and the clear some cache. Does anyone know what cache I need to clear to display the new quantity? I cleared all of the caches and it works but I don't know which one(s) in particular I should clear. – Chris Howard Apr 30 '20 at 18:26
0

Good day,

as usual sku's dont contain special charactes like "#". A SKU is build by the following parameters:

  • Can be any length
  • Alphanumeric
  • Created by retailers

Sku build up

SKU Number Example for a Convenience Store SKU exmaple In the sample above, notice that the first two numbers represent each category of goods in the convenience store. The next four numbers are a sequential numbering system. As long as you don’t have more than 99 departments, or over 9999 products in a given department, this system works and is simple to enter and maintain in any POS system. However, if you want a SKU number to convey more information about each item, a different system with more identifiers is needed.


Heres a good article about SKU's and how they work:

https://fitsmallbusiness.com/sku-numbers/

1
  • We are using SKUs from our ERP and they do contain special characters. I guess there dis no work around unless I dive into the API code. Not really something I wan't to do. – Chris Howard Apr 30 '20 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.