CaspitWeb API Help

BankDeposits

יצירה ושליפה של הפקדות בנק

APIDescription
GET api/v1/BankDeposits?token={token}&page={page}&startDate={startDate}&endDate={endDate}&number={number}

CancelDocument

Cancel a CaspitWeb's documents. A document is an Invoice, a Receipt, etc.

APIDescription
POST api/v1/CancelDocument/{id}?token={token}&documentNumber={documentNumber}&trxTypeId={trxTypeId}&inCaseOfErrorReturnHttpCode={inCaseOfErrorReturnHttpCode}

Cancel a document. Example:
curl.exe --verbose -X POST "http://app.caspit.biz/api/v1/CancelDocument/doc14245?token=zzzz"

ChargeCreditCard

Charge a credit card using a credit card token, expiration date, CVV and TZ

APIDescription
POST api/v1/ChargeCreditCard?token={token}&inCaseOfErrorReturnHttpCode={inCaseOfErrorReturnHttpCode}

Charge a credit card using a token, expiration date, CVV and TZ

Contacts

Get contacts (customers, suppliers)

APIDescription
GET api/v1/Contacts?token={token}&page={page}&pageSize={pageSize}

Get a list of contacts

GET api/v1/Contacts/{id}?token={token}

Get a contact via its id

GET api/v1/Contacts?osekMorshe={osekMorshe}&d={d}&token={token}

Get a contact by its tax number (מספר עוסק מורשה)
Examples:
GET api/v1/Contacts/?token=_TOKEN_&osekMorshe=123456789&d=1
If the contact is not found ==> Exception

GET api/v1/Contacts?email={email}&token={token}&page={page}

Get contacts by email address
Examples:
GET api/v1/Contacts/?token=_TOKEN_&email=support@caspit.biz
or GET api/v1/Contacts/?token=_TOKEN_&email=support@caspit.biz&page=1
If the contact is not found ==> Exception

GET api/v1/Contacts/{id}/{association}?d={d}&token={token}

Get the documents of a customer (e.g. Invoices, Receipts) or Expenses of a supplier for the given contact
Examples:
GET /api/v1/Contacts/Cust6268/expenses?d=1&token=_TOKEN_
GET /api/v1/Contacts/Supplier3909/documents?token=_TOKEN_&d=1
If the contact is not found ==> Exception

POST api/v1/Contacts?token={token}&inCaseOfErrorReturnHttpCode={inCaseOfErrorReturnHttpCode}

יצירת לקוח חדש

PUT api/v1/Contacts/{id}?token={token}

עדכון לקוח קיים
If the contact is not found ==> Exception

DELETE api/v1/Contacts/{id}?token={token}

Delete a contact.
If the contact is not found ==> Exception

ContactsBalance

Get contacts (customers, suppliers) balance

APIDescription
GET api/v1/ContactsBalance?token={token}&page={page}&pageSize={pageSize}

Get a list of contacts balance records
If you need the full details of the contacts then use the GET Contacts API.

CreditCard

Save credit card details and get a token that represents the credit card for future billing.

APIDescription
POST api/v1/CreditCard?token={token}&inCaseOfErrorReturnHttpCode={inCaseOfErrorReturnHttpCode}

Get a credit card token

Currencies

Get a list of currencies. The list is a list of CaspitCurrency. Take a look at the CaspitCurrency class located in the SDK under CaspitWeb.Api project in the Models directory

APIDescription
GET api/v1/Currencies?token={token}&page={page}

Get a list of Currencies

Documents

Create or modify CaspitWeb's documents. A document is an Invoice, a Receipt, etc.

APIDescription
GET api/v1/Documents?token={token}&trxTypeId={trxTypeId}&page={page}&CustomerId={CustomerId}&Number={Number}&onlyOpenDocuments={onlyOpenDocuments}&datStart={datStart}&datEnd={datEnd}

No documentation available.

GET api/v1/Documents/{id}?token={token}

Get a document by its id

POST api/v1/Documents?token={token}&inCaseOfErrorReturnHttpCode={inCaseOfErrorReturnHttpCode}

Create a new document

PUT api/v1/Documents?token={token}&inCaseOfErrorReturnHttpCode={inCaseOfErrorReturnHttpCode}

Update an existing document

EMAIL api/v1/Documents/{id}?token={token}&documentNumber={documentNumber}&trxTypeId={trxTypeId}&lan={lan}&inCaseOfErrorReturnHttpCode={inCaseOfErrorReturnHttpCode}

Send a document via mail.
Note: To invoke this call you will have to use a non-standard Http verb: EMAIL . Example:
curl.exe --verbose -X EMAIL "http://app.caspitweb.biz/api/v1/Documents/doc14245?token=zzzz"
Alternatively you can use the EmailDocument API call. It has identical functionality but uses POST

