API

Getting Started


This is the documentation for the 24SevenOffice API. Here you will find an overview of our current APIs. There are some examples to help you get started with our most commonly used APIs, while other descriptions are more bare bones they should be largely self explanatory. Please note that most integrations will require some familiarity with the inner workings of the 24SevenOffice system and that you should have some business rules and use cases in place before proceeding with an integration. We have an extensive Help Center that will provide many answers and good insights.

If you have not already done so, please create a community user. This is the username and password you will use to authenticate towards the web services.

Once you have a community user, you need to register as an API partner (sign up form only in Norwegian).  Once you’ve registered you will receive credentials for a demo client. Finally you need to request an ApplicationId (Please note that these are two separate steps and that you have to follow the instructions below to get your applicationId).

Request an ApplicationID

Every integration needs an ApplicationId. This is a “per integration” key and not a “per customer” key. Please note that the ApplicationId has no association to any specific clients in the 24SevenOffice system and is not used a direct form of authentication for any specific client. This is handled through the IdentityId in the Login method and/or the use of the GetIdentity and SetIdentity methods in the Authenticate service.
To request an ApplicationID, please send an email to apisupport@24sevenoffice.com with the following information:

Get up and running with authentication

To get started using our webservices, please follow these steps:

  1. Initialize a SoapClient/WebService-object to Authenticate
  2. Check if there is an ASP.NET_SessionId saved (see step 4), if yes, go to step 5
  3. Log in using the Login method. The Login method uses a Credential object as parameter, which requires username, password and ApplicationID. The username is always an email address (community user).
  4. Save the ASP.NET_SessionId that is returned from the Login method (Save it on your side using Database/Cookies/Session/Etc)
  5. Check if ASP.NET_SessionId is still alive at 24SevenOffice by using AuthenticateService’s HasSession method. If it does not, go to step 3.
  6. Initialize a SoapClient/WebService-object to the Webservice that you want to use
  7. Set the cookie with the name “ASP.NET_SessionId” to the SessionId-value you confirmed in step 5, and pass this cookie along to the webservice that you’re going to use.

CODE EXAMPLES: C# .NET – PHP

For Visual Studio users, we recommend that you add our Web Services using the Web Reference Compability.

If you have any questions, please do not hesitate to contact us on apisupport@24sevenoffice.com.

Please read the terms for the 24SevenOffice API

AccountService

https://webservices.24sevenoffice.com/economy/accountV002/Accountservice.asmx (WSDL)

Data types

Please note: This is a reference to the latest version of the AccountService. If you have used our previous version, we strongly recommend you to use this version which has some critical bug fixes and additional features.

Saving financial transactions

The method SaveBundleList is used for saving financial transactions. The general setup is like this:

The Bundlelist has the following properties:

AllowDifference (boolean)
Allow difference in credit/debit balance. This is only applicable when saving journal data (see SaveOption) below. Default value is false.

DirectLedger (boolean)
If set to false use customer ledger. If set to true use account that is set directly.
Default value is false.

SaveOption (unsigned byte)
Can be either 1 or 0. Setting 1 saves the bundle as a journal which can then be reviewed and edited on the 24SevenOffice web site. Setting 0 saves the bundle directly to the ledger.
Default value is 1.

DefaultCustomerId (int)
Default CustomerId that is used if CustomerId is not set on one or more entries.

The Bundle has the following properties:

YearId
The YearId is set to the current year of the bundle. e.g. 2017.

Sort
Can be defined for either Bundle or Voucher. This is an entry type. The No property from GetTransactionTypes is used.

Name
The name of the bundle.

BundleDirectAccounting (boolean)
If set to false it automatically calculates VAT. If set to true it does not calculate VAT. This is only applicable when saving journal data (see SaveOption).

The Voucher has the following properties:

TransactionNo
This the transaction number of the voucher. You can get the next available number by sending a request to GetEntryIdThe GetEntryId method takes a Date property which must be some date within the given fiscal year of the voucher. It also takes a SortNo property, here you must provide an EntrySeriesId property value, which you can get by sending a request to GetTypeList. Please note that the EntryNo property is not set and does not need to be set in your request to GetEntryId.

Sort
Can be defined for either Bundle or Voucher. This is an entry type. The No property from
GetTransactionTypes is used.

The Entry has the following properties:

SequenceId – integer, can be set to define the order of entries when using SaveOption 1.
CustomerId – use CompanyId from GetCompanies
AccountId – use AccountNo (sic) from GetAccountList
Date – DateTime
DueDate – DateTime
Amount – use e.g. 123 for debit and -123 for credit
CurrencyId – use e.g. NOK, USD. Get a list of client’s currencies from GetCurrencyList
CurrencyRate – current Rate of currency
CurrencyUnit – set the unit of the currency.
DepartmentId – Get a list of departments from GetDepartmentList
ProjectId – See for example GetProjectList
InvoiceReferenceNo – The Invoice number.
InvoiceOcr – The OCR/KID number.
TaxNo – the VAT type, see GetTaxCodeList
Period – This usually follows the current month
Comment – A comment that appears on the entry line
StampNo – An Id that acts as a link to any inbound invoices/documents that are sent to 24SevenOffice
BankAccountNo – Bank Account number
LinkId – a GUID you can specify yourself if you wish to link internally in the bundle
Links – LinkId: this is used for internal linking in the bundle, i.e. you reference the LinkId specified in another entry in the bundle you are submitting
LineId – This is for linking to existing entries. You get the LineId from the TransactionService GetTransactions

Methods

Method Input type Input name Return type Description
CheckAccountNo AccountData[] accountList AccountDataErrors[]
GetAccountList AccountData[]
GetTaxCodeList TaxCodeElement[]
GetTaxMappingLists TaxMappingList[]
GetTypeList TypeData[]
LogMessage string message
SaveBundleList BundleList bundlelist saveRespons

 

AttachmentService

https://webservices.24sevenoffice.com/Economy/Accounting/Accounting_V001/AttachmentService.asmx (WSDL)

To upload a new attachment, first send a request to Create, this creates a new ghost file that may be uploaded with AppendChunk. Then use AppendChunk or AppendChunkByLength to upload the remaining file chunks. Finally send a request to Save to make it a valid image file.

Methods

Method Input type Input name Return type Description
AppendChunk file AppendChunkResponse
AppendChunkByLength file AppendChunkByLengthResponse
Create type CreateResult
DownloadChunk file DownloadChunkResult (base64Binary)
GetCheckSum file GetChecksumResult
GetFileInfo parameters GetFileInfoResult
GetMaxRequestLength GetMaxRequestLengthResult
GetSize file GetSizeResult
Save file SaveResponse

 



Authenticate

https://api.24sevenoffice.com/authenticate/v001/authenticate.asmx (WSDL)

Data types


All our webservices uses session based authentication by our Authenticate webservice. To improve performance and ease the stress on our servers, we ask everyone that uses our webservices to store the sessionId on your side so you do not authenticate too often, as that is unnecessary.

The SessionId is added to a cookie with the name “ASP.NET_SessionId” and sent to every webservice that you use.

To authenticate you use the Login-method with a Credential object. You must specify ApplicationId, UserName and Password (IdentityId does not need to be set).

      
    <credential>
        <ApplicationId>guid</ApplicationId>
        <IdentityId>guid</IdentityId>
        <Password>string</Password>
        <Username>string</Username>
    </credential>

Here we provide code examples for authenticating: C# .NET – PHP.

If the login was successful you will get a Login Response containing your SessionId:

		
    <LoginResponse xmlns="http://24sevenOffice.com/webservices">
        <LoginResult>xxxxxxxyyyyyyyyyzzzzzzzz</LoginResult>
    </LoginResponse>

 

Sessions, identities and community users

There are some important concepts that you need to be familiar with. When you have done a successful request to Login, you will get a SessionId in return. This SessionId is linked to a default Identity. In an integration you need to have some interaction with your user to make sure that the integration uses the correct Identity. You need to make a request to GetIdentities in order to get a list of available Identities for a given session. You then have to present this list to your user. The relevant information for the user is the Name of the Client

         
    <Client>
        <Id>long</Id>
        <Name>string</Name>
    </Client>

Once the user has chose a client and it is not the current client, you need to switch the Identity.

Switching Identities
Your community user has a default identity when you log in. If there are several Identities associated with your community user, you invoke the GetIdentities method to get a complete list. Now you may switch to another Identity by using SetIdentity (pass the whole Identity object) or SetIdentityById (pass the Identity Guid). You may also set the Identity directly in your requests to Login by using the IdentityId property. Please note that the IdentityId can change, so you should always implement checks to see which Identity is currently active. The IdentityId can change if an Identity is removed and then readded to a community user.

