Package: vesselapi
Vessel API Python SDKThe Vessel API Python SDK is a PyPi library for accessing the Vessel API, a Unified CRM API that provides standardized endpoints for performing operations on common CRM Objects.SDK InstallationpipinstallvesselapiSDK Example UsageExampleimportvesselapifromvesselapi.modelsimportoperationss=vesselapi.VesselAPI()req=operations.DeleteConnectionRequestBody(connection_id='string',)res=s.connections.delete(req,operations.DeleteConnectionSecurity(vessel_api_token="<YOUR_API_KEY_HERE>",))ifres.status_code==200:# handle responsepassAuthenticationTo authenticate the Vessel Node SDK you will need to provide a Vessel API Token, along with an Access Token for each request. For more details please see theVessel API Documentation.Available Resources and Operationsconnectionsdelete- Delete Connectionfind- Get Connectionlist- Get All Connectionsintegrationslist- Get CRM Integrationswebhookscreate- Create Webhookdelete- Remove Webhookfind- Get Webhookaccountsbatch- Get Batch Accountscreate- Create Accountdetails- Get Account Detailsfind- Get Accountlist- Get All Accountssearch- Search Accountsupdate- Update Accountcallsbatch- Batch Callscreate- Create Calldetails- Get Call Detailsfind- Get Calllist- Get All Callssearch- Search Callsupdate- Update Callcontactsbatch- Get Batch Contactscreate- Create Contactdetails- Get Contact Detailsfind- Get Contactlist- Get All Contactssearch- Search Contactsupdate- Update Contactdealsbatch- Get Batch Dealscreate- Create Dealdetails- Get Deal Detailsfind- Get Deallist- Get All Dealssearch- Search Dealsupdate- Update Dealemailsbatch- Get Batch Emailscreate- Create Emaildetails- Get Email Detailsfind- Get Emaillist- Get All Emailssearch- Search Emailsupdate- Update Emaileventsbatch- Get Batch Eventscreate- Create Eventdetails- Get Event Detailsfind- Get Eventlist- Get All Eventssearch- Search Eventsupdate- Update Eventattendeesbatch- Get Batch Event Attendeescreate- Create Event Attendeedetails- Get Event Attendee Detailsfind- Get Event Attendeelist- Get All Event Attendeessearch- Search Event Attendeesupdate- Update Event Attendeeleadsbatch- Get Batch Leadscreate- Create Leaddetails- Get Lead Detailsfind- Get Leadlist- Get All Leadssearch- Search Leadsupdate- Update Leadnotesbatch- Get Batch Notescreate- Create Notedetails- Get Note Detailsfind- Get Notelist- Get All Notessearch- Search Notesupdate- Update Notepassthroughcreate- Passthrough Requesttasksbatch- Get Batch Taskscreate- Create Taskdetails- Get Task Detailsfind- Get Tasklist- Get All Taskssearch- Search Tasksupdate- Update Taskusersbatch- Get Batch Usersdetails- Get User Detailsfind- Get Userlist- Get All Userssearch- Search Userslinkscreate- Exchange Public Token for Access Tokentokenscreate- Create Link TokenError HandlingHandling errors in this SDK should largely match your expectations.  All operations return a response object or raise an error.  If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.Error ObjectStatus CodeContent Typeerrors.SDKError400-600/Exampleimportvesselapifromvesselapi.modelsimportoperationss=vesselapi.VesselAPI()req=operations.DeleteConnectionRequestBody(connection_id='string',)res=Nonetry:res=s.connections.delete(req,operations.DeleteConnectionSecurity(vessel_api_token="<YOUR_API_KEY_HERE>",))excepterrors.SDKErrorase:print(e)# handle exceptionraise(e)ifres.status_code==200:# handle responsepassServer SelectionSelect Server by IndexYou can override the default server globally by passing a server index to theserver_idx: intoptional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:#ServerVariables0https://api.vessel.landNoneExampleimportvesselapifromvesselapi.modelsimportoperationss=vesselapi.VesselAPI(server_idx=0,)req=operations.DeleteConnectionRequestBody(connection_id='string',)res=s.connections.delete(req,operations.DeleteConnectionSecurity(vessel_api_token="<YOUR_API_KEY_HERE>",))ifres.status_code==200:# handle responsepassOverride Server URL Per-ClientThe default server can also be overridden globally by passing a URL to theserver_url: stroptional parameter when initializing the SDK client instance. For example:importvesselapifromvesselapi.modelsimportoperationss=vesselapi.VesselAPI(server_url="https://api.vessel.land",)req=operations.DeleteConnectionRequestBody(connection_id='string',)res=s.connections.delete(req,operations.DeleteConnectionSecurity(vessel_api_token="<YOUR_API_KEY_HERE>",))ifres.status_code==200:# handle responsepassCustom HTTP ClientThe Python SDK makes API calls using the (requests)[https://pypi.org/project/requests/] HTTP library.  In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a customrequests.Sessionobject.For example, you could specify a header for every request that this sdk makes as follows:importvesselapiimportrequestshttp_client=requests.Session()http_client.headers.update({'x-custom-header':'someValue'})s=vesselapi.VesselAPI(client:http_client)AuthenticationPer-Client Security SchemesThis SDK supports the following security scheme globally:NameTypeSchemevessel_api_tokenapiKeyAPI keyYou can set the security parameters through thesecurityoptional parameter when initializing the SDK client instance. For example:importvesselapifromvesselapi.modelsimportoperations,shareds=vesselapi.VesselAPI(security=shared.Security(vessel_api_token="<YOUR_API_KEY_HERE>",),)req=operations.GetOneConnectionRequest(connection_id='string',)res=s.connections.find(req)ifres.response_bodyisnotNone:# handle responsepassPer-Operation Security SchemesSome operations in this SDK require the security scheme to be specified at the request level. For example:importvesselapifromvesselapi.modelsimportoperationss=vesselapi.VesselAPI()req=operations.DeleteConnectionRequestBody(connection_id='string',)res=s.connections.delete(req,operations.DeleteConnectionSecurity(vessel_api_token="<YOUR_API_KEY_HERE>",))ifres.status_code==200:# handle responsepassSDK Generated bySpeakeasy