Handling Errors

Every B2B API error code by endpoint: what causes it and whether to retry, plus the error response format and HTTP status meanings.

When a B2B API request fails, the response has an HTTP status code and, in most cases, a body that tells you what went wrong. This page lists the error codes the B2B API returns, what causes each one, and whether to retry.

Error response format

Error bodies use the same format as the rest of the API: JSON by default, or XML if you send Accept: application/xml.

{
  "errorCode": "400-103",
  "errorMessage": "companyId must be an integer.",
  "diagnosticCode": "ccb84f25-236e-4bcf-be01-88b7dd673fb4"
}
FieldDescription
errorCodeThe HTTP status followed by a number, for example 400-103. Use it in your code to decide how to handle the error.
errorMessageA human-readable explanation. Don't parse it: the wording can change. Some messages include the value that caused the error.
diagnosticCodeAn ID for this failure. Include it when you contact support.

Some responses have no errorCode, for example when a token is rejected before the request reaches the B2B API. Always check the HTTP status code first.

HTTP status codes

StatusMeaningRetry?
400The request is invalid: a parameter is missing, has the wrong type, or is out of range. Also returned when a job limit is reached.No. Fix the request first. For 400-184 and 400-211, wait for running jobs to finish.
401The access token is missing, invalid, or expired.No. Generate a new token, then retry.
403Your API Key Set doesn't have access to the B2B API.No. Ask your Demandbase admin to grant access.
404The record, job, subscription, or logo doesn't exist.No.
429The request was refused because of a limit. 429-100 means your API credit limit is exhausted.Not for 429-100: contact support to raise your limit. For other 429 responses, see Rate Limits and retry with exponential backoff.
500An error on the Demandbase side.Yes, with exponential backoff. If it keeps failing, contact support with the diagnosticCode.

Authentication and access errors

CodeMessageWhat to do
401-100Authentication credentials are missing or invalid.Send a valid token in the Authorization: Bearer header. See Authentication.
401-102Legacy API tokens are no longer supported.Generate a token from an API Key Set and use it instead of the legacy token.
403-100API Key does not have privilege to access the requested resource.Ask your Demandbase admin to enable B2B API access for your API Key Set.
429-100API credit limit exceeded. Please contact support to increase your limit.Your credits are used up. Retrying won't help. Contact support.

Pagination and common parameters

CodeMessageEndpoints
400-100page number must be greater than or equal to 1.Search, news, and subscription list endpoints
400-101perPage must be between 1 and 50.Search, news, GET /subscriptions, GET /subscriptions/{subscriptionId}/alerts
400-106Invalid field nameEndpoints that accept fields, companyFields, contactFields, or peopleFields. The message names the invalid field.
400-109Sorting order can be either asc or desc.POST /contacts, POST /companies
400-166The request cannot be null.Any endpoint with a request body, when the body is missing or can't be read
404-100Invalid ID, record not found.Fetch endpoints, when the company or contact ID doesn't exist

Contact search: POST /contacts

CodeMessage
400-107At least one parameter must be provided.
400-108Sorting is allowed only on active, title, companyName and confidenceScore.
400-110Invalid contactCountry. Please enter valid country ID in contactCountry.
400-111Invalid companyCountry. Please enter valid country ID in companyCountry.
400-114Industry Id must be an integer.
400-120minEmployees must be greater than or equal to 0.
400-121maxEmployees must be greater than or equal to 0.
400-122Invalid companyId in companyIdsToInclude. companyId must be an integer.
400-123minContactQualityScore must be one of: [A+, A, B, C]
400-124jobLevel must be a valid legacy integer id or string code.
400-125jobFunction must be a valid legacy integer id or string code.
400-126minEmployees must be less than or equal to maxEmployees.
400-137phoneType must be one of: [DIRECT, CORP, MOBILE, ANY, DIRECTORCORP]
400-138emailValidationStatus must be one of: [ValidEmail, ValidDomain]
400-231Invalid contactId in contactIdsToInclude. contactId must be an integer.
📘

