Files
medusa-store/docs/api/store/paths/customers_me.yaml
2023-02-09 09:50:55 +02:00

86 lines
2.2 KiB
YAML

get:
operationId: GetCustomersCustomer
summary: Get a Customer
description: >-
Retrieves a Customer - the Customer must be logged in to retrieve their
details.
x-authenticated: true
x-codegen:
method: retrieve
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/customers_me/get.js
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/customers_me/get.sh
security:
- cookie_auth: []
tags:
- Customer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/StoreCustomersRes.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'409':
$ref: ../components/responses/invalid_state_error.yaml
'422':
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml
post:
operationId: PostCustomersCustomer
summary: Update Customer
description: Updates a Customer's saved details.
x-authenticated: true
requestBody:
content:
application/json:
schema:
$ref: ../components/schemas/StorePostCustomersCustomerReq.yaml
x-codegen:
method: update
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/customers_me/post.js
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/customers_me/post.sh
security:
- cookie_auth: []
tags:
- Customer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/StoreCustomersRes.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'409':
$ref: ../components/responses/invalid_state_error.yaml
'422':
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml