Wove Query Bank API
Query Bank management - add/remove sources from your rate query pool
Query Bank management - add/remove sources from your rate query pool
openapi: 3.1.0
info:
title: Wove External Authentication Query Bank API
version: 1.0.0
description: "# Wove External API Documentation\n\nThe Wove External API allows you to programmatically access document processing, shipment management, and validation capabilities.\n\n## Features\n\n- **OAuth 2.0 Authentication**: Secure client credentials flow\n- **Rate Limiting**: Configurable per-client rate limits\n- **Document Processing**: Upload, validate, and merge shipping documents\n- **Shipment Management**: Create and manage shipment records with validation and merge operations\n- **Webhooks**: Get notified of document processing events (extraction, validation, merge)\n- **Comprehensive Error Handling**: Detailed error responses with troubleshooting information\n\n## Getting Started\n\n1. **Create OAuth Client**: Contact your account manager to create OAuth credentials\n2. **Get Access Token**: Use client credentials flow to obtain bearer token\n3. **Make API Calls**: Include bearer token in Authorization header\n4. **Handle Rate Limits**: Monitor rate limit headers in responses\n\n## Authentication\n\nAll API endpoints require OAuth 2.0 authentication using the client credentials flow.\n\n### Getting an Access Token\n\n```bash\ncurl -X POST https://api.wove.com/api/v1/external/auth/token \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"grant_type\": \"client_credentials\",\n \"client_id\": \"your_client_id\",\n \"client_secret\": \"your_client_secret\"\n }'\n```\n\n### Using the Access Token\n\nInclude the access token in the Authorization header:\n\n```bash\ncurl -H \"Authorization: Bearer your_access_token\" \\\n https://api.wove.com/api/v1/external/shipments\n```\n\n## Rate Limiting\n\nAll endpoints are subject to rate limiting based on your OAuth client configuration:\n\n- **Per-minute limit**: Default 60 requests/minute\n- **Daily limit**: Default 10,000 requests/day\n\nRate limit information is included in response headers:\n- `X-RateLimit-Limit-Minute`: Your per-minute limit\n- `X-RateLimit-Remaining-Minute`: Remaining requests this minute\n- `X-RateLimit-Reset-Minute`: When the minute window resets\n- `X-RateLimit-Limit-Day`: Your daily limit\n- `X-RateLimit-Remaining-Day`: Remaining requests today\n- `X-RateLimit-Reset-Day`: When the daily window resets\n\n## Webhook Security\n\nAll webhook payloads are signed using HMAC-SHA256 for verification:\n\n```javascript\n// Verify webhook signature\nconst crypto = require('crypto');\nconst signature = request.headers['x-wove-signature'];\nconst payload = JSON.stringify(request.body);\nconst expectedSignature = crypto\n .createHmac('sha256', your_webhook_secret)\n .update(payload)\n .digest('hex');\n\nconst isValid = crypto.timingSafeEqual(\n Buffer.from(signature),\n Buffer.from(expectedSignature)\n);\n```\n\nHeaders included with every webhook:\n- `X-Wove-Signature`: HMAC-SHA256 signature of the payload\n- `X-Wove-Event`: Event type (e.g., \"extraction.completed\")\n- `X-Wove-Timestamp`: ISO timestamp when the webhook was sent\n\n## Error Handling\n\nAll errors follow a consistent format:\n\n```json\n{\n \"success\": false,\n \"error\": {\n \"code\": \"VALIDATION_ERROR\",\n \"message\": \"One or more documents not found or access denied\",\n \"details\": {\n \"field\": \"documentIds\",\n \"value\": [\"invalid_id\"]\n }\n }\n}\n```\n\n### Error Codes\n\n- `VALIDATION_ERROR` - Invalid request parameters or data validation failure\n- `AUTHENTICATION_ERROR` - Invalid or expired credentials\n- `AUTHORIZATION_ERROR` - Insufficient permissions for the requested operation\n- `NOT_FOUND` - Requested resource not found\n- `RATE_LIMIT_ERROR` - Too many requests, rate limit exceeded\n- `INTERNAL_ERROR` - Internal server error\n\nSee the common error responses in the components section for detailed examples.\n"
contact:
name: Wove API Support
email: api-support@wove.com
url: https://docs.wove.com
license:
name: Proprietary
url: https://wove.com/terms
servers:
- url: https://api.wove.com
description: Production server
- url: https://staging-api.wove.com
description: Staging server
- url: http://localhost:4000
description: Development server
security:
- bearerAuth: []
tags:
- name: Query Bank
description: Query Bank management - add/remove sources from your rate query pool
paths:
/api/v1/external/query-bank/sources:
get:
tags:
- Query Bank
summary: List Query Bank sources
description: 'Returns all sources currently linked to your Query Bank.
The Query Bank is a collection of rate sources used when querying for rates.
Only sources with status "complete" can be added to the Query Bank.
'
security:
- bearerAuth: []
responses:
'200':
description: Query Bank sources retrieved successfully
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
type: object
properties:
sources:
type: array
items:
$ref: '#/components/schemas/ExternalQueryBankSource'
example:
success: true
data:
sources:
- id: '9876543210987654321'
sourceId: '1234567890123456789'
filename: carrier_rates_2024.xlsx
carrierId: '123456789'
carrierName: Maersk
effectiveDate: '2024-01-01'
expiryDate: '2024-12-31'
linkedAt: '2024-01-15T11:00:00.000Z'
'401':
description: Authentication required
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
post:
tags:
- Query Bank
summary: Add source to Query Bank
description: 'Links a processed source to your Query Bank, making its rates available for querying.
**Requirements**:
- Source must exist and belong to your organization
- Source must have status "complete"
- Source cannot already be in the Query Bank
'
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AddSourceToQueryBankRequest'
example:
sourceId: '1234567890123456789'
responses:
'201':
description: Source added to Query Bank successfully
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
$ref: '#/components/schemas/AddSourceToQueryBankResponse'
example:
success: true
data:
sourceId: '1234567890123456789'
linkedAt: '2024-01-15T11:00:00.000Z'
'400':
description: Source not eligible (not complete, already in Query Bank)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Source not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/v1/external/query-bank/sources/{sourceId}:
delete:
tags:
- Query Bank
summary: Remove source from Query Bank
description: 'Unlinks a source from your Query Bank. The source will no longer be included in rate queries.
This does not delete the source itself - it only removes it from the Query Bank.
'
security:
- bearerAuth: []
parameters:
- name: sourceId
in: path
required: true
schema:
type: string
description: The source ID to remove from Query Bank
example: '1234567890123456789'
responses:
'200':
description: Source removed from Query Bank successfully
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
$ref: '#/components/schemas/RemoveSourceFromQueryBankResponse'
example:
success: true
data:
sourceId: '1234567890123456789'
unlinkedAt: '2024-01-15T12:00:00.000Z'
'404':
description: Source not found in Query Bank
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
ErrorResponse:
type: object
properties:
success:
type: boolean
example: false
error:
type: object
properties:
code:
type: string
example: VALIDATION_ERROR
message:
type: string
example: Invalid input parameters
details:
type: object
description: Additional error context
required:
- success
- error
AddSourceToQueryBankRequest:
type: object
properties:
sourceId:
type: string
description: The source ID to add to Query Bank
required:
- sourceId
AddSourceToQueryBankResponse:
type: object
properties:
sourceId:
type: string
linkedAt:
type: string
format: date-time
required:
- sourceId
- linkedAt
ExternalQueryBankSource:
type: object
properties:
id:
type: string
description: Query Bank entry ID
sourceId:
type: string
description: The linked source ID
filename:
type: string
description: Source filename
carrierId:
type: string
carrierName:
type: string
sourceType:
type: string
rateCount:
type: integer
effectiveDate:
type: string
format: date
expiryDate:
type: string
format: date
linkedAt:
type: string
format: date-time
description: When the source was added to Query Bank
RemoveSourceFromQueryBankResponse:
type: object
properties:
sourceId:
type: string
unlinkedAt:
type: string
format: date-time
required:
- sourceId
- unlinkedAt
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: OAuth 2.0 Bearer token obtained from /auth/token endpoint