WS_Contract


Click here for a complete list of operations.

CreateContract

Creates a contract from the provided contract object. Company Code [2 characters] Contract object to create: TxContract Required Fields: Number (Customer and Site) or (Customer and ProspectSite) or (Prospect and ProspectSite) Type (New Contract = N, Renewal = R) CreationDate EffectiveDate StartDate Info: SalesRep (Set to salesrep for WEB_USER if null) Unused: Id (must be 0) Creation Date Status (Default first status) RenewFrom (must be null) CreateUser (Default WEB_USER) TxContractDetail Required Fields: Type (Service Type) UnitOfMeasure Format: ScheduledDays (0101101 starting from sunday -> saturday. (1 = scheduled, 0 = not scheduled)) Unused: Id Link TxContractRate Required Fields: Column Number Unused: Id Detail Link Column Link Contract ID for created contract

Test

The test form is only available for requests from the local machine.

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /TruxWeb/WSCust_Contract/WS_Contract.asmx HTTP/1.1
Host: payments.robinsonwasteservices.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.trux.com/CreateContract"

<?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:Header>
    <Credentials xmlns="http://www.trux.com">
      <sAccountID>string</sAccountID>
      <sAuthCode>string</sAuthCode>
      <isAuthCodeEncrypted>boolean</isAuthCodeEncrypted>
      <areParametersEncrypted>boolean</areParametersEncrypted>
      <encryptedParameterNames>
        <string>string</string>
        <string>string</string>
      </encryptedParameterNames>
      <requireEncryptedResponse>boolean</requireEncryptedResponse>
      <encryptionMethod>string</encryptionMethod>
      <keyInfo>
        <encryptedKey>string</encryptedKey>
        <encryptionPublicKey>string</encryptionPublicKey>
      </keyInfo>
      <publicAuthKey>string</publicAuthKey>
    </Credentials>
  </soap:Header>
  <soap:Body>
    <CreateContract xmlns="http://www.trux.com">
      <sLoginComp>string</sLoginComp>
      <contract>
        <Id>int</Id>
        <Number>string</Number>
        <Customer>int</Customer>
        <Site>int</Site>
        <Prospect>int</Prospect>
        <ProspectSite>int</ProspectSite>
        <CreateUser>string</CreateUser>
        <CreationDate>dateTime</CreationDate>
        <SalesRep>int</SalesRep>
        <Status>string</Status>
        <PoNum>string</PoNum>
        <Type>string</Type>
        <Comments>string</Comments>
        <EffectiveDate>dateTime</EffectiveDate>
        <StartDate>dateTime</StartDate>
        <ExpiryDate>dateTime</ExpiryDate>
        <GuaranteeDate>dateTime</GuaranteeDate>
        <CustomerPrintName>string</CustomerPrintName>
        <CustomerTitle>string</CustomerTitle>
        <CustomerSignDate>dateTime</CustomerSignDate>
        <RenewFrom>int</RenewFrom>
        <PrintCopies>int</PrintCopies>
        <ApprovedBy>string</ApprovedBy>
        <ApproveDate>dateTime</ApproveDate>
        <EstimatedRevenue>decimal</EstimatedRevenue>
        <LegalId>int</LegalId>
        <ContractDetails>
          <TxContractDetail>
            <Id>int</Id>
            <Type>string</Type>
            <Size>decimal</Size>
            <UnitOfMeasure>string</UnitOfMeasure>
            <Quantity>decimal</Quantity>
            <Compact>boolean</Compact>
            <CustomerOwn>boolean</CustomerOwn>
            <WeekCode>int</WeekCode>
            <MaxLifts>decimal</MaxLifts>
            <WeekDayFrequency>int</WeekDayFrequency>
            <DemurrageDays>int</DemurrageDays>
            <DemmurageRateDecimal>decimal</DemmurageRateDecimal>
            <PoRquired>boolean</PoRquired>
            <Note1>string</Note1>
            <ScheduledDays>string</ScheduledDays>
            <Service>int</Service>
            <OriginalId>int</OriginalId>
            <Finalized>boolean</Finalized>
            <ReinstateDate>dateTime</ReinstateDate>
            <StopReason>string</StopReason>
            <ChangeReason>string</ChangeReason>
            <Action>int</Action>
            <PriceClass>int</PriceClass>
            <ContractRate xsi:nil="true" />
            <ContractRateActivityMaterial xsi:nil="true" />
          </TxContractDetail>
          <TxContractDetail>
            <Id>int</Id>
            <Type>string</Type>
            <Size>decimal</Size>
            <UnitOfMeasure>string</UnitOfMeasure>
            <Quantity>decimal</Quantity>
            <Compact>boolean</Compact>
            <CustomerOwn>boolean</CustomerOwn>
            <WeekCode>int</WeekCode>
            <MaxLifts>decimal</MaxLifts>
            <WeekDayFrequency>int</WeekDayFrequency>
            <DemurrageDays>int</DemurrageDays>
            <DemmurageRateDecimal>decimal</DemmurageRateDecimal>
            <PoRquired>boolean</PoRquired>
            <Note1>string</Note1>
            <ScheduledDays>string</ScheduledDays>
            <Service>int</Service>
            <OriginalId>int</OriginalId>
            <Finalized>boolean</Finalized>
            <ReinstateDate>dateTime</ReinstateDate>
            <StopReason>string</StopReason>
            <ChangeReason>string</ChangeReason>
            <Action>int</Action>
            <PriceClass>int</PriceClass>
            <ContractRate xsi:nil="true" />
            <ContractRateActivityMaterial xsi:nil="true" />
          </TxContractDetail>
        </ContractDetails>
        <ContractNote>
          <TxContractNote>
            <User>string</User>
            <Note>string</Note>
            <SystemNote>boolean</SystemNote>
          </TxContractNote>
          <TxContractNote>
            <User>string</User>
            <Note>string</Note>
            <SystemNote>boolean</SystemNote>
          </TxContractNote>
        </ContractNote>
        <ContractAttachment>
          <TxContractAttachment>
            <FileName>string</FileName>
            <Note>string</Note>
            <File>base64Binary</File>
            <AttachmentType>int</AttachmentType>
          </TxContractAttachment>
          <TxContractAttachment>
            <FileName>string</FileName>
            <Note>string</Note>
            <File>base64Binary</File>
            <AttachmentType>int</AttachmentType>
          </TxContractAttachment>
        </ContractAttachment>
      </contract>
    </CreateContract>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?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>
    <CreateContractResponse xmlns="http://www.trux.com">
      <CreateContractResult>int</CreateContractResult>
    </CreateContractResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /TruxWeb/WSCust_Contract/WS_Contract.asmx HTTP/1.1
