Rebrand 2023 Learn more 

  • Commerce Cloud/
    Account Management/
    Using Account Management API/
    Accounts API Overview

    Accounts API Overview

    An Account resource represents a business account within a store.

    The Account Object

    AttributeTypeDescription
    idstringThe unique identifier for an Account.
    typestringThe type of the object returned. Always use account.
    namestringThe name of the account.
    legal_namestringThe legal name of the account.
    registration_idstringThe registration ID of the account. The maximum character limit for this field is 63.
    external_refstringThe optional external ID reference. For example, this could be an external reference from a separate company system. The maximum length is 2048 characters. Default is null.
    metaobjectAdditional information for this realm. For more information, see The meta object section.
    relationshipsobjectA list of related resources. For more information, see The relationships object section.

    Sample response

    {
      "data": {
        "id": "6e46b042-cb5a-45bf-a6c2-9991bcd7260e",
        "type": "account",
        "name": "Account Level 4",
        "legal_name": "acc-legal-name",
        "registration_id": "0addf4f1-0347-4336-ae41-e44a39e762e8",
        "external_ref": "16bedceb-8b2d-4f82-a973-b0a8d8432708",
        "relationships": {
          "parent": {
            "data": {
              "id": "558d7153-2d2a-48d1-bde4-f8c21649842e",
              "type": "account"
            }
          },
          "ancestors": [
            {
              "data": {
                "id": "b511062a-0a86-4bcc-99f9-528092ac35a6",
                "type": "account"
              }
            },
            {
              "data": {
                "id": "c4a13b06-8083-416f-80cd-ef1281e83f5b",
                "type": "account"
              }
            },
            {
              "data": {
                "id": "558d7153-2d2a-48d1-bde4-f8c21649842e",
                "type": "account"
              }
            }
          ]
        },
        "meta": {
          "timestamps": {
            "created_at": "2021-04-16T15:39:06.884Z",
            "updated_at": "2021-04-16T15:39:06.884Z"
          }
        }
      },
      "links": {
        "self": "https://useast.api.elasticpath.com/v2/accounts/6e46b042-cb5a-45bf-a6c2-9991bcd7260e"
      }
    }
    

    The meta Object

    AttributeTypeDescription
    meta.timestampsstringSpecifies the time and date that the account is created or updated.
    meta.timestamps.created_atstringSpecifies the date the account is created.
    meta.timestamps.updated_atstringSpecifies the date the account is last updated.

    The relationships Object

    AttributeTypeDescription
    relationships.parentobjectProvides details about the relationship between the account and the parent account.
    relationships.parent.dataobjectSpecifies the details of the parent account.
    relationships.parent.data.idstringSpecifies the ID of the parent account.
    relationships.parent.data.typestringSpecifies the type of the parent account.
    relationships.ancestorsobjectDisplays an array with the details about the relationship between an account and the ancestors of the account. The first index of the array is the top-level account, and the last index is the parent of this account. This field is displayed only if the account consists of ancestors.
    relationships.ancestors[x].dataobjectSpecifies the information regarding a specific ancestor.
    relationships.ancestors[x].data.idstringSpecifies the ID of the ancestor.
    relationships.ancestors[x].data.typestringSpecifies the type of the ancestor.