chore(docs): Generated API Reference (#5319)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
4ada22d656
commit
c135730838
@@ -0,0 +1,12 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.priceLists.deleteProductsPrices(priceListId, {
|
||||
product_ids: [
|
||||
productId1,
|
||||
productId2,
|
||||
]
|
||||
})
|
||||
.then(({ ids, object, deleted }) => {
|
||||
console.log(ids.length);
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
curl -X DELETE '{backend_url}/admin/price-lists/{id}/products/prices/batch' \
|
||||
-H 'x-medusa-access-token: {api_token}' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"product_ids": [
|
||||
"prod_1",
|
||||
"prod_2"
|
||||
]
|
||||
}'
|
||||
Reference in New Issue
Block a user