Get tax predictions

Credentials

Retrieve tax predictions for a seller

Parameters

Name In Type Required Description
socialId query string yes Seller's Israeli ID number: digits only, with a valid check digit.
reportingYear query string yes Reporting year, 4 digits
reportingMonths[] query string yes A month as a two-digit string, 01 to 12. Repeat the parameter once per month, at most 12: reportingMonths[]=06&reportingMonths[]=08. Without the brackets (reportingMonths=06) the request is rejected with 400.

Code samples

curl

curl -X GET 'https://<partner_domain>.keep.co.il/partner/api/statistic/tax-predictions?socialId=<socialId>&reportingYear=<reportingYear>&reportingMonths%5B%5D=<reportingMonths[]>' \
  -H 'Authorization: Bearer <YOUR_TOKEN>'

Node.js

const response = await fetch("https://<partner_domain>.keep.co.il/partner/api/statistic/tax-predictions?socialId=<socialId>&reportingYear=<reportingYear>&reportingMonths%5B%5D=<reportingMonths[]>", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <YOUR_TOKEN>",
  },
});

console.log(await response.text());

Python

import requests

response = requests.get(
    "https://<partner_domain>.keep.co.il/partner/api/statistic/tax-predictions?socialId=<socialId>&reportingYear=<reportingYear>&reportingMonths%5B%5D=<reportingMonths[]>",
    headers={
        "Authorization": "Bearer <YOUR_TOKEN>",
    },
)

print(response.text)

PHP

<?php

$ch = curl_init('https://<partner_domain>.keep.co.il/partner/api/statistic/tax-predictions?socialId=<socialId>&reportingYear=<reportingYear>&reportingMonths%5B%5D=<reportingMonths[]>');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer <YOUR_TOKEN>',
    ],
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

Responses

200 — Successful response (success)

Field Type Description
payload object
payload.predictions array
payload.predictions[].reportingYear string
payload.predictions[].reportingMonth string
payload.predictions[].totalIncomesWithoutVat number
payload.predictions[].totalIncomesOriginTaxDeduction number
payload.predictions[].totalDeductibleExpenses number
payload.predictions[].yearlyPredictedProfit number
payload.predictions[].predictedTaxAmount number
payload.predictions[].paychecksPredictedSalary number
payload.predictions[].paychecksPredictedTax number
payload.predictions[].refundPointsValue number
payload.predictions[].predictedTaxRateADV number
payload.reportingYear string
payload.reportingMonths array
payload.seller object
payload.seller.firstName string
payload.seller.lastName string
payload.seller.sellerStatus integer Seller status: -1 new, 0 closed, 1 active.
payload.seller.accountEmail string
payload.seller.phone string
payload.seller.businessNumber integer
payload.seller.businessType integer Business type, the same numeric codes as businessType in Create seller (-1 other).
payload.seller.industryClassificationId integer
payload.seller.idNumber integer
payload.seller.socialSecurityAdvAmount number

400 — Bad Request (error)

Field Type Description
statusCode integer HTTP status code
message string Error message(s)
error string Error type
{
  "statusCode": 400,
  "message": [
    "Validation failed"
  ],
  "error": "Bad Request"
}

401 — Unauthorized (error)

Field Type Description
statusCode integer
message string
{
  "statusCode": 401,
  "message": "Unauthorized"
}

404 — No seller has this ID number. Message: Seller not found. (error)

Field Type Description
statusCode integer HTTP status code
message string Error message(s)
error string Error type