Documentation
FrançaisEnglish
Contact Us
 

LTU API and Services Reference

Here you will find the full API, services and action parameter documentation. We also have a Swagger page, useful to test a little but not fully configured (missing headers for EnrichedImages and Clicks, so it won't work, multipart stuff a little handmade...). You can find it here: https://api.onprint.com/Swagger

Request AccessTo get access to our services, you will have to request an API Key and a platform account to our development team. To do so, please fill in that request form.

Contact UsShould you have any feedback or question please feel free to contact us.

Code

LTU full API Reference

Getting started

Authentication

LTU uses OAuth2 as authentication standard. First, a token must be retrieved from a token endpoint, and then any call to the API, except the EnrichedImage and Click endpoints, must specify OAuth2 authentication type and token in the header. We will explain it more in detail below.

Authentication

Get a token

POST /token

The first step at login is to get a token using the standard OAuth2 request, also with a header containing the ApiKey. Username and password must be provided as a formData content. Example of form-data:

grant_type=password&username=toto@onprint.com&password=test

The content-type of the POST request must be application/x-www-form-urlencoded

The ApiKey Header must be provided as follows. It will return a Json containing user information and the token : ApiKey:xxx

The token is in the field: access_token

The token has an expiration date, also available in the response.

Header for API calls

Once we have the token to connect, we will use OAuth authentication for every API call, except the ones described below. The header must be built as follows:

  • Key: Authorization
  • Value: bearer token value

Authorization: Bearer AQAAANCMnd8BFdERjHoAwE_Cl-sBAAAAHufd(…)

Endpoints that do not require authentication

These endpoints are for image search or user creation / password recovery. As they do not require authentication, the ApiKey header (as well as others, see details in each endpoint part) will have to be set.

  • GET and POST /api/EnrichedImages
  • PUT /api/Clicks
  • POST /api/Pictures/Search

User rights and roles, node hierarchy

Node hierarchy

Objects in the platform are organized in nodes. Here are the main rules:

  • Nodes can be organizations, folders, documents, images or zones.
  • An organization can contain child organizations, folders or documents.
  • A folder can only contain documents.
  • A document can only contain images and images can only be contained in a document.
  • An image can contain zones and zones can only be contained in an image.
  • A user is attached to an organization, and his/her right levels will depend on the node level.

User roles

3 roles can be used in the LTU API. A user can have one or more roles.

  • Administrator: Can see, edit, add, delete users in his/her own organization (peers).
  • CustomerAccountManager: Can see, edit, add, delete users who belong to children organizations (customers). Can see, edit, add, delete documents, folders, organizations under the customer organization.
  • Designer: Can see, edit, add, delete documents, folders, organizations in its own organization.

Return codes

Here is a list of the main Return Codes in use in the application.

Success

200 OK

Standard response for successful HTTP requests. The actual response will depend on the request method used. In a GET request, the response will contain an entity corresponding to the requested resource. Example of use: in resource Folder, in GET /api/Folders/{id}, if the folder is found it is returned in the response body with return code 200.

201 Created

The request has been fulfilled, resulting in the creation of a new resource. Example of use: in resource Document, in POST /api/Documents, if the document could be created with no errors, return code is 201. The new document is returned in the response body.

204 No Content

The server successfully processed the request and is not returning any content. Example of use: in resource EnrichedImage, in POST /api/EnrichedImages, if the request was successful but no corresponding image was recognized, or did not contain any action, the return code is 204. Another example: in resource DocumentLanguage, in PUT /api/DocumentLanguages, if the language was correctly added to the document, the return code is 204.

Client Error

400 Bad Request

The server cannot or will not process the request due to an apparent client error. Example of use: in resource Icon, in PUT /api/Icons/{id}, if the image that is sent in the request is too large, the server will not be able to process the request and will respond 400.

401 Unauthorized

When authentication is required and has failed or has not yet been provided. Example of use: in any resource that needs authentication, if the Authorization header is not set, the server will respond 401.

403 Forbidden

The request was a valid request, but the server is refusing to respond to it. Example of use: in resource Account, in GET /api/accounts?organizationId={id}, if the user role does not allow him/her to see the organization, the response will be 403.

404 Not Found

The requested resource could not be found but may be available in the future. Example of use: in resource Action, in POST /api/Actions, If the given parent DocumentId does not lead to an existing document, the server will say that the resource cannot be found and return 404.

Server Error

500 Internal Server Error

This error should not happen, but can be raised when we did not handle properly something on the server side. Sometimes because of a bad request, or a bug. If you encounter this, please contact LTU.

Image Enrichment

Image enrichment

Documents

Document management

Property Type Description Comment
Id Guid Read-Only, generated
ParentId Guid
DefaultLanguage String Default language used for scan
Name String
ContentType String MIME ContentType Read-Only
Pages Int Pages count Read-Only
ActionCount Int Action Count Read-Only
Status String (see below) Can only be from active to inactive and back
Cover String Document Cover thumbnail URL Read-Only
DateCreated DateTime Read-Only
DateModified DateTime Read-Only

Document Status enumeration

  • Error: there was an error on the document.
  • Active: the document is uploaded and active, ready for recognition.
  • Inactive: the document is correctly uploaded but not activated on the server.
  • Preparation: the document is just created, images are being built and resized on the server.

GET description

/api/Nodes/{nodeId}/Documents
  • Parameter: NodeId (in path): node identifier (Node)
  • Returns: List of documents that are children of the node
/api/Documents/{id}
  • Parameter: DocumentId (in path): document identifier (Document)
  • Returns: Single document

POST rules

The POST method is used to create a document by sending the document file and its properties. The request body content type must be Multipart (multipart/form-data). The content is made of a File data (file) and a Form data (document).

Async parameter

In the URL, a parameter named async can be set like this: POST /api/Documents?async=false. Defaults to true if not set. When this parameter is true, the image creation is made asynchronously and the method returns directly. When it is false, the method waits for the image creation before returning. The difference between both methods is important in the case of a PDF file.

FileData (file)

The document itself. It can be a JPEG, PNG, GIF image, or a PDF document. The MIME type has to be given in the file content type.

FormData (document)

Contains a Document object. The form data name is document. DefaultLanguage, Name and ParentId are mandatory.

PUT method

PUT is a multipart method where only the attached file will be read, to replace the image. To modify document properties, a PATCH will have to be done.

FileData (file)

The document replacement itself. It can be a JPEG, PNG, GIF image, or a PDF document. The MIME type has to be given in the file content type.

PATCH fields

Can be sent independently: DefaultLanguage, Name, ParentId, Status.

DELETE description

/api/Documents/{id}
  • Parameter: DocumentId (in path): document identifier (Document)

Images

Images are contained into a document. They are created when creating the document; it is not possible to create an image outside a document.

Property Type Description Comment
Id Guid Read-Only, generated
DocumentId Guid
Status String (see below) Read-Only
Name String
ActionCount Int Read-Only
ZoneCount Int Read-Only
Order Int Order in document
AutoTrigger Bool? Auto trigger of the action. Only if 1 action
SmallThumbnail String 100px thumbnail Read-Only
BigThumbnail String 700px thumbnail Read-Only
DateCreated DateTime Read-Only
DateModified DateTime Read-Only

Image status enumeration

  • Active: the parent document is active
  • Inactive: the parent document is inactive

GET description

/api/Documents/{documentId}/Images
  • Parameter: documentId (in path): document identifier (Document)
  • Returns: List of images that are children of the document
    /api/Images/{id}
  • Parameter: Id (in path): image identifier (Image)
  • Returns: Single image

PUT rules

Name, Order, Status are mandatory.

PATCH fields

Can be sent independently: AutoTrigger, Name, Order, Status.

DELETE description

/api/Images/{id}
  • Parameter: Id (in path): image identifier (Image)

Actions

Action management

Property Type Description Comment
Id Guid Read-Only, generated
NodeId Guid
IconId Guid Optional
IsValid Bool An action is valid when all fields respect rules
LanguageCode String
Priority Int? Allows to sort actions
Order Int? Allows to sort actions
Name String
Style String Style, given as a css-like string
Type String (see below)
Content String Action content-see other doc
DateCreated DateTime Read-Only
DateModified DateTime Read-Only

Action Type enumeration

  • RAW
  • URL
  • SMS
  • CALENDAR
  • EMAIL
  • MAP
  • PHONE
  • VCARD
  • SHARE

Style

The Style is a free text zone, to be interpreted and understood by the Enriched Images searcher. Onprint smartphone application understands a Json string built as follows. There are 3 parts: the model (identifier so that the app knows how to parse it), the button style (css-like properties, written in Json), and the text style (css-like in Json too).

 {
     "model":"ONPrint-V2.0",
     "button":{
         "background-color":"#14d22c ",
         "opacity":0.6
     },
     "text":{
         "color":"#ffffff ",
         "font-weight":"normal",
         "font-style":"normal",
         "opacity":1
     }
 }

GET description

/api/Nodes/{nodeId}/Actions
  • Parameter: NodeId (in path): node identifier (Node)
  • Returns: Action list
    /api/Nodes/{nodeId}/Languages/{languageCode}/Actions
  • Parameters:
    • NodeId (in path): node identifier (Node)
    • LanguageCode (in path): language code (Language)
  • Returns: Action list
    /api/Actions/{id}
  • Parameter: ActionId (in path): action identifier (Action)
  • Returns: Single Action

POST and PUT rules

LanguageCode, NodeId are mandatory. Node must be a Document, Image or Zone and have a Title for the provided language (even if it is an empty string). If the action type is empty, it will be set to RAW.

PATCH fields

Can be sent independently: Content, IconId, LanguageCode, Name, NodeId, Order, Priority, Style, Type. If the Action Type is patched, then the Content must be provided too, and reverse.

DELETE description

/api/Actions/{id}
  • Parameter: ActionId (in path): action identifier (Action)

DocumentLanguages

The DocumentLanguage is an association between an existing document and an existing language. When creating a new document, a DocumentLanguage is automatically created, with the default language of the document.

Property Type
DocumentId Guid
LanguageCode String

GET description

/api/Documents/{documentId}/DocumentLanguages
  • Parameter: DocumentId (in path): document identifier (Document)
  • Returns: List of the Languages of the document

PUT rules

DocumentId and LanguageCode are mandatory.

DELETE description

/api/Documents/{documentId}/DocumentLanguages/{languageCode}
  • Parameters
    • DocumentId (in path): document identifier (Document)
    • LanguageCode (in path): language identifier (Language)

Languages

This resource corresponds to the languages in use in the platform. It is read-only.

Property Type Description
Code String
Name String
Region String
Zone String Geographic zone

GET description

/api/Languages/{code}
  • Parameter: LanguageCode (in path): language identifier (Language)
  • Returns: Single language
/api/Languages
  • Returns: List of all known languages for the application

Icons

Icons are associated to an action, but can be set at any node level. This will allow inheritance and default settings for the documents within a node.

Property Type Comment
Id Guid Read-Only, generated
NodeId Guid
Name String
Tags String Comma-separated values in a string
Url String Read-Only

GET description

/api/Nodes/{nodeId}/Icons
  • Parameters:
    • NodeId (in path): node identifier (Node)
    • inheritance (in url, optional): Boolean to get the properties of the node plus the ones inherited from the parent nodes. If the user has no view right on the parent(s), their Ids are hidden and only show the first 8 characters.
  • Returns: List of icons that are children of the node
/api/Icons/{id}
  • Parameter: IconId (in path): icon identifier (Icon)
  • Returns: Single icon

POST rules

The request body must be Multipart (multipart/form-data). The content is a File data and a Form data.

FileData

The icon image size must be maximum 64x64 pixel.

FormData

Contains the Json query object that goes with the content. It’s an Icon resource, named “icon”. NodeId is mandatory. Example:

 {
   "NodeId": "07b307ea-7253-4114-9ca1-5e367355df4a ",
   "Name": "MyIcon",
   "Tags": "work, telephone, call"
 }

PUT rules

The PUT function needs the IconId as a parameter in the path: PUT api/Icons?iconId=…, and then a file (multipart, as for POST). The role of the PUT function here is just to replace the file. It will not be possible to modify the icon resource. To do so, a PATCH will have to be used.

PATCH fields

Can be sent independently: NodeId, Name, Tags.

DELETE description

/api/Icons/{id}
  • Parameter: id (in path): icon identifier (Icon)

Titles

A title is associated to an image, document or zone, and a language. It is the title of the element that will be recognized. A title at a higher level than an image will be the default title for the children that are not overridden. The methods will fail if the node type is other than image, document or zone.

Property Type
NodeId Guid
LanguageCode String
Value String
Style String

Title Style

The Style is a free text zone, to be interpreted and understood by the Enriched Images searcher. See its description and example in the Action part.

GET description

/api/Nodes/{nodeId}/Titles
  • Parameter: nodeId (in path): node identifier (Node: Document, Image or Zone)
  • Returns: List of children titles of the given node.
/api/Nodes/{nodeId}/{languageCode}/Titles
  • Parameters:
    • nodeId (in path): node identifier (Node: Document, Image or Zone)
    • languageCode (in path): language identifier (Language)
  • Returns: Single title of the given node, for the given language.

POST rules

The POST method is used to create default titles in parent nodes (folders, organizations). Under a document (for a document, image or zone), titles are created either at the document / image / zone creation, or by using the DocumentLanguage resource, using the PUT method with the language. Then, to edit the titles under the document, a PUT will have to be done on each node. LanguageCode, NodeId, Value are mandatory.

PUT rules

Value is mandatory. LanguageCode and NodeId can’t be modified.

PATCH fields

Can be sent independently: Style, Value.

DELETE description

/api/Nodes/{nodeId}/{languageCode}/Titles
  • Parameters
    • nodeId (in path): node identifier (Node: Document, Image or Zone)
    • languageCode (in path): language identifier (Language)

Zones

A Zone is a sub part of an image which can be enriched independently. Creating a zone in an image will deactivate the parent image and activate the child zone. Actions of the original image become global to every zone.

Property Type Description Comment
Id Guid Read-Only, generated
ImageId Guid
Height Int Percentage of image size
Width Int Percentage of image size
PositionX Int Percentage of image size
PositionY Int Percentage of image size
Status String See Image status Read-Only
Name String
ActionCount Int Read-Only
Order Int Order in image
AutoTrigger Bool? Auto trigger of the action. Only if 1 action
SmallThumbnail String 100px thumbnail Read-Only
BigThumbnail String 700px thumbnail Read-Only
DateCreated DateTime Read-Only
DateModified DateTime Read-Only

GET description

/api/Images/{imageId}/Zones
  • Parameter: imageId (in path): image identifier (Image)
  • Returns: List of children zones of the given image.
/api/Zones/{id}
  • Parameter: id (in path): zone identifier (Zone)
  • Returns: Single zone

POST rules

ImageId, PositionX, PositionY, Width, Height are mandatory.

PUT rules

PositionX, PositionY, Width, Height are mandatory. ImageId can’t be modified.

PATCH fields

Can be sent independently: ActionStyle, AutoTrigger, Height, Name, PositionX, PositionY, TitleStyle, Width.

ImagesAndZones

ImageAndZones is an intermediary resource that combines an image with its children zones. It can be accessed the same way as an image, but will have no interest if the image has no zone. This resource is read-only; manipulating zones is directly done through the Zone resource.

Property Type Description
Id Guid
DocumentId Guid
Status String See Image status enumeration
Name String
ActionCount Int
ZoneCount Int
Order Int Order in document
AutoTrigger Bool Auto trigger of the action. Only if 1 action
SmallThumbnail String 100px thumbnail
BigThumbnail String 700px thumbnail
DateCreated DateTime
DateModified DateTime
Zones List Zone list

GET description

/api/Documents/{documentId}/ImagesAndZones
  • Parameter: documentId (in path): document identifier (Document)
  • Returns: List of images that are children of the document, with their zones.
/api/ImagesAndZones/{id}
  • Parameter: Id (in path): image identifier (Image)
  • Returns: Single image with its zones.

Files

All the files related to a document: thumbnails and originals. The files are created at the document creation, and can be modified when modifying a document. This endpoint is read-only.

GET description

/api/Documents/{documentId}/Images/{imageId}/files/{size}
  • Parameters:
    • documentId (in path): document identifier (Document)
    • imageId (in path): image identifier (image)
    • size (in path): pixel size of the biggest thumbnail size needed
  • Returns: An URL pointing to the image thumbnail for the given image, at the desired size. (content is a single string)
/api/Documents/{documentId}/Original
  • Parameter: DocumentId (in path): document identifier (Document)
  • Returns: An URL pointing to the original document file (single image or PDF) (content is a single string)

Scan of Enriched Images

Scan

EnrichedImages

This resource is a full image used for recognition and getting actions associated to an image. It contains everything that is needed to use onprint from a mobile device.

Property Type Description
Id Guid
BigThumbnailUrl String Big thumbnail URL (700px)
LanguageCode String
Title String Image title
DocumentId Guid
SessionId String Session Id: is set by the server
Order Int Image order in document
AutoTrigger Bool Auto trigger of the action Only if 1 action
TitleStyle String
Data String This field will always be empty, except when you scan a Picture, therefore you will have no Title, no Actions, no LanguageCode, no Styles.
Actions List

ActionMobile

Read-Only resource, only contained in EnrichedImages.

Property Type Description
Id Guid
Icon String Icon URL
Priority Int
Order Int
Name String
Style String
Type String See action type enumeration
Content String

Headers

To use any method for this resource, the following headers are required:

Header Mandatory?
SessionId
ApplicationInstanceId
ApplicationName *
ApplicationVersion *
ApiKey *
DeviceName *
DeviceSystemVersion *
DeviceSystemVersionName
SdkName
SdkVersion *
DeviceConnectivity
DeviceScreenDiagonal
DeviceScreenHeight
DeviceScreenWidth

If SessionId is null, it will be initialized by the server and given back in the EnrichedImage.

GET description

/api/EnrichedImages/{id}
  • Parameters:
    • id (in path): image identifier (Image)
    • LanguageCode (in query url): language identifier (Language)
  • Returns: Enriched image: the image with its actions in the language given in parameter

POST description

The POST method here is used as a search query, to search an image using image recognition. The request body content type must be Multipart (multipart/form-data). The content is made of a File data and a Form data.

FileData

Contains the image file of the picture taken (image/jpeg content type). The picture can be compressed, put in black&white and pre-treated to ease image recognition.

FormData

Contains the Json query object that goes with the content. The parameter only contains one property: Language (string) containing a language code. The form data name is “query”. Example:

 {
     "Language":"fr-FR"
 }
Response

The response is the enriched image with localized actions. Here is an example:

 {
   "Id": "712816b1-ae76-47fb-801f-a54b49378fb5",
   "BigThumbnailUrl": "http://toto.com/bigthumb.jpg",
   "LanguageCode": "fr-FR",
   "Title": "Tout sur les Poissons",
   "DocumentId": "07b307ea-7253-4114-9ca1-5e367355df4a",
   "SessionId": "140cc120-e78a-4039-aef4-1b4b20436a58",
   "Order": 1,
   "AutoTrigger": true,
   "Actions": [{
       "Id": "1e60ce69-32e8-45b7-8655-36a1361ce4bc",
       "Icon": "http://toto.com/icon.jpg",
       "Priority": 2,
       "Order": 8,
       "Name": "Nous rejoindre",
       "Type": "URL",
       "Content": "{
         \"Url\": \"http://www.onprint.com\",
         \"IsEmbeddedWebView\": \"true\",
         \"IsAnonymousURL\": \"true\",
         \“ContentType\”:\”text/html\”}"
     }]
 }