Host: payments.robinsonwasteservices.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Header>
    <Credentials xmlns="http://www.trux.com">
      <sAccountID>string</sAccountID>
      <sAuthCode>string</sAuthCode>
      <isAuthCodeEncrypted>boolean</isAuthCodeEncrypted>
      <areParametersEncrypted>boolean</areParametersEncrypted>
      <encryptedParameterNames>
        <string>string</string>
        <string>string</string>
      </encryptedParameterNames>
      <requireEncryptedResponse>boolean</requireEncryptedResponse>
      <encryptionMethod>string</encryptionMethod>
      <keyInfo>
        <encryptedKey>string</encryptedKey>
        <encryptionPublicKey>string</encryptionPublicKey>
      </keyInfo>
      <publicAuthKey>string</publicAuthKey>
    </Credentials>
  </soap12:Header>
  <soap12:Body>
    <CreateContract xmlns="http://www.trux.com">
      <sLoginComp>string</sLoginComp>
      <contract>
        <Id>int</Id>
        <Number>string</Number>
        <Customer>int</Customer>
        <Site>int</Site>
        <Prospect>int</Prospect>
        <ProspectSite>int</ProspectSite>
        <CreateUser>string</CreateUser>
        <CreationDate>dateTime</CreationDate>
        <SalesRep>int</SalesRep>
        <Status>string</Status>
        <PoNum>string</PoNum>
        <Type>string</Type>
        <Comments>string</Comments>
        <EffectiveDate>dateTime</EffectiveDate>
        <StartDate>dateTime</StartDate>
        <ExpiryDate>dateTime</ExpiryDate>
        <GuaranteeDate>dateTime</GuaranteeDate>
        <CustomerPrintName>string</CustomerPrintName>
        <CustomerTitle>string</CustomerTitle>
        <CustomerSignDate>dateTime</CustomerSignDate>
        <RenewFrom>int</RenewFrom>
        <PrintCopies>int</PrintCopies>
        <ApprovedBy>string</ApprovedBy>
        <ApproveDate>dateTime</ApproveDate>
        <EstimatedRevenue>decimal</EstimatedRevenue>
        <LegalId>int</LegalId>
        <ContractDetails>
          <TxContractDetail>
            <Id>int</Id>
            <Type>string</Type>
            <Size>decimal</Size>
            <UnitOfMeasure>string</UnitOfMeasure>
            <Quantity>decimal</Quantity>
            <Compact>boolean</Compact>
            <CustomerOwn>boolean</CustomerOwn>
            <WeekCode>int</WeekCode>
            <MaxLifts>decimal</MaxLifts>
            <WeekDayFrequency>int</WeekDayFrequency>
            <DemurrageDays>int</DemurrageDays>
            <DemmurageRateDecimal>decimal</DemmurageRateDecimal>
            <PoRquired>boolean</PoRquired>
            <Note1>string</Note1>
            <ScheduledDays>string</ScheduledDays>
            <Service>int</Service>
            <OriginalId>int</OriginalId>
            <Finalized>boolean</Finalized>
            <ReinstateDate>dateTime</ReinstateDate>
            <StopReason>string</StopReason>
            <ChangeReason>string</ChangeReason>
            <Action>int</Action>
            <PriceClass>int</PriceClass>
            <ContractRate xsi:nil="true" />
            <ContractRateActivityMaterial xsi:nil="true" />
          </TxContractDetail>
          <TxContractDetail>
            <Id>int</Id>
            <Type>string</Type>
            <Size>decimal</Size>
            <UnitOfMeasure>string</UnitOfMeasure>
            <Quantity>decimal</Quantity>
            <Compact>boolean</Compact>
            <CustomerOwn>boolean</CustomerOwn>
            <WeekCode>int</WeekCode>
            <MaxLifts>decimal</MaxLifts>
            <WeekDayFrequency>int</WeekDayFrequency>
            <DemurrageDays>int</DemurrageDays>
            <DemmurageRateDecimal>decimal</DemmurageRateDecimal>
            <PoRquired>boolean</PoRquired>
            <Note1>string</Note1>
            <ScheduledDays>string</ScheduledDays>
            <Service>int</Service>
            <OriginalId>int</OriginalId>
            <Finalized>boolean</Finalized>
            <ReinstateDate>dateTime</ReinstateDate>
            <StopReason>string</StopReason>
            <ChangeReason>string</ChangeReason>
            <Action>int</Action>
            <PriceClass>int</PriceClass>
            <ContractRate xsi:nil="true" />
            <ContractRateActivityMaterial xsi:nil="true" />
          </TxContractDetail>
        </ContractDetails>
        <ContractNote>
          <TxContractNote>
            <User>string</User>
            <Note>string</Note>
            <SystemNote>boolean</SystemNote>
          </TxContractNote>
          <TxContractNote>
            <User>string</User>
            <Note>string</Note>
            <SystemNote>boolean</SystemNote>
          </TxContractNote>
        </ContractNote>
        <ContractAttachment>
          <TxContractAttachment>
            <FileName>string</FileName>
            <Note>string</Note>
            <File>base64Binary</File>
            <AttachmentType>int</AttachmentType>
          </TxContractAttachment>
          <TxContractAttachment>
            <FileName>string</FileName>
            <Note>string</Note>
            <File>base64Binary</File>
            <AttachmentType>int</AttachmentType>
          </TxContractAttachment>
        </ContractAttachment>
      </contract>
    </CreateContract>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <CreateContractResponse xmlns="http://www.trux.com">
      <CreateContractResult>int</CreateContractResult>
    </CreateContractResponse>
  </soap12:Body>
</soap12:Envelope>