Warning
WARNING: The TrackAbout MetaWiki has been deprecated and is no longer being updated.

Please visit our new TrackAbout Knowledge Base at https://supportkb.trackabout.com for the most-up-to-date documentation on TrackAbout and TrackAbout Mobile.

Difference between revisions of "Fill and Assign to Orders Service"

From TrackAbout MetaWiki
Jump to navigation Jump to search
Line 27: Line 27:
 
Version 1 and 2 of the web service use the standard asset resolution process when trying to locate assets for a provided bar code and serial number. These are the same rules that are applied when an asset is scanned via a hand held device or a record is created by entering bar codes and serial numbers manually through the website. The details of the standard asset resolution process are outside the scope of this article, but it's important to note that this approach can lead to three potential outcomes:
 
Version 1 and 2 of the web service use the standard asset resolution process when trying to locate assets for a provided bar code and serial number. These are the same rules that are applied when an asset is scanned via a hand held device or a record is created by entering bar codes and serial numbers manually through the website. The details of the standard asset resolution process are outside the scope of this article, but it's important to note that this approach can lead to three potential outcomes:
  
* A single asset is found, and that asset is attached to the 'Fill' record that is created by the web service.
+
* A single asset is found, and that asset is attached to the 'Fill' record that is created by the web service.
* No matching asset is found, and the creation of the 'Fill' record results in a new asset being created using the provided bar code and serial number.
+
* No matching asset is found, and the creation of the 'Fill' record results in a new asset being created using the provided bar code and serial number.
* One or more partially matching assets are found and the 'Fill' record is created with an asset collision. This collision will need to be resolved manually via the website.
+
* One or more partially matching assets are found and the 'Fill' record is created with an asset collision. This collision will need to be resolved manually via the website.
  
 
==== Version 3 Rules ====
 
==== Version 3 Rules ====

Revision as of 11:45, 11 October 2010

<< Back to Web Services

Overview

This service creates Fill Records for the assets specified in the input document and assigns these assets to the Orders specified.

Service Protocol: REST

This web service uses a REST or RESTful style protocol. This is an HTTP resource-oriented architecture that uses standard HTTP actions (e.g. GET, POST, DELETE) to manipulate resources exposed as URLs. Standard HTTP Status Codes are used for success and error codes.

More information on REST can be found at the following resources:

Service Authentication

The HTTP request must have Basic Authentication credentials included. We strongly recommend that all web service requests be made over SSL (HTTPS).

More information on HTTP Basic Authentication can be found at the following resources:

TrackAbout will provide you with a dedicated user account to use when making web service requests.

Troubleshooting Service Authentication/Authorization Issues

When calling a web service, TrackAbout will return a "403 Access Denied" error if there are any issues authenticating the request. These errors can occur under one or more of the following circumstances:

  1. The authentication header is missing or not formatted correctly. To correct this, review the links on HTTP Basic Authentication above and ensure that the application you are using to call the web service is building the authorization header correctly.
  2. The username and/or password specified in the authentication header is incorrect or the user does not have the permissions needed invoke web services. If you have both a production and test instance of TrackAbout it's important to remember that they each have a distinct set of users and login credentials; a username and password that works in the production environment will not necessarily work in the client test environment and vice-versa. To verify and/or correct this:
    1. Login to the TrackAbout website for the environment against which you are trying to invoke the web service and go to the "Internal Users" page. Verify that the username you are using exists.
    2. If the username does not yet exist in the environment that you are trying to use, contact TrackAbout support to have a new web service user created for that environment.
    3. If the username does exist in that environment, verify that it has 'Web Service' (or something similar) listed in its Roles. The TrackAbout support team can assist in verifying whether or not the user in question has the needed web service permissions.
    4. If the username exists in that environment and the it has the needed web service permissions, then it's likely that the password being provided is not correct. You can use the Internal Users page to edit the user in question and set a new password for it. Note: If you change the password for a web service user, you could end up causing issues for other automated processes you're using to make web service calls using that same user. If you're storing the credentials for that user in any external applications that make automated calls into TrackAbout web services you'll need to update the password that those applications are using accordingly.

Service Metadata

TrackAbout creates Web Application Description Language (WADL) documents for all web services that make use of REST architecture. The WADL for a service is accessible via the web service's URL with the word 'meta' appended as a query string parameter. For example, to access the WADL for the simple 'Echo' web service, you would use the following URL: https://www.trackabout.com/ws/Echo.asmx?meta

You can also specify a particular version of a web service to retrieve metadata for by including the major, minor, and revision numbers of the desired version in the query string. For example, to get the WADL for version 2.0.0 of the 'Echo' service, the URL becomes: https://www.trackabout.com/ws/Echo.asmx?v2.0.0&meta

