api.customers.v1 package¶
Submodules¶
api.customers.v1.customer module¶
Autogenerated API
-
api.customers.v1.customer.
add_customer
(name: str = None, shortName: str = None, properties: dict = None, logoURL: str = None, accountManagerID: int = None, features: list = None, language: str = 'ENGLISH', timeZone: str = 'Europe/Oslo', type: str = 'CUSTOMER', parentID: int = None, json: bool = True, verify: bool = True, apiKey: str = None, authentication: dict = {}) → dict[source]¶ Create a new customer (PUBLIC)
Return type: dict
Parameters: - name (str) – Name to set for new customer. => [sw{}$-().[]“‘_/,*+#:@!?;]*
- shortName (str) – shortName to set for new customer (must be unique). => [a-zA-Z0-9_-.]*
- properties (dict) – Properties to set for customer. => [sw{}$-().[]“‘_/,*+#:@!?;]*
- logoURL (str) – Customer logo data url. On format data:image/jpeg;base64,BASE64STRING. => Sanitize by regex data:.*
- accountManagerID (int) – ID of account manager to assign to customer. If not set, no account manager is set.
- features (list) – Features to enable on customer.
- language (str) – Language to set for customer. (default ENGLISH)
- timeZone (str) – Name of timezone to set for customer. (default Europe/Oslo)
- type (str) – Object type. If set to GROUP, this customer can have subcustomers. (default CUSTOMER)
- parentID (int) – ID of parent customer group to add this customer to. (default 0)
Raises: - AuthenticationFailedException – on 401
- ValidationErrorException – on 412
- AccessDeniedException – on 403
- ObjectNotFoundException – on 404
Returns: {‘offset’: 258, ‘limit’: 550, ‘responseCode’: 200, ‘count’: 648, ‘metaData’: {‘additionalProperties’: {}}, ‘messages’: [{‘message’: ‘Authority onto Mrs budget young lose inside.’, ‘messageTemplate’: ‘Admit ball I the discover sell what.’, ‘field’: ‘Guy born evening best something born onto.’, ‘parameter’: {}, ‘timestamp’: 957568341}], ‘currentPage’: 292, ‘size’: 143}
-
api.customers.v1.customer.
add_customer_service
(customerID: int, service: str = None, json: bool = True, verify: bool = True, apiKey: str = None, authentication: dict = {}) → dict[source]¶ Add a service to a customer. (PUBLIC)
Return type: dict
Parameters: - customerID (int) – Customer ID
- service (str) – Name of service to enable on customer
Raises: - AuthenticationFailedException – on 401
- ValidationErrorException – on 412
- AccessDeniedException – on 403
- ObjectNotFoundException – on 404
Returns: {‘offset’: 232, ‘limit’: 702, ‘responseCode’: 200, ‘count’: 316, ‘metaData’: {‘additionalProperties’: {}}, ‘messages’: [{‘message’: ‘Like soon ok piece leave.’, ‘messageTemplate’: ‘Clear step too mention expect give.’, ‘field’: ‘New raise sound.’, ‘parameter’: {}, ‘timestamp’: 385889385}], ‘currentPage’: 565, ‘size’: 324}
-
api.customers.v1.customer.
disable_customer
(id: int, json: bool = True, verify: bool = True, apiKey: str = None, authentication: dict = {}) → dict[source]¶ Disable customer. (PUBLIC)
Return type: dict
Parameters: id (int) – Customer ID
Raises: - AuthenticationFailedException – on 401
- ValidationErrorException – on 412
- AccessDeniedException – on 403
- ObjectNotFoundException – on 404
Returns: {‘offset’: 349, ‘limit’: 408, ‘responseCode’: 200, ‘count’: 724, ‘metaData’: {‘additionalProperties’: {}}, ‘messages’: [{‘message’: ‘Child accept wear term improve author have.’, ‘messageTemplate’: ‘Seek stock can consider old everybody second.’, ‘field’: ‘Night economic area can reason.’, ‘parameter’: {}, ‘timestamp’: 301452404}], ‘currentPage’: 412, ‘size’: 565}
-
api.customers.v1.customer.
get_customer_by_id
(id: int, json: bool = True, verify: bool = True, apiKey: str = None, authentication: dict = {}) → dict[source]¶ Returns a Customer identified by its ID. (PUBLIC)
Return type: dict
Parameters: id (int) – Customer ID
Raises: - AuthenticationFailedException – on 401
- ValidationErrorException – on 412
- AccessDeniedException – on 403
- ObjectNotFoundException – on 404
Returns: {‘offset’: 857, ‘limit’: 975, ‘responseCode’: 200, ‘count’: 218, ‘metaData’: {‘additionalProperties’: {}}, ‘messages’: [{‘message’: ‘List try spring shoulder we section artist.’, ‘messageTemplate’: ‘Computer poor work quickly yes including role news.’, ‘field’: ‘Surface whatever tough discussion.’, ‘parameter’: {}, ‘timestamp’: 1447859866}], ‘currentPage’: 616, ‘size’: 524}
-
api.customers.v1.customer.
get_customer_by_shortname
(shortName: str, json: bool = True, verify: bool = True, apiKey: str = None, authentication: dict = {}) → dict[source]¶ Returns a Customer identified by its shortname. (PUBLIC)
Return type: dict
Parameters: shortName (str) – Customer shortname
Raises: - AuthenticationFailedException – on 401
- ValidationErrorException – on 412
- AccessDeniedException – on 403
- ObjectNotFoundException – on 404
Returns: {‘offset’: 23, ‘limit’: 523, ‘responseCode’: 200, ‘count’: 974, ‘metaData’: {‘additionalProperties’: {}}, ‘messages’: [{‘message’: ‘Hope amount more material practice.’, ‘messageTemplate’: ‘Rest professional pretty at decision within.’, ‘field’: ‘Say fact money media change individual.’, ‘parameter’: {}, ‘timestamp’: 120084980}], ‘currentPage’: 311, ‘size’: 11}
-
api.customers.v1.customer.
get_customer_logo_by_id
(id: int, json: bool = True, verify: bool = True, apiKey: str = None, authentication: dict = {}) → dict[source]¶ Returns a Customer logo by customer shortname. (PUBLIC)
Return type: dict
Parameters: id (int) – Customer ID
Raises: - AuthenticationFailedException – on 401
- ValidationErrorException – on 412
- AccessDeniedException – on 403
- ObjectNotFoundException – on 404
Returns: {}
-
api.customers.v1.customer.
get_customer_logo_by_shortname
(shortName: str, json: bool = True, verify: bool = True, apiKey: str = None, authentication: dict = {}) → dict[source]¶ Returns a Customer logo by customer shortname. (PUBLIC)
Return type: dict
Parameters: shortName (str) – Customer shortname
Raises: - AuthenticationFailedException – on 401
- ValidationErrorException – on 412
- AccessDeniedException – on 403
- ObjectNotFoundException – on 404
Returns: {}
-
api.customers.v1.customer.
list_customers
(parentID: list = None, service: list = None, keywords: list = None, keywordField: list = None, sortBy: list = None, offset: int = None, limit: int = 25, keywordMatch: str = 'all', json: bool = True, verify: bool = True, apiKey: str = None, authentication: dict = {}) → dict[source]¶ Returns customers defined by query parameters (PUBLIC)
Return type: dict
Parameters: - parentID (list) – Search by parentID
- service (list) – Search by services
- keywords (list) – Search by keywords
- keywordField (list) – Set field strategy for keyword search
- sortBy (list) – Sort search result
- offset (int) – Skip a number of results
- limit (int) – Maximum number of returned results
- keywordMatch (str) – Set match strategy for keyword search
Raises: - AuthenticationFailedException – on 401
- ValidationErrorException – on 412
- AccessDeniedException – on 403
- ObjectNotFoundException – on 404
Returns: {‘offset’: 240, ‘limit’: 811, ‘responseCode’: 200, ‘count’: 817, ‘data’: [{‘id’: 942, ‘flags’: [‘INITIAL_TUNING’], ‘name’: ‘Cynthia Lawson’, ‘shortName’: ‘Year detail spend sometimes prevent number.’, ‘properties’: {‘additionalProperties’: ‘Matter fly trip success year true.’}, ‘services’: [{‘id’: 959, ‘name’: ‘Robert Palmer’, ‘description’: ‘Last course article happy exactly.’}], ‘createdByUser’: {‘id’: 453, ‘customerID’: 146, ‘userName’: ‘coffeyandrew’, ‘name’: ‘Ralph Mendoza’}, ‘createdTimestamp’: 633428033, ‘lastUpdatedByUser’: {‘id’: 224, ‘customerID’: 36, ‘userName’: ‘rebecca97’, ‘name’: ‘Carla Pugh’}, ‘accountManager’: {‘id’: 489, ‘customerID’: 863, ‘userName’: ‘xscott’, ‘name’: ‘Samantha Wright’}, ‘lastUpdatedTimestamp’: 1035761482, ‘language’: ‘ENGLISH’}], ‘metaData’: {‘additionalProperties’: {}}, ‘messages’: [{‘message’: ‘Represent class peace exactly health war morning.’, ‘messageTemplate’: ‘Realize price such shoulder pattern reach hear.’, ‘field’: ‘Level trade west couple loss mission.’, ‘parameter’: {}, ‘timestamp’: 942541256}], ‘currentPage’: 998, ‘size’: 322}
-
api.customers.v1.customer.
remove_customer_service
(customerID: int, service: str, json: bool = True, verify: bool = True, apiKey: str = None, authentication: dict = {}) → dict[source]¶ Remove a service from a customer. (PUBLIC)
Return type: dict
Parameters: - customerID (int) – Customer ID
- service (str) – Name of service to remove
Raises: - AuthenticationFailedException – on 401
- ValidationErrorException – on 412
- AccessDeniedException – on 403
- ObjectNotFoundException – on 404
Returns: {‘offset’: 945, ‘limit’: 727, ‘responseCode’: 200, ‘count’: 106, ‘metaData’: {‘additionalProperties’: {}}, ‘messages’: [{‘message’: ‘Real once buy direction recently.’, ‘messageTemplate’: ‘Item though state whose yourself tough increase.’, ‘field’: ‘Prove simple west money report style until history.’, ‘parameter’: {}, ‘timestamp’: 671482611}], ‘currentPage’: 849, ‘size’: 414}
-
api.customers.v1.customer.
search_customers
(limit: int = None, offset: int = None, subCriteria: list = None, customerID: list = None, parentID: list = None, keywords: list = None, keywordMatchStrategy: str = None, keywordFieldStrategy: list = None, service: list = None, domain: list = None, sortBy: list = None, includeFlags: list = None, excludeFlags: list = None, includeDeleted: bool = None, exclude: bool = None, required: bool = None, json: bool = True, verify: bool = True, apiKey: str = None, authentication: dict = {}) → dict[source]¶ Returns customers defined by CustomerSearchCriteria (PUBLIC)
Return type: dict
Parameters: - limit (int) – Set this value to set max number of results. By default, no restriction on result set size.
- offset (int) – Set this value to skip the first (offset) objects. By default, return result from first object.
- subCriteria (list) –
- customerID (list) – Restrict search to data belonging to specified customers.
- parentID (list) – Search for customers by parent customer ID.
- keywords (list) – Search for customers by keywords.
- keywordMatchStrategy (str) – Defines the MatchStrategy for keywords (default match all keywords).
- keywordFieldStrategy (list) – Defines which fields will be searched by keywords (default all supported fields).
- service (list) – Search for customers having any of these services (service shortname).
- domain (list) – Search for customers in one of these domains (by domain id or name).
- sortBy (list) – List of properties to sort by (prefix with “-” to sort descending).
- includeFlags (list) – Only include objects which have includeFlags set.
- excludeFlags (list) – Exclude objects which have excludeFlags set.
- includeDeleted (bool) – Set to true to include deleted objects. By default, exclude deleted objects.
- exclude (bool) – Only relevant for subcriteria. If set to true, objects matching this subcriteria object will be excluded.
- required (bool) – Only relevant for subcriteria. If set to true, objects matching this subcriteria are required (AND-ed together with parent criteria).
Raises: - AuthenticationFailedException – on 401
- ValidationErrorException – on 412
- AccessDeniedException – on 403
- ObjectNotFoundException – on 404
Returns: {‘offset’: 724, ‘limit’: 51, ‘responseCode’: 200, ‘count’: 833, ‘data’: [{‘id’: 438, ‘flags’: [‘DISABLED’], ‘name’: ‘Shelly Snyder’, ‘shortName’: ‘History benefit edge situation some southern song.’, ‘properties’: {‘additionalProperties’: ‘Check reach or hotel language.’}, ‘services’: [{‘id’: 370, ‘name’: ‘Tina Crawford’, ‘description’: ‘Nearly during least however green suggest.’}], ‘createdByUser’: {‘id’: 423, ‘customerID’: 976, ‘userName’: ‘paynechristine’, ‘name’: ‘Laurie Stewart’}, ‘createdTimestamp’: 1435542313, ‘lastUpdatedByUser’: {‘id’: 398, ‘customerID’: 709, ‘userName’: ‘john72’, ‘name’: ‘Jamie Porter’}, ‘accountManager’: {‘id’: 488, ‘customerID’: 925, ‘userName’: ‘kimmonique’, ‘name’: ‘Andrew Hood’}, ‘lastUpdatedTimestamp’: 297525859, ‘language’: ‘ENGLISH’}], ‘metaData’: {‘additionalProperties’: {}}, ‘messages’: [{‘message’: ‘School decide almost fire important in appear.’, ‘messageTemplate’: ‘Lose employee entire sit her beat entire.’, ‘field’: ‘Value behind difference point skin official impact.’, ‘parameter’: {}, ‘timestamp’: 1091373458}], ‘currentPage’: 586, ‘size’: 186}
-
api.customers.v1.customer.
update_customer
(id: int, name: str = None, shortName: str = None, language: str = None, addProperties: dict = None, deleteProperties: list = None, logoURL: str = None, timeZone: str = None, accountManagerID: int = None, addFeatures: list = None, deleteFeatures: list = None, type: str = None, json: bool = True, verify: bool = True, apiKey: str = None, authentication: dict = {}) → dict[source]¶ Update a customer object. (PUBLIC)
Return type: dict
Parameters: - id (int) – Customer ID
- name (str) – If set, change customer name to this value. => [sw{}$-().[]“‘_/,*+#:@!?;]*
- shortName (str) – If set, change customer shortname to this value (must be unique). => [a-zA-Z0-9_-.]*
- language (str) – If set, change customer language.
- addProperties (dict) – If set, add these properties. If the keys exist, they will be overwritten. => [sw{}$-().[]“‘_/,*+#:@!?;]*
- deleteProperties (list) – If set, remove properties with these keys. Missing keys are ignored.
- logoURL (str) – If set, change customer logo. On format data:image/jpeg;base64,BASE64STRING. => Sanitize by regex data:.*
- timeZone (str) – If set, change customer timezone to timezone with this name.
- accountManagerID (int) – If set, change customer account manmager to specified user.
- addFeatures (list) – If set, add these features to customer.
- deleteFeatures (list) – If set, remove these features from customer.
- type (str) – Customer type. If set to GROUP, this customer can have subcustomers.
Raises: - AuthenticationFailedException – on 401
- ValidationErrorException – on 412
- AccessDeniedException – on 403
- ObjectNotFoundException – on 404
Returns: {‘offset’: 577, ‘limit’: 490, ‘responseCode’: 200, ‘count’: 371, ‘metaData’: {‘additionalProperties’: {}}, ‘messages’: [{‘message’: ‘Seat unit Mrs officer.’, ‘messageTemplate’: ‘Mother market fund mention media onto last.’, ‘field’: ‘Lot kid occur because.’, ‘parameter’: {}, ‘timestamp’: 1141699150}], ‘currentPage’: 662, ‘size’: 834}