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

Request Information

URI Parameters

NameDescriptionType/Additional information
id

The id that you supplied to CaspitWeb when the contact was created.
Contacts created in Caspit (and not via the API) have a unique id. You can get the contact
via some other API call and look it up from object that you get from the Caspit.

string

Required

association

One of: documents, expenses

string

Required

d

A dummy parameter used to distinguish API calls

string

Required

token

The access token

string

Body Parameters

None.

Response Description

A list of CaspitDocument or a list of CaspitExpense

Collection of

CaspitBase

A base type that is extended to be one of: CaspitContact,CaspitDocument, CaspitProduct, CaspitExpense, CaspitCurrency, CaspitVatRate, CaspitLog, CaspitExpensePayment, CaspitExpensePaymentFull, CaspitKupaLine, CaspitTrxCode

Response Formats

application/json, text/json

Sample:
[
  {
    "DateCreated": "2024-11-21T15:30:26.1839066+02:00",
    "UserCreated": "sample string 1",
    "DateUpdated": "2024-11-21T15:30:26.1839066+02:00",
    "UserUpdated": "sample string 2"
  },
  {
    "DateCreated": "2024-11-21T15:30:26.1839066+02:00",
    "UserCreated": "sample string 1",
    "DateUpdated": "2024-11-21T15:30:26.1839066+02:00",
    "UserUpdated": "sample string 2"
  }
]

application/xml, text/xml

Sample:
<ArrayOfCaspitBase xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.caspit.biz/2013/03">
  <CaspitBase>
    <DateCreated>2024-11-21T15:30:26.1839066+02:00</DateCreated>
    <DateUpdated>2024-11-21T15:30:26.1839066+02:00</DateUpdated>
    <UserCreated>sample string 1</UserCreated>
    <UserUpdated>sample string 2</UserUpdated>
  </CaspitBase>
  <CaspitBase>
    <DateCreated>2024-11-21T15:30:26.1839066+02:00</DateCreated>
    <DateUpdated>2024-11-21T15:30:26.1839066+02:00</DateUpdated>
    <UserCreated>sample string 1</UserCreated>
    <UserUpdated>sample string 2</UserUpdated>
  </CaspitBase>
</ArrayOfCaspitBase>