Adding Identities
In order to add identities you need to log in and add them manually by clicking on your company name in the top right corner, then entering firm and user credentials that have been provided to you either from our support or from your customer.

Methods

Method Input type Input name Return type Description
Login Credential credential string Authenticates the user and returns the session ID
HasSession bool Returns whether or not the current session is valid
GetIdentities Identity[] Returns a list of community identities
SetIdentity Identity identity bool Sets a current identity
SetIdentityById Guid identityId bool Sets a current identity by its Guid
GetIdentity Identity Returns the current identity
AuthenticateByToken Token token Passport Authenticates with the given token and returns the passport.

ClientService

https://api.24sevenoffice.com/Client/V001/ClientService.asmx (WSDL)

This service is used to get Client settings and other information that can be useful for our other services, like department list and currency information. The information is related to currently active Identity in your API session. See the Authenticate Service for more information on Identities.

Methods

Method Input type Input name Return type Description
GetClientInformation Client Returns client data
GetUsers User Returns user data
GetDepartmentList Department Gets a list of all departments for the client
GetCurrencyList Currency Gets a list of all currencies for the client
GetTypeGroupList TypeGroupModule module TypeGroup Gets a list of all typegroups for the client. TypeGroupModule can be All, Sale or Purchase.
GetVatTypeList VatType Gets a list of all Vat Types.

CompanyService

https://api.24sevenoffice.com/CRM/Company/V001/CompanyService.asmx (WSDL)

Data Types

The Company Service provides you with a range of useful methods for integrating with 24SevenOffice. Most notably SaveCompanies, GetCompanies and DeleteCompanies. This is the service you use for information related to the CRM module and is used for all customer information. In the cases where you have to specify return properties, you will have to sent a string array with the names of the properties you want returned.
SaveCompanies

 

Specifying a Company ID
Please note that you cannot specify your own CompanyID since this is generated by the 24SevenOffice system. If you specify a CompanyId, this means you are updating an existing item. If you wish to specify your own Id you must use the ExternalId property. You can also use the methodSaveMaps if you wish to save an array of Id relations. This data is only accessible through the API (please see SaveMaps below for more information).

Saving a Company
In order to save a company, all you have to do is submit a Name and a Type. You probably want to add more information than that, but it will get you started. The Types you can choose from are: Lead, Consumer (also known as a private customer), Business and Supplier.

Below is a simple XML example for a request to SaveCompanies:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
               xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SaveCompanies xmlns="http://24sevenOffice.com/webservices">
      <companies>
        <Company>
        <Name>Test Name</Name>
        <Type>Business</Type>
      </Company>
    </companies>
  </SaveCompanies>
</soap:Body>
</soap:Envelope>

 

SaveMaps
If you wish to use an external ID in addition to the 24SevenOffice ID, you can use the CompanyMap data type that consist of MapType, ExternalId and CompanyId. You use MapType the specify a type of mapping. This is useful if you are mapping several external Id’s. ExternalId is the external Id and CompanyId is the 24SevenOffice Id. Please note that these mapping references are not visible in the 24SevenOffice user interface, but only on a programmatic level through the API.

Methods

Method Input type Input name Return type Description
GetCompanies CompanySearchParameters, String[] searchParams,returnProperties Company[] Returns a list of companies based on the search parameters. You need to specify the return properties.
DeleteCompanies Company[] companies Company[] Deletes an array of companies and returns the ones where a delete error occured. Only the Id-property of Company is required to delete.
SaveCompanies Company[] companies Company[] Saves all the companies in the array. This method also returns all companies, now with the Id if it is a new company. Please see APIException property for any save errors.
SaveRelations Relation[] relations Relation[] Saves an array of relations and returns the ones where an error occured.
DeleteRelations Relation[] relations Relation[] Deletes an array of relations and returns the ones where an delete error occured.
SaveMaps Map[] maps Map[] Saves an array of maps and returns the ones where an error occured.
DeleteMaps Map[] maps Map[] Deletes an array of mapsand returns the ones where an delete error occured.
GetStatuses KeyValuePair[] Returns a KeyValuePair array of all CRM statuses. Key = StatusId, Value = StatusName
GetCategories Category[] Returns an array of all CRM categories.
SaveCategories Category[] Save an array of CRM categories.
GetIndustries KeyValuePair[] Returns a KeyValuePair array of all Industries. Key = Id, Value = Name
GetCustomerCategoryTree KeyValuePair[] Returns a KeyValuePair array of all Companies and their linked categories. Key = CategoryId, Value = CompanyId.
GetCustomerCategories Int32 customerId Int32[] Returns an array of Category Ids linked to the specified customer
SaveCustomerCategories KeyValuePair[] customerCategories APIException[] BETA: Saves categories to customers (Key=CustomerId, Value=CategoryId) and returns a list of errors (if any)
DeleteCustomerCategories KeyValuePair[] customerCategories APIException[] Deletes categories from customers (Key=CustomerId, Value=CategoryId) and returns a list of errors (if any)

