Medusa 商城 API
    v3.0.0
    • latest
    • v2.0.0
    • v3.0.0
    • Back to home
    • 身份验证
    • 客户登录 (JWT)
      POST
    • 客户登录 (JWT)
      POST
    • 检查电子邮件是否存在
      GET
    • 获取当前客户
      GET
    • 客户登出
      DELETE
    • 客户登录
      POST

      获取当前客户

      正式环境
      https://apifoxmock.com/m1/4532246-4179931-default
      正式环境
      https://apifoxmock.com/m1/4532246-4179931-default
      GET
      /store/auth
      检索当前登录客户的详细信息。

      Request

      Header Params

      Request Code Samples

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location 'https://apifoxmock.com/m1/4532246-4179931-default/store/auth' \
      --header 'Authorization: Bearer {{AUTH_TOKEN}}'

      Responses

      🟢200正常
      application/json
      Bodyapplication/json

      Example
      {
          "customer": {
              "id": "string",
              "email": "user@example.com",
              "first_name": "Arno",
              "last_name": "Willms",
              "billing_address_id": "addr_01G8ZH853YPY9B94857DY91YGW",
              "phone": 16128234334802,
              "has_account": false,
              "created_at": "2019-08-24T14:15:22.123Z",
              "updated_at": "2019-08-24T14:15:22.123Z",
              "deleted_at": "2019-08-24T14:15:22.123Z",
              "orders": [
                  {}
              ],
              "metadata": {
                  "car": "white"
              },
              "groups": [
                  {
                      "id": "cgrp_01G8ZH853Y6TFXWPG5EYE81X63",
                      "name": "VIP",
                      "created_at": "2019-08-24T14:15:22.123Z",
                      "updated_at": "2019-08-24T14:15:22.123Z",
                      "deleted_at": "2019-08-24T14:15:22.123Z",
                      "customers": [
                          {}
                      ],
                      "price_lists": [
                          {}
                      ],
                      "metadata": {
                          "car": "white"
                      }
                  }
              ],
              "shipping_addresses": [
                  {
                      "id": "addr_01G8ZC9VS1XVE149MGH2J7QSSH",
                      "customer_id": "cus_01G2SG30J8C85S4A5CHM2S1NS2",
                      "customer": {},
                      "company": "Acme",
                      "first_name": "Arno",
                      "last_name": "Willms",
                      "address_1": "14433 Kemmer Court",
                      "address_2": "Suite 369",
                      "city": "South Geoffreyview",
                      "province": "Kentucky",
                      "postal_code": 72093,
                      "phone": 16128234334802,
                      "created_at": "2019-08-24T14:15:22.123Z",
                      "updated_at": "2019-08-24T14:15:22.123Z",
                      "deleted_at": "2019-08-24T14:15:22.123Z",
                      "country_code": "st",
                      "metadata": {
                          "car": "white"
                      },
                      "country": {
                          "id": 109,
                          "name": "ITALY",
                          "display_name": "Italy",
                          "region_id": "reg_01G1G5V26T9H8Y0M4JNE3YGA4G",
                          "region": {},
                          "iso_2": "it",
                          "iso_3": "ita",
                          "num_code": 380
                      }
                  }
              ],
              "billing_address": {
                  "id": "addr_01G8ZC9VS1XVE149MGH2J7QSSH",
                  "customer_id": "cus_01G2SG30J8C85S4A5CHM2S1NS2",
                  "customer": {},
                  "company": "Acme",
                  "first_name": "Arno",
                  "last_name": "Willms",
                  "address_1": "14433 Kemmer Court",
                  "address_2": "Suite 369",
                  "city": "South Geoffreyview",
                  "province": "Kentucky",
                  "postal_code": 72093,
                  "phone": 0,
                  "created_at": "2019-08-24T14:15:22.123Z",
                  "updated_at": "2019-08-24T14:15:22.123Z",
                  "deleted_at": "2019-08-24T14:15:22.123Z",
                  "country_code": "st",
                  "metadata": {
                      "car": "white"
                  },
                  "country": {
                      "id": 109,
                      "name": "ITALY",
                      "display_name": "Italy",
                      "region_id": "reg_01G1G5V26T9H8Y0M4JNE3YGA4G",
                      "region": {},
                      "iso_2": "it",
                      "iso_3": "ita",
                      "num_code": 380
                  }
              }
          }
      }
      🟠400客户端错误或多个错误
      🟠401用户未授权。必须先登录
      🟠404未找到错误
      🟠409无效状态错误
      🟠422无效请求错误
      🔴500服务器错误
      Modified at 2024-12-13 03:41:57
      Previous
      检查电子邮件是否存在
      Next
      客户登出
      Built with