1 /**
2 * @oas [post] /admin/tax-regions/{id}
3 * operationId: PostTaxRegionsId
4 * summary: Update a Tax Region
5 * description: Update a tax region's details.
6 * x-authenticated: true
7 * parameters:
8 * - name: id
9 * in: path
10 * description: The tax region's ID.
11 * required: true
12 * schema:
13 * type: string
14 * - name: fields
15 * in: query
16 * description: |-
17 * Comma-separated fields that should be included in the returned data.
18 * if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
19 * without prefix it will replace the entire default fields.
20 * required: false
21 * schema:
22 * type: string
23 * title: fields
24 * description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
25 * fields. Without prefix it will replace the entire default fields.
26 * externalDocs:
27 * url: "#select-fields-and-relations"
28 * security:
29 * - api_token: []
30 * - cookie_auth: []
31 * - jwt_token: []
32 * requestBody:
33 * content:
34 * application/json:
35 * schema:
36 * $ref: "#/components/schemas/AdminUpdateTaxRegion"
37 * x-codeSamples:
38 * - lang: JavaScript
39 * label: JS SDK
40 * source: |-
41 * import Medusa from "@medusajs/js-sdk"
42 *
43 * export const sdk = new Medusa({
44 * baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
45 * debug: import.meta.env.DEV,
46 * auth: {
47 * type: "session",
48 * },
49 * })
50 *
51 * sdk.admin.taxRegion.update("txreg_123", {
52 * province_code: "ca",
53 * })
54 * .then(({ tax_region }) => {
55 * console.log(tax_region)
56 * })
57 * - lang: Shell
58 * label: cURL
59 * source: |-
60 * curl -X POST '{backend_url}/admin/tax-regions/{id}' \
61 * -H 'Authorization: Bearer {jwt_token}'
62 * tags:
63 * - Tax Regions
64 * responses:
65 * "200":
66 * description: OK
67 * content:
68 * application/json:
69 * schema:
70 * $ref: "#/components/schemas/AdminTaxRegionResponse"
71 * "400":
72 * $ref: "#/components/responses/400_error"
73 * "401":
74 * $ref: "#/components/responses/unauthorized"
75 * "404":
76 * $ref: "#/components/responses/not_found_error"
77 * "409":
78 * $ref: "#/components/responses/invalid_state_error"
79 * "422":
80 * $ref: "#/components/responses/invalid_request_error"
81 * "500":
82 * $ref: "#/components/responses/500_error"
83 * x-workflow: updateTaxRegionsWorkflow
84 * x-events: []
85 *
86 */
87