Other

Data Types

FileService

WebService for administration of files on the file area.

The WebService is divided into two parts. One for informasjon about categories and files, and one for uploading and downloading of files.

Uploading a new file
In order to upload a new file, you need to determine where the file should be located. For this you can use GetFolderContentInfo to get e.g. the FolderId you need. To start a file upload you call AppendChunk. You will then get a tmpId in return that you will use for the subsequent file chunk uploads. Once you have transmitted all your data, you call the Save method with the tmpId and the FileInfo (filename, FolderId…).

Updating a file
You need to delete and then reupload a file if you wish to update it.

Deleting a file
You can delete a file by calling the Delete method and specifying the FileId and the FolderId.

URL

https://webservices.24sevenoffice.com/file/V001/FileService.asmx

WSDL

https://webservices.24sevenoffice.com/file/V001/FileInfoService.asmx

WSDL

Autentication

The Webservice uses AutenticateService

Methods

File Info Service

Method Input type Input name Return type Description
GetFolderContentInfo Parameters FileInfoSearch Folder
ReleaseFile FolderId, FileId int, int bool
Delete FolderId, FileId int, int bool
GetFileInfo FolderId, FileId int, int File
FileSize FolderId, FileId int, int int

File Service

Method Input type Input name Return type Description
GetMaxRequestLength long Uploading
AppendChunk TmpId, Buffer, Offset string, byte[], long string Uploading
AppendChunkByLength TmpId, Buffer, BufferLength, Offset string, byte[], int, long string Uploading
Save TmpId, FileInfo string, File void Uploading
PrepareFileDownload FileId, FolderId, CheckOut int, int, bool GetFileInfo Downloading
DownloadFileChunck TmpId, ChunckNum string, int byte[] Downloading
HashFile TmpId string byte[] Uploading and Downloading
EndFileDownload TmpId string Downloading

 

Other

Datatypes

Enum

InvitationService

InvitationService has the following methods:

– GetInvitations(InvitationSearch invitationSearch) which gets a list of all invitations for the current logged in community user. Parameter for this method is of type InvitationSearch where you specify State and Direction. Returned information: State, Id, Title, Type, Date, ReceiverName, ReceiverEmail, SenderName and SenderEmail. The user can then use either AcceptInvitation or RejectInvitation on a invitation id.

– AcceptInvitation(Guid id) which accepts the invitation with the specified Invitatiton Id.

– RejectInvitation(Guid id) which rejects the invitation with the specified Invitatiton Id.

– ShareProject(int contactId, int projectId, int roleId, string email) which invites a contact to a project. See ProjectService to get a list of roles.

URL

https://webservices.24sevenoffice.com/Invitation/Invitation_V001/InvitationService.asmx

WSDL

Other

Data Types

InvoiceService

https://api.24sevenoffice.com/Economy/InvoiceOrder/V001/InvoiceService.asmx (WSDL)

Data Types

This service is used to get information about orders and invoices, as well as saving new or existing orders/invoices. This is done through the GetInvoices and SaveInvoices method.

Please note: If you have activated our latest Invoice Distribution System, some distribution logic may change. Distribution methods that were set on the customer cards in the CRM module are not longer valid and will be ignored. The new Distribution System will try a number of distribution methods and there is a wide array of customizations available in the Invoice Module, so there might not be any need for changes in your integration.

(Also please note that while the new Invoice Distribution System is compatible with older versions of the invoice service, functionality may be limited and an upgrade to the current version is advisable.)

With the new Distribution System activated, the following settings are available:

Distributor DistributionMethod Result
Default Unchanged If this is a new InvoiceOrder the new Distribution System is used. If this is an update to an existing order previous settings are retained.
Automatic Unchanged InvoiceOrder is processed in the new Distribution System, regardless of whether this is an update or a new InvoiceOrder.
Default/Automatic Print Automatic Print Distribution
Default/Automatic EMail Automatic Email Distribution
Default/Automatic ElectronicInvoice Automatic ElectronicInvoice Distribution
Manual Any Manual Distribution

 

