REST API
SOAP API
FAQ
Changelog
Terms & Conditions
Help Center
REST API
SOAP API
FAQ
Changelog
Terms & Conditions
Help Center
  • Getting Started
  • AuthenticateService
  • AccountService
  • AttachmentService
  • BudgetService
  • ClientService
  • CompanyService
  • FileService
  • InvoiceService
  • PaymentService
  • PersonService
  • ProductService
  • ProjectService
  • SalesOppService
  • TemplateService
  • TimeService
  • TransactionService

AttachmentService

This API is used for uploading incoming invoices and receipts. It is not associated to attachments for invoices created through the InvoiceService.

Warning

Please note: The AttachmentService has some references to older properties that are no longer in use, these are still referenced for backwards compatibility reasons, but can safely be ignored in your integration. You will find details and examples in the documentation below on how to submit images and image data.

PDF files are not supported.

Attachment ServiceAttachment Service WSDL

Data types

Guides

Uploading attachments

  1. To upload a new attachment, first send a request to Create, this creates a new ghost file that may be uploaded with AppendChunk.
  2. Use AppendChunk or AppendChunkByLength to upload the remaining file chunks.
  3. Optionally send a request to GetStampNo to get the next available StampNo to be used with the file. GetStampNo does not reserve the StampNo returned, you have to complete the upload with a request to Save. Otherwise the method will return the same StampNo.
  4. Once the file is uploaded send a request to Save.
    Save takes File and Location as its arguments.

Below is a sample XML request to Save. The Id is set to the value returned from the previous request to Create, StampNo in ImageFrameInfo is set to 456 and the InvoiceOCR value is set to 12345678. Location is set to Retrieval, so the image will show up in the inbox in the Retrieval Module.

TIP

Please note: If you wish to upload several pages for the same StampNo, set the PageNo key under MetaData to the appropriate page number you want to add.

    <?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soap:Body>
    <Save xmlns="http://24sevenoffice.com/webservices/economy/accounting/">
      <file>
        <Id>123</Id>
        <Type>Png</Type>
        <FrameInfo>
          <ImageFrameInfo>
            <Id>1</Id>
            <StampNo>456</StampNo>
            <MetaData>
              <KeyValuePair>
                <Key>PageNo</Key>
                <Value>1</Value>
              </KeyValuePair>
              <KeyValuePair>
                <Key>InvoiceOCR</Key>
                <Value>12345678</Value>
              </KeyValuePair>
            </MetaData>
          </ImageFrameInfo>
        </FrameInfo>
      </file>
      <location>Retrieval</location>
    </Save>
  </soap:Body>
</soap:Envelope>

Adding Pages

In order to add more files to a stamp number, you have to set the PageNo property. If you want add three files to a stamp number, you would add the following in each file upload:

	...

	<StampNo>123</StampNo>
	<MetaData>
		<KeyValuePair>
			<Key>PageNo</Key>
			<Value>1</Value>
		</KeyValuePair>
	</MetaData>

	...
	
	<StampNo>123</StampNo>
	<MetaData>
		<KeyValuePair>
			<Key>PageNo</Key>
			<Value>2</Value>
		</KeyValuePair>
	</MetaData>

	etc...

Methods

MethodInput typeReturn TypeDescription
AppendChunkFileAppendChunkResponse
AppendChunkByLengthFileAppendChunkByLengthResponse
CreateTypeCreateResult
DownloadChunkFileDownloadChunkResult
GetCheckSumFileGetCheckSumResult
GetFileInfoparametersGetFileInfoResult
GetMaxRequestLengthGetMaxRequestLength
GetSizeFileGetSizeResult
SaveFileSaveResponse
GetStampNo-
GetApproverList-Get a list of approvers
GetSeries-Get stamp number series
GetSeriesStampNo-Get stamp number based on series ID
Last Updated: 1/24/24, 8:37 AM
Prev
AccountService
Next
BudgetService