1 /**
2 * @oas [post] /admin/store-credit-accounts
3 * operationId: PostStoreCreditAccounts
4 * summary: Create Store Credit Account
5 * description: Create a store credit account.
6 * x-authenticated: true
7 * x-ignoreCleanup: true
8 * security:
9 * - api_token: []
10 * - cookie_auth: []
11 * - jwt_token: []
12 * requestBody:
13 * content:
14 * application/json:
15 * schema:
16 * $ref: "#/components/schemas/AdminCreateStoreCreditAccount"
17 * x-codeSamples:
18 * - lang: Shell
19 * label: cURL
20 * source: |-
21 * curl -X POST '{backend_url}/admin/store-credit-accounts' \
22 * -H 'Authorization: Bearer {jwt_token}' \
23 * -H 'Content-Type: application/json' \
24 * --data-raw '{
25 * "currency_code": "nzd",
26 * "customer_id": "{value}"
27 * }'
28 * tags:
29 * - Store Credit Accounts
30 * responses:
31 * "200":
32 * description: OK
33 * content:
34 * application/json:
35 * schema:
36 * $ref: "#/components/schemas/AdminStoreCreditAccountResponse"
37 * "400":
38 * $ref: "#/components/responses/400_error"
39 * "401":
40 * $ref: "#/components/responses/unauthorized"
41 * "404":
42 * $ref: "#/components/responses/not_found_error"
43 * "409":
44 * $ref: "#/components/responses/invalid_state_error"
45 * "422":
46 * $ref: "#/components/responses/invalid_request_error"
47 * "500":
48 * $ref: "#/components/responses/500_error"
49 * x-badges:
50 * - text: Plugin
51 * description: |
52 * This API route is only available through the [Loyalty Plugin](https://docs.medusajs.com/resources/commerce-modules/loyalty).
53 *
54 */
55