SaveInvoices
This method is used to save and update orders and invoices in the 24SevenOffice system. Please note that it is not possible to change any properties of an order that is marked as Invoiced (i.e. an invoice), only orders may be updated. If you wish to update any of the InvoiceOrder properties, you simply have to specify the OrderId and the CustomerId and your changes.

Invoice Rows
If you are doing changes to any InvoiceOrder rows you need to set the ChangeState property as well with any of the following values: Add,Edit or Delete. In the cases of Editing or Deleting an InvoiceRow you also need to specify the RowId. This is an Id set by the 24SevenOffice system and not something you specify, if you wish to control the order of invoicerows you must use the SequenceNumber property. For other details, please see Invoice Row Data Types

Updating invoice rows
If you wish to update an existing invoice row, you must specify at least the RowId and the ProductId. Please note that if you do not specify a row property, e.g. Price this will be set to the default price for the specified product. So if you want to update the quantity in an invoice row, you have to specify the RowId, the ProductId and the Quantity, but also e.g. the Name, Price etc, if these values have been changed from the default values of the product.

Specifying the order of invoice rows
If you wish to control the order of invoicerows you must use the SequenceNumber property.

How to set an invoice as paid
A typical scenario is when a user buys items online and pays for them with PayPal, credit card etc. In this case you have to set the following properties on the InvoiceOrder:
* OrderStatus (Invoiced)
* Paid (datetime)
* PaymentMethodId (int), see GetPaymentMethods
* PaymentAmount (decimal)
* InvoiceDate (datetime)

With these properties set, the invoice will automatically be marked as paid in 24SevenOffice.

How to create a rest order
As with any general update of an invoice row, you need to make sure that all properties that matter to you are set. For example if you have changed the Price of a product from the default price, you must specify the value of this property when doing an update.

The following properties concern quantity:
Quantity: This is the amount of a given product
QuantityOrdered: The total quantity that was ordered of a given product
QuantityRest: This is set when creating a rest order. When getting this property it is set to its default: -1
QuantityDelivered: The quantity that was delivered of a given product

Let’s say you have an invoice row with a Quantity of 10. You can only deliver 4, so you would then set the following values:
<InvoiceRow>
<ProductId>1</ProductId>
<Price>1.00</Price>
<Name>Rest Order Test</Name>
<Quantity>10.00</Quantity>
<QuantityRest>6.00</QuantityRest>
</InvoiceRow>

This will give you the following values on your order:
Quantity: 4
QuantityOrdered: 10
QuantityRest: -1 (the default value, QuantityRest is only used for setting values)
QuantityDelivered: 0

A new order will also be created with the following values. This is the rest order:
Quantity: 6
QuantityOrdered: 10
QuantityRest: -1 (again, the default value)
QuantityDelivered: 4

Creating a basic invoice

Below is a simple XML example of an order with status Offer.

<?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
                    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <SaveInvoices xmlns="http://24sevenOffice.com/webservices">
          <invoices>
            <InvoiceOrder>
              <CustomerId>1</CustomerId>
              <OrderStatus>Offer</OrderStatus>
              <InvoiceRows>
                <InvoiceRow>
                  <ProductId>1</ProductId>
                  <Price>1.00</Price>
                  <Name>Test</Name>
                  <Quantity>1.00</Quantity>
                </InvoiceRow>
              </InvoiceRows>
            </InvoiceOrder>
          </invoices>
        </SaveInvoices>
      </soap:Body>
    </soap:Envelope>

 

GetInvoices
This method is used to get InvoiceOrder data. You need to specify InvoiceReturnProperties and rowReturnProperties in order to control what data you get in return. The available Search Parameters are: CustomerIds, OrderIds, InvoiceIds, OrderStates and ChangedAfter. If you wish to get a complete list of all invoices available you must use the ChangedAfter parameter and set the date back to your desired time range.

Below is a simple XML example for getting InvoiceOrder data:

