---
displayed_sidebar: jsClientSidebar
slug: /references/js-client/CustomersResource
---

import ParameterTypes from "@site/src/components/ParameterTypes"

# CustomersResource

This class is used to send requests to [Store Customer API Routes](https://docs.medusajs.com/api/store#customers\_postcustomers). All its method
are available in the JS Client under the `medusa.customers` property.

A customer can register and manage their information such as addresses, orders, payment methods, and more.

Related Guide: [How to implement customer profiles in your storefront](https://docs.medusajs.com/modules/customers/storefront/implement-customer-profiles).

## Properties

<ParameterTypes parameters={[
  {
    "name": "addresses",
    "type": "[AddressesResource](js_client.AddressesResource.mdx)",
    "description": "An instance of [AddressesResource](js_client.AddressesResource.mdx) used to send requests to address-related routes part of the [Store Customer API Routes](https://docs.medusajs.com/api/store#customers\\_postcustomers).",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "paymentMethods",
    "type": "[PaymentMethodsResource](js_client.PaymentMethodsResource.mdx)",
    "description": "An instance of [PaymentMethodsResource](js_client.PaymentMethodsResource.mdx) used to send requests to payment-related routes part of the [Store Customer API Routes](https://docs.medusajs.com/api/store#customers\\_postcustomers).",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

___

## Methods

### create

Register a new customer. This will also automatically authenticate the customer and set their login session in the response Cookie header.
Subsequent requests sent with the JS client are sent with the Cookie session automatically.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.customers.create({
  first_name: "Alec",
  last_name: "Reynolds",
  email: "user@example.com",
  password: "supersecret"
})
.then(({ customer }) => {
  console.log(customer.id);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "payload",
    "type": "[StorePostCustomersReq](../../medusa/classes/medusa.StorePostCustomersReq.mdx)",
    "description": "The details of the customer to be created.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "email",
        "type": "`string`",
        "description": "The customer's email.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "first_name",
        "type": "`string`",
        "description": "The customer's first name.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "last_name",
        "type": "`string`",
        "description": "The customer's last name.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "password",
        "type": "`string`",
        "description": "The customer's password.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "phone",
        "type": "`string`",
        "description": "The customer's phone number.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;StoreCustomersRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves to the created customer's details.",
    "expandable": false,
    "children": [
      {
        "name": "customer",
        "type": "Omit&#60;[Customer](../../entities/classes/entities.Customer.mdx), \"password_hash\"&#62;",
        "description": "Customer details.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "billing_address",
            "type": "[Address](../../entities/classes/entities.Address.mdx)",
            "description": "The details of the billing address associated with the customer.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "address_1",
                "type": "`null` \\| `string`",
                "description": "Address line 1",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "address_2",
                "type": "`null` \\| `string`",
                "description": "Address line 2",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "city",
                "type": "`null` \\| `string`",
                "description": "City",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "company",
                "type": "`null` \\| `string`",
                "description": "Company name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "country",
                "type": "`null` \\| [Country](../../entities/classes/entities.Country.mdx)",
                "description": "A country object.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "country_code",
                "type": "`null` \\| `string`",
                "description": "The 2 character ISO code of the country in lower case",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "`null` \\| [Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "Available if the relation `customer` is expanded.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`null` \\| `string`",
                "description": "ID of the customer this address belongs to",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "first_name",
                "type": "`null` \\| `string`",
                "description": "First name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "ID of the address",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "last_name",
                "type": "`null` \\| `string`",
                "description": "Last name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "phone",
                "type": "`null` \\| `string`",
                "description": "Phone Number",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "postal_code",
                "type": "`null` \\| `string`",
                "description": "Postal Code",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "province",
                "type": "`null` \\| `string`",
                "description": "Province",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "billing_address_id",
            "type": "`null` \\| `string`",
            "description": "The customer's billing address ID",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was created.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "deleted_at",
            "type": "`null` \\| `Date`",
            "description": "The date with timezone at which the resource was deleted.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "email",
            "type": "`string`",
            "description": "The customer's email",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "first_name",
            "type": "`string`",
            "description": "The customer's first name",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "groups",
            "type": "[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)[]",
            "description": "The customer groups the customer belongs to.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customers",
                "type": "[Customer](../../entities/classes/entities.Customer.mdx)[]",
                "description": "The details of the customers that belong to the customer group.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The customer group's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "name",
                "type": "`string`",
                "description": "The name of the customer group",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "price_lists",
                "type": "[PriceList](../../entities/classes/entities.PriceList.mdx)[]",
                "description": "The price lists that are associated with the customer group.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "has_account",
            "type": "`boolean`",
            "description": "Whether the customer has an account or not",
            "optional": false,
            "defaultValue": "false",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The customer's ID",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "last_name",
            "type": "`string`",
            "description": "The customer's last name",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "metadata",
            "type": "`Record<string, unknown>`",
            "description": "An optional key-value map with additional details",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "orders",
            "type": "[Order](../../entities/classes/entities.Order.mdx)[]",
            "description": "The details of the orders this customer placed.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "billing_address",
                "type": "[Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the billing address associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "billing_address_id",
                "type": "`string`",
                "description": "The ID of the billing address associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "canceled_at",
                "type": "`Date`",
                "description": "The date the order was canceled on.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`string`",
                "description": "The ID of the cart associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "claims",
                "type": "[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)[]",
                "description": "The details of the claims created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "currency",
                "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
                "description": "The details of the currency used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "currency_code",
                "type": "`string`",
                "description": "The 3 character currency code that is used in the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "[Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "The details of the customer associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`string`",
                "description": "The ID of the customer associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discount_total",
                "type": "`number`",
                "description": "The total of discount rounded",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discounts",
                "type": "[Discount](../../entities/classes/entities.Discount.mdx)[]",
                "description": "The details of the discounts applied on the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "display_id",
                "type": "`number`",
                "description": "The order's display ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "draft_order",
                "type": "[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)",
                "description": "The details of the draft order this order was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "draft_order_id",
                "type": "`string`",
                "description": "The ID of the draft order this order was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "edits",
                "type": "[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)[]",
                "description": "The details of the order edits done on the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "email",
                "type": "`string`",
                "description": "The email associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "external_id",
                "type": "`null` \\| `string`",
                "description": "The ID of an external order.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillment_status",
                "type": "[FulfillmentStatus](../../entities/enums/entities.FulfillmentStatus.mdx)",
                "description": "The order's fulfillment status",
                "optional": false,
                "defaultValue": "not_fulfilled",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillments",
                "type": "[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)[]",
                "description": "The details of the fulfillments created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_card_tax_total",
                "type": "`number`",
                "description": "The total of gift cards with taxes",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_total",
                "type": "`number`",
                "description": "The total of gift cards",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_transactions",
                "type": "[GiftCardTransaction](../../entities/classes/entities.GiftCardTransaction.mdx)[]",
                "description": "The gift card transactions made in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_cards",
                "type": "[GiftCard](../../entities/classes/entities.GiftCard.mdx)[]",
                "description": "The details of the gift card used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The order's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the processing of the order in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "item_tax_total",
                "type": "`null` \\| `number`",
                "description": "The tax total applied on items",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "items",
                "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
                "description": "The details of the line items that belong to the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "no_notification",
                "type": "`boolean`",
                "description": "Flag for describing whether or not notifications related to this should be send.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "object",
                "type": "`\"order\"`",
                "description": "",
                "optional": false,
                "defaultValue": "\"order\"",
                "expandable": false,
                "children": []
              },
              {
                "name": "paid_total",
                "type": "`number`",
                "description": "The total amount paid",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_status",
                "type": "[PaymentStatus](../../entities/enums/entities.PaymentStatus.mdx)",
                "description": "The order's payment status",
                "optional": false,
                "defaultValue": "not_paid",
                "expandable": false,
                "children": []
              },
              {
                "name": "payments",
                "type": "[Payment](../../entities/classes/entities.Payment.mdx)[]",
                "description": "The details of the payments used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "raw_discount_total",
                "type": "`number`",
                "description": "The total of discount",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refundable_amount",
                "type": "`number`",
                "description": "The amount that can be refunded",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refunded_total",
                "type": "`number`",
                "description": "The total amount refunded if the order is returned.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refunds",
                "type": "[Refund](../../entities/classes/entities.Refund.mdx)[]",
                "description": "The details of the refunds created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "region",
                "type": "[Region](../../entities/classes/entities.Region.mdx)",
                "description": "The details of the region this order was created in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "region_id",
                "type": "`string`",
                "description": "The ID of the region this order was created in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "returnable_items",
                "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
                "description": "The details of the line items that are returnable as part of the order, swaps, or claims",
                "optional": true,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "returns",
                "type": "[Return](../../entities/classes/entities.Return.mdx)[]",
                "description": "The details of the returns created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "sales_channel",
                "type": "[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)",
                "description": "The details of the sales channel this order belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "sales_channel_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the sales channel this order belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_address",
                "type": "[Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the shipping address associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_address_id",
                "type": "`string`",
                "description": "The ID of the shipping address associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_methods",
                "type": "[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]",
                "description": "The details of the shipping methods used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_tax_total",
                "type": "`null` \\| `number`",
                "description": "The tax total applied on shipping",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_total",
                "type": "`number`",
                "description": "The total of shipping",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "status",
                "type": "[OrderStatus](../../entities/enums/entities.OrderStatus.mdx)",
                "description": "The order's status",
                "optional": false,
                "defaultValue": "pending",
                "expandable": false,
                "children": []
              },
              {
                "name": "subtotal",
                "type": "`number`",
                "description": "The subtotal of the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swaps",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)[]",
                "description": "The details of the swaps created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_rate",
                "type": "`null` \\| `number`",
                "description": "The order's tax rate",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_total",
                "type": "`null` \\| `number`",
                "description": "The total of tax",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "total",
                "type": "`number`",
                "description": "The total amount of the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "phone",
            "type": "`string`",
            "description": "The customer's phone number",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "shipping_addresses",
            "type": "[Address](../../entities/classes/entities.Address.mdx)[]",
            "description": "The details of the shipping addresses associated with the customer.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "address_1",
                "type": "`null` \\| `string`",
                "description": "Address line 1",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "address_2",
                "type": "`null` \\| `string`",
                "description": "Address line 2",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "city",
                "type": "`null` \\| `string`",
                "description": "City",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "company",
                "type": "`null` \\| `string`",
                "description": "Company name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "country",
                "type": "`null` \\| [Country](../../entities/classes/entities.Country.mdx)",
                "description": "A country object.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "country_code",
                "type": "`null` \\| `string`",
                "description": "The 2 character ISO code of the country in lower case",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "`null` \\| [Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "Available if the relation `customer` is expanded.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`null` \\| `string`",
                "description": "ID of the customer this address belongs to",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "first_name",
                "type": "`null` \\| `string`",
                "description": "First name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "ID of the address",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "last_name",
                "type": "`null` \\| `string`",
                "description": "Last name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "phone",
                "type": "`null` \\| `string`",
                "description": "Phone Number",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "postal_code",
                "type": "`null` \\| `string`",
                "description": "Postal Code",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "province",
                "type": "`null` \\| `string`",
                "description": "Province",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was updated.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />

___

### generatePasswordToken

Create a reset password token to be used when sending a request with the [resetPassword](js_client.CustomersResource.mdx#resetpassword) method. This emits the event `customer.password_reset`. If a notification provider is
installed in the Medusa backend and is configured to handle this event, a notification to the customer, such as an email, may be sent with reset instructions.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.customers.generatePasswordToken({
  email: "user@example.com"
})
.then(() => {
  // successful
})
.catch(() => {
  // failed
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "payload",
    "type": "[StorePostCustomersCustomerPasswordTokenReq](../../medusa/classes/medusa.StorePostCustomersCustomerPasswordTokenReq.mdx)",
    "description": "The necessary details to create the reset password token.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "email",
        "type": "`string`",
        "description": "The customer's email.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "`ResponsePromise`",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves when reset password token is created successfully.",
    "expandable": false,
    "children": []
  }
]} />

___

### listOrders

Retrieve a list of the logged-in customer's orders. The orders can be filtered by fields such as `status` or `fulfillment_status`. The orders can also be paginated.
This method requires [customer authentication](js_client.AuthResource.mdx#authenticate).

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged
medusa.customers.listOrders()
.then(({ orders, limit, offset, count }) => {
  console.log(orders);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "params",
    "type": "[StoreGetCustomersCustomerOrdersParams](../../medusa/classes/medusa.StoreGetCustomersCustomerOrdersParams.mdx)",
    "description": "Filters and pagination configurations to apply on the retrieved orders.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "canceled_at",
        "type": "[DateComparisonOperator](../../medusa/classes/medusa.DateComparisonOperator.mdx)",
        "description": "Date filters to apply on the orders' `canceled_at` date.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "gt",
            "type": "`Date`",
            "description": "The filtered date must be greater than this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "gte",
            "type": "`Date`",
            "description": "The filtered date must be greater than or equal to this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "lt",
            "type": "`Date`",
            "description": "The filtered date must be less than this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "lte",
            "type": "`Date`",
            "description": "The filtered date must be less than or equal to this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      },
      {
        "name": "cart_id",
        "type": "`string`",
        "description": "Cart ID to filter orders by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "created_at",
        "type": "[DateComparisonOperator](../../medusa/classes/medusa.DateComparisonOperator.mdx)",
        "description": "Date filters to apply on the orders' `created_at` date.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "gt",
            "type": "`Date`",
            "description": "The filtered date must be greater than this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "gte",
            "type": "`Date`",
            "description": "The filtered date must be greater than or equal to this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "lt",
            "type": "`Date`",
            "description": "The filtered date must be less than this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "lte",
            "type": "`Date`",
            "description": "The filtered date must be less than or equal to this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      },
      {
        "name": "currency_code",
        "type": "`string`",
        "description": "Currency code to filter orders by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "display_id",
        "type": "`string`",
        "description": "Display ID to filter orders by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "email",
        "type": "`string`",
        "description": "Email to filter orders by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "expand",
        "type": "`string`",
        "description": "Comma-separated relations that should be expanded in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "fields",
        "type": "`string`",
        "description": "Comma-separated fields that should be included in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "fulfillment_status",
        "type": "[FulfillmentStatus](../../entities/enums/entities.FulfillmentStatus.mdx)[]",
        "description": "Fulfillment statuses to filter orders by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "CANCELED",
            "type": "`\"canceled\"`",
            "description": "The order's fulfillments are canceled.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "FULFILLED",
            "type": "`\"fulfilled\"`",
            "description": "The order's items are fulfilled.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "NOT_FULFILLED",
            "type": "`\"not_fulfilled\"`",
            "description": "The order's items are not fulfilled.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "PARTIALLY_FULFILLED",
            "type": "`\"partially_fulfilled\"`",
            "description": "Some of the order's items, but not all, are fulfilled.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "PARTIALLY_RETURNED",
            "type": "`\"partially_returned\"`",
            "description": "Some of the order's items, but not all, are returned.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "PARTIALLY_SHIPPED",
            "type": "`\"partially_shipped\"`",
            "description": "Some of the order's items, but not all, are shipped.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "REQUIRES_ACTION",
            "type": "`\"requires_action\"`",
            "description": "The order's fulfillment requires action.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "RETURNED",
            "type": "`\"returned\"`",
            "description": "The order's items are returned.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "SHIPPED",
            "type": "`\"shipped\"`",
            "description": "The order's items are shipped.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      },
      {
        "name": "id",
        "type": "`string`",
        "description": "ID to filter orders by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "limit",
        "type": "`number`",
        "description": "Limit the number of items returned in the list.",
        "optional": false,
        "defaultValue": "10",
        "expandable": false,
        "children": []
      },
      {
        "name": "offset",
        "type": "`number`",
        "description": "The number of items to skip when retrieving a list.",
        "optional": false,
        "defaultValue": "0",
        "expandable": false,
        "children": []
      },
      {
        "name": "payment_status",
        "type": "[PaymentStatus](../../entities/enums/entities.PaymentStatus.mdx)[]",
        "description": "Payment statuses to filter orders by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "AWAITING",
            "type": "`\"awaiting\"`",
            "description": "The order's payment is awaiting capturing.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "CANCELED",
            "type": "`\"canceled\"`",
            "description": "The order's payment is canceled.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "CAPTURED",
            "type": "`\"captured\"`",
            "description": "The order's payment is captured.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "NOT_PAID",
            "type": "`\"not_paid\"`",
            "description": "The order's payment is not paid.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "PARTIALLY_REFUNDED",
            "type": "`\"partially_refunded\"`",
            "description": "Some of the order's payment amount is refunded.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "REFUNDED",
            "type": "`\"refunded\"`",
            "description": "The order's payment amount is refunded.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "REQUIRES_ACTION",
            "type": "`\"requires_action\"`",
            "description": "The order's payment requires action.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      },
      {
        "name": "q",
        "type": "`string`",
        "description": "Search term to search orders' display ID, email, shipping address's first name, customer's first name, customer's last name, and customer's phone number.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "region_id",
        "type": "`string`",
        "description": "Region ID to filter orders by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "status",
        "type": "[OrderStatus](../../entities/enums/entities.OrderStatus.mdx)[]",
        "description": "Statuses to filter orders by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "ARCHIVED",
            "type": "`\"archived\"`",
            "description": "The order is archived.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "CANCELED",
            "type": "`\"canceled\"`",
            "description": "The order is canceled.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "COMPLETED",
            "type": "`\"completed\"`",
            "description": "The order is completed, meaning that \nthe items have been fulfilled and the payment\nhas been captured.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "PENDING",
            "type": "`\"pending\"`",
            "description": "The order is pending.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "REQUIRES_ACTION",
            "type": "`\"requires_action\"`",
            "description": "The order requires action.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      },
      {
        "name": "tax_rate",
        "type": "`string`",
        "description": "Tax rate to filter orders by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "updated_at",
        "type": "[DateComparisonOperator](../../medusa/classes/medusa.DateComparisonOperator.mdx)",
        "description": "Date filters to apply on the orders' `updated_at` date.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "gt",
            "type": "`Date`",
            "description": "The filtered date must be greater than this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "gte",
            "type": "`Date`",
            "description": "The filtered date must be greater than or equal to this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "lt",
            "type": "`Date`",
            "description": "The filtered date must be less than this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "lte",
            "type": "`Date`",
            "description": "The filtered date must be less than or equal to this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;StoreCustomersListOrdersRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves to the list of orders with pagination fields.",
    "expandable": false,
    "children": [
      {
        "name": "StoreCustomersListOrdersRes",
        "type": "[PaginatedResponse](../../medusa/interfaces/medusa.PaginatedResponse.mdx) & `object`",
        "description": "The list of the customer's orders with pagination fields.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "count",
            "type": "`number`",
            "description": "The total number of items available.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "limit",
            "type": "`number`",
            "description": "The maximum number of items that can be returned in the list.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "offset",
            "type": "`number`",
            "description": "The number of items skipped before the returned items in the list.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "orders",
            "type": "[Order](../../entities/classes/entities.Order.mdx)[]",
            "description": "An array of orders details.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": [
              {
                "name": "billing_address",
                "type": "[Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the billing address associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "billing_address_id",
                "type": "`string`",
                "description": "The ID of the billing address associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "canceled_at",
                "type": "`Date`",
                "description": "The date the order was canceled on.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`string`",
                "description": "The ID of the cart associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "claims",
                "type": "[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)[]",
                "description": "The details of the claims created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "currency",
                "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
                "description": "The details of the currency used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "currency_code",
                "type": "`string`",
                "description": "The 3 character currency code that is used in the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "[Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "The details of the customer associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`string`",
                "description": "The ID of the customer associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discount_total",
                "type": "`number`",
                "description": "The total of discount rounded",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discounts",
                "type": "[Discount](../../entities/classes/entities.Discount.mdx)[]",
                "description": "The details of the discounts applied on the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "display_id",
                "type": "`number`",
                "description": "The order's display ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "draft_order",
                "type": "[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)",
                "description": "The details of the draft order this order was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "draft_order_id",
                "type": "`string`",
                "description": "The ID of the draft order this order was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "edits",
                "type": "[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)[]",
                "description": "The details of the order edits done on the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "email",
                "type": "`string`",
                "description": "The email associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "external_id",
                "type": "`null` \\| `string`",
                "description": "The ID of an external order.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillment_status",
                "type": "[FulfillmentStatus](../../entities/enums/entities.FulfillmentStatus.mdx)",
                "description": "The order's fulfillment status",
                "optional": false,
                "defaultValue": "not_fulfilled",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillments",
                "type": "[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)[]",
                "description": "The details of the fulfillments created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_card_tax_total",
                "type": "`number`",
                "description": "The total of gift cards with taxes",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_total",
                "type": "`number`",
                "description": "The total of gift cards",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_transactions",
                "type": "[GiftCardTransaction](../../entities/classes/entities.GiftCardTransaction.mdx)[]",
                "description": "The gift card transactions made in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_cards",
                "type": "[GiftCard](../../entities/classes/entities.GiftCard.mdx)[]",
                "description": "The details of the gift card used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The order's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the processing of the order in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "item_tax_total",
                "type": "`null` \\| `number`",
                "description": "The tax total applied on items",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "items",
                "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
                "description": "The details of the line items that belong to the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "no_notification",
                "type": "`boolean`",
                "description": "Flag for describing whether or not notifications related to this should be send.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "object",
                "type": "`\"order\"`",
                "description": "",
                "optional": false,
                "defaultValue": "\"order\"",
                "expandable": false,
                "children": []
              },
              {
                "name": "paid_total",
                "type": "`number`",
                "description": "The total amount paid",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_status",
                "type": "[PaymentStatus](../../entities/enums/entities.PaymentStatus.mdx)",
                "description": "The order's payment status",
                "optional": false,
                "defaultValue": "not_paid",
                "expandable": false,
                "children": []
              },
              {
                "name": "payments",
                "type": "[Payment](../../entities/classes/entities.Payment.mdx)[]",
                "description": "The details of the payments used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "raw_discount_total",
                "type": "`number`",
                "description": "The total of discount",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refundable_amount",
                "type": "`number`",
                "description": "The amount that can be refunded",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refunded_total",
                "type": "`number`",
                "description": "The total amount refunded if the order is returned.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refunds",
                "type": "[Refund](../../entities/classes/entities.Refund.mdx)[]",
                "description": "The details of the refunds created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "region",
                "type": "[Region](../../entities/classes/entities.Region.mdx)",
                "description": "The details of the region this order was created in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "region_id",
                "type": "`string`",
                "description": "The ID of the region this order was created in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "returnable_items",
                "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
                "description": "The details of the line items that are returnable as part of the order, swaps, or claims",
                "optional": true,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "returns",
                "type": "[Return](../../entities/classes/entities.Return.mdx)[]",
                "description": "The details of the returns created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "sales_channel",
                "type": "[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)",
                "description": "The details of the sales channel this order belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "sales_channel_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the sales channel this order belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_address",
                "type": "[Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the shipping address associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_address_id",
                "type": "`string`",
                "description": "The ID of the shipping address associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_methods",
                "type": "[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]",
                "description": "The details of the shipping methods used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_tax_total",
                "type": "`null` \\| `number`",
                "description": "The tax total applied on shipping",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_total",
                "type": "`number`",
                "description": "The total of shipping",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "status",
                "type": "[OrderStatus](../../entities/enums/entities.OrderStatus.mdx)",
                "description": "The order's status",
                "optional": false,
                "defaultValue": "pending",
                "expandable": false,
                "children": []
              },
              {
                "name": "subtotal",
                "type": "`number`",
                "description": "The subtotal of the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swaps",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)[]",
                "description": "The details of the swaps created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_rate",
                "type": "`null` \\| `number`",
                "description": "The order's tax rate",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_total",
                "type": "`null` \\| `number`",
                "description": "The total of tax",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "total",
                "type": "`number`",
                "description": "The total amount of the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          }
        ]
      }
    ]
  }
]} />

___

### resetPassword

Reset a customer's password using a password token created by a previous request using the [generatePasswordToken](js_client.CustomersResource.mdx#generatepasswordtoken) method. If the password token expired,
you must create a new one.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.customers.resetPassword({
  email: "user@example.com",
  password: "supersecret",
  token: "supersecrettoken"
})
.then(({ customer }) => {
  console.log(customer.id);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "payload",
    "type": "[StorePostCustomersResetPasswordReq](../../medusa/classes/medusa.StorePostCustomersResetPasswordReq.mdx)",
    "description": "The necessary details to reset the password.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "email",
        "type": "`string`",
        "description": "The customer's email.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "password",
        "type": "`string`",
        "description": "The customer's password.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "token",
        "type": "`string`",
        "description": "The reset password token",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;StoreCustomersRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves to the customer's details.",
    "expandable": false,
    "children": [
      {
        "name": "customer",
        "type": "Omit&#60;[Customer](../../entities/classes/entities.Customer.mdx), \"password_hash\"&#62;",
        "description": "Customer details.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "billing_address",
            "type": "[Address](../../entities/classes/entities.Address.mdx)",
            "description": "The details of the billing address associated with the customer.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "address_1",
                "type": "`null` \\| `string`",
                "description": "Address line 1",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "address_2",
                "type": "`null` \\| `string`",
                "description": "Address line 2",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "city",
                "type": "`null` \\| `string`",
                "description": "City",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "company",
                "type": "`null` \\| `string`",
                "description": "Company name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "country",
                "type": "`null` \\| [Country](../../entities/classes/entities.Country.mdx)",
                "description": "A country object.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "country_code",
                "type": "`null` \\| `string`",
                "description": "The 2 character ISO code of the country in lower case",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "`null` \\| [Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "Available if the relation `customer` is expanded.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`null` \\| `string`",
                "description": "ID of the customer this address belongs to",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "first_name",
                "type": "`null` \\| `string`",
                "description": "First name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "ID of the address",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "last_name",
                "type": "`null` \\| `string`",
                "description": "Last name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "phone",
                "type": "`null` \\| `string`",
                "description": "Phone Number",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "postal_code",
                "type": "`null` \\| `string`",
                "description": "Postal Code",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "province",
                "type": "`null` \\| `string`",
                "description": "Province",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "billing_address_id",
            "type": "`null` \\| `string`",
            "description": "The customer's billing address ID",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was created.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "deleted_at",
            "type": "`null` \\| `Date`",
            "description": "The date with timezone at which the resource was deleted.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "email",
            "type": "`string`",
            "description": "The customer's email",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "first_name",
            "type": "`string`",
            "description": "The customer's first name",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "groups",
            "type": "[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)[]",
            "description": "The customer groups the customer belongs to.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customers",
                "type": "[Customer](../../entities/classes/entities.Customer.mdx)[]",
                "description": "The details of the customers that belong to the customer group.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The customer group's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "name",
                "type": "`string`",
                "description": "The name of the customer group",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "price_lists",
                "type": "[PriceList](../../entities/classes/entities.PriceList.mdx)[]",
                "description": "The price lists that are associated with the customer group.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "has_account",
            "type": "`boolean`",
            "description": "Whether the customer has an account or not",
            "optional": false,
            "defaultValue": "false",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The customer's ID",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "last_name",
            "type": "`string`",
            "description": "The customer's last name",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "metadata",
            "type": "`Record<string, unknown>`",
            "description": "An optional key-value map with additional details",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "orders",
            "type": "[Order](../../entities/classes/entities.Order.mdx)[]",
            "description": "The details of the orders this customer placed.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "billing_address",
                "type": "[Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the billing address associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "billing_address_id",
                "type": "`string`",
                "description": "The ID of the billing address associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "canceled_at",
                "type": "`Date`",
                "description": "The date the order was canceled on.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`string`",
                "description": "The ID of the cart associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "claims",
                "type": "[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)[]",
                "description": "The details of the claims created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "currency",
                "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
                "description": "The details of the currency used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "currency_code",
                "type": "`string`",
                "description": "The 3 character currency code that is used in the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "[Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "The details of the customer associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`string`",
                "description": "The ID of the customer associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discount_total",
                "type": "`number`",
                "description": "The total of discount rounded",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discounts",
                "type": "[Discount](../../entities/classes/entities.Discount.mdx)[]",
                "description": "The details of the discounts applied on the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "display_id",
                "type": "`number`",
                "description": "The order's display ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "draft_order",
                "type": "[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)",
                "description": "The details of the draft order this order was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "draft_order_id",
                "type": "`string`",
                "description": "The ID of the draft order this order was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "edits",
                "type": "[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)[]",
                "description": "The details of the order edits done on the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "email",
                "type": "`string`",
                "description": "The email associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "external_id",
                "type": "`null` \\| `string`",
                "description": "The ID of an external order.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillment_status",
                "type": "[FulfillmentStatus](../../entities/enums/entities.FulfillmentStatus.mdx)",
                "description": "The order's fulfillment status",
                "optional": false,
                "defaultValue": "not_fulfilled",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillments",
                "type": "[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)[]",
                "description": "The details of the fulfillments created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_card_tax_total",
                "type": "`number`",
                "description": "The total of gift cards with taxes",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_total",
                "type": "`number`",
                "description": "The total of gift cards",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_transactions",
                "type": "[GiftCardTransaction](../../entities/classes/entities.GiftCardTransaction.mdx)[]",
                "description": "The gift card transactions made in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_cards",
                "type": "[GiftCard](../../entities/classes/entities.GiftCard.mdx)[]",
                "description": "The details of the gift card used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The order's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the processing of the order in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "item_tax_total",
                "type": "`null` \\| `number`",
                "description": "The tax total applied on items",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "items",
                "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
                "description": "The details of the line items that belong to the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "no_notification",
                "type": "`boolean`",
                "description": "Flag for describing whether or not notifications related to this should be send.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "object",
                "type": "`\"order\"`",
                "description": "",
                "optional": false,
                "defaultValue": "\"order\"",
                "expandable": false,
                "children": []
              },
              {
                "name": "paid_total",
                "type": "`number`",
                "description": "The total amount paid",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_status",
                "type": "[PaymentStatus](../../entities/enums/entities.PaymentStatus.mdx)",
                "description": "The order's payment status",
                "optional": false,
                "defaultValue": "not_paid",
                "expandable": false,
                "children": []
              },
              {
                "name": "payments",
                "type": "[Payment](../../entities/classes/entities.Payment.mdx)[]",
                "description": "The details of the payments used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "raw_discount_total",
                "type": "`number`",
                "description": "The total of discount",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refundable_amount",
                "type": "`number`",
                "description": "The amount that can be refunded",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refunded_total",
                "type": "`number`",
                "description": "The total amount refunded if the order is returned.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refunds",
                "type": "[Refund](../../entities/classes/entities.Refund.mdx)[]",
                "description": "The details of the refunds created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "region",
                "type": "[Region](../../entities/classes/entities.Region.mdx)",
                "description": "The details of the region this order was created in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "region_id",
                "type": "`string`",
                "description": "The ID of the region this order was created in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "returnable_items",
                "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
                "description": "The details of the line items that are returnable as part of the order, swaps, or claims",
                "optional": true,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "returns",
                "type": "[Return](../../entities/classes/entities.Return.mdx)[]",
                "description": "The details of the returns created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "sales_channel",
                "type": "[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)",
                "description": "The details of the sales channel this order belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "sales_channel_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the sales channel this order belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_address",
                "type": "[Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the shipping address associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_address_id",
                "type": "`string`",
                "description": "The ID of the shipping address associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_methods",
                "type": "[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]",
                "description": "The details of the shipping methods used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_tax_total",
                "type": "`null` \\| `number`",
                "description": "The tax total applied on shipping",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_total",
                "type": "`number`",
                "description": "The total of shipping",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "status",
                "type": "[OrderStatus](../../entities/enums/entities.OrderStatus.mdx)",
                "description": "The order's status",
                "optional": false,
                "defaultValue": "pending",
                "expandable": false,
                "children": []
              },
              {
                "name": "subtotal",
                "type": "`number`",
                "description": "The subtotal of the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swaps",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)[]",
                "description": "The details of the swaps created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_rate",
                "type": "`null` \\| `number`",
                "description": "The order's tax rate",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_total",
                "type": "`null` \\| `number`",
                "description": "The total of tax",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "total",
                "type": "`number`",
                "description": "The total amount of the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "phone",
            "type": "`string`",
            "description": "The customer's phone number",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "shipping_addresses",
            "type": "[Address](../../entities/classes/entities.Address.mdx)[]",
            "description": "The details of the shipping addresses associated with the customer.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "address_1",
                "type": "`null` \\| `string`",
                "description": "Address line 1",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "address_2",
                "type": "`null` \\| `string`",
                "description": "Address line 2",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "city",
                "type": "`null` \\| `string`",
                "description": "City",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "company",
                "type": "`null` \\| `string`",
                "description": "Company name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "country",
                "type": "`null` \\| [Country](../../entities/classes/entities.Country.mdx)",
                "description": "A country object.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "country_code",
                "type": "`null` \\| `string`",
                "description": "The 2 character ISO code of the country in lower case",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "`null` \\| [Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "Available if the relation `customer` is expanded.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`null` \\| `string`",
                "description": "ID of the customer this address belongs to",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "first_name",
                "type": "`null` \\| `string`",
                "description": "First name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "ID of the address",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "last_name",
                "type": "`null` \\| `string`",
                "description": "Last name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "phone",
                "type": "`null` \\| `string`",
                "description": "Phone Number",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "postal_code",
                "type": "`null` \\| `string`",
                "description": "Postal Code",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "province",
                "type": "`null` \\| `string`",
                "description": "Province",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was updated.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />

___

### retrieve

Retrieve the logged-in customer's details. This method requires [customer authentication](js_client.AuthResource.mdx#authenticate).

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged
medusa.customers.retrieve()
.then(({ customer }) => {
  console.log(customer.id);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;StoreCustomersRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves to the logged-in customer's details.",
    "expandable": false,
    "children": [
      {
        "name": "customer",
        "type": "Omit&#60;[Customer](../../entities/classes/entities.Customer.mdx), \"password_hash\"&#62;",
        "description": "Customer details.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "billing_address",
            "type": "[Address](../../entities/classes/entities.Address.mdx)",
            "description": "The details of the billing address associated with the customer.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "address_1",
                "type": "`null` \\| `string`",
                "description": "Address line 1",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "address_2",
                "type": "`null` \\| `string`",
                "description": "Address line 2",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "city",
                "type": "`null` \\| `string`",
                "description": "City",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "company",
                "type": "`null` \\| `string`",
                "description": "Company name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "country",
                "type": "`null` \\| [Country](../../entities/classes/entities.Country.mdx)",
                "description": "A country object.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "country_code",
                "type": "`null` \\| `string`",
                "description": "The 2 character ISO code of the country in lower case",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "`null` \\| [Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "Available if the relation `customer` is expanded.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`null` \\| `string`",
                "description": "ID of the customer this address belongs to",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "first_name",
                "type": "`null` \\| `string`",
                "description": "First name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "ID of the address",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "last_name",
                "type": "`null` \\| `string`",
                "description": "Last name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "phone",
                "type": "`null` \\| `string`",
                "description": "Phone Number",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "postal_code",
                "type": "`null` \\| `string`",
                "description": "Postal Code",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "province",
                "type": "`null` \\| `string`",
                "description": "Province",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "billing_address_id",
            "type": "`null` \\| `string`",
            "description": "The customer's billing address ID",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was created.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "deleted_at",
            "type": "`null` \\| `Date`",
            "description": "The date with timezone at which the resource was deleted.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "email",
            "type": "`string`",
            "description": "The customer's email",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "first_name",
            "type": "`string`",
            "description": "The customer's first name",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "groups",
            "type": "[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)[]",
            "description": "The customer groups the customer belongs to.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customers",
                "type": "[Customer](../../entities/classes/entities.Customer.mdx)[]",
                "description": "The details of the customers that belong to the customer group.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The customer group's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "name",
                "type": "`string`",
                "description": "The name of the customer group",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "price_lists",
                "type": "[PriceList](../../entities/classes/entities.PriceList.mdx)[]",
                "description": "The price lists that are associated with the customer group.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "has_account",
            "type": "`boolean`",
            "description": "Whether the customer has an account or not",
            "optional": false,
            "defaultValue": "false",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The customer's ID",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "last_name",
            "type": "`string`",
            "description": "The customer's last name",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "metadata",
            "type": "`Record<string, unknown>`",
            "description": "An optional key-value map with additional details",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "orders",
            "type": "[Order](../../entities/classes/entities.Order.mdx)[]",
            "description": "The details of the orders this customer placed.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "billing_address",
                "type": "[Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the billing address associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "billing_address_id",
                "type": "`string`",
                "description": "The ID of the billing address associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "canceled_at",
                "type": "`Date`",
                "description": "The date the order was canceled on.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`string`",
                "description": "The ID of the cart associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "claims",
                "type": "[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)[]",
                "description": "The details of the claims created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "currency",
                "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
                "description": "The details of the currency used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "currency_code",
                "type": "`string`",
                "description": "The 3 character currency code that is used in the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "[Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "The details of the customer associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`string`",
                "description": "The ID of the customer associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discount_total",
                "type": "`number`",
                "description": "The total of discount rounded",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discounts",
                "type": "[Discount](../../entities/classes/entities.Discount.mdx)[]",
                "description": "The details of the discounts applied on the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "display_id",
                "type": "`number`",
                "description": "The order's display ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "draft_order",
                "type": "[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)",
                "description": "The details of the draft order this order was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "draft_order_id",
                "type": "`string`",
                "description": "The ID of the draft order this order was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "edits",
                "type": "[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)[]",
                "description": "The details of the order edits done on the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "email",
                "type": "`string`",
                "description": "The email associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "external_id",
                "type": "`null` \\| `string`",
                "description": "The ID of an external order.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillment_status",
                "type": "[FulfillmentStatus](../../entities/enums/entities.FulfillmentStatus.mdx)",
                "description": "The order's fulfillment status",
                "optional": false,
                "defaultValue": "not_fulfilled",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillments",
                "type": "[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)[]",
                "description": "The details of the fulfillments created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_card_tax_total",
                "type": "`number`",
                "description": "The total of gift cards with taxes",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_total",
                "type": "`number`",
                "description": "The total of gift cards",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_transactions",
                "type": "[GiftCardTransaction](../../entities/classes/entities.GiftCardTransaction.mdx)[]",
                "description": "The gift card transactions made in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_cards",
                "type": "[GiftCard](../../entities/classes/entities.GiftCard.mdx)[]",
                "description": "The details of the gift card used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The order's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the processing of the order in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "item_tax_total",
                "type": "`null` \\| `number`",
                "description": "The tax total applied on items",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "items",
                "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
                "description": "The details of the line items that belong to the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "no_notification",
                "type": "`boolean`",
                "description": "Flag for describing whether or not notifications related to this should be send.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "object",
                "type": "`\"order\"`",
                "description": "",
                "optional": false,
                "defaultValue": "\"order\"",
                "expandable": false,
                "children": []
              },
              {
                "name": "paid_total",
                "type": "`number`",
                "description": "The total amount paid",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_status",
                "type": "[PaymentStatus](../../entities/enums/entities.PaymentStatus.mdx)",
                "description": "The order's payment status",
                "optional": false,
                "defaultValue": "not_paid",
                "expandable": false,
                "children": []
              },
              {
                "name": "payments",
                "type": "[Payment](../../entities/classes/entities.Payment.mdx)[]",
                "description": "The details of the payments used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "raw_discount_total",
                "type": "`number`",
                "description": "The total of discount",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refundable_amount",
                "type": "`number`",
                "description": "The amount that can be refunded",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refunded_total",
                "type": "`number`",
                "description": "The total amount refunded if the order is returned.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refunds",
                "type": "[Refund](../../entities/classes/entities.Refund.mdx)[]",
                "description": "The details of the refunds created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "region",
                "type": "[Region](../../entities/classes/entities.Region.mdx)",
                "description": "The details of the region this order was created in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "region_id",
                "type": "`string`",
                "description": "The ID of the region this order was created in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "returnable_items",
                "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
                "description": "The details of the line items that are returnable as part of the order, swaps, or claims",
                "optional": true,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "returns",
                "type": "[Return](../../entities/classes/entities.Return.mdx)[]",
                "description": "The details of the returns created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "sales_channel",
                "type": "[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)",
                "description": "The details of the sales channel this order belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "sales_channel_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the sales channel this order belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_address",
                "type": "[Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the shipping address associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_address_id",
                "type": "`string`",
                "description": "The ID of the shipping address associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_methods",
                "type": "[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]",
                "description": "The details of the shipping methods used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_tax_total",
                "type": "`null` \\| `number`",
                "description": "The tax total applied on shipping",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_total",
                "type": "`number`",
                "description": "The total of shipping",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "status",
                "type": "[OrderStatus](../../entities/enums/entities.OrderStatus.mdx)",
                "description": "The order's status",
                "optional": false,
                "defaultValue": "pending",
                "expandable": false,
                "children": []
              },
              {
                "name": "subtotal",
                "type": "`number`",
                "description": "The subtotal of the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swaps",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)[]",
                "description": "The details of the swaps created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_rate",
                "type": "`null` \\| `number`",
                "description": "The order's tax rate",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_total",
                "type": "`null` \\| `number`",
                "description": "The total of tax",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "total",
                "type": "`number`",
                "description": "The total amount of the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "phone",
            "type": "`string`",
            "description": "The customer's phone number",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "shipping_addresses",
            "type": "[Address](../../entities/classes/entities.Address.mdx)[]",
            "description": "The details of the shipping addresses associated with the customer.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "address_1",
                "type": "`null` \\| `string`",
                "description": "Address line 1",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "address_2",
                "type": "`null` \\| `string`",
                "description": "Address line 2",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "city",
                "type": "`null` \\| `string`",
                "description": "City",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "company",
                "type": "`null` \\| `string`",
                "description": "Company name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "country",
                "type": "`null` \\| [Country](../../entities/classes/entities.Country.mdx)",
                "description": "A country object.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "country_code",
                "type": "`null` \\| `string`",
                "description": "The 2 character ISO code of the country in lower case",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "`null` \\| [Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "Available if the relation `customer` is expanded.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`null` \\| `string`",
                "description": "ID of the customer this address belongs to",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "first_name",
                "type": "`null` \\| `string`",
                "description": "First name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "ID of the address",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "last_name",
                "type": "`null` \\| `string`",
                "description": "Last name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "phone",
                "type": "`null` \\| `string`",
                "description": "Phone Number",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "postal_code",
                "type": "`null` \\| `string`",
                "description": "Postal Code",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "province",
                "type": "`null` \\| `string`",
                "description": "Province",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was updated.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />

___

### update

Update the logged-in customer's details. This method requires [customer authentication](js_client.AuthResource.mdx#authenticate).

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged
medusa.customers.update({
  first_name: "Laury"
})
.then(({ customer }) => {
  console.log(customer.id);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "payload",
    "type": "[StorePostCustomersCustomerReq](../../medusa/classes/medusa.StorePostCustomersCustomerReq.mdx)",
    "description": "The attributes to update in the logged-in customer.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "billing_address",
        "type": "`string` \\| [AddressPayload](../../medusa/classes/medusa.AddressPayload.mdx)",
        "description": "The address to be used for billing purposes.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "email",
        "type": "`string`",
        "description": "The customer's email.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "first_name",
        "type": "`string`",
        "description": "The customer's first name.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "last_name",
        "type": "`string`",
        "description": "The customer's last name.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "metadata",
        "type": "`Record<string, unknown>`",
        "description": "Additional custom data about the customer.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "password",
        "type": "`string`",
        "description": "The customer's password.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "phone",
        "type": "`string`",
        "description": "The customer's phone number.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;StoreCustomersRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves to the logged-in customer's details.",
    "expandable": false,
    "children": [
      {
        "name": "customer",
        "type": "Omit&#60;[Customer](../../entities/classes/entities.Customer.mdx), \"password_hash\"&#62;",
        "description": "Customer details.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "billing_address",
            "type": "[Address](../../entities/classes/entities.Address.mdx)",
            "description": "The details of the billing address associated with the customer.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "address_1",
                "type": "`null` \\| `string`",
                "description": "Address line 1",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "address_2",
                "type": "`null` \\| `string`",
                "description": "Address line 2",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "city",
                "type": "`null` \\| `string`",
                "description": "City",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "company",
                "type": "`null` \\| `string`",
                "description": "Company name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "country",
                "type": "`null` \\| [Country](../../entities/classes/entities.Country.mdx)",
                "description": "A country object.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "country_code",
                "type": "`null` \\| `string`",
                "description": "The 2 character ISO code of the country in lower case",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "`null` \\| [Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "Available if the relation `customer` is expanded.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`null` \\| `string`",
                "description": "ID of the customer this address belongs to",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "first_name",
                "type": "`null` \\| `string`",
                "description": "First name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "ID of the address",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "last_name",
                "type": "`null` \\| `string`",
                "description": "Last name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "phone",
                "type": "`null` \\| `string`",
                "description": "Phone Number",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "postal_code",
                "type": "`null` \\| `string`",
                "description": "Postal Code",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "province",
                "type": "`null` \\| `string`",
                "description": "Province",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "billing_address_id",
            "type": "`null` \\| `string`",
            "description": "The customer's billing address ID",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was created.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "deleted_at",
            "type": "`null` \\| `Date`",
            "description": "The date with timezone at which the resource was deleted.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "email",
            "type": "`string`",
            "description": "The customer's email",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "first_name",
            "type": "`string`",
            "description": "The customer's first name",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "groups",
            "type": "[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)[]",
            "description": "The customer groups the customer belongs to.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customers",
                "type": "[Customer](../../entities/classes/entities.Customer.mdx)[]",
                "description": "The details of the customers that belong to the customer group.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The customer group's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "name",
                "type": "`string`",
                "description": "The name of the customer group",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "price_lists",
                "type": "[PriceList](../../entities/classes/entities.PriceList.mdx)[]",
                "description": "The price lists that are associated with the customer group.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "has_account",
            "type": "`boolean`",
            "description": "Whether the customer has an account or not",
            "optional": false,
            "defaultValue": "false",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The customer's ID",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "last_name",
            "type": "`string`",
            "description": "The customer's last name",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "metadata",
            "type": "`Record<string, unknown>`",
            "description": "An optional key-value map with additional details",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "orders",
            "type": "[Order](../../entities/classes/entities.Order.mdx)[]",
            "description": "The details of the orders this customer placed.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "billing_address",
                "type": "[Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the billing address associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "billing_address_id",
                "type": "`string`",
                "description": "The ID of the billing address associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "canceled_at",
                "type": "`Date`",
                "description": "The date the order was canceled on.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`string`",
                "description": "The ID of the cart associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "claims",
                "type": "[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)[]",
                "description": "The details of the claims created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "currency",
                "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
                "description": "The details of the currency used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "currency_code",
                "type": "`string`",
                "description": "The 3 character currency code that is used in the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "[Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "The details of the customer associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`string`",
                "description": "The ID of the customer associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discount_total",
                "type": "`number`",
                "description": "The total of discount rounded",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discounts",
                "type": "[Discount](../../entities/classes/entities.Discount.mdx)[]",
                "description": "The details of the discounts applied on the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "display_id",
                "type": "`number`",
                "description": "The order's display ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "draft_order",
                "type": "[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)",
                "description": "The details of the draft order this order was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "draft_order_id",
                "type": "`string`",
                "description": "The ID of the draft order this order was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "edits",
                "type": "[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)[]",
                "description": "The details of the order edits done on the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "email",
                "type": "`string`",
                "description": "The email associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "external_id",
                "type": "`null` \\| `string`",
                "description": "The ID of an external order.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillment_status",
                "type": "[FulfillmentStatus](../../entities/enums/entities.FulfillmentStatus.mdx)",
                "description": "The order's fulfillment status",
                "optional": false,
                "defaultValue": "not_fulfilled",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillments",
                "type": "[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)[]",
                "description": "The details of the fulfillments created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_card_tax_total",
                "type": "`number`",
                "description": "The total of gift cards with taxes",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_total",
                "type": "`number`",
                "description": "The total of gift cards",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_transactions",
                "type": "[GiftCardTransaction](../../entities/classes/entities.GiftCardTransaction.mdx)[]",
                "description": "The gift card transactions made in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_cards",
                "type": "[GiftCard](../../entities/classes/entities.GiftCard.mdx)[]",
                "description": "The details of the gift card used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The order's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the processing of the order in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "item_tax_total",
                "type": "`null` \\| `number`",
                "description": "The tax total applied on items",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "items",
                "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
                "description": "The details of the line items that belong to the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "no_notification",
                "type": "`boolean`",
                "description": "Flag for describing whether or not notifications related to this should be send.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "object",
                "type": "`\"order\"`",
                "description": "",
                "optional": false,
                "defaultValue": "\"order\"",
                "expandable": false,
                "children": []
              },
              {
                "name": "paid_total",
                "type": "`number`",
                "description": "The total amount paid",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_status",
                "type": "[PaymentStatus](../../entities/enums/entities.PaymentStatus.mdx)",
                "description": "The order's payment status",
                "optional": false,
                "defaultValue": "not_paid",
                "expandable": false,
                "children": []
              },
              {
                "name": "payments",
                "type": "[Payment](../../entities/classes/entities.Payment.mdx)[]",
                "description": "The details of the payments used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "raw_discount_total",
                "type": "`number`",
                "description": "The total of discount",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refundable_amount",
                "type": "`number`",
                "description": "The amount that can be refunded",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refunded_total",
                "type": "`number`",
                "description": "The total amount refunded if the order is returned.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refunds",
                "type": "[Refund](../../entities/classes/entities.Refund.mdx)[]",
                "description": "The details of the refunds created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "region",
                "type": "[Region](../../entities/classes/entities.Region.mdx)",
                "description": "The details of the region this order was created in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "region_id",
                "type": "`string`",
                "description": "The ID of the region this order was created in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "returnable_items",
                "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
                "description": "The details of the line items that are returnable as part of the order, swaps, or claims",
                "optional": true,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "returns",
                "type": "[Return](../../entities/classes/entities.Return.mdx)[]",
                "description": "The details of the returns created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "sales_channel",
                "type": "[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)",
                "description": "The details of the sales channel this order belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "sales_channel_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the sales channel this order belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_address",
                "type": "[Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the shipping address associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_address_id",
                "type": "`string`",
                "description": "The ID of the shipping address associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_methods",
                "type": "[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]",
                "description": "The details of the shipping methods used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_tax_total",
                "type": "`null` \\| `number`",
                "description": "The tax total applied on shipping",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_total",
                "type": "`number`",
                "description": "The total of shipping",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "status",
                "type": "[OrderStatus](../../entities/enums/entities.OrderStatus.mdx)",
                "description": "The order's status",
                "optional": false,
                "defaultValue": "pending",
                "expandable": false,
                "children": []
              },
              {
                "name": "subtotal",
                "type": "`number`",
                "description": "The subtotal of the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swaps",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)[]",
                "description": "The details of the swaps created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_rate",
                "type": "`null` \\| `number`",
                "description": "The order's tax rate",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_total",
                "type": "`null` \\| `number`",
                "description": "The total of tax",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "total",
                "type": "`number`",
                "description": "The total amount of the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "phone",
            "type": "`string`",
            "description": "The customer's phone number",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "shipping_addresses",
            "type": "[Address](../../entities/classes/entities.Address.mdx)[]",
            "description": "The details of the shipping addresses associated with the customer.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "address_1",
                "type": "`null` \\| `string`",
                "description": "Address line 1",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "address_2",
                "type": "`null` \\| `string`",
                "description": "Address line 2",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "city",
                "type": "`null` \\| `string`",
                "description": "City",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "company",
                "type": "`null` \\| `string`",
                "description": "Company name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "country",
                "type": "`null` \\| [Country](../../entities/classes/entities.Country.mdx)",
                "description": "A country object.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "country_code",
                "type": "`null` \\| `string`",
                "description": "The 2 character ISO code of the country in lower case",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "`null` \\| [Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "Available if the relation `customer` is expanded.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`null` \\| `string`",
                "description": "ID of the customer this address belongs to",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "first_name",
                "type": "`null` \\| `string`",
                "description": "First name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "ID of the address",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "last_name",
                "type": "`null` \\| `string`",
                "description": "Last name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "phone",
                "type": "`null` \\| `string`",
                "description": "Phone Number",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "postal_code",
                "type": "`null` \\| `string`",
                "description": "Postal Code",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "province",
                "type": "`null` \\| `string`",
                "description": "Province",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was updated.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />
