AttachmentService

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

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 Service
Attachment 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.
  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>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

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...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

more stuff then?

Methods

Method Input type Return Type Description
AppendChunk File AppendChunkResponse
AppendChunkByLength File AppendChunkByLengthResponse
Create Type CreateResult
DownloadChunk File DownloadChunkResult
GetCheckSum File GetCheckSumResult
GetFileInfo parameters GetFileInfoResult
GetMaxRequestLength GetMaxRequestLength
GetSize File GetSizeResult
Save File SaveResponse
GetStampNo -
GetApproverList - Get a list of approvers
GetSeries - Get stamp number series
GetSeriesStampNo - Get stamp number based on series ID