Credit API (Credit Remaining)

Use Credit to check how much API credit remains for your TrackServiceKey. REST returns CreditResult. SOAP uses CreditRemaining.

TrackRoad Credit API showing remaining API credit via REST /rest/Credit and SOAP CreditRemaining.
Check your remaining API credit using REST POST /rest/Credit or SOAP CreditRemaining.

Need the full contract?

Swagger includes the REST model (CreditResult) and endpoint details. SOAP is available via WSDL.

View Swagger UI View SOAP WSDL API Reference Overview

Table of Contents

  1. What Credit does
  2. Endpoints and base URLs
  3. Authentication (REST & SOAP)
  4. Request schema
  5. Response schema
  6. Examples (REST JSON + SOAP)
  7. Common errors
  8. Best practices
  9. Related endpoints

What Credit does#

Credit returns your remaining balance for the current API key. It helps you monitor usage and avoid failures in high-volume jobs (bulk geocoding, batch routes, dispatch optimization).

REST: POST /rest/Credit. SOAP: CreditRemaining.

Endpoints and base URLs#

REST (JSON)#

Item Value
Base URL https://ts6.trackroad.com
Endpoint POST /rest/Credit
Full URL https://ts6.trackroad.com/rest/Credit
Produces application/json (also XML is supported)
Body No body

SOAP (CreditRemaining)#

Item Value
SOAP URL https://ts6.trackroad.com/TrackService.asmx
WSDL https://ts6.trackroad.com/TrackService.asmx?WSDL
Method CreditRemaining
SOAPAction http://TrackService.TrackRoad.com/CreditRemaining
SOAP 1.1 Content-Type text/xml; charset=utf-8
SOAP 1.2 Content-Type application/soap+xml; charset=utf-8

Recommended: use REST unless you must integrate with an existing SOAP-only system.

Authentication (REST & SOAP)#

REST authentication (X-API-Key)#

Send your TrackServiceKey in the X-API-Key header on every REST request. See: API Authentication.

SOAP authentication (SessionIDHeader)#

SOAP requests use SessionIDHeader. Send your TrackServiceKey as SessionID for each CreditRemaining call.

Login/Logout can remain documented as legacy, but API Key is the recommended authentication.

Request schema#

REST request#

REST Credit is a POST request with no request body. Authentication is via X-API-Key header.

SOAP request#

SOAP uses the CreditRemaining method with a SessionIDHeader.

Response schema#

CreditResult (REST + SOAP)#

Property Type Description
Credit int Remaining credit balance.
Errors Error[] Errors/warnings if any.
Status int (enum) 0=None, 1=Success, 2=Failed, 3=SuccessWithErrors.

REST JSON response example (shape)#

{
  "Credit": 12345,
  "Errors": [],
  "Status": 1
}

SOAP response example (SOAP 1.1)#

<?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>
    <CreditRemainingResponse xmlns="http://TrackService.TrackRoad.com/">
      <CreditRemainingResult>
        <Credit>12345</Credit>
      </CreditRemainingResult>
    </CreditRemainingResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2 response is the same shape but uses the soap12 envelope namespace.

Examples (REST JSON + SOAP)#

REST request examples (multiple languages)#

curl -X POST "https://ts6.trackroad.com/rest/Credit" \
  -H "X-API-Key: YOUR_TRACKSERVICEKEY"

SOAP request examples (CreditRemaining) — multiple languages#

curl -X POST "https://ts6.trackroad.com/TrackService.asmx" \
  -H "Content-Type: text/xml; charset=utf-8" \
  -H "SOAPAction: http://TrackService.TrackRoad.com/CreditRemaining" \
  -d @creditRemaining.xml

Common errors#

  • REST 401 / Unauthorized: Missing or invalid X-API-Key.
  • REST 403 / Forbidden: Key valid but blocked, expired, or lacks credit.
  • Status = 2 (Failed): See Errors[] for the reason.
  • SOAP auth failure: Missing/invalid SessionIDHeader (SessionID must be your TrackServiceKey).

Best practices#

  • Monitor credit in production and alert when it falls below your safe threshold.
  • Check credit before batch jobs (geocode/routes/dispatch at scale).
  • Keep keys server-side and rotate keys if compromised.
  • Prefer REST unless you have a SOAP-only integration.

Next step: calculate routes

After confirming credit, call Routes or Dispatch to optimize your deliveries.

Go to Routes Go to Dispatch