Soap services

 

  • Upsales API services
  • Supported actions
  • API Data transfer object classes
  • Get all items
  • Get lists using criteria
  • Get service item
  • Create new item
  • Update an item
  • Delete an item
  • The order and opportunity service
  • The user service
  • The product service
  • API service descriptions
    • client service
    • contact service
    • activity service
    • appointment service
    • agreement service
    • lead service
    • opportunity service
    • order service
    • product service
    • project service
    • user service

UPSALES API SERVICES CONSISTS OF THE FOLLOWING SERVICES

  • Activity
  • Appointment
  • Client
  • Contact
  • Lead
  • Opportunity
  • Order
  • Product
  • Project
  • User

ALL SERVICES SUPPORT THE FOLLOWING ACTIONS

  • Get all items
  • Get lists using criteria
  • Get a single item
  • Create an item
  • Update an item
  • Delete an item

Item is in this context a client in the client service, activity in the activity service, etc.

The access rules to services and data are same as the user’s rights within Upsales CRM. Making changes to data the user doesn’t have right to, will return a SOAP fault.


API DATA TRANSFER OBJECT CLASSES

The item classes and service methods for retrieving and changing data for all services are similar. Each service has a service-item class consisting of all properties on a service item and all custom fields for that service item.

For instance the client class: The client class is the item class for client data consisting of the properties

  • Id
  • Name
  • Address
  • Zip code
  • City
  • Phone
  • Fax
  • Etc…

Each service-item has a property named customfield of type customField[]. This field consists of all custom values that each service-item can have.

NOTE: if a custom field doesn’t have a value then a record of that custom field will not be present in the customField array when retrieving data.

A complete list of all custom fields and their definitions for each service item can be retrieved using the method getCustomFieldList(). 


GET ALL ITEMS

Retrieving all items for a service is done (for the client service) through the service method: getClientList(clientFilter[])

Each service has its own name, but follows the same naming standard getServiceList(servicefilter[]) (replace Service with the service name). For instance getting all activities through the activity service is done calling the getActivitiyList(activityFilter[]) method.

The one and only parameter to this method is a list of criteria’s. To retrieving a list of all items you must pass the empty list. Null is not a valid value on filter.


GET LISTS USING CRITERIA

Getting lists using search criteria’s is made through the same method as getting all items for a service. The difference is to specify one or more filters.

Instead of passing the empty array you must pass service filter objects (clientFilter, activityFilter, etc).

For more information about how to use filter queries, please read the filter section.


GET SERVICE ITEM

The metod getClient(int), getActivity(int), etc, in each service will return a single service item identified by the id passed as parameter. If no service item is found the method will return null.


CREATE NEW ITEM

To add a new item you need to make a call to the new method in the service. For the client service this method is named newClient(client), for the activity service newActivity(activity), etc.

If the item to be added already exists a duplicate will be made.

When creating a new item and adding values for the custom fields you only need to specify the value and the alias or field id in the custom field class.


UPDATE AN ITEM

Updating is made through the API call updateClient(client), updateActivity(activity), etc. The parameter to the method is the item to update. If the item to be updated can’t be found, that is if an invalid id is set in the client object a SOAP error will be returned.


DELETE AN ITEM

You can delete an item using API call deleteClient(int), deleteActivity(int).  If the item doesn’t exist or is successfully delete the call will return successfully.


THE ORDER AND OPPORTUNITY SERVICE

Orders and opportunities have a minor difference from the other service items. Order and opportunities have a substructure consisting of order rows. Order rows can’t exist separately and are returned within an order or opportunity. The property is named orderrow in the order and opportunity classes and the type of the property is orderrow array.

Like all other service item classes the orderrow class is similar in structure. The custom field definition is extracted from the two services with the method getOrderRowCustomFieldList().


THE USER SERVICE

In order to add or update users the account, used to access Upsales CRM through the API, must have administrator rights. If that is not the case when adding or updating users a SAOP error will be returned in the response.

Also if all licensees are used and you try to add a new user an SOAP error will be returned.


THE PRODUCT SERVICE

Like the user service adding and updating products require administrator rights on the user used to access Upsales CRM through the API. If that is not the case a SOAP error will be returned in the response.


API SERVICE DESCRIPTIONS

 

 

 

 

 

  • product service
    • WSDL: https://wsapi.upsales.com/wsapi/v2/product?wsdl
    • XSD: https://wsapi.upsales.com/wsapi/v2/product?xsd=1
    • Methods:
      • getProductList(productFilter[])
      • getProduct(int)
      • getCustomFieldList()
      • newProduct(product)
      • updateProduct(product)
      • deleteProduct(int)

 

  • project service
    • WSDL: https://wsapi.upsales.com/wsapi/v2/project?wsdl
    • XSD: https://wsapi.upsales.com/wsapi/v2/project?xsd=1
    • Methods:
      • getProjectList(projectFilter[])
      • getProject(int)
      • getCustomFieldList()
      • newProject(project)
      • updateProject(project)
      • deleteProject(int)

 

Har du fler frågor? Skicka en förfrågan

0 Kommentarer

logga in för att lämna en kommentar.