The content parameter types are described in another document.

Clicks

A click is an event resource that is used to track a click of a user on a given action. The most common use case is the smartphone application: the click is called after an image recognition and action listing, when the user taps on an action. The click is stateless, write-only.

Headers

To use this method, the following headers are required:

Header Mandatory?
SessionId *
ApiKey *

If SessionId is null, it will be initialized by the server.

PUT rules

The PUT method is simply called with the Action identifier in the URL: PUT /api/clicks?actionId=…

Clickstream and statistics

Clickstream and statistics

Matches

Through this resource you can access information about the search requests made against a document.

Property Type Description
RequestTime DateTime
DeviceSystemVersion String
Language String Language code
Operating System String
ImageOrder Int Order of image in document
DocumentName String
Host String IP of caller
Clicks List Clicks associated to the match

Clicks

Read-Only resource, only contained in Matches.

Property Type Description
ClickTime DateTime
Host String IP of caller
ActionName String
ActionOrder Int Order of action in image
ActionType String
ActionId Guid

GET description

/api/Matches?documentId=…
  • Parameter: documentId (in request): document identifier (Document)
  • Returns: Match

User Management

User Management

Roles

Roles are associated to rights management and permissions of a user. It is not possible to add a new role. The PUT method allows to associate a User to a known role.