PRINT api/v1/Documents/{id}?token={token}&documentNumber={documentNumber}&trxTypeId={trxTypeId}&lan={lan}&createSignedPdf={createSignedPdf}

Emulate the printing of a document to paper.
If the document in status חדש then Caspit will change the status to הודפס and will run all the logic relevant
to printing a document, e.g. decreasing the number of items in the inventory.
If the document is in status הודפס or מבוטל then Caspit will skip the printing logic.
Will return the URL for fetching the PDF in the location header of the response similar to
http://casp.it/MvBmPgljEb

EmailDocument

Create or modify CaspitWeb's documents. A document is an Invoice, a Receipt, etc.

APIDescription
POST api/v1/EmailDocument/{id}?token={token}&documentNumber={documentNumber}&trxTypeId={trxTypeId}&lan={lan}&inCaseOfErrorReturnHttpCode={inCaseOfErrorReturnHttpCode}

Send a document via mail. Example:
curl.exe --verbose -X POST "http://app.caspitweb.biz/api/v1/EmailDocument/doc14245?token=zzzz"

ExpensePayments

Get a list of payments for expenses for a given period

APIDescription
GET api/v1/ExpensePayments?token={token}&page={page}&startDate={startDate}&endDate={endDate}

Get ExpensePayments for a given period.
Returns a max of 50 records from the given page

Expenses

Get a list of Expenses for a given period

APIDescription
GET api/v1/Expenses?token={token}&page={page}&startDate={startDate}&endDate={endDate}&status={status}

Get Expenses for a given period.
Returns a max of 50 records from the given page

POST api/v1/Expenses?token={token}&inCaseOfErrorReturnHttpCode={inCaseOfErrorReturnHttpCode}

GenerateDeferredPaymentsInvoices

APIDescription
POST api/v1/GenerateDeferredPaymentsInvoices?token={token}

This method can only be used by Account 0

POST api/v1/GenerateDeferredPaymentsInvoices?businessId={businessId}&endDate={endDate}

No documentation available.

Hashavshevet

יצוא של חשבונות או תנועות לקובץ בפורמט חשבשבת

APIDescription
GET api/v1/Hashavshevet?token={token}&startDate={startDate}&endDate={endDate}&exportType={exportType}

Get either movein or heshin for Hashavshevet.
movein.dat is formatted as described in /FaqItem.aspx?id=161
heshin.dat is formatted as described in Caspit's heshin.prm file. (/uploads/heshin.prm)

Kupa

APIDescription
GET api/v1/Kupa?token={token}&page={page}&startDate={startDate}&endDate={endDate}&deposited={deposited}

שליפה של התקבולים שהתקבלו ונמצאים בקופה או שהופקדו לבנק

LastDocumentsNumbers

APIDescription
GET api/v1/LastDocumentsNumbers?token={token}

Get the last document numbers of all the TrxTypes in Caspit
Last is based on the max Document id (and not date, not biggest number)

Log

Get the Caspit log entries. This is helpfull if you receive an error containing no description, only a log id

APIDescription
GET api/v1/Log?token={token}&page={page}&startDate={startDate}&endDate={endDate}&logId={logId}

Get the log records filtered by the login user name
The login user name is what you used to get the token.

OpenAPIToken

Get a token that will allow you to use the API calls.

APIDescription
GET api/v1/OpenAPIToken?token={token}

Get the current OpenAPIToken. Example:
{
"AccessToken": "AAIgNmNlNmI2MDA4YjU3YjNjMGRiZjZmNTk5ZDhhNjI0MjXsKK9mEBiIGafBus-J69J3BxEP8mM33x80J-WUjS5a8VuIT9WO9l6TGw_Hydoj6jCB3TDNlSgIwqXJJtYls4zrQZvzEBTLcmmJdI6hre3mgA",
"AccessTokenValidDate": "2023-10-12T18:11:19.363",
"RefreshToken": "AALvK5Tt1IyH2hc46L80LMTyt94krs0_B-vVCc7y4106EcTK1xfUggVYIpXYRBS9Lz9jxOHa3DmBZqM1Hf8XMzx0nH-BiXXULS_9a0_6kFW2jg",
"RefreshTokenValidDate": "2024-01-10T18:01:18.363"
}

POST api/v1/OpenAPIToken?token={token}&inCaseOfErrorReturnHttpCode={inCaseOfErrorReturnHttpCode}

Save a new OpenAPI Token to the database

Pdf

Get PDF documents

APIDescription
GET api/v1/Pdf/{id}?token={token}&documentNumber={documentNumber}&trxTypeId={trxTypeId}&lan={lan}

Stream the PDF file of the given document.
If the document is a Computerized Document then the method returns a digitally-signed "Original" PDF document.
If the document was printed to paper then the method returns a "Copy" non-signed PDF document.

PreAuthorizedDebits

