Skip to main content
Version: 1.7.3

Overview

Partner API is designed for platforms that file for multiple customer's through a single TaxBandits API account. Each customer is set up as a Managed User, which keeps its businesses, recipients, and returns separate from those of every other customer.

You continue to use one set of credentials, one account balance, and one webhook. Your customer's do not log in to TaxBandits. All activity runs through your integration.

Why use Partner API​

Without Partner API, all of your customer's businesses are stored together under one account. If two customer's add a business with the same TIN, they share a single record, and the most recent update replaces the earlier details, including the business name and address.

With Partner API, each customer has its own separate space. The same TIN can exist under two customer's without either one affecting the other.

ScenarioSingle API accountPartner API
Customer A saves a business with a given TINSavedSaved under Customer A
Customer B saves a business with the same TIN and a different addressReplaces Customer A’s detailsSaved under Customer B
OutcomeCustomer A's business information is overwrittenEach customer’s information remains intact

How it works​

  1. Register each customer once. You provide your own reference for the customer, and TaxBandits returns a token that identifies that customer.
  2. Request an access token for the customer. Include the customer’s reference and token in the access token request. Providing the customer’s reference is optional but recommended to ensure consistent customer identification and avoid potential conflicts in future API requests. The access token will be linked to the specified customer.
  3. File as usual. Use the access token with the same Business, Recipient, and Form endpoints you use today. Each request applies to that customer’s data only.

To enable Partner API access for your account, please contact us at developer@taxbandits.com. See Getting Started for the steps.

What changes in your integration​

  • No new filing endpoints. The Business, Recipient and Form endpoints remain the same.
  • One new endpoint. registerpartner registers a customer and returns its token.
  • One addition to the access token request. A new field, partnerUser, identifies the customer.
  • No new credentials. Your existing Client ID, Client Secret and User Token continue to apply.
  • Gradual adoption. Requests that do not include partnerUser work exactly as they do today, so you can move customer's over in stages.

Key terms​

TermDescription
PartnerYour API account, once Partner API is enabled.
Managed UserA customer registered under your account. Its data is stored separately.
RefYour unique reference for a customer, such as CUST-1001. Each Ref must be unique within your account.
Partner user tokenA secret returned when you register a customer. It is required to act on that customer’s behalf.
UserTypeThe type of customer: BO (Business Owner).
Partner FlowAny request that includes partnerUser.

What remains with your account​

Customer records are kept separate, while billing and configuration stay with your main account.

AreaManaged atWhat this means
Businesses, recipients, returns and TIN checksCustomerEach customer’s records are kept separate.
Credits, balance and pricingYour accountTransmission charges are deducted from your balance. Customer's do not hold separate balances.
API settings, including portal and email customizationYour accountOne configuration applies to all of your customer's.
PDF generationYour accountReturn PDFs are generated using your API settings.
Status notifications (webhooks)Your accountUpdates for all customer's are sent to your webhook URL. Each update includes return or business identifiers, so you can match it to the right customer.

Important to know​

  • Store the token securely. The token is returned only once, at registration. If it is lost, contact TaxBandits support to reset it.
  • One access token per customer. To work on a different customer, request a separate access token using that customer’s reference and token.
  • Webhooks are managed by you. Customer's cannot configure their own webhooks.

Currently, the endpoints to view, list, update, deactivate, and reactivate customer's, and to reset a token aren’t available. Until they are available, contact TaxBandits support to deactivate, reactivate, or reset a customer’s token.

Getting Started​

Partner API is available on request. Once TaxBandits enables it for your account, you register each customer once. After that, you request an access token for a customer whenever you file on its behalf.

Before you begin​

Have the following ready:

  • Your existing Client ID, Client Secret, and User Token
  • A unique reference (Ref) for each customer, such as CUST-1001
  • A secure place to store each customer's token

Setup at a glance​

StepWhat you do
1Request Partner API for your account
2Register each customer
3Request an access token for the customer
4Call the API as usual
5Test in Sandbox, then go live

Step 1: Request Partner API​

Contact TaxBandits support or your account manager and ask for Partner API to be enabled on your API account. TaxBandits will enable it and set up your account as a Partner.

Keep using your existing Client ID, Client Secret, and User Token. No new credentials are issued.

Requests that do not include partnerUser continue to work exactly as before, so you can move customer's over gradually.

Step 2: Register each customer​

Call Register once for each customer, using your own Ref for that customer. Save the token that is returned, because it is shown only once. See Register.

Step 3: Request an access token for the customer​

Add the partnerUser field, containing the customer’s ref and token, to your access token request. See Authentication.

Step 4: Call the API as usual​

