List income documents

Credentials

Retrieve a list of income documents for the authenticated seller. Documents the seller created in the Keep app are included.

Parameters

Name In Type Required Description
page query integer no Page number. Minimum 0, default 0.
limit query integer no Items per page. Positive number, at most 500; use a whole-number item count. Default 10.
documentTypes query string no Filter by document type. Repeat for several types. Allowed values: invoice, receipt, invrec, deal, refund, offer.
fromDate query string no Filter documents from this date
toDate query string no Filter documents until this date
documentNumber query string no Document number, digits
clientEmail query string no Client email
field query string no Sort field. Default docValueDate.
sort query string no Sort direction: asc or desc. Default desc.

Code samples

curl

curl -X GET 'https://<partner_domain>.keep.co.il/seller/api/documents/income' \
  -H 'Authorization: Bearer <YOUR_TOKEN>'

Node.js

const response = await fetch("https://<partner_domain>.keep.co.il/seller/api/documents/income", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <YOUR_TOKEN>",
  },
});

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

Python

import requests

response = requests.get(
    "https://<partner_domain>.keep.co.il/seller/api/documents/income",
    headers={
        "Authorization": "Bearer <YOUR_TOKEN>",
    },
)

print(response.text)

PHP

<?php

$ch = curl_init('https://<partner_domain>.keep.co.il/seller/api/documents/income');
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.page integer
payload.limit integer
payload.total integer
payload.items array
payload.items[].id string
payload.items[].type string
payload.items[].docValueDate string
payload.items[].title string
payload.items[].docLang string
payload.items[].docRegulationId string
payload.items[].currency string
payload.items[].discount number
payload.items[].vatAmount number
payload.items[].totalWithVat number
payload.items[].url string

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 HTTP status code
message string Error message(s)
error string Error type
{
  "statusCode": 401,
  "message": "Unauthorized",
  "error": "Unauthorized"
}