POST api/v7/TransactionLookups/TotalSpend

Perform a total spend lookup request using the provided customer and timeframe and return the total spend information

Request Information

URI Parameters

None.

Body Parameters

The total spend lookup request data

TotalSpendRequest
NameDescriptionTypeRequired?Additional information
MessageContent

string

No

None.

MessageType

string

No

None.

Request

TotalSpendRequestData

No

None.

Request Formats

application/json, text/json

Sample:
{
  "MessageContent": "sample string 1",
  "MessageType": "sample string 2",
  "Request": {
    "TrainingModeFlag": 0,
    "CustomerID": "sample string 1",
    "MonthToDate": 2
  }
}

application/xml, text/xml

Sample:
<Lookup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" content="sample string 1" type="sample string 2">
  <RequestData TrainingModeFlag="False">
    <CustomerID>sample string 1</CustomerID>
    <MonthToDate>2</MonthToDate>
  </RequestData>
</Lookup>

Response Information

Resource Description

The total spend data for the request message

TotalSpendResponse
NameDescriptionType
MessageContent

string
MessageType

string
Request

TotalSpendResponseRequestData
Response

TotalSpendResponseData

Response Formats

application/json, text/json

Sample:
{
  "MessageContent": "sample string 1",
  "MessageType": "sample string 2",
  "Request": {
    "CustomerID": "sample string 1",
    "MonthToDate": 2
  },
  "Response": {
    "Periods": {
      "Periods": [
        {
          "PeriodType": "sample string 1",
          "NumberOfTransactions": 2,
          "TotalSpend": 3,
          "TotalSavings": 4,
          "AverageSpendPerTransaction": 5,
          "AverageSavingsPerTransaction": 6
        },
        {
          "PeriodType": "sample string 1",
          "NumberOfTransactions": 2,
          "TotalSpend": 3,
          "TotalSavings": 4,
          "AverageSpendPerTransaction": 5,
          "AverageSavingsPerTransaction": 6
        }
      ]
    }
  }
}

application/xml, text/xml

Sample:
<Lookup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" content="sample string 1" type="sample string 2">
  <RequestData>
    <CustomerID>sample string 1</CustomerID>
    <MonthToDate>2</MonthToDate>
  </RequestData>
  <ResponseData>
    <Periods>
      <Period type="sample string 1">
        <NumberOfTransactions>2</NumberOfTransactions>
        <TotalSpend>3</TotalSpend>
        <TotalSavings>4</TotalSavings>
        <AverageSpendPerTransaction>5</AverageSpendPerTransaction>
        <AverageSavingsPerTransaction>6</AverageSavingsPerTransaction>
      </Period>
      <Period type="sample string 1">
        <NumberOfTransactions>2</NumberOfTransactions>
        <TotalSpend>3</TotalSpend>
        <TotalSavings>4</TotalSavings>
        <AverageSpendPerTransaction>5</AverageSpendPerTransaction>
        <AverageSavingsPerTransaction>6</AverageSavingsPerTransaction>
      </Period>
    </Periods>
  </ResponseData>
</Lookup>