Get Sale List

Service Address

Request Parameters

DealerSaleAuthentication

Parameter Explanation
DealerCode(string) Dealer code issued by the Moka system
Username (string) Api username given by Moka system
Password (string) Api password given by Moka system
CheckKey (string) The control key (DealerCode + "MK" + Username + "PD" + Password) is created by passing this information, combined as a String, through the SHA-256 hash algorithm.
Click here to go to the trial screen.

Sample Request (JSON)


{
   "DealerSaleAuthentication":{
      "DealerCode":"xxx",
      "Username":"xxx",
      "Password":"xxx",
      "CheckKey":"aabbccddeeff"
   }
}

Successful Request Result

Parameter Explanation
DealerSaleListCount (integer) Number of records in the sales list
DealerSaleList (Array) Sales list

DealerSaleId (integer) On the Moka side, it is the Unique ID of the sale.
SaleCode (string) On the dealer side, it is the code of the sale.
DealerCustomerId (integer) On the Moka side, it is the Unique ID of the customer.
CustomerCode (string) On the dealer side, it's the customer's code.
DealerProductId (integer) On the Moka side, it is the Unique ID of the product.
ProductCode (string) On the dealer side, it is the code of the product.
Amount (decimal) The amount to be charged on each payment.
Currency (string) Currency, if not sent, TL is accepted (TL, USD, EUR)
InstallmentNumber (integer) Installment is the number, if not sent, one shot will be accepted (1..12)
DealerSaleScheduleId (integer) It is the ID of the time program.
SaleDate (date) Date of sale (in YYYYMMDD format, ex: "20170918")
BeginDate (date) From what date will the payments for this sale begin? (in YYYYMMDD format, ex: "20170918")
EndDate (date) What date will the payments for this sale end? If an end date is not given (an empty string is sent or this field is not sent at all), regular withdrawals will continue until the sale is deleted or the EndDate is updated (in YYYYMMDD format, eg "19901218")
HowManyTrial (integer) If the card is unsuccessful, how many more days will the withdrawal be attempted?
Description (string) Description detail field (Max 200 chars)
PlanType (integer) (1: Payment steps are created automatically according to the given time schedule, 2: Payment steps must be created manually, 3: Payment steps can be created both manually and automatically.) If the payment step is to be created manually, this service sets DealerSaleScheduleId to 0.
DealerCustomerTypeId (integer) If payment is to be made by sending a payment request to the customer, not from a hidden card, the customer type ID is entered in this field. The Dealer-specific Customer type is created by Moka and this Id is forwarded to the dealer who will send the payment request in advance.r.
DefaultCard1Token (guid) From which card will the payment be made?
DefaultCard2Token (guid) If payment cannot be made from the first card, which card will be tried.
DefaultCard3Token (guid) If the first 2 cards do not work, which card will be tried last..

Successful Result Example


{
   "Data":{
      " DealerSaleListCount":1,
      "DealerSaleList":[
         {
            "DealerSaleId":1003,
            "SaleCode":"satis",
            "DealerCustomerId":1034,
            "CustomerCode":"Customer",
            "DealerProductId":1009,
            "ProductCode":"Product01",
            "Amount":1.00,
            "Currency":"TL",
            "InstallmentNumber":1,
            "DealerSaleScheduleId":1005,
            "SaleDate":"20170821",
            "BeginDate":"20170821",
            "EndDate":"20171230",
            "HowManyTrial":1,
            "Description":"",
            "PlanType":1,
            "DealerCustomerTypeId":0,
            "DefaultCard1Token":"9de41bb0-e82f-4670-b36b-d71ff27a3111",
            "DefaultCard2Token":"",
            "DefaultCard3Token":""
         }
      ]
   },
   "ResultCode":"Success",
   "ResultMessage":"",
   "Exception":null
}

Failed Request Result

ResultCodeExplanation
DealerSale.GetSale.InvalidRequestThe CheckKey may be bad, or the object may be bad, or the JSON may be corrupt..
DealerSale.GetSaleList.PermissionDenied Permission denied.
DealerSale.GetSaleList.DealerSaleNotFundNo dealers found.
EX An unexpected error has occurred

Example of Failed Result


{
   "Data":null,
   "ResultCode":"DealerSale. GetSaleList.DealerSaleNotFound",
   "ResultMessage":"",
   "Exception":null
}