Skip to content

Service API

hgj52 edited this page Mar 6, 2020 · 1 revision

The service API

<!doctype html>

<title>OneTooX REST Push Service API</title> <style type="text/css"> body { font-family: Trebuchet MS, sans-serif; font-size: 15px; color: #444; margin-right: 24px; }

h1 { font-size: 25px; } h2 { font-size: 20px; } h3 { font-size: 16px; font-weight: bold; } hr { height: 1px; border: 0; color: #ddd; background-color: #ddd; }

.app-desc { clear: both; margin-left: 20px; } .param-name { width: 100%; } .license-info { margin-left: 20px; }

.license-url { margin-left: 20px; }

.model { margin: 0 0 0px 20px; }

.method { margin-left: 20px; }

.method-notes { margin: 10px 0 20px 0; font-size: 90%; color: #555; }

pre { padding: 10px; margin-bottom: 2px; }

.http-method { text-transform: uppercase; }

pre.get { background-color: #0f6ab4; }

pre.post { background-color: #10a54a; }

pre.put { background-color: #c5862b; }

pre.delete { background-color: #a41e22; }

.huge { color: #fff; }

pre.example { background-color: #f3f3f3; padding: 10px; border: 1px solid #ddd; }

code { white-space: pre; }

.nickname { font-weight: bold; }

.method-path { font-size: 1.5em; background-color: #0f6ab4; }

.up { float:right; }

.parameter { width: 500px; }

.param { width: 500px; padding: 10px 0 0 20px; font-weight: bold; }

.param-desc { width: 700px; padding: 0 0 0 20px; color: #777; }

.param-type { font-style: italic; }

.param-enum-header { width: 700px; padding: 0 0 0 60px; color: #777; font-weight: bold; }

.param-enum { width: 700px; padding: 0 0 0 80px; color: #777; font-style: italic; }

.field-label { padding: 0; margin: 0; clear: both; }

.field-items { padding: 0 0 15px 0; margin-bottom: 15px; }

.return-type { clear: both; padding-bottom: 10px; }

.param-header { font-weight: bold; }

.method-tags { text-align: right; }

.method-tag { background: none repeat scroll 0% 0% #24A600; border-radius: 3px; padding: 2px 10px; margin: 2px; color: #FFF; display: inline-block; text-decoration: none; }

</style>

OneTooX REST Push Service API

The OneTooX Archive API allows a customer to receive a copy of the processed job data from OneTooX.
More information: https://www.charlietango.dk/
Version: v1.0
BasePath:
MIT
https://github.com/OneTooX/RestArchive/blob/master/LICENSE.TXT

Access

  1. HTTP Basic Authentication
[ Jump to Models ]

Table of Contents

Up
post /api/v1.0/Archive
Post the archive message. (post)

The Content-Type header must be set and correspond to the content of the body.

Use the Accept header to control the format of the response. Possible values are application/json (default) and application/xml.

If the invocation succeeds HTTP status code 200 is returned.

If the invocation fails a problem details object is returned. The problem details object follows the guidelines in https://tools.ietf.org/html/rfc7807.

The following problem types are explicitly supported by the archive client:

  • https://onetoox.dk/unknown-receiver
    The receiver is not known in the receiving system
  • https://onetoox.dk/invalid-archive-category
    The archive category is not valid
  • https://onetoox.dk/validation-error
    Validation error. The specific error is described by the title and detail attributes
  • <h3 class="field-label">Consumes</h3>
    This API call consumes the following media types via the <span class="header">Content-Type</span> request header:
    <ul>
      <li><code>application/json</code></li>
      <li><code>text/json</code></li>
      <li><code>application/*+json</code></li>
      <li><code>application/xml</code></li>
      <li><code>text/xml</code></li>
      <li><code>application/*+xml</code></li>
    </ul>
    
    <h3 class="field-label">Request body</h3>
    <div class="field-items">
      <div class="param">ArchiveMessage <a href="#ArchiveMessage">ArchiveMessage</a> (required)</div>
    
      <div class="param-desc"><span class="param-type">Body Parameter</span> &mdash;  </div>
    
    </div>  <!-- field-items -->
    
    
    
    
    <h3 class="field-label">Return type</h3>
    <div class="return-type">
      
      String
    </div>
    
    <!--Todo: process Response Object and its headers, schema, examples -->
    
    
    <h3 class="field-label">Produces</h3>
    This API call produces the following media types according to the <span class="header">Accept</span> request header;
    the media type will be conveyed by the <span class="header">Content-Type</span> response header.
    <ul>
      <li><code>text/plain</code></li>
      <li><code>application/json</code></li>
      <li><code>text/json</code></li>
      <li><code>application/xml</code></li>
      <li><code>text/xml</code></li>
    </ul>
    
    <h3 class="field-label">Responses</h3>
    <h4 class="field-label">200</h4>
    Success
        <a href="#String">String</a>
    <h4 class="field-label">400</h4>
    Bad Request
        <a href="#ProblemDetails">ProblemDetails</a>
    

    [ Jump to Methods ]

    Table of Contents

    1. ArchiveMessage -
    2. AttentionInfo -
    3. Channel -
    4. ChannelResolution -
    5. Document -
    6. JobStatus -
    7. MailPriority -
    8. ProblemDetails -
    9. ReceiverType -
    The message containing the job metadata, document and addendums.
    jobId
    Integer The ID of the delivery job. format: int32
    parentJobId
    Integer The ID of the parent job, if any. Used for mail merges. The value is 0 if there is no parent. format: int32
    createTime
    Date The time of creation of the job. format: date-time
    customerId
    String The ID of the customer that the user belongs to.
    division
    String The name of the division that the user belongs to.
    userId
    String The ID of the user that sent the job.
    mainDocument
    Document The main document.
    addendums (optional)
    array[Document] The list of addendums, if any.
    fixedAddendumName (optional)
    String The name of the fixed addendum, if any.
    archiveCaseId (optional)
    String The case ID used for archiving, if any.
    archiveCategory
    String The category for archiving.
    archiveDescription (optional)
    String The description for archiving, if any.
    status
    JobStatus The status of the job.
    channel
    Channel The main channel of the job.
    channelResolution
    ChannelResolution The resolution of the main channel of the job.
    clientAddress
    String The IP address of the client delivering the job.
    clientInfo
    String Information on the client delivering the job. For non-webservice delivery this is the user agent of the client browser.
    clientVersion
    String The version of the client. For webservice delivery this is the version of the OneTooX server.
    isColorPrint (optional)
    Boolean Determines if color was used for remote printing.
    receiver
    String The ID of the receiver, e.g. a civil registration no. or a CBR no.
    receiverType
    ReceiverType The type of the receiver.
    attentionInfo (optional)
    AttentionInfo The AttentionInfo, if any.
    customerText (optional)
    String The customer-specified text, if any.
    digitalDestinationCountry (optional)
    String ISO code of the destination country for digital delivery. Currently only DK is supported.
    digitalPostReceipt (optional)
    String The receipt from Digital Post, if this is the main channel.
    documentType
    String The document type used for creating the job.
    digitalPostResponse (optional)
    String The Digital Post response address that the receiver can reply to if supplied.
    digitalPostResponseSubject (optional)
    String The subject belonging to the Digital Post response address.
    materialId (optional)
    String The Digital Post material ID, if Digital Post is the main channel.
    title
    String The title of the job.
    isArchived (optional)
    Boolean Determines if the job is archived.
    isDuplex (optional)
    Boolean Determines if the document is printed in duplex, if sent to remote print or local print.
    mailPriority (optional)
    MailPriority The mail priority, if sent to remote print.
    totalNumberOfPages
    Integer The total number of pages in the main document and addendums. format: int32
    totalNumberOfSheets
    Integer The total number of sheets in the main document and addendums. format: int32
    totalSize
    Integer The total size in bytes of the main document and addendums. format: int32
    outputSystem
    String The output system that was used to deliver the delivery.
    postalDestinationCountry (optional)
    String ISO code of the destination country for postal delivery.
    sendingSystem
    String The name of the system that sent the document
    AttentionInfo contains data related to the Digital Post AttentionFormat - see https://digst.dk/media/16810/vejledning-i-anvendelse-af-attentionformatet.pdf.
    pNummer (optional)
    String The P-nummer of the receiver.
    email (optional)
    String The e-mail of the receiver.
    personNavn (optional)
    String The name of the receiver.
    enhedsNavn (optional)
    String The OU of the receiver.
    primaerKlasse (optional)
    String FORM code (public classification).
    sekundaerKlasse (optional)
    String KLE code or similar (public classification).

    The main channel of the job.

    1 e-Boks.
    2 Remote print.
    3 Addendum.
    5 Digital Post.
    7 Local Print.
    8 Archive.
    9 Email.
    10 e-Boks Ekspres.

    The delivery resolution of the channel. The value is Accepted if delivery is mandatory.

    0 Accepted.
    1 Not delivered due to no receiver.
    2 Not delivered due to invalid receiver format.
    3 Not delivered due to receiver not being registered in the receiving system.
    A Document represents the main document of a job or an addendum.
    contentType
    String The content type of the document. Currently only application/pdf is supported.
    documentData
    byte[] The contents of the document. format: byte
    title
    String The title of the document.

    The status of the job.

    0 Waiting to get delivered to one or more channels.
    1 Delivered to all channels.
    3 The job has been cancelled and will not be delivered.
    99 A fatal error has occurred and the job will not be delivered.
    11 Delivery was not possible and this was acceptable for the channel.

    The mail priority of the job.

    1 Priority.
    2 Economy.
    type (optional)
    title (optional)
    status (optional)
    Integer format: int32
    detail (optional)
    instance (optional)

    The type of receiver of the job.

    0 No receiver.
    1 Person.
    2 Company.
    3 Email.