SOAP Batch

The Call batch enables you to use any of the other SOAP calls in a batch format and receive more than one response. Limit of 50 responses. Batch calls can be nested but a response cannot be dependent on a previous answer in the same nested call.

Model


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
     <batch xmlns="http://www.tractbilling.com/billing/1_27/service">
         <batchRequest stopOnError="" transactional="">
             <dom:requests>
                **// array of requests. Requests must be of same type: create, update, command, or authorization //**
             </dom:requests>
         </batchRequest>
     </batch>
   </soap:Body>
</soap:Envelope>
Parameters
Element Name Element
Type
Field
Length
Description
Choice:
- create
- update
- command
- authorization
One of:
create
update
command
authorization
- - Choose which call you are using in the Batch Call.
stopOnError Boolean
Shown either:
"true"
(Yes)
or
"false"
(No)

Does the process stopOnError?

Yes, the request stops when an error occurs.

No, the request does NOT stop when an error occurs.

transactional Boolean
Shown either:
"true"
(Yes)
or
"false"
(No)

Is the request transactional?

Yes, the request is tranasactional.

No, the request is NOT transactional.

Examples

The following example is a batch of usage records:

<soap:Envelope xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlnssd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlnsom="http://www.tractbilling.com/billing/1_27/domain">
    <soap:Body>
        <batch xmlns="http://www.tractbilling.com/billing/1_27/service">
            <batchRequest stopOnError="true">
                <dom:requests>
                    <dom:create>
                        <dom:usage startTime="2012-08-02T23:35:00.0" serviceResourceId="batch_mb" usageAmount="1" usageUom="MEGABYTE" description="SOAP Batch Loading 1">
                            <dom:serviceResourceType>GENERICSRVCRESOURCE</dom:serviceResourceType>
                        </dom:usage>
                    </dom:create>
                    <dom:create>
                        <dom:usage startTime="2012-08-02T23:35:00.0" serviceResourceId="batch_mb"usageAmount="2" usageUom="MEGABYTE" description="SOAP Batch Loading 2">
                            <dom:serviceResourceType>GENERICSRVCRESOURCE</dom:serviceResourceType>
                        </dom:usage>
                    </dom:create>
                </dom:requests>
            </batchRequest>
        </batch>
    </soap:Body>
</soap:Envelope>

This is the response:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns2:batchResponse xmlns="http://www.tractbilling.com/billing/1_27/domain" xmlns:ns2="http://www.tractbilling.com/billing/1_27/service">
            <ns2:return errorOccurred="false" numRequestsProcessed="2" successful="true">
                <responses>
                    <create successful="true" eid="3111666" requestId="1"/>
                    <create successful="true" eid="3111668" requestId="2"/>
                </responses>
                <errors/>
            </ns2:return>
        </ns2:batchResponse>
    </soap:Body>
</soap:Envelope>