Cloud Fax and Notifications API 2.4 Documentation
JobSubmit
Cloud Fax and Notifications API Forums Home  
    prev  next        Table of Contents  JobSubmit  
These pages describe an earlier version of the Cloud Fax and Notifications API.
While that version continues to function, new development should use the current version.
 

31.3.1 Duplicate Submission

As discussed above, the MessageId can be used to prevent duplicate jobs being created. Since MessageId is used as a localid, it should not be longer than 80 characters, and values should be chosen that are unlikely to collide with those of other users.
To ensure a unique MessageId value unlikely to collide with those of another user, it is recommended that applications include some user-related string (keeping in mind the 80-character limit) in the value, such as a user id, or company URL or name, or a base64-encoded SHA based on some similar user-specific value.
When a collision occurs, it may be helpful to know from the result whether the job submit request was a duplicate or not, and whether it was a collision with a job from the same user or not.

If the collision was with a job from a different user (or if the user associated with the previous submission could not be determined), then the StatusCode will be "1" (failure), and an ErrorCode of 2051 will be included.

If the collision was with a job from the same user, then the result depends on whether Preview was requested.

If Preview was not requested, or if Preview was requested and the preview result is still available, then the StatusCode will be "0" (success) and the pre-existing job number will be returned, since it is presumed that this is a resend of an earlier request for which the result was for some reason not received. But an ErrorCode of 2050 will also be included as an indication that this was not the first time that the MessageId was received.

If Preview was requested but the preview result is no longer available, then the StatusCode will indicate failure, and an ErrorCode of 2052 will be included.

The use of MessageId to prevent repeated Cloud Fax and Notifications API requests from generating duplicate jobs is primarily intended as a safeguard against generating duplicate jobs if a result is lost due to network connection problems.

 
    prev  next        Table of Contents  JobSubmit  
© Copyright 2020 OpenText Corp. All Rights Reserved.
Privacy Policy | Cookie Policy
This information is subject to change. Please check frequently for updates.
Modified October 06, 2020