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
  7. Common errors
  8. Best practices
  9. Related endpoints
  10. FAQ

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 such as bulk geocoding, batch route generation, and 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 (XML is also 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 provided through the X-API-Key header.

SOAP request

SOAP uses the CreditRemaining method together with a SessionIDHeader.

Response schema#

CreditResult (REST + SOAP)

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

The same result concept is used across REST and SOAP, making it easy to monitor remaining API credit in different integration stacks.

Examples#

REST request examples

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

SOAP request examples

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

Response examples

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>

Common errors#

  • REST 401 / Unauthorized: Missing or invalid X-API-Key.
  • REST 403 / Forbidden: The key is valid but blocked, expired, or out of credit.
  • Status = 2 (Failed): Check Errors[] for the reason.
  • SOAP authentication failure: Missing or 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 such as geocoding, routing, or dispatching at scale.
  • Keep keys server-side and rotate keys if they are compromised.
  • Prefer REST unless you have a SOAP-only integration requirement.

FAQ#

What does the Credit API do?
The Credit API returns how much API credit remains for your TrackServiceKey.
How do I authenticate to Credit in REST and SOAP?
For REST, send your TrackServiceKey in the X-API-Key header on POST /rest/Credit. For SOAP, send your TrackServiceKey in SessionIDHeader as SessionID for each CreditRemaining call.
What does CreditRemaining return?
CreditRemaining returns a CreditResult that includes the Credit integer, which is your remaining API credit balance.
When should I check my remaining API credit?
Check your remaining API credit before running bulk geocoding, route optimization, or dispatch jobs, and monitor it in production to avoid interruptions.

Next step: calculate routes

After confirming your remaining credit, continue with Routes or Dispatch to optimize deliveries and fleet operations.

Go to Routes Go to Dispatch