GET v2/Companies/{CompanyId}/Entities/{LocationId}/Promotions?EntityId={EntityId}

Returns promotions at and under a specific node in the company tree.

Information:

Base URL:

https://api.covasoft.net/pospromotions

This endpoint replaces the deprecated /v1/Companies({CompanyId})/entities({LocationId})/ActivePromotionsForDays({PromoStartDate}, {PromoDateRange}) AND v1/Companies({CompanyId})/Promotions endpoints

The models are forward compatible.

Will return all promotions for a company at and under the EntityId node. For example, calling the endpoint with companyId = entityId will return all promotions defined in the company. (The same as the v1 endpoint)

Request Information

URI Parameters

NameDescriptionTypeAdditional information
CompanyId

The unique Company Id that was provided in your on-boarding package.

integer

Required

EntityId

The entityId of the subtree to retrieve promotions on and under.

integer

Required

LocationId

string

None.

Body Parameters

None.

Response Information

Resource Description

Collection of PromotionsByLocationReturn
NameDescriptionTypeAdditional information
Id

globally unique identifier

None.

DiscountId

globally unique identifier

None.

SelectedParentEntities

Collection of integer

None.

Name

string

None.

Period

PromotionsByLocationReturnPeriod

None.

Status

string

None.

Condition

PromotionsByLocationReturnCondition

None.

Rule

PromotionsByLocationReturnRule

None.

Audit

PromotionsByLocationReturnAudit

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "Id": "d91dd14d-955d-4d35-a733-ba186e6bc8ca",
    "DiscountId": "8ca333e1-4f2c-41f2-bb27-e124b4cd173b",
    "SelectedParentEntities": [
      1,
      2
    ],
    "Name": "sample string 3",
    "Period": {
      "DateRanges": [
        {
          "StartDate": "2024-11-07T08:34:52.3348109+00:00",
          "EndDate": "2024-11-07T08:34:52.3348109+00:00"
        },
        {
          "StartDate": "2024-11-07T08:34:52.3348109+00:00",
          "EndDate": "2024-11-07T08:34:52.3348109+00:00"
        }
      ],
      "Tag": "sample string 1"
    },
    "Status": "sample string 4",
    "Condition": {
      "MatchAll": {
        "Products": {
          "Products": [
            "e14c6c20-78d8-4d49-a3f0-5ceca3de7117",
            "c5693f1d-86d6-4360-b521-4bd3ace94988"
          ],
          "Classifications": [
            1,
            2
          ],
          "Categories": [
            1,
            2
          ],
          "Tag": "sample string 1"
        }
      }
    },
    "Rule": {
      "Tag": "sample string 1",
      "Discount": {
        "Dollar": 1.0,
        "Tag": "sample string 2"
      }
    },
    "Audit": {
      "Created": {
        "On": "2024-11-07T08:34:52.3348109+00:00",
        "By": 2
      },
      "Activated": {
        "On": "2024-11-07T08:34:52.3348109+00:00",
        "By": 2
      },
      "Deactivated": {
        "On": "2024-11-07T08:34:52.3348109+00:00",
        "By": 2
      }
    }
  },
  {
    "Id": "d91dd14d-955d-4d35-a733-ba186e6bc8ca",
    "DiscountId": "8ca333e1-4f2c-41f2-bb27-e124b4cd173b",
    "SelectedParentEntities": [
      1,
      2
    ],
    "Name": "sample string 3",
    "Period": {
      "DateRanges": [
        {
          "StartDate": "2024-11-07T08:34:52.3348109+00:00",
          "EndDate": "2024-11-07T08:34:52.3348109+00:00"
        },
        {
          "StartDate": "2024-11-07T08:34:52.3348109+00:00",
          "EndDate": "2024-11-07T08:34:52.3348109+00:00"
        }
      ],
      "Tag": "sample string 1"
    },
    "Status": "sample string 4",
    "Condition": {
      "MatchAll": {
        "Products": {
          "Products": [
            "e14c6c20-78d8-4d49-a3f0-5ceca3de7117",
            "c5693f1d-86d6-4360-b521-4bd3ace94988"
          ],
          "Classifications": [
            1,
            2
          ],
          "Categories": [
            1,
            2
          ],
          "Tag": "sample string 1"
        }
      }
    },
    "Rule": {
      "Tag": "sample string 1",
      "Discount": {
        "Dollar": 1.0,
        "Tag": "sample string 2"
      }
    },
    "Audit": {
      "Created": {
        "On": "2024-11-07T08:34:52.3348109+00:00",
        "By": 2
      },
      "Activated": {
        "On": "2024-11-07T08:34:52.3348109+00:00",
        "By": 2
      },
      "Deactivated": {
        "On": "2024-11-07T08:34:52.3348109+00:00",
        "By": 2
      }
    }
  }
]