chore(docs): Generated API Reference (#5319)

Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-10-09 13:24:39 +03:00
committed by GitHub
parent 4ada22d656
commit c135730838
5 changed files with 80 additions and 0 deletions

View File

@@ -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);
});

View File

@@ -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"
]
}'