<?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
                    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <GetInvoices xmlns="http://24sevenOffice.com/webservices">
          <searchParams>
            <CustomerIds>
              <int>1</int>
            </CustomerIds>
          </searchParams>
          <invoiceReturnProperties>
            <string>OrderId</string>
            <string>CustomerId</string>
            <string>CustomerName</string>
            <string>Addresses</string>
            <string>OrderStatus</string>
            <string>DateOrdered</string>
            <string>OurReference</string>
            <string>YourReference</string>
            <string>ReferenceNumber</string>
            <string>InvoiceRows</string>
          </invoiceReturnProperties>
          <rowReturnProperties>
            <string>ProductId</string>
            <string>RowId</string>
            <string>Name</string>
            <string>Quantity</string>
            <string>Type</string>
            <string>Price</string>
          </rowReturnProperties>  
        </GetInvoices>
      </soap:Body>
    </soap:Envelope>

Methods

Method Input type Input name Return type Description
GetDistributionLog Int32[] invoiceIds DistributionLog[] Gets the distribution log based on the given invoice Ids
GetInvoices InvoiceSearchParameters, String[], String[] searchParams, invoiceReturnProperties, rowReturnProperties InvoiceOrder Gets a list of invoices and orders based on search parameters. You have to specify which properties you want returned in both the InvoiceOrder-object and the InvoiceRow-objects.
SaveInvoices InvoiceOrder[] invoices InvoiceOrder[] Saves an array of invoices and returns them with their id (if new) or an APIException if an error happened.

Please note that it is not possible to submit any changes to InvoiceOrders with OrderStatus ‘Invoiced’.

When saving changes to existing InvoiceOrder rows please note that the ChangeState property needs to be set on the affected InvoiceRows.

UpdateInvoices InvoiceOrder[] invoices InvoiceOrder[] Updates an array of invoices. Valid update properties: InvoiceTitle, ReferenceNumber
GetInvoiceTemplates TemplateModel[] Gets a list of all Invoice Templates
GetDeliveryMethods DeliveryMethod[] Gets a list of all Delivery Methods
GetPaymentMethods PaymentMethod[] Gets a list of all Payment Methods
GetInvoiceDocument InvoiceDocumentSearchParameters Parameters byte[] Gets an Invoice PDF

PaymentService

This service is used for registering payments on invoices in the 24SevenOffice system. By calling RegisterInvoicePayment or RegisterInvoicePayments you can register a new payment. Mandatory fields are Date, Amount and InvoiceId.

URL

https://api.24sevenoffice.com/Economy/InvoiceOrder/V001/PaymentService.asmx

WSDL

 

Methods

Method Input type Input name Return type Description
RegisterInvoicePayment Payment Payment RegisterInvoicePaymentResult Sets/registers a single invoice as paid
RegisterInvoicePayments Payment[] RegisterInvoicePaymentsResult[] Registers a list of payments. Method will return a list of payments that failed in the saving process.

 



PersonService

URL

https://webservices.24sevenoffice.com/CRM/Contact/PersonService.asmx

WSDL

Methods

Method Input type Input name Return type Description
AddCategoryToPerson long, int personId, categoryId Adds a CRM Category to a person
RemoveCategoryFromPerson long, int personId, categoryId Removes a CRM Category from a person
GetPersonCategoryList long personId int[] Returns a list of category ids for a specific person
GetCategoryList Category[] Returns a list of all CRM categories
AddNote NoteData note int Adds a note and returns the Id of the added note
DeleteNote NoteData note Deletes a note
DeleteNoteById int noteId Deletes a note by using the id
GetNotes long personId NoteData[] Gets all notes for a specific person
GetPersonId string consumerPersonNo long Gets 24SevenOffice’s Person Id that corresponds to the given Consumer Person Id
GetPersonIdsByUserName string username long[] Gets a list of Person Ids from a username in 24SO’s system
GetPersons personSearch PersonSearchParameters PersonItem[] Gets a list of persons
GetPersonsDetailed personSearch PersonSearchParameters PersonItem[] Gets a list of persons with more detailed information
SavePerson personItem PersonItem long Saves a person and returns its ID
GetRelations
MakeRelation relation RelationData bool Insert/update relationdata between a company and a contact.

Other

DataTypes

ProductService

To use this service, you need to log in using the new Authenticate Service under the api.24sevenoffice.com domain.

This service is used to retrieve and save information about products. A product always belongs to a category so in order to save a new product you need to know which category it should belong to. You can get a complete list of categories by invoking the GetCategories method.

 

SaveProducts

The minimum required properties for saving a new product is CategoryId and Name, but you will typically want to include more properties. You can find a nice introduction to products on our help pages.

Below is a simple XML example for a request to SaveProducts:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
                  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SaveProducts xmlns="http://24sevenOffice.com/webservices">
      <products>
        <Product>
          <Name>TestProduct</Name>
          <CategoryId>1</CategoryId>
        </Product>
      </products>
    </SaveProducts>
  </soap:Body>
