API: Access the list of your contracts

It’s possible to retrieve a list of your contracts according to a criteria such as start date, end date, client, initiator of the contract, etc.

The method to retrieve the contracts is getContracts . The call is made in POST and waits for JSON.

Find specific contracts

This url allows you to obtain a list of contracts that correspond to the requested criteria:

https://[host]/calinda/hub/selling/do?m=getContracts

Parameters:

There are parameters to perform the search and others to order the search according to your needs.

First, the search parameters will allow you to retrieve a list that best meets your needs.

The search fields are: 

  • bundleId:  ID of the bundle, this will return all the contracts related to this bundle. (String of character)
  • city: customer's city. (String of characters)
  • colValues:
  • company: Customer's company name (String of characters)
  • contractDefinitionId: Contract template (Character string)
  • contractSelector: 
    • 0 all contracts
    • 1 Contracts in process: open, pending signatures
    • 2 Contracts to be validated: signed but not validated
    • 3 Validated contracts: countersigned
    • 4 Archived contracts
    • 5 Discontinued contracts
  • customer:  customer number (Character string)
  • vendor: email of the initiator of the transaction (Character string)
  • startDate: start date of the search period in milliseconds (to avoid filtering with the date set to 0)
  • endDate: date of the end of the search period in milliseconds (to avoid filtering with the date set to 0)

Les paramètres de tri vont permettre de trié vos recherche selon les colonnes disponible pour le tri

The fields for sorting are:

  • column: the number of the column (String) on which the sorting is to be done.
    • STATUS : "0"
    • DATE : "1"
    • VENDOR : "2"
    • COMPANY : "3"
    • CITY : "4"
    • CUSTOMER : "5"
    • TEMPLATE: "6"
  • direction: sort direction (string)
    • Ascending:  "0"
    • Descending: "1"

You can also apply a limit in the results, allowing you to not retrieve them all directly, if a large number of contracts match your search.

The fields for limiting the results are:

  • offset: Return of the search starting from the Nth result.
  • size: Number of element requested
This content will show up directly in it's container.

    Example:

    https://cloud.sellandsign.com/calinda/hub/selling/do?m=getContracts
    
    POST Param
    { 
    "contractSelector": 0, 
    "contractId": "",
     "vendor": "",
     "company": "",
     "contractDefinitionId": "",
     "startDate": 0,
     "endDate": 0, 
    "customer": "",
     "city" : "",
     "column": "1",
     "direction":"1",
    "offset": 0,
     "size": 150,
     "bundleId": "",
     "colValues": {} 
    }
    Return:
    customerProperties  : {}
    elements[0]: {
    
            actorId: 2
            bundleId: 0
            canceledReason: ""
            city: "Marseille"
            closed: false
            closedDate: 0
            companyName: ""
            contractDefinitionContentToken: ""
            contractDefinitionDocumentToken: ""
            contractDefinitionId: 1
            contractDefinitionShowOptions: false
            contractTypeName: "selling.default_contract.adhoc.title"
            contractorName: ""
            customer: {
                number: "Mi4xNDk5Njc3OTg1NDE0LjE1OTgw",
                actorId: 2,
                syncTimer: 1519826515183,
                civility: "MONSIEUR",
                …
            }
            customerEntityId: 0
            customerName: "Test"
            customerNumber: "Mi4xNDk5Njc3OTg1NDE0LjE1OTgw"
            date: 1519826521942
            documentToken: "MTUxOTgyNjU2MTcxMV8zOTM5XzMxMzI0MA=="
            filename: "test.pdf"
            id: 3939
            keepOnMove: 0
            lastModificationPlace: "SERVER"
            messageBody: ""
            messageTitle: ""
            optionStatus: [, …]
            optionsList: [0, 4425]
            parentContractId: 0
            picturesCount: 0
            status: "SIGNED"
            syncTimer: 1519826587017
            transactionId: "2c949e2f61b2cb750161dcb8e0c717c7"
            vendorEmail: "test@calindasoftware.com"
            totalSize: 1
        }