Property Type Description
Role String Nom du rôle*

Role enumeration

  • Administrator
  • CustomerAccountManager
  • Designer

GET description

/api/Roles

Returns All known roles

/api/Users/{userId}/Roles
  • Parameter: userId (in path): user identifier (User)
  • Returns: List of roles associated to the user.

PUT rules

The PUT method needs the userId and the role name as parameters in the path, and no content: PUT api/Users/{userId}/Roles/{role}. Example: PUT /api/Users/123456/Roles/Designer

DELETE description

/api/Users/{userId}/Roles/{role}
  • Parameters:
    • userId (in path): user identifier (User)
    • role (in path): role string value

Users

Management of the platform users. A user is attached to an organization.

Property Type Description Comment
Id Guid Read-Only, generated
OrganizationId Guid
UserName String
Mail String e-mail address
FirstName String
LastName String
Password String
Status String (see below)
Gender String (see below)

User Status enumeration

  • Inactive
  • Active

User Gender enumeration

  • Unspecified
  • Other
  • Man
  • Woman

GET description

/api/Organizations/{organizationId}/Users
  • Parameter: organizationId (in path): organization identifier (Organization)
  • Returns: List of users of the given organization.
/api/Users?username=…
  • Parameter: username (in URL): user login name (User)
  • Returns: Single user
