# List order promotions

Endpoint: GET /orders/{direction}/{orderID}/promotions
Version: 1.0.453.36726
Security: OAuth2

## Path parameters:

  - `direction` (string, required)
    Direction of the order, from the current user's perspective.
    Enum: "Incoming", "Outgoing", "All"

  - `orderID` (string, required)
    ID of the order.

## Query parameters:

  - `search` (string)
    Word or phrase to search for.

  - `searchOn` (array)
    Comma-delimited list of fields to search on.
    Enum: "ID", "Name", "Code", "Description", "FinePrint", "EligibleExpression", "ValueExpression"

  - `sortBy` (array)
    Comma-delimited list of fields to sort by.
    Enum: "Name", "ID", "Code", "DateApplied", "StartDate", "ExpirationDate", "EligibleExpression", "ValueExpression", "CanCombine", "AutoApply", "Active", "Priority", "!Name", "!ID", "!Code", "!DateApplied", "!StartDate", "!ExpirationDate", "!EligibleExpression", "!ValueExpression", "!CanCombine", "!AutoApply", "!Active", "!Priority"

  - `page` (integer)
    Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

  - `pageSize` (integer)
    Number of results to return per page.

  - `filters` (object)
    An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

## Response 200 fields (application/json):

  - `Items` (array)
    Example: [{"Amount":0,"LineItemID":"","AmountOverridden":false,"DateApplied":"2018-01-01T00:00:00-06:00","ID":"","LineItemLevel":false,"Code":"","Name":"","RedemptionLimit":0,"RedemptionLimitPerUser":0,"RedemptionCount":0,"QuantityLimitPerOrder":0,"ItemLimitPerOrder":0,"ItemSortBy":"","Description":"","FinePrint":"","StartDate":"2018-01-01T00:00:00-06:00","ExpirationDate":"2018-01-01T00:00:00-06:00","EligibleExpression":"","ValueExpression":"","CanCombine":false,"AllowAllBuyers":false,"OwnerID":"","AutoApply":false,"Active":false,"UseIntegration":false,"Priority":0,"xp":{}}]

  - `Items.Amount` (number)

  - `Items.LineItemID` (string)

  - `Items.AmountOverridden` (boolean)
    True when the Amount has been set via PromotionOverrides.

  - `Items.DateApplied` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `Items.ID` (string)

  - `Items.LineItemLevel` (boolean)
    If true, certain eligible expression requirements must be met, and the PromotionDiscount will be applied at the line item level.

  - `Items.Code` (string)
    Must be unique within a marketplace. Entered by buyer when adding promo to order. Required when GeneratedCodeCount is 0.

  - `Items.Name` (string)

  - `Items.RedemptionLimit` (integer)
    Limit the total number of orders this promotion can be applied to across all users.

  - `Items.RedemptionLimitPerUser` (integer)
    Limit the total number of orders this promotion can be applied to per user.

  - `Items.RedemptionCount` (integer)
    The number of times this promotion has been applied to an order.

  - `Items.QuantityLimitPerOrder` (integer)
    Can only be used when LineItemLevel is true and ItemLimitPerOrder does not have a value. When defined the ValueExpression will be the discount applied to each qualifying quantity of eligible items. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.

  - `Items.ItemLimitPerOrder` (integer)
    Can only be used when LineItemLevel is true and QuantityLimitPerOrder does not have a value. Limits the number of items the promotion will apply to when eligible. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.

  - `Items.ItemSortBy` (string)
    Comma delimited list of properties to sort by. Can only be used when ItemLimitPerOrder is true. Used to determine the order in which the promotion is applied to the specified limit of items. Use ! to reverse sort order on a property.

  - `Items.Description` (string)

  - `Items.FinePrint` (string)
    For reference only. Terms, conditions, and other legal jargon.

  - `Items.StartDate` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `Items.ExpirationDate` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `Items.EligibleExpression` (string)
    The expression evaluated to determine if an item or order is eligible for a promotion. See rules engine documentation for formatting details.

  - `Items.ValueExpression` (string)
    The expression evaluated to determine the discount amount of an eligible promotion. See rules engine documentation for formatting details.

  - `Items.CanCombine` (boolean)
    If true, the promotion can be applied to an order that already other promotions applied, as long as they can also be combined.

  - `Items.AllowAllBuyers` (boolean)
    Allow promo to be used by all buyers without creating explicit assignments.

  - `Items.OwnerID` (string)
    ID of the organization that owns the promotion. Only the marketplace owner can override the OwnerID on create.

  - `Items.AutoApply` (boolean)

  - `Items.Active` (boolean)

  - `Items.UseIntegration` (boolean)

  - `Items.Priority` (integer)
    Used to control the order in which promotions are applied when calling the auto apply or refresh endpoint.

  - `Items.GeneratedCodeCount` (integer)
    Number of platform-generated single-use codes for this promotion. Mutually exclusive with Code.

  - `Items.GeneratedCodeLength` (integer)
    Character length of each generated code (excluding prefix). Required when GeneratedCodeCount > 0.

  - `Items.GeneratedCodePrefix` (string)
    Optional prefix prepended to generated codes, separated by a dash.

  - `Items.xp` (object)
    Example: {}

  - `Meta` (object)

  - `Meta.Page` (integer)

  - `Meta.PageSize` (integer)

  - `Meta.TotalCount` (integer)

  - `Meta.TotalPages` (integer)

  - `Meta.ItemRange` (array)

  - `Meta.NextPageKey` (string)

## Response 4XX fields (application/json):

  - `StatusCode` (integer)
    Example: "404"

  - `ErrorCode` (string)
    Example: "NotFoundError"

  - `Message` (string)
    Example: "Object not found"

  - `Data` (object)
    Example: {"ObjectType":"","ObjectID":""}


