Back to Medusa

CreateCustomerDTO

www/apps/resources/references/customer/interfaces/customer.CreateCustomerDTO/page.mdx

2.14.24.0 KB
Original Source

import { TypeList } from "docs-ui"

CreateCustomerDTO

The customer to be created.

<TypeList types={[{"name":"company_name","type":"null \| string","description":"The company name of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"null \| string","description":"The first name of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"null \| string","description":"The last name of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"null \| string","description":"The email of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"null \| string","description":"The phone of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"null \| string","description":"Who created the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"boolean","description":"Whether the customer has an account.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"Omit<CreateCustomerAddressDTO, "customer_id">[]","description":"The addresses of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_name","type":"null \| string","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"boolean","description":"Whether the address is default shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"boolean","description":"Whether the address is the default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"null \| string","description":"The company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"null \| string","description":"The first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"null \| string","description":"The last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"null \| string","description":"The address 1.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"null \| string","description":"The address 2.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"null \| string","description":"The city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"null \| string","description":"The country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"null \| string","description":"The lower-case ISO 3166-2 province of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"null \| string","description":"The postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"null \| string","description":"The phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"MetadataType","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"MetadataType","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CreateCustomerDTO"/>