/api/Users/{id}
  • Parameter: Id (in path): user identifier (User)
  • Returns: Single user

POST rules

OrganizationId, Mail are mandatory. If provided Username is NULL, Mail address will be copied into Username.

PUT rules

OrganizationId, Mail are mandatory. PUT does not update Password. If provided Username is NULL, Mail address will be copied into Username.

PATCH fields

Can be sent independently: Status, Password.

DELETE description

/api/Users/{id}
  • Parameter: Id (in path): user identifier (User)

Account

An organization’s account, created after the organization creation. RemainingCredit depends on the contract type. The other fields are counters. This resource is read-only.

Property Type Description
OrganizationId Guid
ValidityDate DateTime End of contract date
ActivePages Int Number of active pages
ActivationCumul Int Number of pages that have been activated at least once
AccountType String (see below)
RemainingCredit int Remaining pages to activate

Account Type enumeration

  • YearlySubscription: the organization is not billed on page number, but on a year basis subscription.
  • ActivePages: a price is set for the number of active pages at a given time. When deactivating page, the remaining page credit increases.
  • ActivationCumul: a price is set for the number of activations. The credit is consumed once, and is not given back when deactivating a doc.

GET description

/api/Account
  • Parameter: OrganizationId (in url): organization identifier (Organization).
  • Returns: Single Account

Credits

A credit is an event resource that means a transaction between a source and a target. The source is the organization of the user that is logged in, the target is the organization identifier given in the Json parameter. To give or take credits, the user must have sufficient rights on the source and on the target organizations. The credit transaction is stateless, write-only.

Property Type
OrganizationId Guid
Amount Guid
Direction String

Credit Direction enumeration

  • Debit: “take”: the credit amount is taken from the target (parameter org), and given to the source (user org)
  • Credit: “give”: the credit amount is taken from the source (user org), and given to the target (parameter org).

PUT rules

OrganizationId, Amount and Direction are all mandatory.

The Logo is associated to an organization. It is used for platform client display. It can only be set or deleted from here, and its URL is available in the organization resource properties.

PUT rules

The request body content type must be Multipart (multipart/form-data). It needs the OrganizationId as a parameter in the path: PUT api/Logo/{id} and a File Data. In File data, the logo can be any image type (png, jpg, gif).

DELETE description

/api/Logo/{id}
  • Parameter: Id (in path): organization identifier (Organization)

Node Hierarchy

Node Hierarchy

Organizations

An organization represents a customer (company or individual). It’s the main node of a document hierarchy.

Property Type Description Comment
Id Guid Read-Only, generated
ParentId Guid? NodeId (parent)
Logo String Logo URL Read-Only
LanguageCode String
Name String
ApiKey String API Key, used for WebAPI calls Read-Only
AccountType String See account type enumeration Read-Only
MobileApiAuthorized Bool Mobile can reach the API Read-Only
WebApiAuthorized Bool Any API access Read-Only
IRProviderId Guid Id and access details of IR Provider Read-Only
ActivationCumul Int See account resource Read-Only
DeactivationCumul Int Read-Only
TotalDebit Int Read-Only
TotalCredit Int Read-Only
DateCreated DateTime Read-Only
DateModified DateTime Read-Only
PicturesCount Int? Pictures Counter, only for organizations in Pictures mode. Updated when option GetPicturesCount is True in GET Organizations/Id. Read-Only

GET description

/api/Nodes/{nodeId}/Organizations
  • Parameter: nodeId (in path): node identifier (Node)
  • Returns: List of children organizations of the given node.
/api/Organizations/{id}
  • Parameter: id (in path): organization identifier (Organization)
  • Parameter: activationCumul (bool, in URL): will calculate the counters (Activation Cumul, Deactivation Cumul, Total Debit, Total Credit) cumulating child nodes.
  • Parameter: getPicturesCount (bool, in URL): will calculate - update and return Pictures Count, if any Pictures in the organization.
  • Returns: Single organization

POST and PUT rules

LanguageCode, Name, ParentId are mandatory.

PATCH fields

Can be sent independently: LanguageCode, Name, ParentId.

DELETE description

/api/Organizations/{id}
  • Parameter: Id (in path): organization identifier (Organization)

Special fields

AccountType, IRProviderId, MobileApiAuthorized and WebApiAuthorized are special fields that require LTU input and cannot be set / modified. Contact us for more information.

Folders

Folder management.

Property Type Description Comment
Id Guid Read-Only, generated
ParentId Guid NodeId
Name String
DateCreated DateTime Read-Only
DateModified DateTime Read-Only

GET description

/api/Nodes/{nodeId}/Folders
  • Parameter: NodeId (in path): node identifier (Node)
  • Returns! List of folders that are children of the node
/api/Folders/{id}
  • Parameter: FolderId (in path): folder identifier (Folder)
  • Returns: Single folder

POST and PUT rules

Name and ParentId are mandatory.

PATCH fields

Can be sent independently: Name, ParentId.

DELETE description

/api/Folders/{id}
  • Parameter: FolderId (in path): folder identifier (Folder)

Nodes

A node is an element of arborescence that hierarchically organizes Organizations, Folders, Documents, Images and Zones. It contains no information but the hierarchy of nodes. Nodes are systematically created among with Organizations, Folders, Documents, Images and Zones.

Property Type
Id Guid
Type String
ParentId Guid
Name String

Node Type enumeration

  • Document
  • Organization
  • Folder

GET description

/api/Nodes/{id}/Nodes
  • Parameter: id (in path): node identifier (Node)
  • Returns: List of children nodes which parent is the one given in parameter.

Properties

Properties define default behavior for nodes. Today it only concerns default Icon or default Style. Behavior of properties is different for icon properties and style properties. For an icon, it is only stored, not used by the server and not provided in the list of icons in the node. For a style, the information is used by the server. The style is automatically set for all the children titles or actions, existing or new, when there is no other defined style in the hierarchy.

Property Type Comment
Id Guid Read-Only, generated
NodeId Guid
Type String
Name String
Value String

Property Type enumeration

  • Style (see how the Style value is built in the Action part)
  • Icon

Property Name constraint

If Property Type is “Style”, Property name must be one of the following. It indicates whether the property sets a default ActionStyle or a default TitleStyle:

  • Action
  • Title

GET description

/api/Nodes/{nodeId}/Properties
  • Parameters:
    • nodeId (in path): node identifier (Node)
    • type (in url, optional): type identifier, to only get properties of the given type
    • inheritance (in url, optional): Boolean to get the properties of the node plus the ones inherited from the parent nodes. If the user has no view right on the parent(s), their Ids are hidden and only show the first 8 characters.
  • Returns: List of children properties of the given node.
