You are here: HTTP Services > Get Pos Transactions

Get POS Transactions

Summary

This service will return a set of POS transaction details for each POS transaction that occurred equal to or after an indicated start time. The desired start time must be less than or equal to 31 days old. Optionally, an end time may be sent. In this case, all transactions within the start and end time will be returned, not including transactions equal to the end time. POS transactions may be requested for a particular club.

Service Name getPosTransactions
Service Type HTTP
Invoked by HTTPS GET Request
Returns HTTPS Response
URL Format

[server]/ws/getPosTransactions/[club-number]?startTime=[timestamp]

Required Parameters startTime

Parameters

getPosTransactions requires one parameter, startTime, and it allows one additional parameter: endTime.

startTime

The startTime parameter is required. It limits responses to transactions that have a time value greater than or equal to the specified time.

This time is compared to the Create timestamp of POS transactions.

When specifying the endTime, use the guidelines outlined in the simple datetime formatting.

The startTime parameter must fit the following criteria:

endTime

The endTime parameter is optional, and it limits responses to transactions that have a time value less than (not equal to) the specified time.

Using an endTime that is before the startTime will result in a successful completion, but will return no transactions.

When specifying the endTime, use the guidelines outlined in the simple datetime formatting.

URL Format

[server]/ws/getPosTransactions/[club-number]?startTime=[timestamp]&endTime=[timestamp]

memberId

The memberId uniquely identifies a member within a particular club. ABC assigns memberIds in the form of a GUID.

URL Format

[server]/ws/getPosTransactions/[club-number]?startTime=[timestamp]&memberId=[id]
[server]/ws/getPosTransactions/[club-number]?startTime=[timestamp]&endTime=[timestamp]&memberId=[id]

Response Data

The Response is a Standard HTTPS GET Response object containing a message in XML.

The XML message contains three sections:

The root tag is getPosTransactions.

Status Section

This section describes the overall status of the request. The Status section's tag name is status. The status tag contains the following tags:

Tag Name Format Description
response string, up to 50 characters

The response tag contains a value indicating the overall status of the request.

The overall status will be one of three values:

  • completed: The service completed successfully. Transactions may or may not have been returned.
  • usageError: Required Request parameters did not pass validation, and no transactions were returned.
  • internalError: System exceptions occurred while executing the web service, and no transactions were returned.
message string, up to 125 characters

The message tag provides a more specific description of the result value. Each message tag includes an attribute. The id attribute is assigned a unique id.

Example tags and values include:

<message id="0">Service completed successfully</message>
<message id="5">Invalid value for parameter startTime</message>

transactionsReturned integer Contains a value equal to the number of transactions included in the response.
currentTimeStamp simple datetime

Contains a value equal to the current timestamp of the database, representing the end time of the request (if the endTime parameter was not used).

Use the value in subsequent requests to ensure that:

  • No transaction intervals are missed
  • No duplicate transactions are retrieved. For example, if a request is received at time x with a start time of y, the currentTimeStamp has a value of x.
    Learn more about the format of the time stamp in simple datetime.

Request Section

The Request section lists the values in the original request.

The Request section's tag name is request.

Tag Name Format Description
clubNumber #### The club number specified in the request URL.
startTime simple datetime The startTime specified in the request URL.
endTime simple datetime The endTime specified in the request URL.
memberId GUID The memberId specified in the request URL.

Result Section

This section contains specific information about each transaction for the desired club. The Result section's tag name is result.

The result tag contains the root tag transactions and the following tags:

Tag Name Format Parent Tag Description
transaction GUID transactions

Contains the id attribute, with a GUID to uniquely identify the transaction instance on ABC systems. It contains the POS transaction-specific information in its tags and their child tags.

Child tags:

  • member
  • employee
  • receiptNumber
  • return
  • items

There may be zero, one, or many transaction tags.

member GUID transaction Optional. Contains an id attribute to identify the member's member id if there is a member attached to a transaction.
employee GUID transaction Contains an id attribute to identify the employee assigned to this transaction.
receiptNumber transaction Contains a value that identifies the receipt number.
stationName string transaction Contains the name of the DataTrak workstation where the transaction took place.
return boolean transaction

Contains a value identifying whether the transaction is a return or a purchase.

  • true indicates a return
  • false indicates a purchase
items transaction Contains the various items associated with this transaction within one or many item tags.
item GUID items

Contains an id attribute to identify the item's id. Contains information about the items in its child tags.

Child tags:

  • name
  • inventoryType
  • sale
  • upc
  • profitCenter
  • catalog
  • unitPrice
  • quantity
  • packageQuantity
  • subtotal
  • tax
name string item Contains the name of the item.
inventoryType string item

Contains one of the following two values:

Allowed values:

  • service
  • product

The club designates profit centers and assigns items to them.

sale boolean item Uses true and false to describe whether an item is a sale item or a non-sale item.

Examples of non-sale items include purchasing a gift card, buying pre-pay, or making a payment on a club account.

upc string item Contains a value for the UPC code the club assigned to them.
profitCenter string item Contains a value of the name of the profit center that the item belongs to. The club designates profit centers and assigns items to them.
catalog string item Contains the catalog name the club has assigned the item to.
unitPrice two decimal number item Contains the unit price for the item. Unit prices are always greater than or equal to zero.
quantity integer item Contains the number of units sold of this item. Always contains a value greater than or equal to one.
packageQuantity integer item Optional. Contains the number of items sold in the package.For example, a training package may contains several individual sessions.
subtotal two decimal number item

Contains a value representing the pre-tax subtotal, using one of the following two calculations:

no packageQuantity

unitPrice * quantity

packageQuantity present

unitPrice * quantity * packageQuantity

tax two decimal number item Contains a value representing the amount of tax calculated for the item.
recurringServiceId GUID item

Contains the id attribute equal to a GUID.

The GUID contained in recurringServiceId can be used in the getRecurringServiceList service to restrict the results to a particular service.