The 400-137 message lists DIRECTORCORP, but the API doesn't accept it. Valid phoneType values are direct, corp, mobile, and any.

Company search: POST /companies

CodeMessage
400-102At least one parameter must be provided for company search.
400-111Invalid companyCountry. Please enter valid country ID in companyCountry.
400-112Invalid news category. The message lists the valid values.
400-113Invalid newsDuration. Valid values are between 1 and 30
400-114Industry Id must be an integer.
400-117Invalid gender. Valid values are male and female
400-118minRevenue must be greater than or equal to 0.
400-119maxRevenue must be greater than or equal to 0.
400-120minEmployees must be greater than or equal to 0.
400-121maxEmployees must be greater than or equal to 0.
400-126minEmployees must be less than or equal to maxEmployees.
400-127minRevenue must be less than or equal to maxRevenue.
400-128Invalid businessStructure. Valid values are: uncategorized, globalParent, subsidiary, group, branch, independent
400-129Invalid businessType. Valid values are: public, private, school, government, organization
400-130Invalid companyStatus. Valid values are: unassigned, operating, non-operating, acquired, liquidating, outOfBusiness
400-131Invalid fiscalYearEnd. fiscalYearEnd should be a valid month name.
400-132Invalid fortuneRanking. Valid values are: fortune500, fortune1000
400-133Invalid region. Valid values are: Africa, Asia, Europe, MiddleEast, NorthAmerica, Oceania, SouthAmerica
400-134Invalid companyType. Valid values are: unknown, public, private, government, organization
400-135Sorting is allowed only on employeeCount, businessType, companyRevenue and location
400-136Invalid Ethnicity Ids. Ethnicity Ids should be between 1 and 7
400-214Invalid country. Please enter valid country ID in country.

Company and contact details

CodeMessageEndpoint
400-103companyId must be an integer.GET /company/{companyId} and its /news, /newsFeed, and /logos routes
400-217sortBy parameter is only allowed with value: popularityGET /company/{companyId} (family tree sorting)
400-105contactId must be an integer.GET /contact/{contactId}
400-183Invalid include parameter. Allowed value is other_employments.GET /contact/{contactId}
400-112Invalid news category. The message lists the valid values.GET /company/{companyId}/news
400-115Invalid value for size. Should be among {100,200,400}GET /company/{companyId}/logos/{logoSize}
404-103Company logo for the given company ID is not present.GET /company/{companyId}/logos/{logoSize}

Match: POST /match

CodeMessage
400-123minContactQualityScore must be one of: [A+, A, B, C]
400-164At least one of the following parameters: name, website, email, executiveLinkedInHandle or ticker must be provided for a match.
400-165The match request should have non empty requests list.
400-167Each request should have a unique ID.
400-168The match request size should be less than or equal to 30.
400-169The match limitResults should be between 1 and 20.

Bulk jobs: POST /job, POST /match/job, GET /job/{jobId}

CodeMessage
400-184Job limit exceeded: A maximum of 2 jobs can run at the same time.
400-190jobName is required and cannot be empty.
400-196jobName must be at most 50 characters
400-199jobType is required and cannot be empty.
400-195jobType must be one of: companyFetch, contactFetch, companySearch, contactSearch
400-202At least one filter must be provided.
400-201Maximum 1 filter can be applied at a time.
400-197Filter field is required
400-198Filter values must not be empty
400-200Filter can only be applied on field 'companyId' for given jobType.
400-212Filter can only be applied on field 'contactId' for given jobType.
400-213Invalid field in filter: followed by the field name
400-203The number of values in the filter exceeds the limit of 10000.
400-204fields list must not be empty in job request
400-139Job Id should not be empty.
400-210JobId should be a valid UUID.
404-101Invalid job ID, job not found.

Match job CSV file: POST /match/job

These errors describe a problem in the uploaded CSV file. Most messages include the line number or header name.

