Fueltorque REST API
The FuelTorque API is a REST API. It exposes application data to be used by third-party applications.
Authentication
Access Tokens
Third party applications that interact with the FuelTorque API will require an access token. Each access token is associated to a single site and grants access to resources associated with that site.
Manage Access Tokens
Access tokens may be managed from Tools -> API Tokens . Here tokens can be created and disabled / enabled.
Access Token Usage
Each request made to the FuelTorque API requires the access token in the
Authorization
header as
detailed below (replace xxxxxx with the Fueltorque API token).
Authorization: Bearer xxxxxx
Rate Limits
The Fueltorque REST API allows 20 requests to be made per minute. Exceeding the limit will return a
429 Too
Many Requests
HTTP code.
Rate Limit Headers
Headers are included in all API requests indicating the current number of requests used.
-
X-Rate-Limit-Limit - The maximum number of allowed requests during a period
-
X-Rate-Limit-Remaining - The remaining number of allowed requests within the current period
-
X-Rate-Limit-Reset - The number of seconds to wait before having maximum number of allowed requests again
Last Sync Header
The response to every request to the Fueltorque REST API contains a
X-Fueltorque-Site-Last-Synced
header. The value of this header is the last time that a sync occurred from the Backoffice service to the
Fueltorque web host in UNIX time.
Pagination
When you make a
GET
request on a resource without an identifier a collection is returned. The result
of
the query will be paged. Details of the paging (number of pages, items per page, current page) are
included as headers in the request. Pages can be selected and page size can be adjusted using query parameter
Pagination Query Parameters
Parameters can be included in a GET request on a resource to adjust the selected page and number of entities per page
-
page - The current page of the resource collection
-
per-page - The maximum number of entities per page (between 1 and 50, default 20)
Example usage of pagination query parameters. The following will select page 2 and limit the number of entities per page to 10
https://api.fueltorque.co.nz/v1/sales?page=2&per-page=10
Pagination Headers
Headers are included in all API requests indicating the pagination status (current page, items per page, number of pages, total count).
-
X-Pagination-Total-Count - The total number of entities of the requested resource type
-
X-Pagination-Page-Count - The total number of pages for the given per page amount
-
X-Pagination-Current-Page - The current page returned by the request
-
X-Pagination-Per-Page - The maximum number of entities per page of the resource collection
Filtering
Requests to resources that return a collection can be filtered with the application of filtering keywords in the
filter
query parameter. The format is
?filter[attribute][keyword]=value
, or in the
case
of the
in
or
nin
keyword (IN or NOT IN),
?filter[attribute][in]=firstValue&filter[attribute][in]=secondValue
Example usage of filter query parameters
The following is an example based on the Sales resource collection and will filter the collection with
results whose date time is greater than or equal to
2020-10-29 15:19:14
https://api.fueltorque.co.nz/v1/sales?
filter
[
siteDateTime
][
gte
]=
2020-10-29%2015:19:14
Filtering Keywords
Below are the valid filtering keywords and their translations
- and
- AND
- or
- OR
- not
- NOT
- lt
- <
- gt
- >
- lte
- <=
- gte
- >=
- eq
- =
- neq
- !=
- in
- IN
- nin
- NOT IN
- like
- LIKE
Filtering Attributes
The valid attributes for filtering a resource collection are defined in the Resource documentation
Sorting
Requests to resources that return a collection can be sorted with the application of a sort keyword in the
sort
query parameter. The format is
?sort=value
for ascending sort or
?sort=-value
for descending sort.
Example usage of filter query parameters
The following is an example based on the Sales resource collection and will sort the collection by saleDateTime descending.
https://api.fueltorque.co.nz/v1/sales?
sort
=
-saleDateTime
Sorting Attributes
The valid attributes for sorting a resource collection are defined in the Resource documentation
Content Type
By default requests to the Fueltorque API will be formatted in JSON. By setting the
Application
header to
application/xml
the response body of requests to the API will be formatted in XML.
Status Codes
The following HTTP status codes may be returned by API queries.
-
200 - The request was successfully processed
-
201 - An entity was successfully created (e.g. with a POST request)
-
204 - Request accepted but not content to return (e.g. with a DELETE request)
-
401 - The required credentials were either not present in the request or were incorrect
-
404 - The entity was not found
-
422 - The entity could not be created (on a CREATE request) due to errors in the body. The errors will be included in the response.
-
429 - The site associated with the access token has exceeded the rate limit
-
5xx - Internal error occurred in the FuelTorque application
Validation
When using methods
POST
for creation of new entities and
PUT
PATCH
for modification of existing entities (where allowed), the data provided in the body of the request will be validated.
If the data provided is incorrect the response code will be 422 and the errors will be provided in the response.
Validation Error Response Format
The validation errors are formatted as an array of object. In the error object
field
is the
entity field with a validation error and
message
is the error message.
Example
[
{
"field": "data",
"message": "Data cannot be blank."
},
{
"field": "saleDataOptionId",
"message": "Sale Data Option Id is invalid."
}
]
Resources
Sales
This endpoint includes all sales processed by the site. Includes adjustments, customer ROAs.
- URL (multiple entities)
- https://api.fueltorque.co.nz/v1/sales
- URL (single entity, for entity with ID 42)
- https://api.fueltorque.co.nz/v1/sales/42
- Methods
- GET HEAD OPTIONS
- Filter Attributes
- siteDateTime total stationName customerId
- Sort Attributes
- siteDateTime total
Sale
The following fields are present in a Sale entity
-
id - A unique identifier for the sale
-
rounding - The unformatted rounding amount for the sale (e.g. 0.0200)
-
formattedRounding - The site specific formatted rounding amount for the sale (e.g. $0.02)
-
change - The change amount for the sale (e.g. 0.1000)
-
formattedChange - The site specific formatted change amount for the sale (e.g. $0.02)
-
transactionNumber - The sale transaction number / invoice number on the customer's receipt
-
total - The unformatted sale total (e.g. 150.0000)
-
tax - The unformatted tax component (e.g. 10.0000)
-
formattedTotal - The site specific formatted total (e.g. $150.00)
-
formattedTax - The site specific formatted tax component (e.g. $10.00)
-
stationName - The POS station name (e.g. POS 1)
-
stationDescription - The POS station description (e.g. Main POS)
-
dateTime - The date/time the sale was processed in UNIX time
-
formattedDateTime - The date/time the sale was processed formatted with site locale and timezone (e.g. Mar 9, 2021, 11:24:21 PM)
-
shiftStartDateTime - The date/time the associated shift began in UNIX time
-
formattedShiftStartDateTime - The date/time the associated shift began formatted with site locale and timezone (e.g. Mar 9, 2021, 11:24:21 PM)
-
siteId - The identifier of the site the sale was processed on.
-
payments - See payments
-
items - See items
-
receiptMain - The main body of the sales receipt
-
receiptHeader - The header of the sales receipt
-
receiptFooter - The footer of the sales receipt
Payments
The following fields are present in a Payment entity
-
id - A unique identifier for the payment
-
mopId - A unique identifier for the method of payment
-
tender - The tendered amount for the payment
-
tenderFormatted - The site specific formatted payment (e.g. $10.00)
-
customerId - The customer ID for the payment (if a debtor type payment)
-
debtorFirstName - The customer's first name (if a debtor type payment)
-
debtorLastName - The customer's last name (if a debtor type payment)
-
debtorEmail - The customer's email (if a debtor type payment)
-
debtorHasEReceipt - Whether the customer has been sent an eReceipt (if a debtor type payment)
-
cardHolderName - The card holder name (if a debtor type payment)
-
cardNumber - The card number (if a debtor type payment)
-
cashOut - Whether cash out occurred as part of the payment method
-
mopType - The method of payment type enum. See MOP Types
-
acquirerId - The acquirer enum. See Acquirers
-
description - The payment description (e.g. Cash)
-
vehicleRegistration - The vehicle registration (if one is associated with the payment)
-
mopSurcharge - The payment surcharge as a percent if charged
-
cardHolderExtraData - See Extra Data (extra data for cardholder - may be present if local account payment)
-
fleetCardHolderExtraData - See Extra Data (extra data for fleet card holder - may be present if fleet card payment)
-
mopExtraData - See Extra Data (extra data for the method of payment)
Items
-
id - A unique identifier for the sale item
-
itemId - A unique identifier for the sale item
-
quantity - The quantity of the item in the sale can be discrete or continuous depending on item type (e.g. 2.0000 or 2.2000)
-
unitSymbol - The unit symbol for the item (e.g. kg)
-
unitPrice - The unit price of the item in the sale at the time of sale (i.e. what the customer was charged)
-
formattedUnitPrice - The site specific formatted unit price (e.g. $15.00)
-
totalPrice - The total price of the item in the sale at the time of sale (quantity * unit price)
-
formattedTotalPrice - The site specific formatted total price (e.g. $30.00)
-
taxComponent - The tax component of the item price in the sale at the time of sale
-
formattedTaxComponent - The site specific formatted tax component (e.g. $4.50)
-
costPrice - The cost price the item at the time of sale
-
formattedCostPrice - The site specific formatted cost price of the item(e.g. $10.00)
-
description - The name / description of the item
-
itemType - The item type enum. See Item Types
-
departmentDescription - The name / description of the department that the item belonged to at the sale was completed
-
departmentType - The department type. See Department Types
-
taxRatePercent - The percent rate of sales tax on the item e.g. (15.0000)
-
taxRatePercent - The description of the sales tax applied to the item e.g. (15% GST)
-
sku - The item SKU
-
fuelGrade - The fuel grade if the item is a fuel delivery e.g. 95
-
pumpNumber - The pump number if the item is a fuel delivery e.g. 5
-
pumpAttendantId - The pump attendant ID if the item is a fuel delivery
-
pumpAttendantFirstName - The pump attendant first name if the item is a fuel delivery
-
pumpAttendantLastName - The pump attendant last name if the item is a fuel delivery
-
isAlcohol - Whether the item is alcohol
-
isTobacco - Whether the item is tobacco
-
isPrepay - Whether the item is a prepay
-
isRefund - Whether the item is a refund
-
isAccommodation - Whether the item is accommodation
-
isNotSoldIndividually - Whether the item is NOT sold individually
-
customerId - The customer ID (only set when the itemType is ITEMTYPE_ROA)
-
customerOrganisationName - The customer organisation name (only set when the itemType is ITEMTYPE_ROA)
-
customerFirstName - The customer first name (only set when the itemType is ITEMTYPE_ROA)
-
customerLastName - The customer last name (only set when the itemType is ITEMTYPE_ROA)
-
localDebtorCardNumber - The local debtor card number (only set when the itemType is ITEMTYPE_ROA)
-
localDebtorCardHolderName - The local debtor card holder name (only set when the itemType is ITEMTYPE_ROA)
-
extraData - See Extra Data
Extra Data
-
data - The data provided at time of sale
-
dataTypeDescription - Description of the data type
-
dataType - See Data Types
Enums
Item Types
-
ITEMTYPE_PLU - PLU
-
ITEMTYPE_PREPAY - Fuel Prepay
-
ITEMTYPE_PREPAYREFUND - Fuel Prepay Refund
-
ITEMTYPE_PLU_OUTER - PLU Outer
-
ITEMTYPE_DOLLAR_DISCOUNT - $ Discount
-
ITEMTYPE_PERCENT_DISCOUNT - % Discount
-
ITEMTYPE_DOLLAR_SURCHARGE - $ Surcharge
-
ITEMTYPE_PERCENT_SURCHARGE - % Surcharge
-
ITEMTYPE_ROUNDING - Rounding
-
ITEMTYPE_TARGETPRICE - Special Target Price
-
ITEMTYPE_NOSALE_PLU - No Sale
-
ITEMTYPE_SHIFT_START - Shift Start
-
ITEMTYPE_SHIFT_END - Shift End
-
ITEMTYPE_SAFEDROP - Safe Drop
-
ITEMTYPE_ROA - Receive On Account
-
ITEMTYPE_QUANTITY_DISCOUNT - Quantity $ Discount
-
ITEMTYPE_TRUNCATED_QUANTITY_DISCOUNT - $ Discount on Whole Quantities
-
ITEMTYPE_PREPAY_UNITPRICE_DISCOUNT - Fuel Prepay Discount
-
ITEMTYPE_ATTENDANT_PAYIN - Attendant Payin
-
ITEMTYPE_PAYOUT - Cashier Payout
-
ITEMTYPE_REFUNDED_ITEM - Refunded Item
-
ITEMTYPE_SALE_MARKER - Sale Marker (non add)
-
ITEMTYPE_PAYIN - Cashier Payin
-
ITEMTYPE_TIP_RECEIVED - Tip Received
-
ITEMTYPE_HOST_SALE_ADJUSTMENT - Sale Total Adjustment By Host
-
ITEMTYPE_ASSET - Fixed Asset
-
ITEMTYPE_OVERHEAD - Operating Overhead
-
ITEMTYPE_UNITPRICE_REPRICE_DISCOUNT - Unit Price Reprice Discount
Department Types
-
DEPARTMENTTYPE_DRYSTOCK - Drystock
-
DEPARTMENTTYPE_WETSTOCK - Wetstock
-
DEPARTMENTTYPE_MODIFIER - Modifier
-
DEPARTMENTTYPE_OVERHEADS - Operating Overheads
-
DEPARTMENTTYPE_ASSETS - Fixed Assets
Method of Payment Types
-
MOPTYPE_CASH - Cash
-
MOPTYPE_CHEQUE - Cheque
-
MOPTYPE_CREDIT_CARD - Credit Card
-
MOPTYPE_MANUAL_EFTPOS - Paper-based or Non-integrated EFTPOS
-
MOPTYPE_FINANCE - Finance
-
MOPTYPE_VOUCHER - Voucher
-
MOPTYPE_DRIVEOFF - Driveoff
-
MOPTYPE_TESTDELIVERY - Test Delivery
-
MOPTYPE_DIRECT_CREDIT - Direct Credit
-
MOPTYPE_ADJUSTMENT - Adjustment
-
MOPTYPE_LOCAL_DEBTOR - Local Debtor
-
MOPTYPE_EXTERNALFS_TRANSACTION - External Financial System Transaction
-
MOPTYPE_INTEGRATED_EFTPOS - Integrated EFTPOS
-
MOPTYPE_MULTISITE_DEBTOR - Multisite Debtor Card
-
MOPTYPE_LOYALTY - Loyalty Card
-
MOPTYPE_MULTISITE_LOYALTY - Multisite Loyalty Card
Acquirers
-
ACQUIRER_NONE - None
-
ACQUIRER_LOCAL_DEBTOR - Local Debtor
-
ACQUIRER_RADIUM - RADIUM
-
ACQUIRER_DPS - DPS
-
ACQUIRER_EFTPOS_NZ - EFTPOS NZ
-
ACQUIRER_FIGMENT - Figment South Africa
-
ACQUIRER_NEDBANK - Nedbank South Africa
Data Types
-
DATA_SUPERGOLDCARD - Super Gold Card
-
DATA_VEHICLEREGISTRATION - Registration
-
DATA_VEHICLEFLEET - Fleet
-
DATA_VEHICLEODOMETER - Odometer
-
DATA_ORIGINALRECEIPT - Original Receipt
-
DATA_VOUCHER - Voucher
-
DATA_REFUNDREASON - Refund Reason
-
DATA_PRODUCTDESCRIPTION - Description
-
DATA_PURCHASEORDER - Purchase Order
-
DATA_GREYPOWERCARD - Greypower Card
-
DATA_SUPERMARKETDISCOUNT - Supermarket Discount
-
DATA_SUPPLIER - Supplier
-
DATA_ORIGINALRECEIPT_ALPHA - Original Tax Receipt
-
DATA_EXPIRYDATE - Expiry date
-
DATA_CUSTOMER_BUSINESS_CODE - Customer Business Code
-
DATA_SALE_TOTAL_ADJUSTMENT - Sale Total Adjustment
-
DATA_DRIVERNAME - Driver Name
-
DATA_REFERENCE - Reference
-
DATA_STORE_NAME - Store Name
-
DATA_OIL_CHECKED - Oil Checked
-
DATA_WATER_CHECKED - Water Checked
Example Output
JSON Single Entity
{
"id": 5,
"rounding": "-0.0272",
"formattedRounding": "-$0.03",
"change": "0.9000",
"formattedChange": "$0.90",
"transactionNumber": 122,
"total": "122.1000",
"tax": "18.3191",
"stationName": "POS1",
"stationDescription": "Main POS",
"formattedTotal": "$122.10",
"formattedTax": "$18.32",
"siteId": 1,
"payments": [
{
"id": "456",
"tender": "123.0000",
"tenderFormatted": "$123.00",
"customerId": null,
"debtorFirstName": null,
"debtorLastName": null,
"debtorEmail": null,
"debtorHasEReceipt": false,
"cardHolderName": null,
"cardHolderHasEReceipt": false,
"cashOut": null,
"mopType": "MOPTYPE_CASH",
"acquirerId": "ACQUIRER_NONE",
"description": "Cash",
"cardNumber": null,
"vehicleRegistration": null,
"mopSurcharge": null
}
],
"shiftStartDateTime": null,
"formattedShiftStartDateTime": null,
"dateTime": "1587600000",
"formattedDateTime": "23 4 2020 12:00:00",
"items": [
{
"id": "321",
"description": "Premium 95",
"itemType": "ITEMTYPE_PLU",
"departmentDescription": "Wetstock",
"departmentType": "DEPARTMENTTYPE_WETSTOCK",
"taxRatePercent": "15.0000",
"taxRateDescription": "15% GST",
"sku": null,
"fuelGrade": 95,
"pumpNumber": 10,
"isAlcohol": false,
"isTobacco": false,
"quantity": "42.4200",
"unitPrice": "2.8790",
"formattedUnitPrice": "$2.88",
"totalPrice": "122.1272",
"formattedTotalPrice": "$122.13",
"taxComponent": "18.3191",
"formattedTaxComponent": "$18.32",
"costPrice": "1.9860",
"formattedCostPrice": "$1.99",
"isPrepay": false,
"isRefund": false,
"isAccommodation": false,
"isNotSoldIndividually": false,
"customerId": null,
"customerOrganisationName": null,
"customerFirstName": null,
"customerLastName": null,
"localDebtorCardNumber": null,
"localDebtorCardHolderName": null,
"unitsSymbol": "L",
"pumpAttendantId": null,
"pumpAttendantFirstName": null,
"pumpAttendantLastName": null
}
],
"receiptMain": "Items in sale...",
"receiptHeader": "Welcome to Fuel Station...",
"receiptFooter": "Thank you for..."
}
JSON Multiple Entities
[
{
"id": 5,
"rounding": "-0.0272",
"formattedRounding": "-$0.03",
"change": "0.9000",
"formattedChange": "$0.90",
"transactionNumber": 122,
"total": "122.1000",
"tax": "18.3191",
"stationName": "POS1",
"stationDescription": "Main POS",
"formattedTotal": "$122.10",
"formattedTax": "$18.32",
"siteId": 1,
"payments": [
{
"id": "456",
"tender": "123.0000",
"tenderFormatted": "$123.00",
"customerId": null,
"debtorFirstName": null,
"debtorLastName": null,
"debtorEmail": null,
"debtorHasEReceipt": false,
"cardHolderName": null,
"cardHolderHasEReceipt": false,
"cashOut": null,
"mopType": "MOPTYPE_CASH",
"acquirerId": "ACQUIRER_NONE",
"description": "Cash",
"cardNumber": null,
"vehicleRegistration": null,
"mopSurcharge": null
}
],
"shiftStartDateTime": null,
"formattedShiftStartDateTime": null,
"dateTime": "1587600000",
"formattedDateTime": "23 4 2020 12:00:00",
"items": [
{
"id": "321",
"description": "Premium 95",
"itemType": "ITEMTYPE_PLU",
"departmentDescription": "Wetstock",
"departmentType": "DEPARTMENTTYPE_WETSTOCK",
"taxRatePercent": "15.0000",
"taxRateDescription": "15% GST",
"sku": null,
"fuelGrade": 95,
"pumpNumber": 10,
"isAlcohol": false,
"isTobacco": false,
"quantity": "42.4200",
"unitPrice": "2.8790",
"formattedUnitPrice": "$2.88",
"totalPrice": "122.1272",
"formattedTotalPrice": "$122.13",
"taxComponent": "18.3191",
"formattedTaxComponent": "$18.32",
"costPrice": "1.9860",
"formattedCostPrice": "$1.99",
"isPrepay": false,
"isRefund": false,
"isAccommodation": false,
"isNotSoldIndividually": false,
"customerId": null,
"customerOrganisationName": null,
"customerFirstName": null,
"customerLastName": null,
"localDebtorCardNumber": null,
"localDebtorCardHolderName": null,
"unitsSymbol": "L",
"pumpAttendantId": null,
"pumpAttendantFirstName": null,
"pumpAttendantLastName": null
}
],
"receiptMain": "Items in sale...",
"receiptHeader": "Welcome to Fuel Station...",
"receiptFooter": "Thank you for..."
},
{
"id": 6,
"rounding": null,
"formattedRounding": "$0.00",
"change": null,
"formattedChange": "$0.00",
"transactionNumber": 123,
"total": "7.9700",
"tax": "1.1955",
"stationName": "POS2",
"stationDescription": "Secondary POS",
"formattedTotal": "$7.97",
"formattedTax": "$1.20",
"siteId": 1,
"payments": [
{
"id": 789,
"tender": "0.0000",
"tenderFormatted": "$0.00",
"customerId": 15,
"debtorFirstName": "John",
"debtorLastName": "Smith",
"debtorEmail": "johnsmith@fueltorque.co.nz",
"debtorHasEReceipt": false,
"cardHolderName": "John Smith",
"cardHolderHasEReceipt": false,
"cashOut": null,
"mopType": "MOPTYPE_LOCAL_DEBTOR",
"acquirerId": "ACQUIRER_NONE",
"description": "Local Debtor",
"cardNumber": "123456789",
"vehicleRegistration": "AAA123",
"mopSurcharge": null
}
],
"shiftStartDateTime": null,
"formattedShiftStartDateTime": null,
"dateTime": "1615295704",
"formattedDateTime": "Mar 9, 2021, 5:15:04 AM",
"items": [
{
"id": 567,
"description": "Chocolate Bar",
"itemType": "ITEMTYPE_PLU",
"departmentDescription": "Confectionary",
"departmentType": "DEPARTMENTTYPE_DRYSTOCK",
"taxRatePercent": "15.0000",
"taxRateDescription": "15% GST",
"sku": "123456789",
"fuelGrade": null,
"pumpNumber": null,
"isAlcohol": false,
"isTobacco": false,
"quantity": "1.0000",
"unitPrice": "1.9900",
"formattedUnitPrice": "$1.99",
"totalPrice": "1.9900",
"formattedTotalPrice": "$1.99",
"taxComponent": "0.2985",
"formattedTaxComponent": "$0.30",
"costPrice": "1.0375",
"formattedCostPrice": "$1.04",
"isPrepay": false,
"isRefund": false,
"isAccommodation": false,
"isNotSoldIndividually": false,
"customerId": null,
"customerOrganisationName": null,
"customerFirstName": null,
"customerLastName": null,
"localDebtorCardNumber": null,
"localDebtorCardHolderName": null,
"unitsSymbol": "",
"pumpAttendantId": null,
"pumpAttendantFirstName": null,
"pumpAttendantLastName": null
},
{
"id": 111,
"description": "Fizzy Drink",
"itemType": "ITEMTYPE_PLU",
"departmentDescription": "Drinks",
"departmentType": "DEPARTMENTTYPE_DRYSTOCK",
"taxRatePercent": "15.0000",
"taxRateDescription": "15% GST",
"sku": "987654321",
"fuelGrade": null,
"pumpNumber": null,
"isAlcohol": false,
"isTobacco": false,
"quantity": "2.0000",
"unitPrice": "2.9900",
"formattedUnitPrice": "$2.99",
"totalPrice": "2.9900",
"formattedTotalPrice": "$5.98",
"taxComponent": "0.8970",
"formattedTaxComponent": "$0.90",
"costPrice": "1.5385",
"formattedCostPrice": "$1.54",
"isPrepay": false,
"isRefund": false,
"isAccommodation": false,
"isNotSoldIndividually": false,
"customerId": null,
"customerOrganisationName": null,
"customerFirstName": null,
"customerLastName": null,
"localDebtorCardNumber": null,
"localDebtorCardHolderName": null,
"unitsSymbol": "",
"pumpAttendantId": null,
"pumpAttendantFirstName": null,
"pumpAttendantLastName": null
}
],
"receiptMain": "Items in sale...",
"receiptHeader": "Welcome to Fuel Station...",
"receiptFooter": "Thank you for..."
}
]
XML Single Entity
<?xml version="1.0" encoding="UTF-8"?>
<response>
<item>
<id>493</id>
<rounding></rounding>
<formattedRounding>$0.00</formattedRounding>
<change></change>
<formattedChange>$0.00</formattedChange>
<transactionNumber></transactionNumber>
<total>0.0000</total>
<tax>0.0000</tax>
<stationName>Host</stationName>
<stationDescription>Host</stationDescription>
<formattedTotal>$0.00</formattedTotal>
<formattedTax>$0.00</formattedTax>
<siteId>1</siteId>
<payments>
<item>
<id>11</id>
<tender>0.0000</tender>
<tenderFormatted>$0.00</tenderFormatted>
<customerId></customerId>
<debtorFirstName></debtorFirstName>
<debtorLastName></debtorLastName>
<debtorEmail></debtorEmail>
<debtorHasEReceipt>false</debtorHasEReceipt>
<cardHolderName></cardHolderName>
<cardHolderHasEReceipt>false</cardHolderHasEReceipt>
<cashOut></cashOut>
<mopType>MOPTYPE_ADJUSTMENT</mopType>
<acquirerId>ACQUIRER_NONE</acquirerId>
<description>Stock Adjustment</description>
<cardNumber></cardNumber>
<vehicleRegistration></vehicleRegistration>
<mopSurcharge></mopSurcharge>
</item>
</payments>
<shiftStartDateTime></shiftStartDateTime>
<formattedShiftStartDateTime></formattedShiftStartDateTime>
<dateTime>1603977554</dateTime>
<formattedDateTime>Oct 29, 2020, 6:19:14 AM</formattedDateTime>
<items>
<item>
<description>A</description>
<itemType>ITEMTYPE_PLU</itemType>
<departmentDescription>a</departmentDescription>
<departmentType>DEPARTMENTTYPE_DRYSTOCK</departmentType>
<taxRatePercent>15.0000</taxRatePercent>
<taxRateDescription>15% GST</taxRateDescription>
<sku></sku>
<fuelGrade></fuelGrade>
<pumpNumber></pumpNumber>
<isAlcohol>false</isAlcohol>
<isTobacco>false</isTobacco>
<quantity>123000.0000</quantity>
<unitPrice>0.0000</unitPrice>
<formattedUnitPrice>$0.00</formattedUnitPrice>
<totalPrice>0.0000</totalPrice>
<formattedTotalPrice>$0.00</formattedTotalPrice>
<taxComponent>0.0000</taxComponent>
<formattedTaxComponent>$0.00</formattedTaxComponent>
<costPrice></costPrice>
<formattedCostPrice>$0.00</formattedCostPrice>
<isPrepay>false</isPrepay>
<isRefund>false</isRefund>
<isAccommodation>false</isAccommodation>
<isNotSoldIndividually>false</isNotSoldIndividually>
<customerId></customerId>
<customerOrganisationName></customerOrganisationName>
<customerFirstName></customerFirstName>
<customerLastName></customerLastName>
<localDebtorCardNumber></localDebtorCardNumber>
<localDebtorCardHolderName></localDebtorCardHolderName>
<unitsSymbol></unitsSymbol>
<pumpAttendantId></pumpAttendantId>
<pumpAttendantFirstName></pumpAttendantFirstName>
<pumpAttendantLastName></pumpAttendantLastName>
</item>
</items>
<receiptMain></receiptMain>
<receiptHeader></receiptHeader>
<receiptFooter></receiptFooter>
</item>
</response>
XML Multiple Entities
<?xml version="1.0" encoding="UTF-8"?>
<response>
<item>
<id>5</id>
<rounding>-0.0272</rounding>
<formattedRounding>-$0.03</formattedRounding>
<change>0.9000</change>
<formattedChange>$0.90</formattedChange>
<transactionNumber>122</transactionNumber>
<total>122.1000</total>
<tax>18.3191</tax>
<stationName>POS1</stationName>
<stationDescription>Main POS</stationDescription>
<formattedTotal>$122.10</formattedTotal>
<formattedTax>$18.32</formattedTax>
<siteId>1</siteId>
<payments>
<item>
<id>654</id>
<tender>123.0000</tender>
<tenderFormatted>$123.00</tenderFormatted>
<customerId></customerId>
<debtorFirstName></debtorFirstName>
<debtorLastName></debtorLastName>
<debtorEmail></debtorEmail>
<debtorHasEReceipt>false</debtorHasEReceipt>
<cardHolderName></cardHolderName>
<cardHolderHasEReceipt>false</cardHolderHasEReceipt>
<cashOut></cashOut>
<mopType>MOPTYPE_CASH</mopType>
<acquirerId>ACQUIRER_NONE</acquirerId>
<description>Cash</description>
<cardNumber></cardNumber>
<vehicleRegistration></vehicleRegistration>
<mopSurcharge></mopSurcharge>
</item>
</payments>
<shiftStartDateTime></shiftStartDateTime>
<formattedShiftStartDateTime></formattedShiftStartDateTime>
<dateTime>1587600000</dateTime>
<formattedDateTime>23 4 2020 12:00:00</formattedDateTime>
<items>
<item>
<id>321</id>
<description>Premium 95</description>
<itemType>ITEMTYPE_PLU</itemType>
<departmentDescription>Wetstock</departmentDescription>
<departmentType>DEPARTMENTTYPE_WETSTOCK</departmentType>
<taxRatePercent>15.0000</taxRatePercent>
<taxRateDescription>15% GST</taxRateDescription>
<sku></sku>
<fuelGrade>95</fuelGrade>
<pumpNumber>10</pumpNumber>
<isAlcohol>false</isAlcohol>
<isTobacco>false</isTobacco>
<quantity>42.4200</quantity>
<unitPrice>2.8790</unitPrice>
<formattedUnitPrice>$2.88</formattedUnitPrice>
<totalPrice>122.1272</totalPrice>
<formattedTotalPrice>$122.13</formattedTotalPrice>
<taxComponent>18.3191</taxComponent>
<formattedTaxComponent>$18.32</formattedTaxComponent>
<costPrice>1.9860</costPrice>
<formattedCostPrice>$1.99</formattedCostPrice>
<isPrepay>false</isPrepay>
<isRefund>false</isRefund>
<isAccommodation>false</isAccommodation>
<isNotSoldIndividually>false</isNotSoldIndividually>
<customerId></customerId>
<customerOrganisationName></customerOrganisationName>
<customerFirstName></customerFirstName>
<customerLastName></customerLastName>
<localDebtorCardNumber></localDebtorCardNumber>
<localDebtorCardHolderName></localDebtorCardHolderName>
<unitsSymbol>L</unitsSymbol>
<pumpAttendantId></pumpAttendantId>
<pumpAttendantFirstName></pumpAttendantFirstName>
<pumpAttendantLastName></pumpAttendantLastName>
</item>
</items>
<receiptMain>Items in sale...</receiptMain>
<receiptHeader>Welcome to Fuel Station...</receiptHeader>
<receiptFooter>Thank you for...</receiptFooter>
</item>
<item>
<id>6</id>
<rounding></rounding>
<formattedRounding>$0.00</formattedRounding>
<change></change>
<formattedChange>$0.00</formattedChange>
<transactionNumber>123</transactionNumber>
<total>7.9700</total>
<tax>1.1955</tax>
<stationName>POS2</stationName>
<stationDescription>Secondary POS</stationDescription>
<formattedTotal>$7.97</formattedTotal>
<formattedTax>$1.20</formattedTax>
<siteId>1</siteId>
<payments>
<item>
<id>789</id>
<tender>7.9700</tender>
<tenderFormatted>$7.97</tenderFormatted>
<customerId>15</customerId>
<debtorFirstName>John</debtorFirstName>
<debtorLastName>Smith</debtorLastName>
<debtorEmail>johnsmith@fueltorque.co.nz</debtorEmail>
<debtorHasEReceipt>false</debtorHasEReceipt>
<cardHolderName>John Smith</cardHolderName>
<cardHolderHasEReceipt>false</cardHolderHasEReceipt>
<cashOut></cashOut>
<mopType>MOPTYPE_LOCAL_DEBTOR</mopType>
<acquirerId>ACQUIRER_NONE</acquirerId>
<description>Local Debtor</description>
<cardNumber>123456789</cardNumber>
<vehicleRegistration>AAA123</vehicleRegistration>
<mopSurcharge></mopSurcharge>
</item>
</payments>
<shiftStartDateTime></shiftStartDateTime>
<formattedShiftStartDateTime></formattedShiftStartDateTime>
<dateTime>1615295704</dateTime>
<formattedDateTime>Mar 9, 2021, 5:15:04 AM</formattedDateTime>
<items>
<item>
<id>789</id>
<description>Chocolate Bar</description>
<itemType>ITEMTYPE_PLU</itemType>
<departmentDescription>Confectionary</departmentDescription>
<departmentType>DEPARTMENTTYPE_DRYSTOCK</departmentType>
<taxRatePercent>15.0000</taxRatePercent>
<taxRateDescription>15% GST</taxRateDescription>
<sku>123456789</sku>
<fuelGrade></fuelGrade>
<pumpNumber></pumpNumber>
<isAlcohol>false</isAlcohol>
<isTobacco>false</isTobacco>
<quantity>1.0000</quantity>
<unitPrice>1.9900</unitPrice>
<formattedUnitPrice>$0.00</formattedUnitPrice>
<totalPrice>1.9900</totalPrice>
<formattedTotalPrice>$1.99</formattedTotalPrice>
<taxComponent>0.2985</taxComponent>
<formattedTaxComponent>$0.30</formattedTaxComponent>
<costPrice>1.0375</costPrice>
<formattedCostPrice>$1.04</formattedCostPrice>
<isPrepay>false</isPrepay>
<isRefund>false</isRefund>
<isAccommodation>false</isAccommodation>
<isNotSoldIndividually>false</isNotSoldIndividually>
<customerId></customerId>
<customerOrganisationName></customerOrganisationName>
<customerFirstName></customerFirstName>
<customerLastName></customerLastName>
<localDebtorCardNumber></localDebtorCardNumber>
<localDebtorCardHolderName></localDebtorCardHolderName>
<unitsSymbol></unitsSymbol>
<pumpAttendantId></pumpAttendantId>
<pumpAttendantFirstName></pumpAttendantFirstName>
<pumpAttendantLastName></pumpAttendantLastName>
</item>
<item>
<id>111</id>
<description>Fizzy Drink</description>
<itemType>ITEMTYPE_PLU</itemType>
<departmentDescription>Drinks</departmentDescription>
<departmentType>DEPARTMENTTYPE_DRYSTOCK</departmentType>
<taxRatePercent>15.0000</taxRatePercent>
<taxRateDescription>15% GST</taxRateDescription>
<sku>987654321</sku>
<fuelGrade></fuelGrade>
<pumpNumber></pumpNumber>
<isAlcohol>false</isAlcohol>
<isTobacco>false</isTobacco>
<quantity>2.0000</quantity>
<unitPrice>2.9900</unitPrice>
<formattedUnitPrice>$2.99</formattedUnitPrice>
<totalPrice>2.9900</totalPrice>
<formattedTotalPrice>$5.98</formattedTotalPrice>
<taxComponent>0.8970</taxComponent>
<formattedTaxComponent>$0.90</formattedTaxComponent>
<costPrice>1.5385</costPrice>
<formattedCostPrice>$1.54</formattedCostPrice>
<isPrepay>false</isPrepay>
<isRefund>false</isRefund>
<isAccommodation>false</isAccommodation>
<isNotSoldIndividually>false</isNotSoldIndividually>
<customerId></customerId>
<customerOrganisationName></customerOrganisationName>
<customerFirstName></customerFirstName>
<customerLastName></customerLastName>
<localDebtorCardNumber></localDebtorCardNumber>
<localDebtorCardHolderName></localDebtorCardHolderName>
<unitsSymbol></unitsSymbol>
<pumpAttendantId></pumpAttendantId>
<pumpAttendantFirstName></pumpAttendantFirstName>
<pumpAttendantLastName></pumpAttendantLastName>
</item>
</items>
<receiptMain>Items in sale...</receiptMain>
<receiptHeader>Welcome to Fuel Station...</receiptHeader>
<receiptFooter>Thank you for...</receiptFooter>
</item>
</response>
Customers
This endpoint includes all customers for the site.
- URL (multiple entities)
- https://api.fueltorque.co.nz/v1/customers
- URL (single entity, for entity with ID 42)
- https://api.fueltorque.co.nz/v1/customers/42
- Methods
- GET HEAD OPTIONS
- Filter Attributes
- creditLimit accountBalance organisationName
- Sort Attributes
- creditLimit accountBalance
Customer
The following fields are present in a Customer entity
-
id - A unique identifier for the customer
-
organisationName - The customer organisation name
-
creditLimit - The customer credit limit (e.g. 1000.0000)
-
accountBalance - The customer account balance (e.g. 0.1000)
-
localDebtorCards - See Local Debtor Cards
Local Debtor Card
The following fields are present in a Local Debtor Card entity
-
id - A unique identifier for the local debtor card
-
number - The local debtor card number
-
vehicleMake - The make of the vehicle associated with the car (if applicable)
-
vehicleModel - The model of the vehicle associated with the car (if applicable)
-
vehicleYear - The year of the vehicle associated with the car (if applicable)
-
vehicleRegistration - The registration of the vehicle associated with the car (if applicable)
Example Output
JSON Single Entity
{
"id": 1,
"organisationName": "An Organisation",
"creditLimit": 1000.0000,
"accountBalance": 0.9000,
"localDebtorCards": [
{
"id": 2,
"number": "890890",
"vehicleMake": "Toyota",
"vehicleYear": "1999",
"vehicleModel": "Corolla",
"vehicleRegistration": "AAA111"
}
]
}
JSON Multiple Entities
[
{
"id": 1,
"organisationName": "An Organisation",
"creditLimit": 1000.0000,
"accountBalance": 0.9000,
"localDebtorCards": [
{
"id": 2,
"number": "890890",
"vehicleMake": "Toyota",
"vehicleYear": "1999",
"vehicleModel": "Corolla",
"vehicleRegistration": "AAA111"
}
]
},
{
"id": 2,
"organisationName": "Other Organisation",
"creditLimit": 500.0000,
"accountBalance": 100.2000,
"localDebtorCards": []
}
]
XML Single Entity
<?xml version="1.0" encoding="UTF-8"?>
<response>
<item>
<id>1</id>
<organisationName>An Organisation</organisationName>
<creditLimit>1000.0000</creditLimit>
<accountBalance>0.9000</accountBalance>
<localDebtorCards>
<item>
<id>2</id>
<number>890890</number>
<vehicleMake>Toyota</vehicleMake>
<vehicleYear>1999</vehicleYear>
<vehicleModel>Corolla</vehicleModel>
<vehicleRegistration>AAA111</vehicleRegistration>
</item>
</localDebtorCards>
</item>
</response>
XML Multiple Entities
<?xml version="1.0" encoding="UTF-8"?>
<response>
<item>
<id>1</id>
<organisationName>An Organisation</organisationName>
<creditLimit>1000.0000</creditLimit>
<accountBalance>0.9000</accountBalance>
<localDebtorCards>
<item>
<id>2</id>
<number>890890</number>
<vehicleMake>Toyota</vehicleMake>
<vehicleYear>1999</vehicleYear>
<vehicleModel>Corolla</vehicleModel>
<vehicleRegistration>AAA111</vehicleRegistration>
</item>
</localDebtorCards>
</item>
<item>
<id>2</id>
<organisationName>Other Organisation</organisationName>
<creditLimit>500.0000</creditLimit>
<accountBalance>100.2000</accountBalance>
<localDebtorCards/>
</item>
</response>
Remote Payments
This endpoint allows for the creation / cancellation of remote payment requests for the site.
- URL (multiple entities)
- https://api.fueltorque.co.nz/v1/remote-payments
- Methods
- GET POST HEAD OPTIONS
- URL (single entity, for entity with ID 42)
- https://api.fueltorque.co.nz/v1/remote-payments/42
- Methods
- GET DELETE HEAD OPTIONS
Remote Payment
The following fields are present in a remote payment entity and required on creation of a remote payment.
-
id - A unique identifier for the remote payment
-
localDebtorCardNumber - The Customer's Local Debtor Card used for the transaction.
-
dollarLimit - The currency limit on the pump authorisation.
-
paymentMethodId - The change amount for the sale (e.g. 0.1000)
-
fuelGrade - The fuel grade selected for the Fuelling Point (e.g. 95).
-
fuellingPointId - The ID of the associated Fuelling Point (not present in entity in GET request)
The following fields are present in the entity but not required on creation of a remote payment
-
pumpNumber - The pump number of the pump associated with the remote payment request (e.g. 5).
-
eventStatus - The ID for the Customer's Local Debtor Card used for the transaction.
-
deliveryStatus - The ID for the Customer's Local Debtor Card used for the transaction.
-
financialStatus - The ID for the Customer's Local Debtor Card used for the transaction.
Enums
Event Status
-
PHONEPAY_INPROGRESS - In Progress
-
PHONEPAY_COMPLETED - Completed
-
PHONEPAY_CANCELLED - Cancelled
Delivery Status
-
PPD_PROPOSAL_REJECTED - Proposal rejected by Backoffice
-
PPD_PROPOSAL_NOT_AUTHORISED - Proposal unable to be authorised by Backoffice
-
PPD_PROPOSAL_AUTHORISED - Proposal authorised by Backoffice
-
PPD_PROPOSAL_NOT_CANCELLED - Proposal not able to be cancelled by Backoffice
-
PPD_PROPOSAL_CANCELLED - Proposal successfully cancelled by Backoffice
-
PPD_PROPOSAL_ACCEPTED - Proposal accepted by Backoffice
-
PPD_PROPOSAL_APPROVED - Proposal approved by Host
-
PPD_PROPOSAL_CANCEL - Proposal cancelled by Host
-
PPD_PROPOSAL_DECLINED - Proposal declined by Host
-
PPD_PROPOSAL_DELIVERED - Proposal delivered, pending payment finalisation
-
PPD_PROPOSAL_REQUEST - Proposal requested from Phone
-
PPD_PROPOSAL_SELECTING - Awaiting Proposal from Phone
Financial Status
-
PPF_PAYMENT_SELECTING - Awaiting Payment Method
-
PPF_PAYMENT_AUTHORISATION_PENDING - Awaiting Authorisation
-
PPF_PAYMENT_AUTHORISATION_APPROVED - Authorisation Approved
-
PPF_PAYMENT_AUTHORISATION_DECLINED - Authorisation Declined
-
PPF_PAYMENT_CANCEL_PENDING - Authorisation Cancel Pending
-
PPF_PAYMENT_CANCELLED - Authorisation Cancelled
-
PPF_PAYMENT_POST_PENDING - Payment Post Pending
-
PPF_PAYMENT_POSTED - Payment Posetd
Fuelling Points
This endpoint includes all fuelling points for the site.
- URL (multiple entities)
- https://api.fueltorque.co.nz/v1/fuelling-points
- URL (single entity, for entity with ID 42)
- https://api.fueltorque.co.nz/v1/fuelling-points/42
- Methods
- GET HEAD OPTIONS
Fuelling Point
The following fields are present in a Fuelling Point entity.
-
id - A unique identifier for the fuelling point
-
pumpNumber - The pump display number
-
fuellingPointNumber - The internal fuelling point number
-
products - See Products
Products
The following fields are present in a Product entity
-
product - Product number
-
fuelGrade - Fuel grade number
-
description - Description of the fuel grade
Example Output
JSON Single Entity
{
"id": 10,
"loopNumber": 1,
"pumpNumber": 1,
"fuellingPointNumber": 1,
"products": [
{
"product": 1,
"fuelGrade": 1,
"description": "91"
},
{
"product": 2,
"fuelGrade": 2,
"description": "95"
}
]
}
JSON Multiple Entities
[
{
"id": 10,
"loopNumber": 1,
"pumpNumber": 1,
"fuellingPointNumber": 1,
"products": [
{
"product": 1,
"fuelGrade": 1,
"description": "91"
},
{
"product": 2,
"fuelGrade": 2,
"description": "95"
}
]
},
{
"id": 11,
"loopNumber": 1,
"pumpNumber": 2,
"fuellingPointNumber": 2,
"products": [
{
"product": 1,
"fuelGrade": 1,
"description": "91"
},
{
"product": 2,
"fuelGrade": 2,
"description": "95"
},
{
"product": 3,
"fuelGrade": 3,
"description": "Diesel"
}
]
}]
XML Single Entity
<?xml version="1.0" encoding="UTF-8"?>
<response>
<item>
<id>10</id>
<loopNumber>1</loopNumber>
<pumpNumber>1</pumpNumber>
<fuellingPointNumber>1</fuellingPointNumber>
<pumpNumber>1</pumpNumber>
<products>
<item>
<product>1</product>
<fuelGrade>1</fuelGrade>
<description>91</description>
</item>
<item>
<product>2</product>
<fuelGrade>2</fuelGrade>
<description>95</description>
</item>
</products>
</item>
</response>
XML Multiple Entities
<?xml version="1.0" encoding="UTF-8"?>
<response>
<item>
<id>10</id>
<loopNumber>1</loopNumber>
<pumpNumber>1</pumpNumber>
<fuellingPointNumber>1</fuellingPointNumber>
<pumpNumber>1</pumpNumber>
<products>
<item>
<product>1</product>
<fuelGrade>1</fuelGrade>
<description>91</description>
</item>
<item>
<product>2</product>
<fuelGrade>2</fuelGrade>
<description>95</description>
</item>
</products>
</item>
<item>
<id>11</id>
<loopNumber>1</loopNumber>
<pumpNumber>2</pumpNumber>
<fuellingPointNumber>2</fuellingPointNumber>
<pumpNumber>2</pumpNumber>
<products>
<item>
<product>1</product>
<fuelGrade>1</fuelGrade>
<description>91</description>
</item>
<item>
<product>2</product>
<fuelGrade>2</fuelGrade>
<description>95</description>
</item>
<item>
<product>3</product>
<fuelGrade>3</fuelGrade>
<description>Diesel</description>
</item>
</products>
</item>
</response>
Sale Data Options
This endpoint includes Sale Data Options available to add as extra data to a Remote Payment through the Remote Payment Extra Data endpoint
- URL
- https://api.fueltorque.co.nz/v1/sale-data-options
- Methods
- GET HEAD OPTIONS
-
id - A unique identifier for the Sale Data Option
-
prompt - The prompt for the Data Option, i.e. what is shown on the POS during a sale
-
description - The description of the Sale Data Option
-
numeric - Whether the 'data' field provided to the Remote Payment Extra Data endpoint is expected to be numeric
Example Output
JSON Single Entity
{
"id": "DATA_SUPERGOLDCARD",
"prompt": "Enter Super Gold Card Number",
"description": "Super Gold Card",
"numeric": true
}
JSON Multiple Entities
[
{
"id": "DATA_SUPERGOLDCARD",
"prompt": "Enter Super Gold Card Number",
"description": "Super Gold Card",
"numeric": true
},
{
"id": "DATA_VEHICLEREGISTRATION",
"prompt": "Enter Vehicle Registration Number",
"description": "Registration",
"numeric": false
},
{
"id": "DATA_VEHICLEFLEET",
"prompt": "Enter Vehicle Fleet Number",
"description": "Fleet",
"numeric": true
}
]
XML Single Entity
<?xml version="1.0" encoding="UTF-8"?>
<response>
<item>
<id>DATA_SUPERGOLDCARD</id>
<prompt>Enter Super Gold Card Number</prompt>
<description>Super Gold Card</description>
<numeric>true</numeric>
</item>
</response>
XML Multiple Entities
<?xml version="1.0" encoding="UTF-8"?>
<response>
<item>
<id>DATA_SUPERGOLDCARD</id>
<prompt>Enter Super Gold Card Number</prompt>
<description>Super Gold Card</description>
<numeric>true</numeric>
</item>
<item>
<id>DATA_VEHICLEREGISTRATION</id>
<prompt>Enter Vehicle Registration Number</prompt>
<description>Registration</description>
<numeric>false</numeric>
</item>
<item>
<id>DATA_VEHICLEFLEET</id>
<prompt>Enter Vehicle Fleet Number</prompt>
<description>Fleet</description>
<numeric>true</numeric>
</item>
</response>
Remote Payment Extra Data
This endpoint includes Sale Data Options available to add as extra data to a Remote Payment through the Remote Payment Extra Data endpoint
- URL (multiple entities)
- https://api.fueltorque.co.nz/v1/remote-payment-extra-data
- Methods
- GET POST HEAD OPTIONS
- URL (single entity, for entity with ID 42)
- https://api.fueltorque.co.nz/v1/remote-payment-extra-data/42
- Methods
- GET PUT PATCH DELETE HEAD OPTIONS
- Filter Attributes
- remotePaymentId
Remote Payment Extra Datum
The following fields are present in a Remote Payment Extra Data entity and (except for
id
) required on creation.
-
id - A unique identifier for the Remote Payment Extra Datum
-
remotePaymentId - The ID of the Remote Payment the extra data is associated with.
-
saleDataOptionId - The ID of the Sale Data Option.
-
dataTypeId - The ID of the Data Type (This determines whether the extra data is associated with the Sale Item or the MOP).
Enums
Data Types
-
EXTRADATATYPE_MOP - MOP Extra Data
-
EXTRADATATYPE_ITEM - Item Extra Data
Example Output
JSON Single Entity
{
"id": 5,
"data": "Some item data...",
"remotePaymentId": 23,
"saleDataOptionId": "DATA_REFERENCE",
"dataTypeId": "EXTRADATATYPE_ITEM"
}
JSON Multiple Entities
[
{
"id": 5,
"data": "Some item data...",
"remotePaymentId": 23,
"saleDataOptionId": "DATA_REFERENCE",
"dataTypeId": "EXTRADATATYPE_ITEM"
},
{
"id": 4,
"data": "SOME DATA",
"remotePaymentId": 23,
"saleDataOptionId": "DATA_STORE_NAME",
"dataTypeId": "EXTRADATATYPE_MOP"
}
]
XML Single Entity
<?xml version="1.0" encoding="UTF-8"?>
<response>
<id>1</id>
<data>SOME DATA</data>
<remotePaymentId>23</remotePaymentId>
<saleDataOptionId>DATA_STORE_NAME</saleDataOptionId>
<dataTypeId>EXTRADATATYPE_ITEM</dataTypeId>
</response>
XML Multiple Entities
<?xml version="1.0" encoding="UTF-8"?>
<response>
<item>
<id>5</id>
<data>Some item data...</data>
<remotePaymentId>23</remotePaymentId>
<saleDataOptionId>DATA_REFERENCE</saleDataOptionId>
<dataTypeId>EXTRADATATYPE_ITEM</dataTypeId>
</item>
<item>
<id>4</id>
<data>SOME DATA</data>
<remotePaymentId>23</remotePaymentId>
<saleDataOptionId>DATA_STORE_NAME</saleDataOptionId>
<dataTypeId>EXTRADATATYPE_MOP</dataTypeId>
</item>
</response>