{"section":"known-issues","requestedLocale":"en","requestedSlug":"inventory-divergence-in-ui-x-api-due-to-warehouse-id-being-case-sensitive","locale":"en","slug":"inventory-divergence-in-ui-x-api-due-to-warehouse-id-being-case-sensitive","path":"docs/en/known-issues/Logistics/inventory-divergence-in-ui-x-api-due-to-warehouse-id-being-case-sensitive.md","branch":"main","content":"## Summary\n\n\nAs actually the same API creates and updates the warehouse (Create/update warehouse: `POST https://{accountName}.{environment}.com.br/api/logistics/pvt/configuration/warehouses`), Logistics identifies by the id what action should be taken, and as the id is case sensitive, if the intention would be to update de id \"TEST\" but id \"test\" is entered, a new warehouse is created, but the inventory is replicated for both because the inventory is case insensitive.\n\n\n\n## Simulation\n\n\nCreate an inventory with capital id, either by UI or API, for example:\n\n    POST https://\\{accountName\\}.\\{environment\\}.com.br/api/logistics/pvt/configuration/warehouses\\{ \"id\": \"TEST\", \"name\": \"TEST\", \"warehouseDocks\": [\\{ \"dockId\": \"dock-test\", \"time\": \"05:00:00\", \"cost\": 0.99 \\}]\\}\n\n\nUpdate the inventory of a SKU for this new warehouse (id \"TEST\"), either by UI or API, for example:\n\n    PUT https://\\{accountName\\}.\\{environment\\}.com.br/api/logistics/pvt/inventory/skus/\\{skuId\\}/warehouses/\\{warehouseId\\}\\{ \"quantity\": 122\\}\n\n\nUpdate the loading dock time and cost by API with lowercase id \"test\", for example:\n\n    POST https://\\{accountName\\}.\\{environment\\}.com.br/api/logistics/pvt/configuration/warehouses\\{ \"id\": \"test\", \"name\": \"TEST\", \"warehouseDocks\": [\\{ \"dockId\": \"dock-test\", \"time\": \"08:00:00\", \"cost\": 0.00 \\}]\\}\n\n\nAlthough the id is the same, being case sensitive will cause another warehouse to be created:\n ![](https://raw.githubusercontent.com/vtexdocs/known-issues/refs/heads/main/docs/en/known-issues/Logistics/inventory-divergence-in-ui-x-api-due-to-warehouse-id-being-case-sensitive_1.png)\n\nHowever, for the inventory UI, the id is not case sensitive, so for both inventories the same information will be shown:\n ![](https://raw.githubusercontent.com/vtexdocs/known-issues/refs/heads/main/docs/en/known-issues/Logistics/inventory-divergence-in-ui-x-api-due-to-warehouse-id-being-case-sensitive_2.png)\n\nBut checking on the API, each inventory is separated, as expected:\n ![](https://raw.githubusercontent.com/vtexdocs/known-issues/refs/heads/main/docs/en/known-issues/Logistics/inventory-divergence-in-ui-x-api-due-to-warehouse-id-being-case-sensitive_3.png)\n\nAnd then, when deleting the first warehouse record (with capital letter \"TEST\"), the inventory information in the UI keeps showing that quantity available for the id \"test\" inventory (lowercase), where it is actually 0:\n ![](https://raw.githubusercontent.com/vtexdocs/known-issues/refs/heads/main/docs/en/known-issues/Logistics/inventory-divergence-in-ui-x-api-due-to-warehouse-id-being-case-sensitive_4.png)\n ![](https://raw.githubusercontent.com/vtexdocs/known-issues/refs/heads/main/docs/en/known-issues/Logistics/inventory-divergence-in-ui-x-api-due-to-warehouse-id-being-case-sensitive_5.png)\n\nAnd as a consequence of this, the SKU indexing gets 0 quantity, and it shows out of stock in the checkout:\n ![](https://raw.githubusercontent.com/vtexdocs/known-issues/refs/heads/main/docs/en/known-issues/Logistics/inventory-divergence-in-ui-x-api-due-to-warehouse-id-being-case-sensitive_6.png)\n ![](https://raw.githubusercontent.com/vtexdocs/known-issues/refs/heads/main/docs/en/known-issues/Logistics/inventory-divergence-in-ui-x-api-due-to-warehouse-id-being-case-sensitive_7.png)\n\n\n\n## Workaround\n\n\nAs a workaround, you can update the inventory of the specific warehouse, and if possible, not have the same id with case insensitive (\"TEST\" x \"test\")."}