/api/Properties/{id}
  • Parameter: Id (in path): property identifier (Property)
  • Returns: Single property

POST and PUT rules

NodeId, Type and Name are mandatory.

PATCH fields

Can be sent independently: Name, Value.

DELETE description

/api/Properties/{id}
  • Parameter: Id (in path): property identifier (Property)

History

History Node Management.

Property Type
Date DateTime
User String
Operation * String

Operation enumeration

  • CREATE
  • ACTIVATION (Document only)
  • DEACTIVATION (Document only)
  • MOVE
  • RENAME
  • REPLACE (Document only)
  • UPDATE
  • MIGRATION

GET description

/api/Nodes/{nodeId}/History
  • Parameter: NodeId (in path): node identifier (Node)
  • Returns: List of history of the node

Core Image Recognition

Core Image Recognition

Sometimes, you will only need the Platform to identify an image, not to enrich it with actions, languages and styles. There are entry points for that. You only need a login, an OrganizationId (you get it when you log in), and an API Key for searching.

This part is optimized for High Volumes / High Speed image recognition. No image is stored in the platform, and data is indexed in a fast database.

This API also allows to search an image based on the color of another image. The principle stays the same but if you need more information please do not hesitate to contact us.

Pictures

A Picture is a simple, single Image. It is not compatible with the whole Node hierarchy and cannot be into a Document, nor listed in a Folder. There cannot be Zones in it. It is only linked to an Organization.

Property Mandatory? Type Description Comment
Id String Picture Id in the platform. Read-Only, generated
_objectId String Internal Id, useful for pagination (see ) Read-Only, generated
Name * String Picture name. Can be your own identifier
Data String Picture metadata. You can put whatever you want, in any format.
OrganizationId * String Organization's Id. Pictures will be listed under it.
BigThumbnailUrl String URL of the Picture's Thumbnail. (only for display) Read-Only, generated
SessionId String Session identifier that you can use to link events to the IR. Read-Only, generated
RecognitionScore String Score of the image recognition, regarding the query image. Read-Only
Keywords String[] Keywords attached to the picture, to filter searches.

GET description

/api/Pictures/{id}
  • Parameter: Id (in path): picture identifier (Picture)
  • Returns: Single picture
/api/Organizations/{id}/Pictures
/api/Organizations/{id}/Pictures?lastId={lastId}&limit={limit}&reverseOrder={reverseOrder}
  • Parameters:
    • Id (in path): organization identifier (Organization)
    • lastId (in URL, optional): the last Picture's __objectId_ previously received. For pagination. The next set of results will then be returned. If no lastId is provided, the results will be the first page.
    • limit (in URL, optional): maximum number of results. If no limit is provided or if the limit is 0, the 50 first pictures will be returned.
    • reverseOrder (in URL, optional): true if you need to get the list in reverse order (most recent first). In this case, always set it in the query, and the lastId will have to be the smallest __objectId_.
  • Returns: List of Pictures under an organization. LastId and Limit are used for Pagination. The __objectIds_ are ordered.

POST rules

The POST method is used to create a picture by sending the image file and its properties. The request body content type must be Multipart (multipart/form-data). The content is made of a File data (file) and a Form data (picture).

FileData (file)

The image itself. It can be a JPEG, PNG, or GIF image. The MIME type has to be given in the file content type.

FormData (picture)

Contains a Picture object. The form data name is picture. Name and OrganizationId are mandatory. If you don't know where to find an OrganizationId, yours is in the token when you log in.

PUT description

Calling PUT /api/Pictures with an existing updated Picture in the body will only update its Name, Data and Keywords.

PATCH description

Calling PATCH /api/Pictures with an existing updated Picture in the body can update its Name, Data and Keywords, if a value is entered for each.

DELETE description

/api/Pictures/{id}
  • Parameter: Id (in path): picture identifier (Picture) Delete cannot be undone!

SEARCH (POST) rules

The POST method on SEARCH is used to query the image for recognition. The request body content type must be Multipart (multipart/form-data). The content is made of a File data (file) and a Form data (query), currently left empty. This method does not require authentication but the following headers:

Header Mandatory?
ApplicationInstanceId
ApplicationName *
ApplicationVersion *
ApiKey *
DeviceName *
DeviceSystemVersion *
DeviceSystemVersionName
SdkName
SdkVersion *
DeviceConnectivity
DeviceScreenDiagonal
DeviceScreenHeight
DeviceScreenWidth
FileData (file)

The query image itself. It can be a JPEG, PNG, or GIF image. The MIME type has to be given in the file content type.

FormData (query)

Please send also a query consisting of an empty form { }. The form data name is query. A query object to precise / filter results. Currently it consists of adding the picture's keywords as a Json:

{
    Keywords:["keyword1", "keyword2"]
}
Returns

The Search returns a list of pictures matching the query image and, if there are, the keywords. Every matching Picture is returned with its RecognitionScore between 0 and 1, the highest being 1.

ONprint API : Services

ONprint API

Authentication

Authentication

Onprint uses OAuth2 as authentication standard. First, a token must be retrieved from a token endpoint, and then any call to the API, except the EnrichedImage and Click endpoints, must specify OAuth2 authentication type and token in the header. We will explain it in more details below.

Token

POST /token

The first step at login is to get a token using the standard OAuth2 request, also with a header containing the ApiKey. Username and password must be provided as a formData content. Example of form-data: grant_type=password&username=toto@onprint.com&password=test

The content-type of the POST request must be: application/x-www-form-urlencoded

The ApiKey Header must be provided as follows: ApiKey:xxx It will return a Json containing user information and the token.

The token is in the field: access_token

The token has an expiration date, also available in the response.

Header for API calls

Once we have the token to connect, we will use OAuth authentication for every API call, except the ones described below.

The header must be built as follows:

  • Key: Authorization
  • Value: bearer token value

Authorization: Bearer AQAAANCMnd8BFdERjHoAwE_Cl-sBAAAAHufd(…)

Automation

Automation

Import a document

Import actions in a document, providing a XML or a Json string. The document must have been created and uploaded before, using the API (POST /api/documents).

Syntax

PUT /services/Automation/Import

Request

  • documentId (in url) : id of the document (Document)
  • type (in url) : "XML" or "JSON"
  • Import (as data : XML or Json content) : Object containing a Json or / and a XML representation of the document’s languages, titles and actions. If both are provided, the Json representation will be used in priority.

    The Import format (XML or JSON) is exactly the same as the exported format (see below).

    Json representation example, explained:

    Document-level properties: default values, titles, default actions, images

    "DefaultLanguage":"fr-FR",
     "Name":"Doc1",
     "ActionStyle":"",
     "TitleStyle":"",

List of default titles for the document. Here we have 2 languages: French and US English. The titles are empty because they have not been set yet. In this example other titles are set in the image, therefore we don’t need them. Titles need to be set anyway, even empty, as they are also used to list the languages of the document.

    "Titles":
      [{
         "LanguageCode":"en-US",
         "Value":""
     },{
         "LanguageCode":"fr-FR",
         "Value":""
     }],

