---
schema_version: "1"
id: c5c4dbd17b647827e690b897b39b6764cdbfb16dd34fec5eccb657b87ca15692
title: getAccounts
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/retail_api/copy_promotion_getaccounts.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/copy_promotion_getaccounts.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 40a1bedc9cfcb09587528e649d5e9a2341cb31bd13ebbee5ecba51643471f982
description: This method returns the list of accounts valid for the target promotion. Target promotion timeframe is calculated by the difference in days between the original promotion date and the new date.
---
# getAccounts

This method returns the list of accounts valid for the target promotion. Target promotion timeframe is calculated by the difference in days between the original promotion date and the new date.

## Input Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| promotionId | String | YES | ID of the promotion. |
| inStoreDateFrom | String | YES | New start date of the promotion. |

## Input Sample

"source": {
    "class": "CopyPromotionWizardCallable",
    "method": "getAccounts",
    "cache": true,
    "params": {
        "promotionId": "{! promotionId }",
        "inStoreDateFrom": "{! promoDateFrom }"
    }
}

## Response Sample

\[
    {
        "Name": "\*Kroger Atlanta",
        "Id": "0012X000023GAClQAO"
    },
    {
        "Name": "\*Kroger Store #201",
        "Id": "0012X000023GACxQAO"
    },
    {
        "Name": "\*Safeway South-East",
        "Id": "0012X000023GAC5QAO"
    },
    {
        "Name": "+Kroger Detroit",
        "Id": "0012X000023GACWQA4"
    }
\]

## Response Properties

| Name | Description |
| --- | --- |
| Id | ID of the Account. |
| Name | Name of the Account. |