chore(docs): Updated API Reference (automated) (#12673)

Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2025-06-10 07:21:44 +00:00
committed by GitHub
parent f8c0bd887e
commit b456044060
11 changed files with 211 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
import Medusa from "@medusajs/js-sdk"
export const sdk = new Medusa({
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
debug: import.meta.env.DEV,
auth: {
type: "session",
},
})
sdk.admin.draftOrder.delete("order_123")
.then(({ id, object, deleted }) => {
console.log(id, object, deleted)
})

View File

@@ -0,0 +1,2 @@
curl -X DELETE '{backend_url}/admin/draft-orders/{id}' \
-H 'Authorization: Bearer {access_token}'