Modify Work Unit Web Service


Use the Modify Work Unit Web Service to add justification for a Carrier/Tariff/Government to eligible work units. With the Modify Work Unit Web Service, you can also modify and add data to existing work units that are used in workflows for distribution of fares, rules and footnotes data.

Request

Your request to the Modify Work Unit Web Service must provide a valid OAuth access token and a userId in the header. See Authentication for more information.

You must also specify parameters to add justification and/or reassign batches in the request along with the Work Unit ID in the request body:
Work Unit ID - Work Unit ID where justification is added, and the batches are being moved

Parameters to add justification:

  • Carrier - Carrier to which the justification applies
  • Tariff - Tariff to which the justification applies
  • Government - Government to which the justification applies
  • Justification Text - Free-form text that will populate the justification within the work unit for the specified Carrier/Tariff/Government

Additionally, you may opt to specify:
Justification Effective Date - Effective Date to be used to validate against the effective date of the data in the work unit

Parameters to reassign batches:

  • Source Work Unit ID - Work unit ID where the batch is being moved from
  • Rules Batch IDs - Rules batch ID that is being moved from one work unit to another
  • Fares Batch IDs - Fares batch ID that is being moved from one work unit to another
  • Footnotes Batch IDs - Footnotes batch ID that is being moved from one work unit to another

A maximum of 20 batch IDs can be specified per request. When the source Work Unit ID is specified, at least one batch to reassign is required. Upon successful processing of request, batches will be reassigned and the justification for the Carrier/Tariff/Government will be associated to the specified work unit. Justification will be added to the work unit only if the reassign is successful.

You may also update existing justification within a work unit.

Request Header Parameters

See Authentication for full instructions on header parameters needed for authentication.

Request Body

The request body should be formatted as a JSON object, which must include the required parameters and can additionally include the optional parameter.

Request Object Parameters

The request object must include the following parameters:

ParameterDescriptionTypeFormatExample
workUnitIDUnique identifier assigned to work unitstringAlphanumeric between 10-17 characters, including (in order) 1) the 2-3 character org code (XXX), 2) the create date, and 3) the work unit number: XXX-DDMMMYY-NNNNNNN"XXX-17MAR18-1234567"
carrierAs defined by ATPCO; generally, an airlinestringAlphanumeric, 2 characters"XX"
tariffEntity that is defined by system, geographic scope, and distribution processstringAlphanumeric between 1-7 characters"O3A415"
governmentGovernment to which the justification appliesstringAlphabetic, 2 characters"US"
justificationTextFree-form text that will populate the justification within the work unit for the specified government/carrier/tariffstringAlphanumeric between 0-632 characters that permits blank spaces and the special characters hyphen (-), forward slash (/), percent sign (%), asterisk (*), pound/hash (#), and period (.)."***This is example justification text."
effectiveDate(Optional) Effective date that will populate the justification within the work unit for the specified government/carrier/tariffstringSeven characters of the format DDMMMYY where DD is two numeric characters signifying the day of the month, MMM is three alphabetic characters signifying the first three letters of the month name, and YY is two numeric characters signifying the year"17MAR18"
sourceWorkUnitIDUnique identifier assigned to work unitstringAlphanumeric between 10-17 characters, including (in order) 1) the 2-3 character org code (XXX), 2) the create date, and 3) the work unit number: XXX-DDMMMYY-NNNNNNN"XXX-17MAR18-1234567"
rulesBatchIdsUnique identifier assigned to rules batchstring7 characters, including (in order) 1) the 2 character batch ID (XX), 2) the batch number (NNNNN)"91 1234"
fareBatchIdsUnique identifier assigned to fares batchstring7 characters, including (in order) 1) the 2 character batch ID (XX), 2) the batch number (NNNNN)"91 1234"
footnotesBatchIdsUnique identifier assigned to footnotes batchstring7 characters, including (in order) 1) the 2 character batch ID (XX), 2) the batch number (NNNNN)"91 1234"

Response

Upon successful processing of a request, summary of added justifications and reassigned batches for the work unit is returned.

The response to a successful Modify Work Unit service call will contain a JSON object including the parameters specified in the request body and messages detailing the results of the request.

Example response object

Response Parameters

The response object can include the following parameters:

ParameterDescriptionTypeExample
workUnitIdWork unit ID where justification is added and the batches are being moved tostring"XXX-17MAR18-1234567"
detailsDescribes message; prefixed by the associated parametercollection of strings[ "Justification saved successfully" ]
carrierCarrier to which the justification appliesstring"XX"
tariffTariff to which the justification appliesstring"O3A415"
governmentGovernment to which the justification appliesstring"US"
justificationTextFree-form text that will populate the justification within the work unit for the specified government/carrier/tariffstring"***This is example justification text."
effectiveDateEffective Date to be used to validate against the effective date of the data in the work unitstring"110419"
justificationsGrouping of justification details to be added to specified Work Unitcollection of maps[ { ..., ..., ... } }
levelDescribes message level as ERROR or INFOstring"INFO"
msgTop-level message (used for errors and system messages)string"Submit request was successful"
msgListGrouping of work unit release messages per Work Unitstring[ { "level": "INFO", "details": [ "Justification saved successfully" ] }, {...} ]
sourceWorkUnitIDWork unit ID where the batch is being moved fromstring"XXX-17MAR18-1234567"
rulesBatchIdsRules batch ID that is being moved from one work unit to anotherstring"91 1234"
fareBatchIdsFares batch ID that is being moved from one work unit to anotherstring"91 1234"
footnotesBatchIdsFootnotes batch ID that is being moved from one work unit to anotherstring"91 1234"
reassignGrouping of batch details to be reassigned to specified Work Unitcollection of maps{ { ..., ..., ... } }

Example Requests and Responses

The following examples show what the Modify Work Unit Web Service would return based on the indicated requests.

Request to Add Single Justification to a Work Unit

Request

Response

Request to Add Multiple Justifications to a Work Unit

Request

Response

Request to Update Existing Justification

Request

Response

Request to Reassign Batches to a Work Unit without Justification

Request

Response

Request to Reassign Batches to a Work Unit with Justification

Request

Response