</soap:Envelope>

 

URL

https://api.24sevenoffice.com/Logistics/Product/V001/ProductService.asmx

WSDL

 

Methods

Method Input type Input name Return type Description
GetProducts ProductSearchParameters, String[] searchParams, returnProperties Product[] Returns a list of products based on the given search parameters. Will only return the properties specified in the returnProperties parameter.
SaveProducts Product[] products Product[] Saves a list of products
DeleteProducts Product[] products Product[] Deletes a list of products
GetCategories String[] returnProperties Category[] Returns a list of categories with the return properties specified.
SaveCategories Category[] categories Category[] Saves a list of categories
SetStockQuantity Int32, Decimal productId, stockQuantity Boolean Sets the stock quantity and returns true if no error occured.
GetDiscountMatrixPriceGroup Discount[]
GetDiscountMatrixCategory Discount[]
GetPriceList Int32 priceListId KeyValuePair[] Returns a KeyValuePair array of ProductIDs and Prices that match the specified PriceListId. Key = ProductId, Value = Price
GetAllPriceLists ProductPriceList[] Returns a list of product price list data

Other

DataTypes

ProjectService

URL

https://webservices.24sevenoffice.com/Project/V001/ProjectService.asmx

WSDL

 

Methods

Method Input type Input name Return type Description
GetProjectNameList ProjectShort[] Gets a list of the name and id of all projects
GetProjectList ProjectSearch Ps Project[] Gets a list of all projects
GetProjectsDetailed ProjectSearch Ps Project[] Gets a list of all projects with additional data
GetSingleProject int projectId Project Gets a single project by id
GetProjectTasks int projectId Task[] Returns a list of tasks for a specific project
GetMyProjectTasks Task[] Returns a list of the currently logged in user’s tasks
SaveProjectTask Task task Saves a task.
GetProjectRoles Role[] Returns a list of project roles
GetProjectStatuses Status[] Returns a list of project statuses
GetProjectTypes KeyValuePair[] Returns a list of project types. Key = Type Id, Value = Type Name
SaveProject Project project int Creates a new or edits an existing project
GetPipeLines Project KeyValuePair[] Returns a list of project substatuses. Key = Status Id, Value = Status Name

Other

Data Types

SalesOppService

URL

https://webservices.24sevenoffice.com/SalesOpp/V001/SalesOppService.asmx

WSDL

 

Methods

Method Input type Input name Return type Description
DeleteSalesOpp SalesOpp salesOpp Deletes a sales opp
DeleteSalesOppById int salesOppId Deletes a sales opp by its ID
GetSalesOppSteps SalesOppStep[] Gets a list of SalesOpp steps
GetSalesOppTypes SalesOppType[] Gets a list of SalesOpp types
GetSalesOpps SalesOppSearch salesOppSearch SalesOpp[] Gets a list of SalesOpps based on search parameters
SaveSalesOpp SalesOpp salesOpp Saves a new or edits an existing Sales Opp
GetSources CRMSource[] Gets all sources
GetCampaigns Campaign[] Gets all campaigns

 

Other

Data Types

TemplateService

Templates are specially customized tabs throughout the 24SevenOffice system that are set up for our clients by one of our consultants. Once set up, the client can set custom values for a given customer, project, sales opportunity and other elements in the 24SevenOffice system.

Getting Data
To get data from a template you send a request to GetTemplateList to identify the template you wish to use.

You can then send a request to GetTemplateValues to get a list of field values for a given templateId, idType and id. The id specified is for the given type, so if the idType is Customer the id must be a Customer Id. If the idType is Project the id must be a Project Id and so on. You can get a list of Type Ids by sending a request to GetTypeDefinitions.

Send a request to GetTemplateFields to get a list with a description of all the fields for a given template.

Saving Data
When saving data you need to Specify:
FieldId (This is set if you are updating an existing value. You get the value from GetTemplateFields)
Value (the value you wish to save)
OrderId
TemplateId (which you get from GetTemplates)
Id (e.g. Customer Id, Project Id)

If you want to set an option, e.g. in a dropdown menu, you send a request to GetTemplateFieldOptions to get the value for the option you wish to specify.

URL

https://api.24sevenoffice.com/CRM/Template/V001/TemplateService.asmx

WSDL

 

Methods