List of global actions for the document. Here we have 2 actions for each language. These actions will be attached to the document, and shown for every image of the document.

    "Actions":
     [{
         "LanguageCode":"en-US",
         "Priority":0,
         "Order":1,
         "Name":"Oww Yeah 1",
         "Type":"URL",

Note that Action content is a Serialized Json, not directly an object, because it can have different types (see Action object in API documentation).

        "Content":"{\"Url\":\"www.onprint.com\",\"IsEmbeddedWebView\":false,\"IsAnonymousURL\":false,\"ContentType\":\"Text/html\"}",
         "Style":null
     },{
         "LanguageCode":"en-US",
         "Priority":0,
         "Order":2,
         "Name":"Oww Yeah 2",
         "Type":"URL",
     "Content":"{\"Url\":\"www.onprint.com\",\"IsEmbeddedWebView\":false,\"IsAnonymousURL\":false,\"ContentType\":\"Text/html\"}",
     },{
         "LanguageCode":"fr-FR",
         "Priority":0,
         "Order":1,
         "Name":"éléphant 1",
         "Type":"URL",
 "Content":"{\"Url\":\"www.onprint.com\",\"IsEmbeddedWebView\":false,\"IsAnonymousURL\":false,\"ContentType\":\"Text/html\"}",
     },{
         "LanguageCode":"fr-FR",
         "Priority":0,
         "Order":2,
         "Name":"éléphant 2",
         "Type":"URL",
 "Content":"{\"Url\":\"www.onprint.com\",\"IsEmbeddedWebView\":false,\"IsAnonymousURL\":false,\"ContentType\":\"Text/html\"}",
     }],

Images correspond to the details of the pages of the document. For each page we will list the associated titles and actions.

    "Images":
     [{
         "Name":"Page 1",
         "AutoTrigger":false,
         "ActionStyle":"",
         "TitleStyle":"",

As for the document before, the titles have the same structure. Here they correspond to the titles only for this page.

        "Titles":
         [{
             "LanguageCode":"en-US",
             "Value":"All you ever wanted to know"
         },{
             "LanguageCode":"fr-FR",
             "Value":"Tout sur les éléphants"
         }],

And finally, the actions associated to the image itself. Here we have 2 per language. When the image will be flashed on a French phone, we will see the 3 French global actions plus the 2 actions defined below for French.

        "Actions":
         [{
             "LanguageCode":"en-US",
             "Priority":0,
             "Order":1,
             "Name":"Action of page 1, nr 1",
             "Type":"URL",
             "Content":"{\"Url\":\"www.onprint.com\",\"IsEmbeddedWebView\":false,\"IsAnonymousURL\":false,\"ContentType\":\"Text/html\"}",
         },{
             "LanguageCode":"en-US",
             "Priority":0,
             "Order":2,
             "Name":"Action of page 1, nr 2",
             "Type":"URL",
             "Content":"{\"Url\":\"www.onprint.com\",\"IsEmbeddedWebView\":false,\"IsAnonymousURL\":false,\"ContentType\":\"Text/html\"}",
         },{
             "LanguageCode":"fr-FR",
             "Priority":0,"Order":1,
             "Name":"éléphant de la page 1, nr 1",
             "Type":"URL",
             "Content":"{\"Url\":\"www.onprint.com\",\"IsEmbeddedWebView\":false,\"IsAnonymousURL\":false,\"ContentType\":\"Text/html\"}",
         },{
             "LanguageCode":"fr-FR",
             "Priority":0,
             "Order":2,
             "Name":"éléphant de la page 1, nr 2",
             "Type":"URL",
             "Content":"{\"Url\":\"www.onprint.com\",\"IsEmbeddedWebView\":false,\"IsAnonymousURL\":false,\"ContentType\":\"Text/html\"}",
         }],

If the image has zones, they will be defined here. A zone is like an image, but it has a Height, width, positions, expressed as percentages of the full image. Titles, actions are defined. If the image has zones, the actions of the image will work as global document actions and will be added to the zone actions. The image itself will not be active, the zones will be.

        "Zones": [{
             "Height":20,
             "Width":10,
             "PositionX":1,
             "PositionY":2,
             "Name":"Zone1",
             "AutoTrigger":false,
             "ActionStyle":"",
             "TitleStyle":"",
             "Titles":[{
                 "LanguageCode":"fr-FR",
                 "Style":null,
                 "Value":""
             }],
             "Actions":[{
                 "LanguageCode":"fr-FR",
                 "Priority":0,
                 "Order":1,
                 "Name":"coucou zone1",
                 "Type":"URL",
                 "Icon":null,
                 "Content":"{\"Url\":\"www.onprint.com\",\"IsEmbeddedWebView\":false,\"IsAnonymousURL\":false,\"ContentType\":\"Text/html\"}",
                 "Style":null
             }]
         }]
     }]
 }

There is also the possibility to set a Style for any Title or any Action (css-like string, see action description in API documentation), and an Icon Id (known Guid) for any action. XML representation example:

This is the same as before, but in XML. The structure is exactly the same.

 <?xml version="1.0" encoding="utf-16"?>
 <Document DefaultLanguage="fr-FR" Name="Doc1">
     <ActionStyle />
     <TitleStyle />
     <Titles>
         <Title LanguageCode="en-US"></Title>
         <Title LanguageCode="fr-FR"></Title>
     </Titles>
     <Actions>
         <Action LanguageCode="en-US" Priority="0" Order="1" Name="Oww Yeah 1" Type="URL">

The content is still Json: it is a string that will be set as is in the content.

    <Content>{"Url":"www.onprint.com","IsEmbeddedWebView":false,"IsAnonymousURL":false,"ContentType":"Text/html"}</Content>
         </Action>
         <Action LanguageCode="en-US" Priority="0" Order="2" Name="Oww Yeah 2" Type="URL">
     <Content>{"Url":"www.onprint.com","IsEmbeddedWebView":false,"IsAnonymousURL":false,"ContentType":"Text/html"}</Content>
         </Action>
         <Action LanguageCode="fr-FR" Priority="0" Order="1" Name="éléphant 1" Type="URL">            <Content>{"Url":"www.onprint.com","IsEmbeddedWebView":false,"IsAnonymousURL":false,"ContentType":"Text/html"}</Content>
         </Action>
         <Action LanguageCode="fr-FR" Priority="0" Order="2" Name="éléphant 2" Type="URL">            <Content>{"Url":"www.onprint.com","IsEmbeddedWebView":false,"IsAnonymousURL":false,"ContentType":"Text/html"}</Content>
         </Action>
     </Actions>
     <Images>
         <Image Name="Page 1" AutoTrigger="false">
             <ActionStyle />
             <TitleStyle />
             <Titles>
                 <Title LanguageCode="en-US">All you ever wanted to know</Title><Title LanguageCode="fr-FR">Tout sur les éléphants</Title>
             </Titles>
             <Actions>
                 <Action LanguageCode="en-US" Priority="0" Order="1" Name="Action of page 1, nr 1" Type="URL">
                     <Content>{"Url":"www.onprint.com","IsEmbeddedWebView":false,"IsAnonymousURL":false,"ContentType":"Text/html"}</Content>
                 </Action>
                 <Action LanguageCode="en-US" Priority="0" Order="2" Name="Action of page 1, nr 2" Type="URL">
                     <Content>{"Url":"www.onprint.com","IsEmbeddedWebView":false,"IsAnonymousURL":false,"ContentType":"Text/html"}</Content>
                 </Action>
                 <Action LanguageCode="fr-FR" Priority="0" Order="1" Name="éléphant of page 1, nr 1" Type="URL">
                     <Content>{"Url":"www.onprint.com","IsEmbeddedWebView":false,"IsAnonymousURL":false,"ContentType":"Text/html"}</Content>
                 </Action>
                 <Action LanguageCode="fr-FR" Priority="0" Order="2" Name="éléphant of page 1, nr 2" Type="URL">
                     <Content>{"Url":"www.onprint.com","IsEmbeddedWebView":false,"IsAnonymousURL":false,"ContentType":"Text/html"}</Content>
                 </Action>
             </Actions>
             <Zones>
                 <Zone Height="20" Width="10" PositionX="1" PositionY="2" Name="Zone1" AutoTrigger="false">
                     <ActionStyle />
                     <TitleStyle />
                     <Titles>
                         <Title LanguageCode="fr-FR"></Title>
                     </Titles>
                     <Actions>
                         <Action LanguageCode="fr-FR" Priority="0" Order="1" Name="coucou zone1" Type="URL">
                             <Content>{"Url":"www.onprint.com","IsEmbeddedWebView":false,"IsAnonymousURL":false,"ContentType":"Text/html"}</Content>
                         </Action>
                     </Actions>
                 </Zone>
             </Zones>
         </Image>
     </Images>
 </Document>"

