API Error Dictionary

This guide covers the error codes and common error messages you may encounter when integrating with the Wingspan API, along with recommended solutions.

Errors

Wingspan uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a batch was already closed, etc.). Codes in the 5xx range indicate an error with Wingspan's servers (these are rare).

Some 4xx errors that could be handled programmatically include an error message that briefly explains the error reported.

Attributes

AttributeTypeDescription
codeintegerThe HTTP status code of the response.
messagestringA human-readable message providing more details about the error.
errorMessagestringFor bulk batch item errors, found in metadata.errorMessage after batch processing completes.

HTTP Status Code Summary

CodeNameDescription
200OKEverything worked as expected.
208Already ReportedThe bulkPayableItemReference already exists. The existing item is returned to prevent duplicates.
400Bad RequestThe request was unacceptable, often due to missing a required parameter or invalid data format.
401UnauthorizedNo valid API key provided. Generate a new token in the Wingspan portal under Data & Integrations → Developer.
403ForbiddenThe API key doesn't have permissions to perform the request.
404Not FoundThe requested resource doesn't exist.
409ConflictThe request conflicts with another request. We recommend an exponential backoff of your requests.
422Unprocessable EntityThe request syntax was valid but the content cannot be processed.
429Too Many RequestsToo many requests hit the API too quickly. We recommend an exponential backoff of your requests.
500Server ErrorSomething went wrong on Wingspan's end. (These are rare.)

Error Types

TypeDescription
Batch ErrorBatch errors occur when attempting invalid operations on a bulk batch, such as invalid status transitions or modifying a closed batch.
Payable Item ErrorPayable item errors occur when adding or updating items in a bulk payable batch with invalid or missing data.
Agent Item ErrorAgent item errors occur when adding items to a bulk collaborator batch with invalid or conflicting data.

Common Error Messages

Batch Errors

Error MessageCodeDescription
Status may only be updated from Open to Pending400Batches can only transition from Open to Pending.
Processing strategy cannot be updated once set400Create a new batch with your desired strategy instead.
Can only delete Empty or Incomplete batch403Only batches in Open status can be deleted.
Not found404The batch ID doesn't exist. Verify the bulkCollaboratorBatchId or bulkPayableBatchId.

Payable Item Errors

Error MessageCodeDescription
BulkPayableBatch must be in status Open400Create a new batch to add additional items.
Bulk payable item batch must match request400The batch ID in the request body must match the URL.
Collaborator with externalId {value} does not exist400Create the Agent first or verify the externalId.
Amount must be set and a number400Provide a valid numeric amount.
LineItemDescription must be set and not empty400A description is required for each line item.
Failed to parse dueDate400Use YYYY-MM-DD format (e.g., 2025-12-15).
PayableStatus of {value} is not valid400Use: Draft, Open, Approved, Paid, or Cancelled.
Bulk payable item reference refers to item on payable in closed state400Payables can only be updated while in Draft or Open status.

Item Addition Errors

Error MessageCodeDescription
BulkCollaboratorBatch must be in status Open400Create a new batch to add additional items.
Cannot set both engagementId and collaboratorGroupId400Use only one of these fields, not both.
Bulk collaborator batch not found404Verify the bulkCollaboratorBatchId.

Handling Errors

We recommend writing code that gracefully handles all possible API exceptions. Key practices include:

  • Log error responses — Capture full message bodies for debugging.
  • Use exponential backoff — Implement retry logic with jitter when handling 429 or 500 errors.
  • Validate before submission — Catch format issues (dates, amounts, required fields) before they reach the API.
  • Monitor batch completion — Check individual item statuses in metadata.errorMessage after a batch completes.

Rate Limits

Request TypeLimit
GET requests200/second
POST, PATCH, DELETE100/second

If you're regularly hitting limits, contact your Wingspan Solutions Engineer to discuss increasing them for your account.