Manage PreAuthorizedDebit (הוראות קבע)

APIDescription
GET api/v1/PreAuthorizedDebits?token={token}&page={page}

שליפה של רשימה של הוראות קבע

GET api/v1/PreAuthorizedDebits/{id}?token={token}

Get a PreAuthorizedDebit via its id

POST api/v1/PreAuthorizedDebits?token={token}&inCaseOfErrorReturnHttpCode={inCaseOfErrorReturnHttpCode}

יצירת הוראת קבע חדשה

PUT api/v1/PreAuthorizedDebits/{id}?token={token}

עדכון הוראת קבע קיימת
If the PreAuthorizedDebit is not found ==> Exception

DELETE api/v1/PreAuthorizedDebits/{id}?token={token}

Delete a contact.
If the contact is not found ==> Exception

PrintDocument

Create or modify CaspitWeb's documents. A document is an Invoice, a Receipt, etc.

APIDescription
POST api/v1/PrintDocument/{id}?token={token}&documentNumber={documentNumber}&trxTypeId={trxTypeId}&lan={lan}&createSignedPdf={createSignedPdf}&inCaseOfErrorReturnHttpCode={inCaseOfErrorReturnHttpCode}

Emulate the printing of a document to paper.
If the document in status חדש then Caspit will change the status to הודפס and will run all the logic relevant
to printing a document, e.g. decreasing the number of items in the inventory.
If the document is in status הודפס or מבוטל then Caspit will skip the printing logic.
Will return the URL for fetching the PDF in the location header of the response similar to
http://casp.it/MvBmPgljEb

Products

APIDescription
GET api/v1/Products?token={token}&page={page}

Get all the products from Caspit

GET api/v1/Products/{id}?token={token}

Get an existing product from Caspit

GET api/v1/Products?catalogNumber={catalogNumber}&token={token}&page={page}

Get a product by its catalog number

POST api/v1/Products?token={token}&inCaseOfErrorReturnHttpCode={inCaseOfErrorReturnHttpCode}

Create a product.
Usage: POST api/v1/Product

PUT api/v1/Products/{id}?token={token}&inCaseOfErrorReturnHttpCode={inCaseOfErrorReturnHttpCode}

Update a product.
Usage: PUT api/v1/Products/5

DELETE api/v1/Products/{id}?token={token}

Delete a product by its id
Return Http status code 204 No Content

TelerikReports

APIDescription
POST api/v1/TelerikReports

No documentation available.

DELETE api/v1/TelerikReports?clientID={clientID}

No documentation available.

DELETE api/v1/TelerikReports?clientID={clientID}&instanceID={instanceID}

No documentation available.

POST api/v1/TelerikReports?clientID={clientID}&instanceID={instanceID}

No documentation available.

DELETE api/v1/TelerikReports?clientID={clientID}&instanceID={instanceID}&documentID={documentID}

No documentation available.

GET api/v1/TelerikReports?folder={folder}&resourceName={resourceName}

No documentation available.

GET api/v1/TelerikReports?clientID={clientID}&instanceID={instanceID}&documentID={documentID}&pageNumber={pageNumber}

No documentation available.

GET api/v1/TelerikReports?clientID={clientID}&instanceID={instanceID}&documentID={documentID}&resourceID={resourceID}

No documentation available.

PUT api/v1/TelerikReports?clientID={clientID}&instanceID={instanceID}&documentID={documentID}&actionID={actionID}

No documentation available.

Token

Get a token that will allow you to use the API calls.

APIDescription
GET api/v1/Token?user={user}&pwd={pwd}&osekMorshe={osekMorshe}

Get a new Token. A token will allow you to access CaspitWeb for 10 minutes.
The time window is sliding. That is you get a new 10 minute window every time you access Caspit.
The token is relevant to only one busineess. If you have more than one business in your account
you will need to get a seperate token to each of them.

POST api/v1/Token

Get a new Token. A token will allow you to access CaspitWeb for 10 minutes.
The time window is sliding. That is you get a new 10 minute window every time you access Caspit.
The token is relevant to only one busineess. If you have more than one business in your account
you will need to get a seperate token to each of them.

TrxCodes

Get TrxCodes סיווגי תנועה

APIDescription
GET api/v1/TrxCodes?token={token}

Get a list TrxCodes סיווגי תנועה
Usage: GET /api/v1/TrxCodes/?token=_TOKEN_

VatData

Get the VAT payments to be paid.

APIDescription
GET api/v1/VatData?token={token}&year={year}&month={month}

Get the VAT payemnt details for the given month

VatRate

Get historical VAT rates

APIDescription
GET api/v1/VatRate?token={token}&date={date}

Get a list of historical VAT rates
Usage: GET /api/v1/VatRate/?token=_TOKEN_

Caspit Objects

Other Objects

Enumerations

Other Enumerations