Use the access token with the existing 2.0.0 Business, Recipient and Form endpoints. Every call applies to that customer’s data. Access tokens are valid for one hour, so request a new one when the current one expires.

Filing calls run against the customer's data. Billing, PDFs and status webhooks are handled by your Partner account.

Step 5: Test in Sandbox, then go live​

Complete the flow in Sandbox, then follow the standard Request to Go Live process.

Register​

Use this endpoint to register one of your customer's as a Managed User under your Partner account. The response returns the token you need to act on that customer’s behalf.

To register the partner, you must first call the Auth method to obtain an access token. Include this token in your request header as a Bearer token. Refer to OAuth 2.0 Authentication for details on JWT-based authentication.

Key points​

  • Use your standard access token. Call Register with an access token requested without partnerUser.
  • Save the token. It is returned only once, and TaxBandits stores it in a secure, hashed form. If it is lost, contact TaxBandits support to reset it.
  • API access only. Managed Users cannot log in to the portal.

Endpoint: POST /v2/registerpartner

Request Body​

FieldTypeDescription
PartnerUserObjectDetails of the customer to register
RefStringYour unique reference for the customer. Must be unique within your Partner account. Required
ContactNameStringOptional customer’s contact name.
PhoneNumberStringOptional customer’s phone number.
UserTypeStringOptional kind of customer. Allowed values: BO

Request JSON​

Sample 1 — Register a Business Owner


{
"PartnerUser": {
"Ref": "CUST-1001",
"ContactName": "John Smith",
"PhoneNumber": "9876543210",
"UserType": "BO"
}
}

Response Body​

FieldTypeDescription
StatusCodeNumberHTTP status code
StatusNameStringName of the status code
StatusMessageStringDetailed status message
PartnerUserObjectRegistered customer
RefStringRef as sent
TokenStringPartner user token. Use it in the partnerUser JWS claim. Returned only in this response.
UserTypeStringBO as sent
ErrorsObject[]Validation errors, if any

Response JSON​


{
"StatusCode": 200,
"StatusName": "Ok",
"StatusMessage": "Successful API Call",
"PartnerUser": {
"Ref": "CUST-1001",
"Token": "f96e4efe67894b5dbc020e3e78462a88",
"UserType": "BO"
},
"Errors": null
}

Authentication​

Partner API uses the same two-step process as OAuth 2.0 Authentication. You create a signed request, called a JWS, and exchange it for an access token. The only difference is one additional field, partnerUser, which identifies the customer.

Step 1 — Generate the JWS​

Header


{
"alg": "HS256",
"typ": "JWT"
}

Payload


{
"iss": "968a9c78dae29a29",
"sub": "968a9c78dae29a29",
"aud": "a574b75f18b24fc09f9039ffb5cb08f3",
"iat": 1790323200,
"scope": "fullaccess",
"categories": ["all"],
"partnerUser": {
"ref": "CUST-1001",
"token": "3f6c2a4e91b74d0ebb4a6a7e2d9c1f05"
}
}

JWS claims​

ClaimDescriptionRequired
issIssuer — Client ID from the consoleYes
subSubject — Client ID from the consoleYes
audAudience — User Token from the consoleYes
iatIssued at, Unix epoch secondsYes
scopeRead / Write / Read_Write / Transmit / FullAccessOptional
categoriesForm groups the token can accessRequired if scope is not FullAccess
partnerUserObject identifying the customer. Its presence marks a Partner Flow requestYes, for Partner Flow
partnerUser.refThe Ref used at registrationYes, for Partner Flow
partnerUser.tokenThe Token returned by RegisterYes, for Partner Flow

Signature: Sign the header and payload with your Client Secret using HS256. The JWS is valid for 5 minutes from iat.

Claim keys inside the JWS use camelCase (partnerUser, ref, token). API responses keep the 2.0.0 PascalCase style (PartnerUser, Ref).

Step 2 — Submit the Token Request​

Endpoint: GET v2/token

  • Sandbox: https://testoauth.expressauth.net/v2/token
  • Live: https://oauth.expressauth.net/v2/token
HeaderValueRequired
AuthenticationThe JWS from Step 1Yes

Success response​


{
"StatusCode": 200,
"StatusName": "Ok",
"StatusMessage": "Successful API Call",
"AccessToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6InRiLTIwMjYtMDkiLCJ0eXAiOiJKV1QifQ...",
"TokenType": "Bearer",
"ExpiresIn": 3600,
"PartnerUser": {
"Ref": "CUST-1001",
"UserType": "BO"
},
"Errors": null
}

