### Get all Products Source: https://developer.elasticpath.com/docs/api/pxm/catalog/get-all-products This example demonstrates how to retrieve all products using the Elastic Path API. ```APIDOC ## GET /products ### Description Retrieves a list of all products in the catalog. ### Method GET ### Endpoint /products ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of products to return. - **offset** (integer) - Optional - The number of products to skip before returning results. - **filter** (string) - Optional - Filters products based on specified criteria. - **sort** (string) - Optional - Sorts products by a specified field. ### Response #### Success Response (200) - **data** (array) - An array of product objects. - **id** (string) - The unique identifier for the product. - **type** (string) - The type of the resource (e.g., "product"). - **attributes** (object) - Contains the product's attributes. - **name** (string) - The name of the product. - **description** (string) - A description of the product. - **slug** (string) - A URL-friendly identifier for the product. - **created_at** (string) - The timestamp when the product was created. - **updated_at** (string) - The timestamp when the product was last updated. - **links** (object) - Links related to the product. #### Response Example ```json { "data": [ { "id": "123e4567-e89b-12d3-a456-426614174000", "type": "product", "attributes": { "name": "Example Product", "description": "This is an example product.", "slug": "example-product", "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T10:00:00Z" }, "links": { "self": "/products/123e4567-e89b-12d3-a456-426614174000" } } ], "links": { "self": "/products?limit=10&offset=0" } } ``` ``` -------------------------------- ### Product Import Request Example Source: https://developer.elasticpath.com/docs/composer/integration-hub/store-management/product-import This JSON object demonstrates the structure of a request to initiate a product import. It includes the URLs for Gzip files, the starting file index, and pagination settings. ```json { "gzipFileUrls": [ "https://{path}/products.jsonl.gz" ], "fileIndex": 0, "page": 0, "pageSize": 1000 } ``` -------------------------------- ### Response Example for Get Promotions Source: https://developer.elasticpath.com/docs/promotions-builder/promotions-builder-api/promotions-builder-management/get-promotions This is a sample JSON response for a successful request to retrieve promotions. It includes details of a sample promotion, such as its ID, name, enabled status, and rule configuration. ```json { "data": [ { "type": "rule_promotion", "id": "009527e4-1cb4-40c7-9da4-8cd2aed864cf", "store_id": "85ea6cac-589a-4141-80d0-42b91aae73a7", "name": "10% off cart rule", "description": "cart rule 10% off your order!", "enabled": false, "automatic": false, "rule": { "rules": { "strategy": "cart_total", "operator": "gte", "args": [ 100 ] }, "actions": [ { "strategy": "cart_discount", "args": [ "percent", 20 ] } ] }, "start": "2024-01-01T00:00:00Z", "end": "2025-01-01T00:00:00Z", "meta": { "timestamps": { "created_at": "2023-12-18T22:12:36.276Z", "updated_at": "2023-12-18T22:12:36.276Z" } } }, ... ] } ``` -------------------------------- ### Load Bundle with Components and Configuration Source: https://developer.elasticpath.com/llms-full.txt A comprehensive example demonstrating how to combine bundle product data with component configuration details. ```typescript async function loadBundleWithComponents(bundleId: string) { // Fetch bundle with component products const bundleResponse = await getByContextProduct({ path: { product_id: bundleId }, query: { include: ['component_products', 'main_image', 'files'] } }); const bundle = bundleResponse.data?.data; const componentProducts = bundleResponse.included?.component_products || []; const mainImage = bundleResponse.included?.main_images?.[0]; const allImages = bundleResponse.included?.files || []; // Get component configuration details const componentConfig = await getByContextComponentProductIds({ path: { product_id: bundleId } }); return { bundle, componentProducts, componentConfig: componentConfig.data, images: { main: mainImage, all: allImages } }; } ``` -------------------------------- ### Install Dependencies with npm Source: https://developer.elasticpath.com/docs/developer-tools/composable-starter/storefront-starter Run this command from your project directory to install necessary dependencies for the Composable Starter project using npm. ```bash npm install ``` -------------------------------- ### Vercel CLI Version Output Source: https://developer.elasticpath.com/llms-full.txt Example output showing the installed Vercel CLI version. ```text Vercel CLI 29.0.0 29.0.0 ``` -------------------------------- ### Generate a New Composable Starter App Source: https://developer.elasticpath.com/docs/developer-tools/composable-starter/storefront-starter Create a new Composable Starter application in your terminal. Replace 'my-storefront' with your desired project name. ```bash ep generate my-storefront ``` -------------------------------- ### Get Account Member by ID Source: https://developer.elasticpath.com/docs/api/accounts/get-v-2-account-members-account-member-id This example demonstrates how to retrieve an account member using their ID. ```APIDOC ## GET /v2/account-members/{account_member_id} ### Description Retrieves a specific account member by their ID. ### Method GET ### Endpoint /v2/account-members/{account_member_id} ### Parameters #### Path Parameters - **account_member_id** (string) - Required - The ID of the account member to retrieve. ### Response #### Success Response (200) - **data** (object) - The account member object. - **id** (string) - The unique identifier of the account member. - **type** (string) - The type of the resource, which will be `account_member`. - **attributes** (object) - The attributes of the account member. - **email** (string) - The email address of the account member. - **first_name** (string) - The first name of the account member. - **last_name** (string) - The last name of the account member. - **created_at** (string) - The date and time when the account member was created. - **updated_at** (string) - The date and time when the account member was last updated. - **relationships** (object) - The relationships of the account member. - **account** (object) - The account associated with the account member. - **links** (object) - Links to the related resource. - **self** (string) - The URL to the related resource. - **data** (object) - The data of the related resource. - **type** (string) - The type of the related resource, which will be `account`. - **id** (string) - The ID of the related resource. - **roles** (object) - The roles associated with the account member. - **links** (object) - Links to the related resource. - **self** (string) - The URL to the related resource. - **data** (array) - An array of related resources. - **type** (string) - The type of the related resource, which will be `role`. - **id** (string) - The ID of the related resource. #### Response Example ```json { "data": { "id": "123e4567-e89b-12d3-a456-426614174000", "type": "account_member", "attributes": { "email": "john.doe@example.com", "first_name": "John", "last_name": "Doe", "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T10:00:00Z" }, "relationships": { "account": { "links": { "self": "/v2/accounts/abc123xyz" }, "data": { "type": "account", "id": "abc123xyz" } }, "roles": { "links": { "self": "/v2/account-members/123e4567-e89b-12d3-a456-426614174000/roles" }, "data": [ { "type": "role", "id": "role-admin" } ] } } } } ``` ``` -------------------------------- ### Install Dependencies with pnpm Source: https://developer.elasticpath.com/docs/developer-tools/composable-starter/storefront-starter Run this command from your project directory to install necessary dependencies for the Composable Starter project using pnpm. ```bash pnpm install ``` -------------------------------- ### Get Cart Shipping Group Request Source: https://developer.elasticpath.com/llms-full.txt Example cURL request to retrieve a specific shipping group. ```bash curl -X GET https://useast.api.elasticpath.com/v2/carts/:cartID/shipping-groups/:shippingGroupID -H "Authorization: Bearer XXXX" \ -H "content-type: application/json" ``` -------------------------------- ### Run Storefront Locally with npm Source: https://developer.elasticpath.com/docs/developer-tools/composable-starter/storefront-starter Execute this command from your project directory to start the Next.js storefront locally using npm. ```bash npm run dev ``` -------------------------------- ### Get Order Shipping Groups Request Source: https://developer.elasticpath.com/llms-full.txt Example cURL request to retrieve shipping groups for a specific order ID. ```bash curl -X GET https://useast.api.elasticpath.com/v2/orders/:id/shipping-groups -H "Authorization: Bearer XXXX" \ -H "content-type: application/json" ``` -------------------------------- ### Example Array of Files for Looping Source: https://developer.elasticpath.com/docs/composer/builder/integrations/building-integrations This example shows the output of a step that generates an array of file paths. This array can then be used as input for a loop component to process each file individually. ```json [ "path/to/file1.txt", "path/to/file2.txt", "path/to/file3.txt", "path/to/file4.txt" ] ``` -------------------------------- ### Get Order Shipping Groups Response Source: https://developer.elasticpath.com/llms-full.txt Example JSON response containing shipping group details and associated order metadata. ```json { "data": [ { "type": "shipping_group", "id": "65eaafee-0a77-40f5-81b0-42b825bf1f71", "relation": "order", "order_id": "9ba16dd0-ef51-4ad3-97bc-c76dfe666499", "cart_id": "c9a5a598-0136-4db8-aa27-acd5505caa4b", "shipping_type": "UPS Ground", "tracking_reference": "ground_1234", "address": { "first_name": "Andy", "last_name": "Dwyer", "company_name": "Ron Swanson Enterprises", "line_1": "1 Sunny Street", "line_2": "", "city": "Vancouver", "postcode": "92802", "county": "Orange", "country": "US", "region": "WA" }, "delivery_estimate": { "start": "2023-04-26T22:52:19Z", "end": "2023-04-27T22:52:19Z" }, "created_at": "2023-06-27T23:15:38.625Z", "updated_at": "2023-06-27T23:15:50.839Z", "relationships": { "order": { "data": { "type": "order", "id": "9ba16dd0-ef51-4ad3-97bc-c76dfe666499" } } }, "meta": { "shipping_display_price": { "total": { "amount": 160, "currency": "USD", "formatted": "$1.60" }, "base": { "amount": 100, "currency": "USD", "formatted": "$1.00" }, "tax": { "amount": 50, "currency": "USD", "formatted": "$0.50" }, "fees": { "amount": 10, "currency": "USD", "formatted": "$0.10" } } } } ] } ``` -------------------------------- ### Install Dependencies with yarn Source: https://developer.elasticpath.com/docs/developer-tools/composable-starter/storefront-starter Run this command from your project directory to install necessary dependencies for the Composable Starter project using yarn. ```bash yarn install ``` -------------------------------- ### Retrieve Cart Shipping Groups via cURL Source: https://developer.elasticpath.com/llms-full.txt Example request to fetch shipping groups using the GET method and Bearer token authentication. ```bash curl -X GET https://useast.api.elasticpath.com/v2/carts/:id/shipping-groups -H "Authorization: Bearer XXXX" \ -H "content-type: application/json" \ ``` -------------------------------- ### Get Order Shipping Group Request Source: https://developer.elasticpath.com/llms-full.txt Example cURL command to retrieve shipping group details. Requires a valid Bearer token in the Authorization header. ```bash curl -X GET https://useast.api.elasticpath.com/v2/orders/:orderID/shipping-groups/:shippingGroupID -H "Authorization: Bearer XXXX" \ -H "content-type: application/json" ``` -------------------------------- ### Initialize Next.js Project Source: https://developer.elasticpath.com/llms-full.txt Commands to scaffold a new Next.js application. ```bash npx create-next-app@latest my-elastic-path-store cd my-elastic-path-store ``` -------------------------------- ### Get All Promotions Request Example Source: https://developer.elasticpath.com/docs/promotions-builder/promotions-builder-api/promotions-builder-management/get-promotions This cURL command demonstrates how to retrieve all promotions using the Promotions Builder API. Ensure you replace 'XXXX' with your actual API token. ```bash curl -X GET https://useast.api.elasticpath.com/v2/rule-promotions \ -H "Authorization: Bearer XXXX" \ -H "Content-Type: application/json" \ ``` -------------------------------- ### Deploy Storefront to Vercel CLI Source: https://developer.elasticpath.com/docs/developer-tools/composable-starter/deploy/storefront-deploy Run this command in your storefront directory to build and deploy the storefront to Vercel. A URL will be provided upon successful deployment. ```bash vercel deploy ``` -------------------------------- ### Get a Promotion Code Usage Source: https://developer.elasticpath.com/docs/promotions/promotion-usages/get-a-promotion-code-usage Use this endpoint to track the usage history of a specific promotion code within the specific promotion. For example, `order_id`, `code`, `times_used`. ```APIDOC ## GET /v2/promotions/:id/codes/:code-name/usages ### Description Use this endpoint to track the usage history of a specific promotion code within the specific promotion. For example, `order_id`, `code`, `times_used`. ### Method GET ### Endpoint https://useast.api.elasticpath.com/v2/promotions/:id/codes/:code-name/usages ### Parameters #### Path Parameters - **id** (string) - Required - Specifies the unique identifier for the promotion. - **code-name** (string) - Required - Specifies the name of the code. For example, `10OFF`. #### Query Parameters - **filter** (string) - Optional - Filter attributes. For more information, see [Filtering](#filtering). - **page[limit]** (integer) - Optional - The number of records per page. - **page[offset]** (integer) - Optional - The number of records to offset the results by. - **sort** (string) - Optional - Supported attribute is `used_on`. When specified, the results are sorted in ascending order based on the value of the field. To sort in descending order, prefix the attribute with -, for example, -used_on. The default sort order is `used_on` in ascending order. See [Sorting](/guides/Getting-Started/sorting). #### Headers - **Authorization** (string) - Required - The Bearer token required to get access to the API. ### Request Example ```bash curl https://useast.api.elasticpath.com/v2/promotions/:id/codes/:code-name/usages \ -H "Authorization: Bearer XXXX" \ -H "Content-Type: application/json" \ ``` ### Response #### Success Response (200) - **data** (array) - Contains usage records. - **id** (string) - The unique identifier for the usage record. - **order_id** (string) - The ID of the order associated with the usage. - **code_id** (string) - The ID of the promotion code. - **code** (string) - The name of the promotion code. - **times_used** (integer) - The number of times the code has been used. - **used_on** (string) - The timestamp when the code was used. - **customer_id** (string) - The ID of the customer who used the code. - **customer_email** (string) - The email of the customer who used the code. - **meta** (object) - Metadata about the usage record. - **timestamps** (object) - Timestamps for the usage record. - **updated_at** (string) - The timestamp when the usage record was last updated. - **anonymized** (boolean) - Indicates if the usage record has been anonymized. #### Response Example ```json { "data": [ { "id": "a042bd4b-21a6-4f55-8add-5a3e8b862ddc", "order_id": "01e2a292-f92e-4579-973c-2f3bc70acec1", "code_id": "7905c48a-55b0-4bf0-abd7-c2cdbbb944e9", "code": "cart2uses", "times_used": 1, "used_on": "2023-05-30T23:10:56.016Z", "customer_id": "1eaf092c-f6e1-48e6-a64f-1c092b711916", "customer_email": "test@email.com", "meta": { "timestamps": { "updated_at": "2024-01-03T17:37:47.111Z" } }, "anonymized": false } ] } ``` ``` -------------------------------- ### Run Storefront Locally with pnpm Source: https://developer.elasticpath.com/docs/developer-tools/composable-starter/storefront-starter Execute this command from your project directory to start the Next.js storefront locally using pnpm. ```bash pnpm dev ``` -------------------------------- ### Install Composable CLI Source: https://developer.elasticpath.com/llms-full.txt Install the global CLI tool required for managing Composable Starter projects using your preferred package manager. ```bash npm install -g composable-cli ``` ```bash pnpm install -g composable-cli ``` ```bash yarn global add composable-cli ``` -------------------------------- ### Get Customer by ID (JavaScript SDK) Source: https://developer.elasticpath.com/docs/customer-management/customer-management-api/get-a-customer This JavaScript SDK example demonstrates how to fetch a customer using their ID. Replace 'X' with your client ID and secret, and 'XXXX' with the customer ID. ```javascript const MoltinGateway = require("@moltin/sdk").gateway; const Moltin = MoltinGateway({ client_id: "X", client_secret: "X", }); const id = "XXXX"; Moltin.Customers.Get(id).then((customer) => { // Do something }); ``` -------------------------------- ### Response Example with Priority and Stackable Flags Source: https://developer.elasticpath.com/docs/promotions-builder/promotions-builder-api/cart-level-promotions/create-a-cart-fixed-discount This JSON response shows the created promotion with `priority` and `stackable` flags set. It confirms the successful creation of the promotion with the specified settings. ```json { "data": { "type": "rule_promotion", "id": "422d4cff-3069-4ec2-9d04-410db05444e3", "store_id": "85ea6cac-589a-4141-80d0-42b91aae73a7", "name": "promo with priority 100", "description": "promo with priority 100", "enabled": false, "automatic": false, "rule_set": { "rules": { "strategy": "cart_total", "operator": "gte", "args": [ 10000 ] }, "actions": [ { "strategy": "cart_discount", "args": [ "fixed", 500 ] } ] }, "start": "2023-12-01T00:00:00Z", "end": "2024-12-31T00:00:00Z", "stackable": true, "priority": 100, "meta": { "timestamps": { "created_at": "2024-07-09T17:03:04.211Z", "updated_at": "2024-07-09T17:03:04.211Z" } } } } ``` -------------------------------- ### Initialize InstantSearch Source: https://developer.elasticpath.com/llms-full.txt Integrate the adapter with InstantSearch.js and configure search widgets. ```javascript import instantsearch from 'instantsearch.js'; const search = instantsearch({ indexName: 'search', searchClient: catalogSearchAdapter.searchClient, }); // Add widgets search.addWidgets([ instantsearch.widgets.searchBox({ container: '#searchbox', }), instantsearch.widgets.hits({ container: '#hits', }), instantsearch.widgets.refinementList({ container: '#brand-list', attribute: 'extensions.products(product_brands).name', }), ]); search.start(); ``` -------------------------------- ### Include Most Build Rules Example Source: https://developer.elasticpath.com/guides/How-To/Products/build-pxm-variations This example demonstrates how to configure `build_rules` to include most variation options, with specific exclusions. It sets the default behavior to 'exclude' and lists combinations to include. ```json { "data": { "type": "product", "attributes": { /*** other product attributes omitted ***/ "build_rules": { "default": "exclude", "include": [ [ "c166dabf-eb42-4364-98a6-3802e0bb7582", "7b8a1cac-bfe0-4ae9-90b1-c7a1393cccc5" ] ] } } } } ``` -------------------------------- ### Get Promotion Details Source: https://developer.elasticpath.com/llms-full.txt Retrieves the details of a specific promotion. This includes its name, description, type, enabled status, start and end dates, and any minimum cart value or maximum application limits. ```APIDOC ## Get Promotion ### Description Retrieves the details of a specific promotion. ### Method GET ### Endpoint /promotions/{promotionId} ### Parameters #### Path Parameters - **promotionId** (string) - Required - The unique identifier of the promotion. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **type** (string) - The type of the resource, which is `promotion`. - **id** (string) - The unique identifier of the promotion (UUID format). - **name** (string) - The name of the promotion. - **description** (string) - The description of the promotion. - **promotion_type** (string) - The type of the promotion (e.g., `fixed_discount`, `percent_discount`). - **enabled** (boolean) - Whether the promotion is enabled. - **automatic** (boolean) - Whether the promotion is applied automatically. - **start** (string) - The start date of the promotion. - **end** (string) - The end date of the promotion. - **min_cart_value** (object) - The minimum cart value required for the promotion to apply, including currency and amount. - **max_applications_per_cart** (number) - The maximum number of times a promotion can be applied per cart. - **schema** (object) - Defines the conditions for the promotion, including target catalogs, products, nodes, and discount values. #### Response Example { "type": "promotion", "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "Buy SKU1 and SKU2 to get free gift", "description": "SKU1 and SKU2 for free gift", "promotion_type": "item_fixed_discount", "enabled": true, "automatic": false, "start": "2020-01-01", "end": "2100-01-01", "min_cart_value": { "amount": 1000, "currency": "USD" }, "max_applications_per_cart": 0, "schema": { "targets": ["sku1"], "target_catalogs": ["baff37e6-1c9b-449d-852c-80ec4d0e39c6"], "currencies": [ { "amount": 500, "currency": "USD" } ] } } ``` -------------------------------- ### Get Cart Items Example Source: https://developer.elasticpath.com/llms-full.txt Retrieves items from a specific cart, including details like product ID, quantity, pricing, and discounts. The response may include shipping group IDs if associated with the cart. ```json "data": [ { "id": "98de010d-dd10-4fa5-a070-0b9bcdc72974", "type": "cart_item", "product_id": "5a4662d2-9a2b-4f6e-a215-2970db914b0c", "name": "sku1", "description": "sku1", "sku": "sku1", "slug": "sku1", "image": { "mime_type": "", "file_name": "", "href": "" }, "quantity": 1, "manage_stock": false, "unit_price": { "amount": 10000, "currency": "USD", "includes_tax": false }, "value": { "amount": 10000, "currency": "USD", "includes_tax": false }, "discounts": [ { "amount": { "amount": -2000, "currency": "USD", "includes_tax": false }, "code": "sale2024", "id": "e4d929d5-f471-4317-9a86-a84a6c572b44", "promotion_source": "rule-promotion", "is_cart_discount": true }, { "amount": { "amount": -1000, "currency": "USD", "includes_tax": false }, "code": "sale2024", "id": "de19a043-a6da-4bde-b896-d17e16b77e25", "promotion_source": "rule-promotion" }, { "amount": { "amount": -1000, "currency": "USD", "includes_tax": false }, "code": "sale2024", "id": "509295ee-2971-45b6-801e-95df09756989" }, { "amount": { "amount": -1000, "currency": "USD", "includes_tax": false }, "code": "sale2024", "id": "ca79e606-7ecd-41ac-9478-af4c8c28c546", "promotion_source": "rule-promotion", "is_cart_discount": true } ], "links": { "product": "https://useast.api.elasticpath.com/v2/products/5a4662d2-9a2b-4f6e-a215-2970db914b0c" }, "meta": { "display_price": { "with_tax": { "unit": { "amount": 5000, "currency": "USD", "formatted": "$50.00" }, "value": { "amount": 5000, "currency": "USD", "formatted": "$50.00" } }, "without_tax": { "unit": { "amount": 5000, "currency": "USD", "formatted": "$50.00" }, "value": { "amount": 5000, "currency": "USD", "formatted": "$50.00" } }, "tax": { "unit": { "amount": 0, "currency": "USD", "formatted": "$0.00" }, "value": { "amount": 0, "currency": "USD", "formatted": "$0.00" } }, "discount": { "unit": { "amount": -5000, "currency": "USD", "formatted": "-$50.00" }, "value": { "amount": -5000, "currency": "USD", "formatted": "-$50.00" } }, "without_discount": { "unit": { "amount": 10000, "currency": "USD", "formatted": "$100.00" }, "value": { "amount": 10000, "currency": "USD", "formatted": "$100.00" } } } } } ] ``` -------------------------------- ### Get Promotion Usages Request Example Source: https://developer.elasticpath.com/docs/promotions-builder/promotions-builder-codes/get-promotion-usages This cURL command demonstrates how to request promotion usages for a specific promotion ID. Ensure you replace ':promotionID' with the actual promotion ID and 'XXXX' with your valid API token. ```bash curl https://useast.api.elasticpath.com/v2/rule-promotions/:promotionID/usages \ -H "Authorization: Bearer XXXX" \ -H "Content-Type: application/json" \ ``` -------------------------------- ### Configure SDK Client Source: https://developer.elasticpath.com/llms-full.txt Setup the SDK client instance in a dedicated library file. ```typescript // lib/epcc-client.ts import { configureClient } from "@epcc-sdk/sdks-shopper"; const endpointUrl = process.env.NEXT_PUBLIC_EPCC_ENDPOINT_URL; const clientId = process.env.NEXT_PUBLIC_EPCC_CLIENT_ID; if (!endpointUrl || !clientId) { throw new Error('Missing Elastic Path credentials'); } // Configure the SDK client export const client = configureClient( { baseUrl: endpointUrl }, { clientId, storage: "localStorage" } ); ``` -------------------------------- ### Get Promotion Code Usage Request Example Source: https://developer.elasticpath.com/docs/promotions/promotion-usages/get-a-promotion-code-usage Use this cURL command to retrieve the usage history for a specific promotion code. Ensure you replace :id and :code-name with actual values and provide a valid Bearer token. ```curl curl https://useast.api.elasticpath.com/v2/promotions/:id/codes/:code-name/usages \ -H "Authorization: Bearer XXXX" \ -H "Content-Type: application/json" \ ``` -------------------------------- ### Retrieve Customers via JavaScript SDK Source: https://developer.elasticpath.com/llms-full.txt Demonstrates initializing the Moltin gateway and fetching customer lists, including an example of applying a filter to the query. ```javascript const MoltinGateway = require("@moltin/sdk").gateway; const Moltin = MoltinGateway({ client_id: "X", }); Moltin.Customers.All().then((customer) => { // Do something }); //Filter example Moltin.Customers.Filter({ eq: { email: "jim@bob.com" } }) .All() .then((customers) => { // Do something }); ```