Package: ooti-api
SDK OOTIExplore the docs »ooti.coTable of ContentsAbout The ProjectBuilt WithGetting StartedPrerequisitesInstallationHow to useLicenseAbout The ProjectThis sdk is for all people wanting to use the ooti APIBuilt WithPythonGetting StartedPrerequisitesPython 3.7https://www.python.org/downloads/release/python-377/InstallationIn case you work with virtuel environment you could, add ooti-api in your requirements.Run  the following command to install packageooti-api:pipinstallooti-apiHow to useImportimportooti.ootiasootiConnect to the APImy_account=ooti.OotiAPI('email','password')my_account.connect()Do a requestinvoices=my_account.get_invoices_list()Exampleimport ooti.ooti as ooti
import pprint


###### Connect ######
my_account = ooti.OotiAPI('email', 'password')
my_account.connect()


###### Invoice ######
invoices = my_account.Invoices.get_invoices_list()  # Get the list of invoices
for invoice in invoices['data']:
    pprint.pp(invoice)  # Print each invoice

invoice = my_account.Invoices.get_invoice_details(pk='invoice_pk')  # Get the details of one invoice
if(invoice['status']==404):
    print('check the pk as it must be false')
else:
    pprint.pp(invoice['data'])  #Print details of the invoice

payload = {
    "amount": 1000,
}
invoice = my_account.Invoices.create_invoice(1499, payload)  # Create an invoice
pprint.pp(invoice)

payload = {
    "amount": 3000,
}
invoice = my_account.Invoices.update_invoice(pk='invoice_pk', payload)  # update an invoice
pprint.pp(invoice)

###### Payment ######
payments = my_account.Payments.get_payments_list()  # Get the list of payments
for payment in payments['data']:
    pprint.pp(payment)  # Print each payment

payment = my_account.Payments.get_payment_details(pk='payment_pk')  # Get the details of one payment
if(payment['status']==404):
    print('check the pk as it must be false')
else:
    pprint.pp(payment['data'])  #Print details of the payment

payload = {
    "amount": 1000,
}
payment = my_account.Payments.create_payment(1499, payload)  # Create a payment
pprint.pp(payment)

payload = {
    "amount": 3000,
}
payment = my_account.Payments.update_payment(pk='payment_pk', payload)  # update a payment
pprint.pp(payment)

###### Project ######
projects = my_account.Projects.get_projects_list()  # Get the list of projects
for project in projects['data']:
    pprint.pp(project)  # Print each project

project = my_account.Projects.get_project_details(id='project_id')  # Get the details of one project
if(project['status']==404):
    print('check the id as it must be false')
else:
    pprint.pp(project['data'])  #Print details of the project

data = {
    'business_title': 'new_title'
}
project = my_account.Projects.update_project_details(pk='invoice_pk', data=data)  # Update the details of one project
pprint.pp(project)  # Print details of the updated project


###### Phase ######
phases = my_account.Phases.get_phases_list(project_pk='project_id')  # Get the list of phases for one project
for phase in phases['data']:
    pprint.pp(phase)  # Print each phase

phase = my_account.Phases.get_phase_details(pk='phase_id')  # Get the details of one phase
if(phase['status']==404):
    print('check the id as it must be false')
else:
    pprint.pp(phase['data']) #Print details of the phase

data = {'progress': 66}
phase = my_account.Phases.update_phase_details(pk='phase_pk', data=data)  # Update the details of one phase
pprint.pp(phase)  # Print details of the updated phaseLicenseCopyright (C) 2016-2022 AxonePro S.A.S.info@ooti.coAll Rights ReservedThis file is part of ooti.co.Unauthorized copying of any file in this project, via any medium is strictly prohibited. Proprietary and confidentialaxonepro.com can not be copied and/or distributed without the express permission of AXONEPRO.