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:
co-authored by
Oli Juhl
Shahed Nasser
parent
f8c0bd887e
commit
b456044060
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* @oas [delete] /admin/draft-orders/{id}
|
||||
* operationId: DeleteDraftOrdersId
|
||||
* summary: Delete a Draft Order
|
||||
* description: Delete a draft order.
|
||||
* x-authenticated: true
|
||||
* parameters:
|
||||
* - name: id
|
||||
* in: path
|
||||
* description: The draft order's ID.
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* security:
|
||||
* - api_token: []
|
||||
* - cookie_auth: []
|
||||
* - jwt_token: []
|
||||
* x-codeSamples:
|
||||
* - lang: JavaScript
|
||||
* label: JS SDK
|
||||
* source: |-
|
||||
* 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)
|
||||
* })
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* curl -X DELETE '{backend_url}/admin/draft-orders/{id}' \
|
||||
* -H 'Authorization: Bearer {access_token}'
|
||||
* tags:
|
||||
* - Draft Orders
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* x-workflow: deleteDraftOrdersWorkflow
|
||||
* x-events: []
|
||||
* x-version: 2.8.4
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user