More information on WADL can be found at the following resources:

Standard Service Parameters

The following standard web service parameters are available for this RESTful web service. These parameters are optionally provided via the querystring of the URL used to access the service.

Friendly Name Query String Name Description
Retrieve Metadata meta When this parameter is provided, the service will return its WADL document instead of doing the normal processing.
Use Encryption e The presence of this parameter enables request and response payload encryption using public/private X.509 certificates. Certificates must be exchanged and configured in advance of using this parameter. This encryption is separate from standard HTTPS/SSL encryption. Both can be used together.
Use Specific Version vX.X.X Specifies the version of the service being called. For example, the parameter value 'v2.2.5' specifies that Version 2.2.5 should be used.
Use Gzip Compression gz Indicates that gzip compression should be used for the response.
Use Zip Compression zip Indicates that zip compression should be used for the response.
Use Bz2 Compression bz2 Indicates that bz2 compression should be used for the response.

Other Service Parameters

In addition to the standard service parameters, this service also accepts the following parameters:

Friendly Name Query String Name Description
Skip Auto Verify skipAutoVerify 'True' or 'False' value indicating whether or not the service should automatically verify any accounting adjustment records that may have been created in the process of performing the cylinder validation. This is an optional parameter and will default to 'false' if not provided. This means that, by default, any request to this service will automatically verify account adjustment records that get created.

Validations and Restrictions

The following validations are applicable to the data and parameters provided to this service. If one or more of these validations fail, the web service will return a response status code and error message that indicates the source of the failure.

  • The username and password provided must be valid
  • The XML submitted must conform to the expected schema as outlined in the service metadata.

Processing Rules

There are currently three different versions of this web service. By default, version 1 is used. Version 2 and Version 3 can be targeted by specifying the 'version' query string parameter as denoted in the 'Standard Service Parameters' above. All versions apply processing rules to locate a single asset matching the provided bar code and serial number. The rules applied differ between the versions.

Version 1 and 2 Rules

Version 1 and 2 of the web service use the standard asset resolution process when trying to locate assets for a provided bar code and serial number. These are the same rules that are applied when an asset is scanned via a hand held device or a record is created by entering bar codes and serial numbers manually through the website. The details of the standard asset resolution process are outside the scope of this article, but it's important to note that this approach can lead to three potential outcomes:

  • A single asset is found, and that asset is attached to the 'Fill' record that is created by the web service.
  • No matching asset is found, and the creation of the 'Fill' record results in a new asset being created using the provided bar code and serial number.
  • One or more partially matching assets are found and the 'Fill' record is created with an asset collision. This collision will need to be resolved manually via the website.

Version 3 Rules

Version 3 of this web service implements a special set of processing rules for locating assets using the provided bar code and serial number. The asset database keeps a record of each time the bar code of an asset is changed. Version 3 of the web service will search through both current and previous bar codes when attempting to find the matching asset. Only an asset that matches on both the provided bar code and serial number will be considered a match, though the matching bar code does not have to be the current bar code of the asset. If a single matching asset is found, that asset is used and will be attached to the 'Fill' record. If no asset is found or multiple assets are found, the asset will not be attached to the record. Unlike versions 1 and 2 of the web service, version 3 will not attempt to create a 'Fill' record unless at least one asset can be successfully resolved using this special set of processing rules.

Request Output

The service will return a standard web service response, and include information on the status of the request. The information in the response will also include an indication of the service version and the status of the request (error codes and messages).

This service can return the following errors (the number indicates the error code that will be returned):

  1. Unexpected Error
  2. Unknown Location
  3. Unknown Customer
  4. Unknown Product Code
  5. Invalid Lot Number
  6. Missing Order
  7. Missing Asset
  8. Duplicate Asset Found
  9. Asset already exists in a record with the provided Fill Date
  10. Fill Date Too Far In Past
  11. Fill Date In Future

Usage

Production Environment

  • Web Service URL: https://www.trackabout.com/OrderFills.asmx
  • Web Service URL with 'skip auto verify' override parameter: https://www.trackabout.com/OrderFills.asmx?skipAutoVerify=true
  • Service WADL: https://www.trackabout.com/ws/OrderFills.asmx?meta

Test Environment

  • Web Service URL: https://test.trackabout.com/OrderFills.asmx
  • Web Service URL with 'skip auto verify' override parameter: https://test.trackabout.com/OrderFills.asmx?skipAutoVerify=true
  • Service WADL: https://test.trackabout.com/ws/OrderFills.asmx?meta