Method Input type Input name Return type Description
GetTemplateList Template[] Returns a list of templates
GetTemplateFields Int32 templateId TemplateField[] Returns a list of TemplateFields for the specified template
GetTemplateFieldOptions Int32, Int32 templateId, fieldId KeyValuePair[] Returns a list of the field options for the specified field. Key = Option Id, Value = Option Name.
GetTemplateValues Int32, TemplateType, Int32 TemplateValue[] Gets a list of values for the specified template and type id
SaveTemplateValues TemplateValue[] templateValue Saves the template values. Date values must be XML-formatted (yyyy-MM-ddThh:mm:ssZ)
GetTypeDefinitions KeyValuePair Gets a list of id types. Key = Id, Value = Name

Other

Data Types

TimeService

This service is used for getting information about hours and costs saved in the 24SevenOffice system. You can search for recent changes or hours registered after a given date with the ChangedAfter and RegisteredAfter search parameters in GetHours. These dates are in UTC, seconds are disregarded in the search, so only changes to minutes will have an effect on the search query.

Methods

Method Input type Input name Return type Description
SaveHour Hour Hour long Adds an hour into the time system
GetHours HourSearch hs Hour[] Returns a list of hours
GetProjectData ProjectDataSearch Pds ProjectData Returns information about a project
GetProjectList ProjectSearch Ps Project[] Returns a list of projects
GetWorkTypeList WorkTypeSearch Wts WorkType[] Returns a list of work types
AddCost Cost cost Adds a cost
GetCosts CostSearchParameters costSearchParameters Cost[] Gets a list of costs based on search parameters
DeleteHour Hour Hour bool Deletes an hour
GetSalaryTypes SalaryType[] Gets a list of salary types
GetHoursForApproval approvalSearchParameters approvalSearchParameters Hour[] Gets hours pending for approval
GetTimeSettings KeyValue[] Get settings for Time Module

URL

https://webservices.24sevenoffice.com/timesheet/v001/timeservice.asmx

WSDL

OTHER

Datatypes

Enum

TransactionService

To use this service, you need to log in using the new Authenticate Service under the api.24sevenoffice.com domain.

This service is mainly used to retrieve a list of journal transactions by using the GetTransactions method. Please note that you need to set the end date time to 23:59:59:59 in order to include all transactions of the end date rather than setting the date time to 00:00:00.

Properties and Search Parameters

The LinkId provides information on links between e.g. invoices, credit notes and payments. Please note that the LinkId is updated every time a new link is made between transactions. This means that you cannot rely on previously used LinkIds when searching for updates on invoice payments. (For example, an invoice is being linked with a part payment and gets LinkId 1. Another payment is made and all the linked transactions now have the LinkId 2).

The DateSearchParameters lets you choose if DateStart and DateEnd should use EntryDate or DateChangedUTC. EntryDate is the default value and returns all entries/transactions in the given date range, while DateChangedUTC gives you all transactions what have been updated. This means that you can search for all transactions that have been created or updated within a given date range. This makes it easy to e.g. find new payments that are linked to a transactions within a given time frame by simply searching for any updated transactions and checking their LinkIds for payment details.

URL

https://api.24sevenoffice.com/Economy/Accounting/V001/TransactionService.asmx

WSDL

Methods

Method Input type Input name Return type Description
GetTransactionTypes TransactionType[] Returns a list of transaction types
GetTransactions TransactionSearchParameters searchParams Transaction[] Returns a list of transactions
GetAggregated DateTime, Dimension[], Int16[], PeriodType, Boolean startDate, dimensions, accountNos, periodType, returnIB AggregatedData[] Returns aggregated data based on input parameters. The date range is from the specified start date until the end of that fiscal year. Dimensions are required, but account numbers are not. If you supply an empty array (or null) the aggregated data will be the sum of all accounts. If you do not set the period type, balance and IB per period will not be returned. You have to specify that you want Incoming Balance returned.

Other

Data Types

--- FAQ ---

How can I get all data from a service?
― We generally encourage you to limit the amount of data fetched, but in the instances where you need to fully sync data you can use the ChangedAfter search parameter (or similarily named DateTime search parameter in a service) and set the date sufficiently back in time to ensure that you get all available data.
I’m getting error message “Could not finish last Bundle! iError:2” when trying to use AccountService – SaveBundleList
― Please make sure that the accounting year has been defined in the client’s Accounting setup.
Is there any rate limiting on API calls?
― The rate limit for API calls is 7200 requests per hour