CodeCause
400-185The file is larger than 10 MB.
400-186The file has more than 10,000 lines.
400-191The id header is missing.
400-192The file has a header the API doesn't recognize.
400-204None of the headers needed for matching is present. The message lists them.
400-187A row has an empty id.
400-188A row has the wrong number of fields.
400-205A true/false column has a value other than True, False, or empty.
400-206contactMatching has a value other than active, all, or empty.
400-209A row has no value in any of the columns needed for matching. The message lists them.
📘

In a match job CSV, 400-204, 400-205, 400-206, and 400-209 have the meanings in this table, not the meanings they have on other endpoints. Check the endpoint and the message along with the code.

Subscriptions

Creating and updating subscriptions: POST /subscriptions/job, PUT /subscriptions/job

CodeMessage
400-211Only one subscription job can be created at a time. Please wait for the current job to finish before creating a new one.
400-205Maximum number of subscriptions for the tenant has been reached. Please delete some subscriptions before creating a new one.
400-194Subscription job name is invalid. It should not be empty.
400-209Subscription job name is too long. Maximum length is 100 characters.
400-162Subscription type is invalid. Valid values are: company, dbPerson, companynews, companyfamilytree
400-142Subscription belongs to a different subscription type. Also returned for: Invalid Webhook. Url is too long.
400-157One or more fields is invalid for provided subscription type.
400-158One or more company ID should be present
400-159One or more dbPerson ID should be present
400-160Company ids exceeds the permissible limit for subscription job
400-161dbPerson ids exceeds the permissible limit for subscription job
400-163One or more newsCategories is invalid for provided subscription type.
400-206One or more news category IDs should be present for subscription type companynews.
400-156Start date is invalid. It should be in YYYY-MM-DD format and should be a future date.
400-148Cron expression is invalid.
400-149Frequency has invalid pattern.
400-150Frequency is not valid for the provided subscription type
400-151Frequency type is invalid.
400-152Frequency must be present.
400-153Frequency value must be an integer and greater than 0.
400-154Frequency value for minutes is more than the max allowed.
400-155Frequency value is more than the max allowed.
400-144Invalid Webhook. Url syntax is invalid.
400-145Invalid Webhook. Url is not absolute.
400-146Invalid Webhook. Url is incorrect.
400-147Invalid Signing secret. Length should be less than 500
404-104Subscription ID does not exist.

Reading and deleting subscriptions

CodeMessageEndpoints
400-162Subscription type is invalid. Valid values are: company, dbPerson, companynews, companyfamilytreeGET /subscriptions
400-171Subscription ID cannot be empty.Routes with {subscriptionId}
400-181perPage must be between 1 and 5000.GET /subscriptions/{subscriptionId}/alerts/{alertId}, GET /subscriptions/{subscriptionId}/entityIds
400-182Alert ID does not belong to subscription.GET /subscriptions/{subscriptionId}/alerts/{alertId}
404-104Subscription ID does not exist.Routes with {subscriptionId}
404-105Alert ID does not exist.GET /subscriptions/{subscriptionId}/alerts/{alertId}

Subscription jobs: GET /subscriptions/jobs, GET /subscriptions/job/{jobId}

CodeMessage
400-172Invalid set of period params, either send period, start and end or none of them.
400-173Invalid period type. Valid values are: day, month and year.
400-174Invalid date format. The message lists the valid formats for each period.
400-175Difference between start date and end date should be less than 90 days.
400-176Difference between start date and end date should be less than 18 months.
400-177Invalid job status. Valid values are: accepted, processing, finished and failed
400-178Invalid job type. Valid values are: notificationSubscriptionCreate and notificationSubscriptionUpdate
400-179Invalid start date. It should not be some future date and should be less than end date
400-139Job Id should not be empty.
404-101Invalid job ID, job not found.

Server errors

CodeMessageWhat to do
500-100Error while communicating with internal serviceRetry with exponential backoff.
500Internal server exception occurred.Retry with exponential backoff. If it keeps failing, contact support with the diagnosticCode.

Getting help

If an error doesn't make sense, or a 500 error persists, contact [email protected]. Include the endpoint, the request you sent (without your token), the time of the request, and the diagnosticCode.


Did this page help you?