FieldDescription
AccessTokenJWT to send as the Bearer token on all 2.0.0 calls for this customer
ExpiresInToken lifetime in seconds (3600 = 1 hour)
PartnerUser.RefRef sent in the JWS
PartnerUser.UserTypeBO, as registered. Empty if not set

PartnerUser is returned only for Partner Flow requests. The default response is unchanged.

Step 3 — Use the Access Token​

Send the access token as Authorization: Bearer <AccessToken> on the Business, Recipient, and Form endpoints. All data you create or read belongs to the customer named in partnerUser.ref.

To work on another customer, request a separate access token using that customer’s ref and token.

Billing, PDFs & Webhooks​

With a Partner Flow access token, filing data belongs to the customer, while charges, PDFs and webhooks are handled by your main Partner account.

OperationHandled by
Create, update, get, list and delete Businesses, Recipients and FormsCustomer (Managed User)
TIN uniqueness and duplicate checksCustomer
Status, PDF and utility lookups on returnsCustomer
Credit or cash balance check and deduction on TransmitPartner
API configuration, including portal and email customizationPartner
PDF generation for transmitted returnsPartner's API settings
Status webhooks (Accepted, Rejected and so on)Partner's webhook URL

Billing​

Transmission charges are deducted from your Partner account’s credits or cash balance. Customer's do not have separate balances.

PDFs​

PDFs for your customer's returns are generated with your Partner account's API settings, the same as for returns filed under your main account.

Webhooks​

Status webhooks for every customer's returns are sent to the webhook URL configured on your Partner account. The payload is the standard 2.0.0 webhook payload; no Partner-specific fields are added. Use the return or business identifiers in the payload to match the update to your customer.

Customer's cannot configure their own webhooks.

Error Codes​

Partner API returns the existing AUTH errors plus the partner-specific errors below. Error IDs marked new are proposed.

Authentication errors​

Error IDNameMessage
AUTH-100009RefererInvalid Referer value in the request
AUTH-100010RefererReferer value is required
AUTH-100017AuthorizationJWT Invalid
AUTH-100018AuthorizationJWT EXPIRED
AUTH-100019AuthorizationInvalid IP Address
AUTH-100026AuthorizationAuthorization Failed
AUTH-100027AuthorizationInvalid Authorization Token
AUTH-100081AuthorizationAuthorization is required

Register errors​

Error IDNameMessage
AUTH-100062PartnerFlowPartner flow is not enabled for this account. Please contact TaxBandits support to enable it.
AUTH-100063PartnerUserEither PartnerUser Ref or Token is required in the partnerUser claim.
AUTH-100064PartnerUser.RefInvalid PartnerUser Ref. The Ref must not exceed 50 characters and must not contain +.
AUTH-100065PartnerUser.TokenInvalid PartnerUser Token.
AUTH-100066PartnerUser.RefThe PartnerUserRef is not associated with the given PartnerUser token.
AUTH-100067PartnerUser.TokenThe PartnerUser Token does not match the registered token for the given Ref.
AUTH-100068PartnerUserUnable to process the partner user request at this time. Please try again later.
AUTH-100069PartnerUser.RefPartnerUser Ref is required.
AUTH-100070PartnerUser.RefThe PartnerUser Ref is already registered for this partner.
AUTH-100071PartnerUser.UserTypeInvalid UserType. Allowed values are BO.
AUTH-100073AuthorizationA partner user access token cannot be used to register a partner user. Use the API user's access token.
AUTH-100075PartnerUser.PhoneNumberInvalid phone number. Only numeric digits are allowed, and the phone number must contain 10 to 15 digits.
AUTH-100076PartnerUser.RefThe PartnerUser Ref is not registered.
AUTH-100077PartnerUser.tokenThe PartnerUser token is invalid.
AUTH-100078PartnerUser.ContactNameContactName should not exceed 70 characters.
AUTH-100079PartnerUser.ContactNameContact name must contain at least 3 characters.
AUTH-100080PartnerUser.ContactNameInvalid contactName. ContactName must have alphabetic character.
AUTH-100081AuthorizationAuthorization is required.
AUTH-100082RefRef must be at least 8 characters.
AUTH-100083EmailAddressEmail Address cannot be more than 100 characters.
AUTH-100084ContactNameInvalid contactName. The following special characters are not allowed: < > ; { } [ ] _ \ ! : ? =

Sample Error JSON​


{
"StatusCode": 403,
"StatusName": "Forbidden",
"StatusMessage": "Managed user is inactive",
"Errors": [
{
"Id": "AUTH-PARTNER-403",
"Name": "PartnerUser",
"Message": "The managed user CUST-1001 is not active"
}
]
}