End Transaction

Overview - Step 4 of 4 Upload Steps

More Than Rewards logs every single "line item" for the overall transaction / invoices within our system.  This is done by posting 1000 records at a time to the logpartsale, logvehiclesale,logservicesale,logcustomer, and loginventory api.  The end transaction tells us that your done uploading records to, make sure you read the GettingStartedGuide if you have not.  

THE LAST THING YOU CALL 
This is the last thing you'll call which tells us that you're done uploading and we should being to import this entire transaction in our system.  This does a final "check" and if everything matches it processes, it compares the total records inserted with the expected records and if everything looks good it finalizes everything. 

VERY IMPORTANT

  • DO NOT use the same transaction ID for each feed type, instead it's just 1 transaction per feed.  
  • When your posting the transactions please try to do them in sequence, meaning do not post part sales at the same time as service sales,  instead get a transactionid post all the part sales, endthetransaction,  then begin the transaction again post the service sales under the new transaction, and so on. 
  • If after 8 hours hours any records posted which are missing "end transaction" record are purged.  
  • The sales data that is imported in MTR does not import "Time" since a lot of the Dealer Systems do not store the exact time of the transaction.   Therefore you should always always assume the start date and end date of the data requests will must have the ENTIRE DAY worth of transactions regardless of the time used.  
  • The MTR system assumes your uploading data daily, so in most cases your start date and end date will be a single date range, however be advised that we do run "week" runs on the weekends, so the date range may be larger than 24 hours that are returned to you when calling this on a Sunday.  

  https://api.riderrewards.com/endtransaction 

- SSL is required

Headers

Name  Required      Empty Allowed   Notes
transactionidYesNoThis is the unique identifier for a transaction, generated by the BeginTransaction API endpoint. Links all the uploaded data together for a given feed.
PartnerAPIKeyYesNoAPI Key for approved partners, to be provided by More Than Rewards. To become an approved partner call More Than Rewards at 414-326-4100.
RRStoreAPIKeyYesNoStore's API key within the Rider Rewards system. Retrieved via the  GetMyDealerList  API endpoint.
RRStoreIDYesNoUnique store identifier within the Rider Rewards system. Retrieved via the GetMyDealerList  API endpoint.

* An error will not result if Max Length is exceeded. Data will be trimmed to this length.
+ These are set in the header WITHOUT base64, just regular header values.

Expected JSON Body To POST

{
  "transactionsummary": {
    "transactionid": "asdfas234234234h323guid1232",
    "partnertransactionid": "12154",
    "partnerstoreid": "12154",    
    "feedtype": "C",
    "startdate": null,
    "enddate": null
  }
}


Body Description

Field  Required      Empty Allowed   Notes
transactionsummary

Object containing fields described below.
 transactionid
YesNoThis is the unique identifier for a transaction, generated by the BeginTransaction API endpoint. Links all the uploaded data together for a given feed.
  partnertransactionid
NoYesField designed for API user (Partner) to pass their own reference / key to identify a transaction within the Rider Rewards System. Could be used in future API's for look ups.
 partnerstoreid
NoYesField designed for Partner's to pass their own reference / key to identify a store within the Rider Rewards System. Could be used in future API's for look ups.
 feedtype
YesNoC = Customer
startdate
YesYesThis should be null or empty string for the Customer feed. This is due to Customer data not being specific to a given date range. Customer data is uploaded in its entirety. Retrieved via the Ready Feed Upload endpoint.
enddate
YesYesThis should be null or empty string for the Customer feed. This is due to Customer data not being specific to a given date range. Customer data is uploaded in its entirety.
Retrieved via the Ready Feed Upload endpoint.

* An error will not result if Max Length is exceeded. Data will be trimmed to this length.

Sample Results

Success Message

{
  "results": {
    "message": "Success",
    "transactionid": "asdfas234234234h323guid1232",
    "partnertransactionid": "agwwer1232",
    "PartnerStoreID": "12154"   
  }
}

Sample Failure Message

{
  "results": { "error": "Authentication failed" }
}