{"openapi":"3.0.2","info":{"contact":{"email":"rest-api@abacus.ch","name":"Abacus Research AG","url":"https://www.abacus.ch/"},"description":"","title":"Abacus API","version":"v2023"},"servers":[{"description":"Abacus test system with a the default client installed. Gets reset and updated every week.","url":"https://entity-api1-1.demo.abacus.ch/api/entity/v1/mandants/7777/"}],"security":[{"oauth2":["oauth2"]}],"tags":[{"description":"","name":"Customers"}],"paths":{"/Customers":{"get":{"parameters":[{"description":"Show only the first n items, see [Paging - Top](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptiontop)","example":5,"explode":true,"in":"query","name":"$top","required":false,"schema":{"format":"int32","minimum":0,"type":"integer"},"style":"form"},{"description":"Expand related entities, see [Expand](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionexpand)","explode":true,"in":"query","name":"$expand","required":false,"schema":{"items":{"enum":["DefaultCurrency","Division","Subject","CustomerCurrencies"],"type":"string"},"type":"array"},"style":"form"},{"description":"Select properties to be returned, see [Select](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionselect)","explode":true,"in":"query","name":"$select","required":false,"schema":{"items":{"enum":["Id","SubjectId","DefaultCurrencyId","Status","InactiveFrom","MultipleCurrenciesActive","DivisionId","DisabledForPayout","ResponsiblePersonId","CustomerCondition","CustomerCreditLimit","CustomerReminder"],"type":"string"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"value":{"items":{"$ref":"#/components/schemas/ch.abacus.debi.Customer"},"type":"array"}},"title":"object","type":"object"}}},"description":"Retrieved entities"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}},"description":"Error"}},"tags":["Customers"]},"post":{"description":"Add new entity to Customers","parameters":[{"description":"Show only the first n items, see [Paging - Top](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptiontop)","example":5,"explode":true,"in":"query","name":"$top","required":false,"schema":{"format":"int32","minimum":0,"type":"integer"},"style":"form"},{"description":"Expand related entities, see [Expand](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionexpand)","explode":true,"in":"query","name":"$expand","required":false,"schema":{"items":{"enum":["DefaultCurrency","Division","Subject","CustomerCurrencies"],"type":"string"},"type":"array"},"style":"form"},{"description":"Select properties to be returned, see [Select](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionselect)","explode":true,"in":"query","name":"$select","required":false,"schema":{"items":{"enum":["Id","SubjectId","DefaultCurrencyId","Status","InactiveFrom","MultipleCurrenciesActive","DivisionId","DisabledForPayout","ResponsiblePersonId","CustomerCondition","CustomerCreditLimit","CustomerReminder"],"type":"string"},"type":"array"},"style":"form"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ch.abacus.debi.Customer-create"}}},"description":"New entity","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ch.abacus.debi.Customer-create"}}},"description":"Created entity"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}},"description":"Error"}},"tags":["Customers"]}},"/Customers(Id={Id})":{"delete":{"parameters":[{"description":"key: Id","explode":false,"in":"path","name":"Id","required":true,"schema":{"format":"int64","type":"integer"},"style":"simple"}],"responses":{"204":{"description":"Success"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}},"description":"Error"}},"summary":"Delete entity from Customers","tags":["Customers"]},"get":{"parameters":[{"description":"key: Id","explode":false,"in":"path","name":"Id","required":true,"schema":{"format":"int64","type":"integer"},"style":"simple"},{"description":"Show only the first n items, see [Paging - Top](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptiontop)","example":5,"explode":true,"in":"query","name":"$top","required":false,"schema":{"format":"int32","minimum":0,"type":"integer"},"style":"form"},{"description":"Expand related entities, see [Expand](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionexpand)","explode":true,"in":"query","name":"$expand","required":false,"schema":{"items":{"enum":["DefaultCurrency","Division","Subject","CustomerCurrencies"],"type":"string"},"type":"array"},"style":"form"},{"description":"Select properties to be returned, see [Select](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionselect)","explode":true,"in":"query","name":"$select","required":false,"schema":{"items":{"enum":["Id","SubjectId","DefaultCurrencyId","Status","InactiveFrom","MultipleCurrenciesActive","DivisionId","DisabledForPayout","ResponsiblePersonId","CustomerCondition","CustomerCreditLimit","CustomerReminder"],"type":"string"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ch.abacus.debi.Customer"}}},"description":"Get entity from Customers by key"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}},"description":"Error"}},"tags":["Customers"]},"patch":{"parameters":[{"description":"key: Id","explode":false,"in":"path","name":"Id","required":true,"schema":{"format":"int64","type":"integer"},"style":"simple"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ch.abacus.debi.Customer-update"}}},"description":"New property values","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ch.abacus.debi.Customer-create"}}},"description":"Created entity"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}},"description":"Error"}},"summary":"Update entity in Customers","tags":["Customers"]}}},"components":{"schemas":{"ch.abacus.debi.Customer-create":{"properties":{"SubjectId":{"format":"int64","type":"integer"},"DefaultCurrencyId":{"example":"string","maxLength":3,"type":"string"},"Status":{"$ref":"#/components/schemas/ch.abacus.debi.ActiveStatus"},"InactiveFrom":{"example":"2023-12-20","format":"date","type":"string"},"MultipleCurrenciesActive":{"type":"boolean"},"DivisionId":{"format":"int32","type":"integer"},"DisabledForPayout":{"type":"boolean"},"ResponsiblePersonId":{"format":"int64","type":"integer"},"CustomerCondition":{"$ref":"#/components/schemas/ch.abacus.debi.CustomerCondition"},"CustomerCreditLimit":{"$ref":"#/components/schemas/ch.abacus.debi.CustomerCreditLimit"},"CustomerReminder":{"$ref":"#/components/schemas/ch.abacus.debi.CustomerReminder"}},"title":"Customer-create","type":"object"},"ch.abacus.debi.Customer-update":{"properties":{"SubjectId":{"format":"int64","type":"integer"},"DefaultCurrencyId":{"example":"string","maxLength":3,"type":"string"},"Status":{"$ref":"#/components/schemas/ch.abacus.debi.ActiveStatus"},"InactiveFrom":{"example":"2023-12-20","format":"date","type":"string"},"MultipleCurrenciesActive":{"type":"boolean"},"DivisionId":{"format":"int32","type":"integer"},"DisabledForPayout":{"type":"boolean"},"ResponsiblePersonId":{"format":"int64","type":"integer"},"CustomerCondition":{"$ref":"#/components/schemas/ch.abacus.debi.CustomerCondition"},"CustomerCreditLimit":{"$ref":"#/components/schemas/ch.abacus.debi.CustomerCreditLimit"},"CustomerReminder":{"$ref":"#/components/schemas/ch.abacus.debi.CustomerReminder"}},"title":"Customer-update","type":"object"},"ch.abacus.debi.Customer":{"properties":{"Id":{"format":"int64","type":"integer"},"SubjectId":{"format":"int64","type":"integer"},"DefaultCurrencyId":{"example":"string","maxLength":3,"type":"string"},"Status":{"$ref":"#/components/schemas/ch.abacus.debi.ActiveStatus"},"InactiveFrom":{"example":"2023-12-20","format":"date","type":"string"},"MultipleCurrenciesActive":{"type":"boolean"},"DivisionId":{"format":"int32","type":"integer"},"DisabledForPayout":{"type":"boolean"},"ResponsiblePersonId":{"format":"int64","type":"integer"},"CustomerCondition":{"$ref":"#/components/schemas/ch.abacus.debi.CustomerCondition"},"CustomerCreditLimit":{"$ref":"#/components/schemas/ch.abacus.debi.CustomerCreditLimit"},"CustomerReminder":{"$ref":"#/components/schemas/ch.abacus.debi.CustomerReminder"}},"title":"Customer","type":"object"},"ch.abacus.debi.ActiveStatus":{"enum":["Active","Inactive"],"title":"ActiveStatus","type":"string"},"ch.abacus.debi.CustomerCondition":{"properties":{"PaymentConditionId":{"format":"int32","type":"integer"},"DiscountToleranceDays":{"format":"int32","type":"integer"},"DiscountTolerancePercent":{"anyOf":[{"type":"number"},{"type":"string"}],"example":0,"format":"decimal","maximum":9999999999,"minimum":-9999999999,"multipleOf":1}},"title":"CustomerCondition","type":"object"},"ch.abacus.debi.CustomerCreditLimit":{"properties":{"CheckCreditRating":{"type":"boolean"}},"title":"CustomerCreditLimit","type":"object"},"ch.abacus.debi.CustomerReminder":{"properties":{"ProcedureId":{"example":"string","maxLength":4,"type":"string"},"SubjectId":{"format":"int64","type":"integer"},"ContactId":{"example":"aac04bd3-8ffb-4ff0-9989-bb3ace77a1fb","format":"uuid","type":"string"},"Mode":{"$ref":"#/components/schemas/ch.abacus.debi.ReminderMode"},"ViewOrSendActive":{"type":"boolean"},"ViewWithNoReminder":{"type":"boolean"},"ViewBlocked":{"type":"boolean"},"BlockedUntil":{"example":"2023-12-20","format":"date","type":"string"},"SendAccountStatement":{"type":"boolean"},"BlockedReasonId":{"format":"int32","type":"integer"},"DispatchType":{"$ref":"#/components/schemas/ch.abacus.debi.CustomerDispatchType"},"GracePeriodDays":{"format":"int32","type":"integer"}},"title":"CustomerReminder","type":"object"},"ch.abacus.debi.ReminderMode":{"enum":["Remind","NeverRemind"],"title":"ReminderMode","type":"string"},"ch.abacus.debi.CustomerDispatchType":{"enum":["Undefined","Letter","Mail"],"title":"CustomerDispatchType","type":"string"},"error":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"target":{"type":"string"},"details":{"items":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"target":{"type":"string"}},"required":["code","message"],"type":"object"},"type":"array"},"innererror":{"type":"object"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}},"securitySchemes":{"oauth2":{"description":"You can request the credentials at abacus-api@abacus.ch.","flows":{"clientCredentials":{"scopes":{"abacus.entity.customer.read":"Scope required to read entitiy Customer and associated bound functions","abacus.entity.customer.readwrite":"Scope required to readWrite entitiy Customer and associated bound actions"},"tokenUrl":"https://entity-api1-1.demo.abacus.ch/oauth/oauth2/v1/token"}},"type":"oauth2"}}}}