UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 237 kB
{"openapi":"3.0.0","servers":[{"description":"Production","url":"https://api.sinao.app/v1"},{"description":"Staging","url":"https://api.sinao.dev/v1"},{"description":"Development","url":"https://api.sinao.test/v1"}],"info":{"contact":{"email":"contact@sinao.fr"},"description":"Sinao API for account management, apps administration and network exploration","license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"title":"Sinao API","version":"1.1.0","x-apisguru-categories":["financial"],"x-logo":{"url":"https://sinao.app/icon.ico"},"x-origin":[{"format":"openapi","url":"https://api.sinao.app/v1/swagger.yaml","version":"3.0"}],"x-providerName":"sinao.app"},"paths":{"/apps":{"get":{"description":"Get all apps","operationId":"app.list","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/filters"},{"$ref":"#/components/parameters/order"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/App"},"type":"array"}}},"description":"search results"},"400":{"description":"bad input parameter"}},"security":[{}],"summary":"List apps","tags":["Applications"]},"post":{"description":"Create a new `App` with their organization profile","operationId":"app.create","parameters":[{"description":"Organization name. Minimum 3 characters with 1 alpha","in":"query","name":"organization_name","required":true,"schema":{"minimum":3,"pattern":"/^.*[a-z]+.*$/i","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}},"description":"Success"},"422":{"description":"The organization name format is invalid : minimum 3 characters with 1 alpha"}},"security":[{},{},{}],"summary":"Create an app","tags":["hidden"]}},"/apps/access/invite/{accessToken}":{"delete":{"description":"Remove an invitation from token","operationId":"app.policies.registration.delete","parameters":[{"in":"path","name":"accessToken","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}},"description":"successful operation"},"401":{"description":"Token expired"},"404":{"description":"Token was not found"}},"summary":"Delete an invitation from token","tags":["hidden"]},"get":{"description":"Get infos of an invitation request. Returns an `AccessInvitation` object","operationId":"app.policies.registration.get","parameters":[{"in":"path","name":"accessToken","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessInvitation"}}},"description":"Success"},"404":{"description":"Invitation was not found"}},"summary":"Get invitation informations","tags":["hidden"]}},"/apps/access/invite/{accessToken}/register":{"post":{"description":"Registration for an invited user","operationId":"app.policies.registration.register","parameters":[{"in":"path","name":"accessToken","required":true,"schema":{"type":"string"}},{"description":"Password for account","in":"query","name":"password","required":true,"schema":{"minimum":8,"type":"string"}},{"description":"First name of user before account creation / account link","in":"query","name":"firstname","schema":{"type":"string"}},{"description":"Last name of user before account creation / account link","in":"query","name":"lastname","schema":{"type":"string"}},{"description":"User has valided CGU ?","in":"query","name":"cgu","required":true,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"description":"Success"},"400":{"description":"Bad parameters"},"401":{"description":"Token expired"},"404":{"description":"Token not found"}},"security":[{}],"summary":"Create an User by invitation","tags":["hidden"]}},"/apps/{appId}":{"get":{"description":"Get app informations","operationId":"app.get","parameters":[{"$ref":"#/components/parameters/appId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{},{"always_allowed":[]}],"summary":"Get an app","tags":["Applications"]}},"/apps/{appId}/access":{"get":{"description":"Get all policies for an app. Manage access for users","operationId":"app.policies.list","parameters":[{"$ref":"#/components/parameters/appId"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/filters"},{"$ref":"#/components/parameters/order"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PolicyProfile"},"type":"array"}}},"description":"Success"},"404":{"description":"App was not found"}},"security":[{}],"summary":"Get policies for an app","tags":["hidden"]}},"/apps/{appId}/access/invite":{"get":{"description":"Get all sent invitations","operationId":"app.policies.invitations.list","parameters":[{"$ref":"#/components/parameters/appId"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/filters"},{"$ref":"#/components/parameters/order"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AccessInvitation"},"type":"array"}}},"description":"Success"},"404":{"description":"App was not found"}},"security":[{}],"summary":"List invitations","tags":["hidden"]},"post":{"description":"Invites a user to access the organization panel","operationId":"app.policies.invitations.create","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"Email for invitation. Will be used to account creation or account matching with an existing user","in":"query","name":"email","required":true,"schema":{"type":"string"}},{"description":"Profile for policies set","in":"query","name":"policy_profile_id","required":true,"schema":{"minimum":0,"type":"integer"}},{"description":"First name of user before account creation / account link","in":"query","name":"firstname","schema":{"type":"string"}},{"description":"Last name of user before account creation / account link","in":"query","name":"lastname","schema":{"type":"string"}},{"description":"Last name of user before account creation / account link","in":"query","name":"civility","schema":{"type":"string"}},{"description":"Password for new user","in":"query","name":"password","schema":{"minimum":8,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessInvitation"}}},"description":"Success"},"403":{"description":"This user already exists, you can not set a password"},"404":{"description":"App was not found"}},"security":[{},{},{"is_admin":[]}],"summary":"Invite an user","tags":["hidden"]}},"/apps/{appId}/access/invite/{id}":{"delete":{"description":"Remove an invitation","operationId":"app.policies.invitations.delete","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}},"description":"successful operation"},"404":{"description":"Invitation was not found"}},"security":[{},{},{"is_admin":[]}],"summary":"Delete an invitation","tags":["hidden"]}},"/apps/{appId}/access/profiles":{"get":{"description":"Get all profiles","operationId":"app.policies.profiles.list","parameters":[{"$ref":"#/components/parameters/appId"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PolicyProfile"},"type":"array"}}},"description":"Success"}},"security":[{}],"summary":"Get profiles","tags":["hidden"]}},"/apps/{appId}/access/{userId}":{"delete":{"description":"Cancel access for an user on an app","operationId":"app.policies.delete","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}},"description":"Success"},"404":{"description":"App was not found"}},"security":[{},{},{"is_admin":[]}],"summary":"Delete police for an user","tags":["hidden"]},"get":{"description":"Find policy profile for an user on an app","operationId":"app.policies.get","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyProfile"}}},"description":"Success"},"404":{"description":"App was not found"}},"security":[{}],"summary":"Get police for an user","tags":["hidden"]},"post":{"description":"Update police for an user on an app","operationId":"app.policies.update","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"path","name":"userId","required":true,"schema":{"type":"string"}},{"in":"query","name":"policy_profile_id","required":true,"schema":{"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyProfile"}}},"description":"Success"},"404":{"description":"App was not found"}},"security":[{},{},{"is_admin":[]}],"summary":"Update police for an user","tags":["hidden"]}},"/apps/{appId}/accountcategories/":{"get":{"description":"","operationId":"app.accounting.categories.list","parameters":[{"$ref":"#/components/parameters/appId"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/filters"},{"$ref":"#/components/parameters/order"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AccountCategory"},"type":"array"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{}],"summary":"List categories","tags":["AccountCategories"]},"post":{"description":"","operationId":"app.accounting.categories.create","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"query","name":"name","schema":{"type":"string"}},{"in":"query","name":"description","schema":{"type":"string"}},{"in":"query","name":"type","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCategory"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Create a category","tags":["AccountCategories"]}},"/apps/{appId}/accountcategories/{id}":{"delete":{"description":"","operationId":"app.accounting.categories.delete","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Remove a category","tags":["AccountCategories"]},"get":{"description":"","operationId":"app.accounting.categories.get","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCategory"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Get a category","tags":["AccountCategories"]},"post":{"description":"","operationId":"app.accounting.categories.update","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"name","schema":{"type":"string"}},{"in":"query","name":"description","schema":{"type":"string"}},{"in":"query","name":"type","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCategory"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Update a category","tags":["AccountCategories"]}},"/apps/{appId}/accounting_entries/":{"get":{"description":"","operationId":"app.accounting.entries.list","parameters":[{"$ref":"#/components/parameters/appId"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/filters"},{"$ref":"#/components/parameters/order"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Account"},"type":"array"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{}],"summary":"List accounting entries","tags":["Entries"]}},"/apps/{appId}/accounts/":{"get":{"description":"","operationId":"app.accounting.accounts.list","parameters":[{"$ref":"#/components/parameters/appId"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/filters"},{"$ref":"#/components/parameters/order"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Account"},"type":"array"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{}],"summary":"List Account","tags":["Accounts"]},"post":{"description":"","operationId":"app.accounting.accounts.create","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"query","name":"journalcode","schema":{"type":"string"}},{"in":"query","name":"name","schema":{"type":"string"}},{"in":"query","name":"description","schema":{"type":"string"}},{"in":"query","name":"keywords","schema":{"type":"string"}},{"in":"query","name":"accounting_number","schema":{"type":"string"}},{"in":"query","name":"is_cashflow","schema":{"type":"boolean"}},{"in":"query","name":"is_sales","schema":{"type":"boolean"}},{"in":"query","name":"is_purchase","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Create a Account","tags":["Accounts"]}},"/apps/{appId}/accounts/batch":{"post":{"description":"Create many accounts","operationId":"app.accounting.accounts.batch","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"List of accounts. Without ID for insert","in":"query","name":"data","required":true,"schema":{"items":{"$ref":"#/components/schemas/Account"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Create many accounts","tags":["hidden"]}},"/apps/{appId}/accounts/{id}":{"delete":{"description":"","operationId":"app.accounting.accounts.delete","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID of Account","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Remove a Account","tags":["Accounts"]},"get":{"description":"","operationId":"app.accounting.accounts.get","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID of Account","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Get a Account","tags":["Accounts"]},"post":{"description":"","operationId":"app.accounting.accounts.update","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID of Account","in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"journalcode","schema":{"type":"string"}},{"in":"query","name":"name","schema":{"type":"string"}},{"in":"query","name":"description","schema":{"type":"string"}},{"in":"query","name":"keywords","schema":{"type":"string"}},{"in":"query","name":"accounting_number","schema":{"type":"string"}},{"in":"query","name":"is_cashflow","schema":{"type":"boolean"}},{"in":"query","name":"is_sales","schema":{"type":"boolean"}},{"in":"query","name":"is_purchase","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Update a Account","tags":["Accounts"]}},"/apps/{appId}/apikeys":{"get":{"operationId":"app.apikeys.list","parameters":[{"$ref":"#/components/parameters/appId"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/filters"},{"$ref":"#/components/parameters/order"}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Success"},"404":{"description":"App not found"}},"security":[{},{"is_admin":[]}],"summary":"Get all api keys","tags":["Applications"]},"post":{"operationId":"app.apikeys.create","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"Key name","in":"query","name":"name","required":true,"schema":{"minimum":4,"type":"string"}},{"description":"Partner ID for official connexion","in":"query","name":"api_partner_id","schema":{"nullable":true,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}},"description":"Success"},"404":{"description":"App or key not found"}},"security":[{},{},{"is_admin":[]}],"summary":"Create new API key","tags":["Applications"]}},"/apps/{appId}/apikeys/{id}":{"delete":{"operationId":"app.apikeys.delete","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"Automatically added","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"404":{"description":"Not found"}},"security":[{},{},{"is_admin":[]}],"summary":"Remove an api key","tags":["Applications"]}},"/apps/{appId}/apipartners":{"get":{"operationId":"app.apipartners.list","parameters":[{"$ref":"#/components/parameters/appId"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/filters"},{"$ref":"#/components/parameters/order"}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Success"},"404":{"description":"App not found"}},"security":[{}],"summary":"Get all api parners","tags":["Applications"]}},"/apps/{appId}/attachments":{"get":{"description":"Get list of attachments","operationId":"app.attachments.list","parameters":[{"$ref":"#/components/parameters/appId"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/filters"},{"$ref":"#/components/parameters/order"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Attachment"},"type":"array"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{}],"summary":"List attachments","tags":["Attachments"]},"post":{"description":"","operationId":"app.attachments.create","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"Object to attach file","in":"query","name":"type","required":true,"schema":{"enum":["none","purchase","invoice","quote","transaction","relationship"],"type":"string"}},{"description":"Object id","in":"query","name":"attachable_id","schema":{"type":"integer"}},{"description":"File to attach","in":"query","name":"file","schema":{"format":"binary","type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Attach a file on an object","tags":["Attachments"]},"put":{"description":"","operationId":"app.sapAttestations.generateSapAttestations","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"year number to generate","in":"query","name":"year","schema":{"type":"integer"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"},"422":{"description":"Error"}},"security":[{}],"summary":"Recreate S.A.P attestations","tags":["Attachments"]}},"/apps/{appId}/attachments/download":{"get":{"description":"","operationId":"app.attachments.download","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"Array of attachments id","in":"query","name":"ids","required":true,"schema":{"items":{"type":"integer"},"type":"string"}},{"description":"Type of attachment","in":"query","name":"type","required":true,"schema":{"enum":["sap"],"type":"string"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Download a list of attachments in pdf into a .zip file","tags":["attachments"]}},"/apps/{appId}/attachments/sap-download":{"get":{"description":"","operationId":"app.sapAttestations.download","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"Array of attachments id","in":"query","name":"ids","required":true,"schema":{"items":{"type":"integer"},"type":"string"}},{"description":"Type of attachment","in":"query","name":"type","required":true,"schema":{"enum":["sap"],"type":"string"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Download a list of SAP attestations in pdf into a .zip file","tags":["attachments"]}},"/apps/{appId}/attachments/{id}":{"delete":{"description":"","operationId":"app.attachments.delete","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"Attachment id","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Detach a file from id","tags":["Attachments"]},"get":{"description":"","operationId":"app.attachments.get","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"Attachment id","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Get attachment by id","tags":["Attachments"]}},"/apps/{appId}/attachments/{id}/pdf":{"get":{"description":"","operationId":"app.attachments.RedirectToPublicUrl","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"Attachment id to download","in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"random number to force fresh pdf","in":"query","name":"random","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Download the attachment as pdf","tags":["attachments"]}},"/apps/{appId}/bankdetails":{"get":{"description":"","operationId":"app.documents.sales.bankdetails.list","parameters":[{"$ref":"#/components/parameters/appId"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/filters"},{"$ref":"#/components/parameters/order"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BankDetails"},"type":"array"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{}],"summary":"List BankDetails","tags":["BankDetails"]},"post":{"description":"","operationId":"app.documents.sales.bankdetails.create","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"query","name":"name","schema":{"type":"string"}},{"in":"query","name":"iban","schema":{"type":"string"}},{"in":"query","name":"bic","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankDetails"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Create a BankDetails","tags":["BankDetails"]}},"/apps/{appId}/bankdetails/{id}":{"delete":{"description":"","operationId":"app.documents.sales.bankdetails.delete","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID of BankDetails","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Remove a BankDetails","tags":["BankDetails"]},"get":{"description":"","operationId":"app.documents.sales.bankdetails.get","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID of BankDetails","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankDetails"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Get a BankDetails","tags":["BankDetails"]},"post":{"description":"","operationId":"app.documents.sales.bankdetails.update","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID of BankDetails","in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"name","schema":{"type":"string"}},{"in":"query","name":"iban","schema":{"type":"string"}},{"in":"query","name":"bic","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankDetails"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Update a BankDetails","tags":["BankDetails"]}},"/apps/{appId}/banks/":{"delete":{"description":"The deletion of the account is irreversible, it will not be possible to resume synchronization as it is afterwards. - If transactions have been exported to accounting or used as payment, the CashflowSource will be left as it is. Resuming synchronization will remain impossible. If you re-import the account, a new CashflowSource will be created and transactions will therefore be duplicated. - Otherwise, if the CashflowSource was not used, it as well as its transactions will be deleted","operationId":"app.cashflow.banks.delete","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"query","name":"item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Remove a Bankin synchronization","tags":["hidden"]},"get":{"description":"","operationId":"app.cashflow.banks.list","parameters":[{"$ref":"#/components/parameters/appId"}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{}],"summary":"List banks connected to bankin","tags":["hidden"]}},"/apps/{appId}/banks/connect":{"get":{"description":"","operationId":"app.cashflow.banks.connect","parameters":[{"$ref":"#/components/parameters/appId"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"url":{"format":"uri","type":"string"}},"type":"object"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Get the link to the funnel to connect a bank with Sinao","tags":["hidden"]}},"/apps/{appId}/banks/synchronize":{"post":{"description":"","operationId":"app.cashflow.banks.synchronize","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"Optional item id to refresh. If set, triggers a refresh at Bankin before synchronizing transactions","in":"query","name":"id","schema":{"type":"integer"}},{"description":"The value 'false' triggers a non-incremental syncronization of the maximum possible duration. The value 'true' updates the transactions updated by Bankin since a certain date","in":"query","name":"is_incremential","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashflowSource"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Triggers synchronization at Bankin then synchronizes transactions with Sinao","tags":["hidden"]}},"/apps/{appId}/banks/{id}/funnel/edit":{"get":{"description":"","operationId":"app.cashflow.banks.url_edit","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"url":{"format":"uri","type":"string"}},"type":"object"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{}],"summary":"Get the link to the funnel to edit password","tags":["hidden"]}},"/apps/{appId}/banks/{id}/funnel/sync":{"get":{"description":"","operationId":"app.cashflow.banks.url_sync","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"url":{"format":"uri","type":"string"}},"type":"object"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{}],"summary":"Get the link to the funnel to start manually a synchronization (SCA)","tags":["hidden"]}},"/apps/{appId}/banks/{id}/funnel/validate":{"get":{"description":"","operationId":"app.cashflow.banks.url_validate","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"url":{"format":"uri","type":"string"}},"type":"object"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{}],"summary":"Get the link to the funnel to validate a pro item (SCA)","tags":["hidden"]}},"/apps/{appId}/banks/{id}/select_accounts":{"post":{"description":"","operationId":"app.cashflow.banks.select_accounts","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"List of enables accounts","in":"query","name":"bank_account_ids","schema":{"items":{"type":"integer"},"nullable":true,"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashflowSource"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Select accounts to synchronize","tags":["hidden"]}},"/apps/{appId}/cashflowsources/":{"get":{"description":"","operationId":"app.cashflow.cashflowsources.list","parameters":[{"$ref":"#/components/parameters/appId"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/filters"},{"$ref":"#/components/parameters/order"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CashflowSource"},"type":"array"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{}],"summary":"List CashflowSource","tags":["Sources"]},"post":{"description":"","operationId":"app.cashflow.cashflowsources.create","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"query","name":"name","schema":{"type":"string"}},{"in":"query","name":"identifiant","schema":{"type":"string"}},{"in":"query","name":"type","schema":{"enum":["bank","cashdesk","waiting"],"type":"string"}},{"in":"query","name":"balance_amount","schema":{"type":"integer"}},{"in":"query","name":"account_type","schema":{"enum":["checking","card","savings","special","securities","loan","life_insurance","unknown","pending","share_savings_plan"],"type":"string"}},{"in":"query","name":"parent_cashflow_source_id","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashflowSource"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{}],"summary":"Create a CashflowSource","tags":["Sources"]}},"/apps/{appId}/cashflowsources/{id}":{"delete":{"description":"","operationId":"app.cashflow.cashflowsources.delete","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID of CashflowSource","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Remove a CashflowSource","tags":["Sources"]},"get":{"description":"","operationId":"app.cashflow.cashflowsources.get","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID of CashflowSource","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashflowSource"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Get a CashflowSource","tags":["Sources"]},"post":{"description":"","operationId":"app.cashflow.cashflowsources.update","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID of CashflowSource","in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"name","schema":{"type":"string"}},{"in":"query","name":"identifiant","schema":{"type":"string"}},{"in":"query","name":"type","schema":{"enum":["bank","cashdesk","waiting"],"type":"string"}},{"in":"query","name":"balance_amount","schema":{"type":"integer"}},{"in":"query","name":"account_type","schema":{"enum":["checking","card","savings","special","securities","loan","life_insurance","unknown","pending","share_savings_plan"],"type":"string"}},{"in":"query","name":"parent_cashflow_source_id","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashflowSource"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Update a CashflowSource","tags":["Sources"]}},"/apps/{appId}/contacts/merge":{"post":{"description":"","operationId":"app.contacts.transform.merge","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"query","name":"contacts","required":true,"schema":{"items":{"format":"object","properties":{"id":{"type":"integer"},"type":{"enum":["organization","person"],"type":"string"}}},"nullable":true,"type":"array"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Merge many contacts","tags":["hidden"]}},"/apps/{appId}/email/batch":{"post":{"description":"","operationId":"app.contacts.email.batch","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"query","name":"from","schema":{"format":"email","type":"string"}},{"in":"query","name":"messages","schema":{"items":{"properties":{"content":{"type":"string"},"documents":{"items":{"properties":{"id":{"type":"integer"},"type":{"enum":["invoice","quote","attachment"],"type":"string"}},"type":"object"},"type":"array"},"recipients":{"items":{"format":"email","type":"string"},"type":"array"},"recipients_bcc":{"items":{"format":"email","type":"string"},"type":"array"},"recipients_cc":{"items":{"format":"email","type":"string"},"type":"array"},"title":{"type":"string"}},"type":"object"},"type":"array"}},{"in":"query","name":"need_copy_bcc","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Send emails","tags":["Emails"]}},"/apps/{appId}/email/document":{"post":{"description":"","operationId":"app.contacts.email.send","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"query","name":"from","schema":{"format":"email","type":"string"}},{"in":"query","name":"recipients","required":true,"schema":{"items":{"format":"email","type":"string"},"type":"array"}},{"in":"query","name":"recipients_cc","schema":{"items":{"format":"email","type":"string"},"type":"array"}},{"in":"query","name":"recipients_bcc","schema":{"items":{"format":"email","type":"string"},"type":"array"}},{"in":"query","name":"title","schema":{"type":"string"}},{"in":"query","name":"body","schema":{"type":"string"}},{"in":"query","name":"documents","required":true,"schema":{"items":{"properties":{"id":{"type":"integer"},"type":{"enum":["invoice","quote","attachment"],"type":"string"}},"type":"object"},"type":"array"}},{"in":"query","name":"need_copy_bcc","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Send an email","tags":["Emails"]}},"/apps/{appId}/establishments/{id}":{"delete":{"description":"Remove an establishment","operationId":"app.contacts.establishments.delete","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID of establishment","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Remove an establishment","tags":["Establishments"]},"get":{"description":"Get an establishment by id","operationId":"app.contacts.establishments.get","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID of an establishment","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstablishmentIdentity"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Get an establishment","tags":["Establishments"]},"post":{"description":"Update an establishment by id","operationId":"app.contacts.establishments.update","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID of an establishment","in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"name","schema":{"type":"string"}},{"in":"query","name":"phones","schema":{"items":{"type":"string"},"type":"array"}},{"in":"query","name":"emails","schema":{"items":{"type":"string"},"type":"array"}},{"description":"Establishment number (french NIC)","in":"query","name":"nic","schema":{"nullable":true,"pattern":"/^[0-9]{5}$/i","type":"string"}},{"in":"query","name":"place","schema":{"properties":{"administrative_area_level1":{"type":"string"},"administrative_area_level2":{"type":"string"},"administrative_area_level3":{"type":"string"},"country":{"type":"string"},"countryiso2":{"type":"string"},"formatted_address":{"description":"Address formatted for intelligent analysis by google maps","type":"string"},"latitude":{"type":"integer"},"locality":{"type":"string"},"longitude":{"type":"integer"},"postal_code":{"type":"string"},"route":{"type":"string"},"route2":{"type":"string"},"street_number":{"type":"string"},"sublocality":{"type":"string"}},"type":"object"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstablishmentIdentity"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Update an establishment","tags":["Establishments"]}},"/apps/{appId}/exports":{"get":{"description":"","operationId":"app.accounting.export.list","parameters":[{"$ref":"#/components/parameters/appId"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/filters"},{"$ref":"#/components/parameters/order"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ExportEntity"},"type":"array"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{}],"summary":"List ExportEntity","tags":["Exports"]},"post":{"description":"","operationId":"app.accounting.export.create","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"query","name":"until","required":true,"schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportEntity"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Create a ExportEntity","tags":["Exports"]}},"/apps/{appId}/exports/acd_compta":{"get":{"description":"If response UUID is empty, you must register your identifiants.","operationId":"app.accounting.export.AcdComptaGetUuid","parameters":[{"$ref":"#/components/parameters/appId"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"uuid":{"type":"string"}},"type":"object"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Get the ACD UUID for authentification","tags":["Exports","ACD"]},"post":{"description":"Sinao will try to connect ACD authentification with your ids. If succed, Sinao will store your ids.","operationId":"app.accounting.export.AcdComptaSetUuid","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"the login provided by ACD Compta","in":"query","name":"login","required":true,"schema":{"type":"string"}},{"description":"the password provided by ACD Compta","in":"query","name":"password","required":true,"schema":{"type":"string"}},{"description":"Your ACD account number (3XXXX)","in":"query","name":"base","required":true,"schema":{"pattern":"/^3[A-Z]{3,}$/i","type":"string"}},{"description":"your CNX by ACD Compta","in":"query","name":"cnx","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"uuid":{"type":"string"}},"type":"object"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Register ACD identifiants","tags":["Exports","ACD"]}},"/apps/{appId}/exports/download":{"get":{"description":"","operationId":"app.accounting.export.download","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"The export format can be a FEC (universal - similar to the French legal file 'Fichier des Ecritures Comptables') or specific for accounting software","in":"query","name":"format","schema":{"enum":["universal","quadra","fiducial","acd"],"type":"string"}},{"in":"query","name":"export_entities_ids","schema":{"items":{"type":"integer"},"type":"array"}},{"description":"Automatically find export entities from a date range","in":"query","name":"start_at","schema":{"format":"date-time","type":"string"}},{"description":"Automatically find export entities from a date range","in":"query","name":"end_at","schema":{"format":"date-time","type":"string"}},{"description":"Automatically find export entities since a date","in":"query","name":"since","schema":{"format":"date-time","type":"string"}},{"description":"Automatically find the export entities since the last export downloaded","in":"query","name":"since_last","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Download the export entity as zip","tags":["Exports"]}},"/apps/{appId}/exports/months":{"get":{"description":"","operationId":"app.accounting.export.list_by_months","parameters":[{"$ref":"#/components/parameters/appId"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ExportEntity"},"type":"array"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{}],"summary":"List ExportEntity","tags":["Exports"]}},"/apps/{appId}/exports/{id}":{"delete":{"description":"","operationId":"app.accounting.export.delete","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID of ExportEntity","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{},{}],"summary":"Remove a ExportEntity","tags":["Exports"]},"get":{"description":"","operationId":"app.accounting.export.get","parameters":[{"$ref":"#/components/parameters/appId"},{"description":"ID of ExportEntity","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportEntity"}}},"description":"Success"},"400":{"description":"Bad request"},"404":{"description":"Not found"}},"security":[{}],"summary":"Get a ExportEntity","tags":["Exports"]}},"/apps/{appId}/invoices":{"get":{"description":"Get list of invoices","operationId":"app.documents.sales.invoices.list","parameters":[{"$ref":"#/components/parameters/appId"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/filters"},{"$ref":"#/components/parameters/order"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Invoice"},"type":"array"}}},"description":"Success"},"404":{"description":"Not found"}},"security":[{}],"summary":"List invoices","tags":["Invoices"]},"post":{"description":"Create a new invoice with an Organization or a Person. Relationship store notes, metadata and accounting settings parameters","operationId":"app.documents.sales.invoices.create","parameters":[{"$ref":"#/components/parameters/appId"},{"in":"query","name":"contact_infos","schema":{"nullable":true,"properties":{"address":{"description":"Customer addresss (street number and address) obtained from customer object or set manually","nullable":true,"type":"string"},"address2":{"description":"Customer address subline obtained from customer object or set manually","nullable":true,"type":"string"},"details":{"nullable":true,"type":"string"},"id":{"type":"integer"},"location":{"description":"Customer address location (city, postal code and country) obtained from customer object or set manually","nullable":true,"type":"string"},"name":{"description":"Customer name obtained from customer object or set manually","nullable":true,"type":"string"},"type":{"enum":["organization","person"],"type":"string"}},"type":"object"}},{"in":"query","name":"third_account","schema":{"nullable":true,"properties":{"address":{"description":"Third account addresss (street number and address) obtained from customer object or set manually","nullable":true,"type":"string"},"id":{"type":"integer"},"location":{"description":"Third account address location (city, postal code and country) obtained from customer object or set manually","nullable":true,"type":"string"},"name":{"description":"Third account name obtained from customer object or set manually","nullable":true,"type":"string"},"type":{"enum":["organization","person"],"type":"string"}},"type":"object"}},{"in":"query","name":"title","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"content","schema":{"items":{"$ref":"#/components/schemas/SalesLine"},"type":"array"}},{"description":"List columns to display","in":"query","name":"columns","schema":{"properties":{"amount":{"type":"string"},"designation":{"type":"string"},"discount":{"type":"string"},"due":{"type":"string"},"info_total_quantity":{"type":"string"},"quantity":{"type":"string"},"quantity_name":{"type":"string"},"subtotal":{"type":"string"},"vat_percent":{"type":"string"}},"type":"object"}},{"description":"Free variable not display in document","in":"query","name":"reference","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"discount","schema":{"properties":{"amount":{"type":"integer"},"name":{"type":"string"},"percent":{"type":"integer"}},"type":"object"}},{"in":"query","name":"currency","schema":{"type":"string"}},{"description":"Legal mentions","in":"query","name":"legal_notice","schema":{"nullable":true,"type":"string"}},{"in":"query","name":"bank_details_id","schema":{"nullable":true,"type":"integer"}},{"in":"query","name":"vat_exemption","schema":{"properties":{"article":{"nullable":true,"type":"string"},"exempted":{"description":"specify if exempted or not","type":"boolean"},"reason":{"description":"example : micro for microentrepreneur","nullable":true,"type":"string"}},"type":"object"}},{"in":"query","name":"tags","schema":{"items":{"format":"string"},"nullable":true,"type":"array"}},{"in":"query","name":"metadata","schema":{"items":{},"nullable":true,"type":"array"}},{"in":"query","name":"downpayments","schema":{"items":{"type":"integer"},"nullable":true,"type":"array"}},{"in":"query","name":"downpayment_cash","schema":{"nullable":true,"type":"integer"}},{"in":"qu