|
1
|
/** |
|
2
|
* @oas [delete] /admin/customer-groups/{id} |
|
3
|
* operationId: DeleteCustomerGroupsId |
|
4
|
* summary: Delete a Customer Group |
|
5
|
* description: | |
|
6
|
* Delete a customer group. Customers in the group aren't deleted. |
|
7
|
* x-authenticated: true |
|
8
|
* parameters: |
|
9
|
* - name: id |
|
10
|
* in: path |
|
11
|
* description: The customer group's ID. |
|
12
|
* required: true |
|
13
|
* schema: |
|
14
|
* type: string |
|
15
|
* security: |
|
16
|
* - api_token: [] |
|
17
|
* - cookie_auth: [] |
|
18
|
* - jwt_token: [] |
|
19
|
* x-codeSamples: |
|
20
|
* - lang: JavaScript |
|
21
|
* label: JS SDK |
|
22
|
* source: |- |
|
23
|
* import Medusa from "@medusajs/js-sdk" |
|
24
|
* |
|
25
|
* export const sdk = new Medusa({ |
|
26
|
* baseUrl: import.meta.env.VITE_BACKEND_URL || "/", |
|
27
|
* debug: import.meta.env.DEV, |
|
28
|
* auth: { |
|
29
|
* type: "session", |
|
30
|
* }, |
|
31
|
* }) |
|
32
|
* |
|
33
|
* sdk.admin.customerGroup.delete("cusgroup_123") |
|
34
|
* .then(({ deleted }) => { |
|
35
|
* console.log(deleted) |
|
36
|
* }) |
|
37
|
* - lang: Shell |
|
38
|
* label: cURL |
|
39
|
* source: |- |
|
40
|
* curl -X DELETE '{backend_url}/admin/customer-groups/{id}' \ |
|
41
|
* -H 'Authorization: Bearer {jwt_token}' |
|
42
|
* tags: |
|
43
|
* - Customer Groups |
|
44
|
* responses: |
|
45
|
* "200": |
|
46
|
* description: OK |
|
47
|
* content: |
|
48
|
* application/json: |
|
49
|
* schema: |
|
50
|
* type: object |
|
51
|
* description: The deletion's details. |
|
52
|
* required: |
|
53
|
* - id |
|
54
|
* - object |
|
55
|
* - deleted |
|
56
|
* properties: |
|
57
|
* id: |
|
58
|
* type: string |
|
59
|
* title: id |
|
60
|
* description: The customer group's ID. |
|
61
|
* object: |
|
62
|
* type: string |
|
63
|
* title: object |
|
64
|
* description: The customer group's object. |
|
65
|
* deleted: |
|
66
|
* type: boolean |
|
67
|
* title: deleted |
|
68
|
* description: The customer group's deleted. |
|
69
|
* "400": |
|
70
|
* $ref: "#/components/responses/400_error" |
|
71
|
* "401": |
|
72
|
* $ref: "#/components/responses/unauthorized" |
|
73
|
* "404": |
|
74
|
* $ref: "#/components/responses/not_found_error" |
|
75
|
* "409": |
|
76
|
* $ref: "#/components/responses/invalid_state_error" |
|
77
|
* "422": |
|
78
|
* $ref: "#/components/responses/invalid_request_error" |
|
79
|
* "500": |
|
80
|
* $ref: "#/components/responses/500_error" |
|
81
|
* x-workflow: deleteCustomerGroupsWorkflow |
|
82
|
* x-events: [] |
|
83
|
* |
|
84
|
*/ |
|
85
|
|