Carrier->Update
Update (Carrier Function)
This function updates a single Carrier record.
XML Request
Definitions
- null fields are the fields that are either omitted or initialized to a special value - string "NULL".
- E.g., <Street>NULL<Street/> will be interpreted as a null field.
- Empty string fields are, e.g., <Street /> or <Street></Street>
The Add function takes the following request parameters:
Parameter | Type | Optional | Description |
---|---|---|---|
Name | String | Yes | Carrier name, required in both old and new. New carrier name must be at least 4 characters. |
Street | String | Yes | Street segment of Carrier address |
Street2 | String | Yes | Street segment of Carrier address - line 2 |
City | String | Yes | City segment of Carrier address |
State | String | Yes | State segment of Carrier address |
Postal | String | Yes | Postal code segment of Carrier address |
MiscInfo | String | Yes | Additional information. This can be used to match the corresponding company's office information field |
USDotNumber | String | Yes | Identifying number issued by DOT |
- oldCarrier record is found based on Name specified in oldCarrier and on NMCAccount derived from the user login credentials.
- Only oldCarrier/Name field is used. Any other oldCarrier fields are ignored.
- Name is a required filed in both oldCarrier and newCarrier. It may not be either an empty string or null.
- Name must be unique for a given customer. If this constraint is violated, SOAP fault "System.Web.Services.Protocols.SoapException: Record already exists." will result.
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <Update xmlns="http://www.omnitracs.com"> <oldCarrier> <Name>string</Name> <Street>string</Street> <Street2>string</Street2> <City>string</City> <State>string</State> <Postal>string</Postal> <MiscInfo>string</MiscInfo> <USDotNumber>string</USDotNumber> </oldCarrier> <newCarrier> <Name>string</Name> <Street>string</Street> <Street2>string</Street2> <City>string</City> <State>string</State> <Postal>string</Postal> <MiscInfo>string</MiscInfo> <USDotNumber>string</USDotNumber> </newCarrier> </Update> </soap:Body> </soap:Envelope>
XML Response
The return result indicates success or failure via SOAP exceptions.
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <UpdateResponse xmlns="http://www.omnitracs.com" /> </soap:Body> </soap:Envelope>