Response

The response type is 204, NoContent.

Export a document

Syntax

GET /services/Automation/Export

Request parameters

  • documentId (in url) : id of the document (Document)
  • type (in url) : "XML" or "JSON"

Response

Export XML or Json object, as defined in the Import paragraph.

Reporting and measuring

Reporting and measuring

Get Match cumul

Gets the number of matches on a document (by Id or by image search), cumulated per day.

Syntax

GET /services/Clickstream/GetMatchCumul

Request parameters

  • documentId (in url) : id of the document (Document)

Response

Json MatchCumul object list.

Property Type Description
Timestamp Datetime Day corresponding to the measure cumul
Count Long Number of matches

Example:

 [{
     "Timestamp":"2016-03-09T00:00:00Z",
     "Count":5
 },
 {
     "Timestamp":"2016-03-10T00:00:00Z",
     "Count":23
 },
 {
     "Timestamp":"2016-03-11T00:00:00Z",
     "Count":4
 }]

Download Clickstream full archive

Get an archive containing the detailed matches on a document and the match cumul, as an archive of two CSV files.

Syntax

GET /services/Clickstream/Download

Request parameters

  • documentId (in url): id of the document (Document)
  • languageCode (in url): language identifier (Language): language of the CSV file headers. Only French and English are supported, default language is English.

Response

Json Clickstream object.

Property Type Description
DocumentId Guid
CreationTime DateTime Date of archive creation (normally, request date)
ArchiveUrl String Url to download the archive

Example:

 {
     "DocumentId":"0b56dd2a-cc66-4be8-abdf-60adf88b082e",
     "CreationTime":"2016-04-07T16:42:01.7976336+02:00",
     "ArchiveUrl":"http://onprint-ci.cloudapp.net/Clickstream/20160407_mydoc.zip"
 }

Conflicts

Conflicts

Check conflicts

Gets the conflicts for a Document, Image or Zone.

Syntax

GET /services/Conflict/Check

Request parameters

  • nodeId (in url) : id of the node (Node)

Response

Json ConflictResult object list.

Property Type Description
Id Guid Image/Zone Id
Conflicts Object Conflict object list
Property Type Description
DocumentId Guid Document target id
DocumentName String Document target name
PageNumber String Page target number
Distance Double Resemblance between 0 and 1
Path Object SearchPath object list
Thumbnail String Thumbnail of the page target

Example:

[
  {
    "Id": "00000000-0000-0000-0000-000000000000",
    "Conflicts": [
      {
        "DocumentId": "00000000-0000-0000-0000-000000000000",
        "DocumentName": " Essai Conflicts",
        "PageNumber": "1",
        "Distance": 0.009999999776482582,
        "Path": [
          {
            "Id": "00000000-0000-0000-0000-000000000000",
            "Type": "Image",
            "Name": "Page 1"
          },
          {
            "Id": "00000000-0000-0000-0000-000000000000",
            "Type": "Document",
            "Name": "Essai Conflicts"
          },
          {
            "Id": "00000000-0000-0000-0000-000000000000",
            "Type": "Organization",
            "Name": "Demo"
          }
        ],
        "Thumbnail": "…/Files/Thumbs/0/0/0/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000/700.jpg"
      }
    ]
  },
  {
    "Id": "00000000-0000-0000-0000-000000000000",
    "Conflicts": []
  }
]

Search

Search organization, document, folder or user by his name (or a part) or his id.

Syntax

GET /services/Search

Request parameters

  • SearchQuery (in body)

    |Property|Type|Description| |--------|----|-----------| |Id|Guid|Organization/Document/Folder/User id| |Name|String|Organization/Document/Folder/User (part of) name|

Response

Json SearchResult object list.

Property Type Description
Type String Document/Organization/Folder/User
Result Dynamic Element information
Path Object Path from your Organization to the Element
[
  {
    "Type": "Document",
    "Result": {
      "Id": "00000000-0000-0000-0000-000000000000",
      "ParentId": "00000000-0000-0000-0000-000000000000",
      "DefaultLanguage": "nl-BE",
      "Name": "Breaking Bad (Page 2)",
      "ContentType": "image/jpeg",
      "Pages": 1,
      "ActionCount": 0,
      "Status": "Inactive",
      "DateCreated": "2016-08-18T06:21:45Z",
      "DateModified": "2016-08-25T07:51:44Z",
      "Links": {
        "self": {
          "HRef": "/documents/00000000-0000-0000-0000-000000000000",
          "Method": "GET"
        },
        "samelevelnodes": {
          "HRef": "/nodes/00000000-0000-0000-0000-000000000000/nodes/",
          "Method": "GET"
        },
        "children": {
          "HRef": "/nodes/00000000-0000-0000-0000-000000000000/nodes/",
          "Method": "GET"
        },
        "list:node": {
          "HRef": "/nodes/00000000-0000-0000-0000-000000000000/documents/",
          "Method": "GET"
        }
      }
    },
    "Path": [
      {
        "Id": "00000000-0000-0000-0000-000000000000",
        "Type": "Document",
        "Name": "Essai Search"
      },
      {
        "Id": "00000000-0000-0000-0000-000000000000",
        "Type": "Organization",
        "Name": "Demo"
      }
    ]
  }
]

ONprint API : Actions Content

Email

Email

Fields in use in Onprint API

Field Name Type Example
Address String petit.guillaume@onprint.com
Subject String Demande de contact
Content String Bonjour, j’aimerais avoir plus d’informations sur ce sujet. A bientôt.

Address is a mandatory field.

Onprint resource and data format as sent to mobile (JSON)

 {
     "Address": "petit.guillaume@onprint.com",
     "Subject": "Demande de contact ",
     "Content": "Bonjour, j’aimerais avoir plus d’informations sur ce sujet.\n A bientôt."
 }

