API - Usage Methods
API Usage Methods
The list below gives a brief description of each supported method exposed by the Sequoia API. The 'version' column indicates in which version of the software the method was introduced.
Each method is further described in the following section.
Airline Messaging
Method |
Description |
SendFhlMessage |
Transmits an FHL (Air Manifest data) message to an airline |
SendFwbMessage |
Transmits an FWB (Air Waybill data) message to an airline |
Consolidation
CCS-UK Inventory
CRM
Declaration (CHIEF)
ETSF
Export Messaging
Job
Link
NCTS
Shipment
Worksheet
Process Flow Service Methods
The following methods will help to programmatically automate Sequoia functionality.
Sequoia v1.74
Batch
Description
Payload |
Schema / Return value |
Request: |
None |
Response (success): |
.xsd |
Response (failure): |
|
Sequoia v1.74
BatchProcess
Commits the specified transactions
Payload |
Schema / Return value |
Request: |
None |
Response (success): |
.xsd |
Response (failure): |
|
Example Batch Processing
The following is an example of the BatchProcess
service request where data from successful responses to individual service requests is used to seed a subsequent request.
This example uses XPath to parse data from successful responses and to store the required information into variables which are then used to replace the information in the subsequent request.
The example is based on creating a job (CreateJob), a declaration (CreateImportGbDeclaration) and then linking both the job and declaration together (LinkJobToDeclaration).
<?xml version="1.0" encoding="utf-8"?>
<this:batch xmlns:this="asm.org.uk/Sequoia/BatchProcess"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="asm.org.uk/Sequoia/BatchProcess">
<this:messages>
<this:message request="CreateJob">
<this:payload>
<![CDATA[<jobHeader xmlns="asm.org.uk/Sequoia/JobHeader" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="asm.org.uk/Sequoia/JobHeader JobHeader.xsd" xmlns:nsAccount="asm.org.uk/Sequoia/Account" xmlns:nsAccAddr="asm.org.uk/Sequoia/AccountAddress">
<jobType>AI</jobType>
<customer>
<nsAccount:shortCode>APITEST</nsAccount:shortCode>
<nsAccount:name>API Test Customer Ltd</nsAccount:name>
<nsAccount:address>
<nsAccAddr:street1>123 New Street</nsAccAddr:street1>
<nsAccAddr:countryCode>GB</nsAccAddr:countryCode>
<nsAccAddr:description>Test description</nsAccAddr:description>
</nsAccount:address>
</customer>
<consignee>
...
</jobHeader>]]>
</this:payload>
<this:variables>
<this:parseInstruction xPath="" variableName="@JOBREFERENCE@" />
</this:variables>
</this:message>
<this:message request="CreateImportGbDeclaration">
<this:payload>
<![CDATA[<importDeclaration xmlns="asm.org.uk/Sequoia/DeclarationGbImport">
<declarantBadge>
<code xmlns="asm.org.uk/Sequoia/Badge">BOB</code>
<location xmlns="asm.org.uk/Sequoia/Badge">
<iataPortCode xmlns="asm.org.uk/Sequoia/UnLocation">LHR</iataPortCode>
</location>
</declarantBadge>
<declarationCurrency>
<currencyCode xmlns="asm.org.uk/Sequoia/Currency">GBP</currencyCode>
</declarationCurrency>
...
</importDeclaration>]]>
</this:payload>
<this:variables>
<this:parseInstruction xPath="//*[local-name() = 'declarationIdentifier']/*[local-name() = 'declarationIdentity']/*[local-name() = 'declarationUcr']" variableName="@DUCR@" />
</this:variables>
</this:message>
<this:message request="LinkJobToDeclaration">
<this:payload>
<![CDATA[<linkJobToDeclaration xmlns="asm.org.uk/Sequoia/LinkJobAndDeclaration" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="asm.org.uk/Sequoia/LinkJobAndDeclaration LinkJobToDeclaration.xsd" xmlns:nsJobIdentityType="asm.org.uk/Sequoia/JobIdentityType" xmlns:nsDeclarationIdentityType="asm.org.uk/Sequoia/DeclarationGbIdentityType">
<JobId>
<nsJobIdentityType:jobReference>@JOBREFERENCE@</nsJobIdentityType:jobReference>
</JobId>
<DeclarationId>
<nsDeclarationIdentityType:declarationUcr>@DUCR@</nsDeclarationIdentityType:declarationUcr>
</DeclarationId>
</linkJobToDeclaration>]]>
</this:payload>
<this:variables>
<this:replaceInstruction variableName="@JOBREFERENCE@" />
<this:replaceInstruction variableName="@DUCR@" />
</this:variables>
</this:message>
</this:messages>
</this:batch>
Sequoia v1.74
CommitTransactions
Commits the specified transactions
Payload |
Schema / Return value |
None - see WSDL for service description. |
|
Notes |
|
Pass the TransactionId to the method. |
|
An array of any errors will be populated in the response XML. |
|
Sequoia v1.74
GetApiVersion
Gets the API version number
Payload |
Schema / Return value |
Request: |
None |
Response (success): |
ApiVersionNumber.xsd |
Response (failure): |
|
Sequoia v1.74
GetEvents
Retrieves events raised by Sequoia.
Note that this method is not available for services where there is a callback channel as these events will get reported directly to the registered callback method in that case.
This method will return a maximum of 50 distinct event notifications for one query. This method can be re-queried to bring back further event notifications in page sizes of 50 notifications. If there are no events available, an XML file matching the schema but containing an empty collection of events is returned.
Events will not be duplicated - for example if a user saves a job 3 times within ten seconds, there will only be one 'job updated' event returned by subsequently calling this service method.
Payload |
Schema / Return value |
Request: |
None |
Response (success): |
EventsResponse.xsd |
Response (failure): |
|
Sequoia v1.74
Logon
Creates an authenticated session within which an application can invoke methods on the API service.
None - see WSDL for service description.
Usage
Pass username and password to this method. An array of any errors will be populated in the response XML.
Sequoia v1.74
LookUp
Method to look up an entity based on a code or reference. Currently only supports an air carrier based on its master air waybill prefix.
Payload |
Schema / Return value |
Request: |
LookupRequest.xsd |
Response (success): |
LookupResponse.xsd |
Response (failure): |
See Error Reporting above |
Sequoia v1.74
RollbackTransactions
Rollback the specified transactions.
Payload |
Schema / Return value |
None - see WSDL for service description. |
|
Notes
Pass TransactionId to this method.