Map

Map

Fields in use in Onprint API

Field Name Type Example
Latitude Double 43.81234123
Longitude Double -119.8374747
SearchAddress String 14 rue Violet, 75015 Paris

There must be either a latitude and a longitude, or a search address.

Onprint resource and data format as sent to mobile (JSON)

 {
     "Latitude": 43.81234123,
     "Longitude": -119.8374747,
     "SearchAddress": "14 rue Violet, 75015 Paris"
 }

Phone

Phone

Fields in use in Onprint API

Field Name Type Example
Number String +33651512648

Onprint resource and data format as sent to mobile (JSON)

 {
     "Number": "+33651512648"
 }

Share

Share

Fields in use in Onprint API

Field Name Type Example
Url String http://www.onprint.com
Content String Découvrez cette solution.

Onprint resource and data format as sent to mobile (JSON)

 {
     "Url": "http://www.onprint.com",
     "Content": "Découvrez cette solution."
 }

Sms

Sms

Fields in use in Onprint API

Field Name Type Example
Number String +33651512648
Content String Coucou c’est moi !

Onprint resource and data format as sent to mobile (JSON)

 {
     "Number": "+33651512648",
     "Content": "Coucou c’est moi !"
 }

Url

Url

Fields in use in Onprint API

Field Name Type Example
Url String http://www.onprint.com
IsEmbeddedWebView Bool True
IsAnonymousURL Bool False
ContentType String text/html

Content type must be a MIME type.

Onprint resource and data format as sent to mobile (JSON)

 {
     "Url": "http://www.onprint.com",
     "IsEmbeddedWebView": "true",
     "IsAnonymousURL": "true",
     “ContentType”:”text/html”
 }

Vcard: RFC6350

Vcard

Fields in use in Onprint API

Onprint API Action Content accepts a Json input built as follows:

Fields

Field Name Type Example
FirstName String François
LastName String Longevialle
Organization String ONprint
PhotoUrl String (a URL to an image) http://www.photos.com/maphoto.jpg
Telephones Telephone[ ] (see below)
Addresses Address[ ] (see below)
Emails Email[ ] (see below)

Telephone fields

Field Name Type Example
Type Telephone Type (see below) WORK
Number String (valid phone number) 0601525468

Telephone Type can be one of this list: WORK, HOME, TEXT, VOICE, FAX, CELL, VIDEO, PAGER, TEXTPHONE

Address fields

Field Name Type Example
Type Address Type (see below) WORK
Street String 14 rue Violet
City String PARIS
ZipCode String 75015
Country String FRANCE

Address Type can be one of this list: WORK, HOME

Email fields

Field Name Type Example
Type Email Type (see below) WORK
Email String (valid email) flon@gmail.com

Email type can be one of this list: WORK, HOME

Onprint resource format (JSON)

This format is used for front-end VCard edition. It is not used by the mobile.

 {
     "FirstName": "François",
     "LastName": "Longevialle",
     "Organization": "ONprint",
     "PhotoUrl": "http://www.letribunaldunet.fr/wp-content/uploads/2013/06/Ai-ou-paresseux-trois-doigts-17-.jpg",
     "Telephones": [{
         "Type": "Work",
         "Number": "0601525468"}, {
         "Type": "Home",
         "Number": "0715451549"}],
     "Addresses": [{
         "Type": "Work",
         "Street": "14 rue Violet",
         "City": "Paris",
         "ZipCode": "75015",
         "Country": "FRANCE"}, {
         "Type": "Home",
         "Street": "45 rue home",
         "City": "Paris",
         "ZipCode": "75016",
         "Country": "FRANCE"}],
     "Emails": [{
         "Type": "Home",
         "Email": flon@flon.com}, {
         "Type": "Work",
         "Email": francois.longevialle@onprint.com}]
 }

RFC6350 VCard sample as stored in our databases and sent to mobile

 {
     "VCard": "BEGIN:VCARD\r\n
         VERSION:3.0\r\n
         N:Longevialle;François;;; \r\n
         FN:François Longevialle\r\n
         ORG:ONprint\r\n
         PHOTO:http://photo.com/maphoto.jpg\r\n
         TEL:TYPE=WORK,VOICE:0601525468\r\n
         TEL:TYPE=HOME,VOICE:0715451549\r\n
         ADR:TYPE=WORK:;;14 rue Violet;Paris;;75015;FRANCE\r\n
         ADR:TYPE=HOME:;;45 rue home;Paris;;75016;FRANCE\r\n
         EMAIL:TYPE=HOME,INTERNET:flon@flon.com\r\n
         EMAIL:TYPE=WORK,INTERNET:francois.longevialle@onprint.com\r\n
         REV:2016-02-04T15:44:49Z\r\n
         END:VCARD\r\n"
 }

ICalendar: RFC2445

ICalendar

Fields in use in Onprint API

Onprint API Action Content accepts a Json input built as follows:

Fields

Field Name Type Example
Start UTC Date-Time (ISO 8601) 2016-02-03T11:50:00Z
End UTC Date-Time (ISO 8601). Must be after Start time. 2016-02-03T12:50:00Z
OrganizerMail String (valid email) francois.longevialle@onprint.com
AttendeeMail String (valid email) arthur.lagenebre@onprint.com
Description String Un magnifique événement, pour en savoir plus: http://onprint.com
Location String Onprint, 14 rue Violet, 75015 Paris
Summary String Coder oh oui!
RecurrenceRule RecurrenceRule (see below)

RecurrenceRule fields

Field Name Type Example
Frequency Frequency (see below) WEEKLY
Interval Integer 2

Frequency can be one of this list: SECONDLY, MINUTELY, HOURLY, DAILY, WEEKLY, MONTHLY, YEARLY

Onprint resource format (JSON)

This format is used for front-end VCalendar edition. It is not used by the mobile.

 {
     "Start":"2016-02-03T11:50:00Z",
     "End":"2016-02-04T06:00:00Z",
     "OrganizerMail":"francois.longevialle@onprint.com",
     "AttendeeMail":"arthur.lagenebre@onprint.com",
     "Description":"Un magnifique événement, pour en savoir plus: http://onprint.com",
     "Location":"Onprint, 14 rue Violet, 75015 Paris",
     "Summary":"Coder oh oui!",
     "RecurrenceRule":{
         "Frequency":"WEEKLY",
         "Interval":"2"}
 }

RFC2445 iCalendar sample as stored in our databases and sent to mobile

 {
     "VCalendar": "BEGIN:VCALENDAR
         VERSION:2.0
         PRODID:-//onprint//onprintplatformv2//fr
         BEGIN:VEVENT
         DTSTART:20160203T115000Z
         DTEND:20160204T060000Z
         RRULE:FREQ=WEEKLY;INTERVAL=2
         ORGANIZER:mailto:francois.longevialle@onprint.com
         ATTENDEE:mailto:arthur.lagenebre@onprint.com
         DESCRIPTION:Un magnifique événement, pour en savoir plus: http://onprint.com
         CREATED:20160203T163800Z
         LAST-MODIFIED:20160203T163900Z
         LOCATION:Onprint, 14 rue Violet, 75015 Paris
         SUMMARY:Coder oh oui!
         TRANSP:OPAQUE
         END:VEVENT
         END:VCALENDAR"
 }