Endpoints for managing third-party integrations including Google Calendar sync, Google Things to Do, Viator, vQuip fleet management, Wave accounting, voice services, and shipment tracking.
Integrations
Get GPS alerts for a location
GET /integrations/alerts
Retrieves OneStepGPS alerts from a specific location within a time range
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
minutes | query | integer | No | Number of minutes to look back for alerts |
limit | query | integer | No | Maximum number of alerts to return |
Responses
| Code | Description |
|---|---|
200 | List of alerts |
500 | Internal server error |
Get GPS alerts for a specific device
GET /integrations/device-alerts/{deviceName}
Retrieves OneStepGPS alerts for a specific device within a time range
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
deviceName | path | string | Yes | The name of the GPS device |
minutes | query | integer | No | Number of minutes to look back for alerts |
limit | query | integer | No | Maximum number of alerts to return |
Responses
| Code | Description |
|---|---|
200 | List of device alerts |
500 | Internal server error |
Get alert summary by device
GET /integrations/alert-summary
Retrieves a summary of alert counts grouped by device name for a location
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hours | query | integer | No | Number of hours to look back for alert summary |
Responses
| Code | Description |
|---|---|
200 | Alert summary by device |
500 | Internal server error |
Google Calendar
Initiate Google Calendar OAuth flow
GET /integrations/google-calendar/connect
Starts the Google Calendar OAuth2 authorization flow. Returns an authorization URL to redirect the user to.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
userId | query | string | Yes | The user ID initiating the connection |
customerId | query | string | Yes | The customer/business ID |
Responses
| Code | Description |
|---|---|
200 | Authorization URL generated successfully |
400 | Missing userId or customerId |
500 | Failed to initiate Google Calendar connection |
Google Calendar OAuth callback
GET /integrations/google-calendar/callback
Handles the OAuth2 callback from Google, exchanges the code for tokens, and stores the encrypted credentials
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
code | query | string | Yes | Authorization code from Google |
state | query | string | Yes | State token to validate the request |
error | query | string | No | Error code if authorization was denied |
Responses
| Code | Description |
|---|---|
200 | Returns HTML page with postMessage to close popup |
302 | Redirects to frontend with error if authorization denied |
400 | Missing code/state or invalid state token |
Disconnect Google Calendar
POST /integrations/google-calendar/disconnect
Revokes Google Calendar access and removes stored credentials for a user
Request body
| Field | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | The user ID to disconnect |
Responses
| Code | Description |
|---|---|
200 | Google Calendar disconnected successfully |
400 | Missing userId |
500 | Failed to disconnect Google Calendar |
Get calendar connection status
GET /integrations/google-calendar/status
Returns the Google Calendar connection status for a user
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
userId | query | string | Yes | The user ID to check |
Responses
| Code | Description |
|---|---|
200 | Connection status retrieved successfully |
400 | Missing userId |
500 | Failed to get calendar status |
Get available calendars
GET /integrations/google-calendar/calendars
Returns the list of Google Calendars available to the user
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
userId | query | string | Yes | The user ID |
Responses
| Code | Description |
|---|---|
200 | Calendars retrieved successfully |
400 | Missing userId or Google Calendar not connected |
500 | Failed to fetch calendars |
Update selected calendar
POST /integrations/google-calendar/update-calendar
Changes the calendar used for syncing bookings
Request body
| Field | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | The user ID |
calendarId | string | Yes | The Google Calendar ID to use |
Responses
| Code | Description |
|---|---|
200 | Calendar updated successfully |
400 | Missing userId/calendarId or Google Calendar not connected |
500 | Failed to update calendar |
Trigger manual calendar sync
POST /integrations/google-calendar/sync
Manually triggers a full calendar sync job. Primarily for testing and debugging.
Responses
| Code | Description |
|---|---|
200 | Sync job started |
500 | Failed to trigger sync |
Google Things To Do
Get schema for inventory item
GET /schema/inventory/{inventoryId}
Returns JSON-LD structured data for a single inventory item, formatted for Google Search rich results (Things to Do)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
inventoryId | path | string | Yes | The inventory item ID |
baseUrl | query | string | No | Base URL for generating links |
Responses
| Code | Description |
|---|---|
200 | JSON-LD schema for the inventory item |
403 | Inventory is not publicly visible |
404 | Inventory or location not found |
500 | Internal server error |
Get schema for location
GET /schema/location/{locationId}
Returns JSON-LD LocalBusiness schema for a location including all its public inventory items
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
locationId | path | string | Yes | The location ID |
baseUrl | query | string | No | Base URL for generating links |
Responses
| Code | Description |
|---|---|
200 | JSON-LD LocalBusiness schema for the location |
404 | Location not found |
500 | Internal server error |
Get all schemas for customer
GET /schema/all/{customerId}
Returns an array of JSON-LD schemas for all locations and their public inventory belonging to a customer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
customerId | path | string | Yes | The customer/business ID |
baseUrl | query | string | No | Base URL for generating links |
Responses
| Code | Description |
|---|---|
200 | Array of JSON-LD schemas |
404 | No locations found for customer |
500 | Internal server error |
Viator Integration
Configure Viator integration
POST /viator/admin/configure
Create or update the Viator marketplace configuration for a customer. Uses JWT auth (admin only).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes | |
supplierId | string | Yes | |
apiKey | string | Yes | Inbound API key for Viator to authenticate with RentalTide |
viatorApiKey | string | No | Outbound API key for sending notifications to Viator |
currency | string | No | |
isActive | boolean | No |
Responses
| Code | Description |
|---|---|
200 | Configuration saved successfully |
400 | Missing required fields |
500 | Internal server error |
Tour List (V1)
POST /viator/tourlist
Returns the full product catalog for this supplier. Authenticated via Viator API key.
Responses
| Code | Description |
|---|---|
200 | List of tours/products |
401 | Unauthorized |
Calendar availability (V2)
POST /viator/v2/availability/calendar
Returns availability and pricing for a date range across products.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
productOptionIds | array | Yes | |
startDate | string | Yes | |
endDate | string | Yes |
Responses
| Code | Description |
|---|---|
200 | Calendar availability data |
400 | Missing required fields |
Availability check (V2)
POST /viator/v2/availability/check
Real-time capacity check for specific products, dates, and traveler counts.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
productOptions | array | Yes | |
travelDate | string | Yes |
Responses
| Code | Description |
|---|---|
200 | Availability status per product |
400 | Missing required fields |
Reserve inventory (V2)
POST /viator/v2/reserve
Hold inventory for 15+ minutes while Viator processes payment.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
productOptionId | string | Yes | |
travelDate | string | Yes | |
startTime | string | No | |
tickets | array | No | |
totalTravelers | integer | No |
Responses
| Code | Description |
|---|---|
200 | Reservation created with expiration time |
400 | Missing required fields |
404 | Product not found |
Confirm booking (V1)
POST /viator/booking
Confirm a previously reserved booking after Viator has processed payment.
Responses
| Code | Description |
|---|---|
200 | Booking confirmed or rejected |
Cancel booking (V1)
POST /viator/booking-cancellation
Cancel a confirmed Viator booking.
Responses
| Code | Description |
|---|---|
200 | Cancellation confirmed or rejected |
Special offers (V2)
POST /viator/v2/product/special-offers
Returns active promotions and special offers.
Responses
| Code | Description |
|---|---|
200 | List of special offers (currently returns empty) |
Amend booking (V1)
POST /viator/booking-amendment
Modify an existing booking (date change, traveler details).
Responses
| Code | Description |
|---|---|
200 | Amendment confirmed or rejected |
Unified dispatcher (all request types)
POST /viator/api
Single endpoint that accepts all Viator request types via a requestType discriminator. Auth is read from data.ApiKey in the request body instead of headers.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
requestType | string | Yes | |
data | object | Yes |
Responses
| Code | Description |
|---|---|
200 | Response from the dispatched handler |
400 | Missing or unknown requestType |
401 | Invalid or missing ApiKey in data |
vQuip
Check vQuip integration status
GET /vquip/status
Check if the current customer has an active vQuip integration.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
customerId | query | string | Yes | The customer ID |
Responses
| Code | Description |
|---|---|
200 | Integration status retrieved successfully |
400 | customerId is required |
500 | Failed to check vQuip status |
Connect vQuip integration
POST /vquip/connect
Save vQuip credentials, test the connection, and activate the integration.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes | |
clientId | string | Yes | |
clientSecret | string | Yes | |
tokenUrl | string | Yes |
Responses
| Code | Description |
|---|---|
200 | vQuip connected successfully |
400 | Missing required parameters or connection test failed |
500 | Failed to connect vQuip |
Disconnect vQuip integration
DELETE /vquip/disconnect
Deactivate the vQuip integration for the customer.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
customerId | query | string | Yes | The customer ID |
Responses
| Code | Description |
|---|---|
200 | vQuip disconnected successfully |
400 | customerId is required |
500 | Failed to disconnect vQuip |
Get vQuip inventory types
GET /vquip/inventory-types
Fetch all inventory types from the connected vQuip account.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
customerId | query | string | Yes | The customer ID |
Responses
| Code | Description |
|---|---|
200 | Inventory types retrieved successfully |
400 | vQuip not configured for this customer |
500 | Failed to get inventory types |
Get vQuip products
GET /vquip/products
Fetch all products from the connected vQuip account.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
customerId | query | string | Yes | The customer ID |
Responses
| Code | Description |
|---|---|
200 | Products retrieved successfully |
400 | vQuip not configured for this customer |
500 | Failed to get products |
Get vQuip reservations
GET /vquip/reservations
Fetch reservations from vQuip by external booking ID.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
customerId | query | string | Yes | The customer ID |
externalBookingId | query | string | Yes | The RentalTide booking ID to look up in vQuip |
Responses
| Code | Description |
|---|---|
200 | Reservations retrieved successfully |
400 | Missing required parameters or vQuip not configured |
500 | Failed to get reservations |
Create a vQuip reservation
POST /vquip/reservations
Push a RentalTide booking to vQuip as a new reservation.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes | |
externalBookingId | string | Yes | |
startDate | string | Yes | |
endDate | string | Yes | |
productId | string | Yes | |
customerName | string | Yes | |
customerEmail | string | No | |
customerPhone | string | No | |
totalAmount | number | No | |
notes | string | No |
Responses
| Code | Description |
|---|---|
201 | Reservation created successfully |
400 | Missing required parameters or vQuip not configured |
500 | Failed to create reservation |
Update a vQuip reservation
PUT /vquip/reservations/{reservationId}
Update an existing reservation in vQuip.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
reservationId | path | string | Yes | The vQuip reservation ID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes | |
startDate | string | No | |
endDate | string | No | |
productId | string | No | |
customerName | string | No | |
customerEmail | string | No | |
customerPhone | string | No | |
totalAmount | number | No | |
notes | string | No | |
status | string | No |
Responses
| Code | Description |
|---|---|
200 | Reservation updated successfully |
400 | vQuip not configured for this customer |
500 | Failed to update reservation |
Cancel a vQuip reservation
PUT /vquip/reservations/{reservationId}/cancel
Cancel an existing reservation in vQuip.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
reservationId | path | string | Yes | The vQuip reservation ID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes |
Responses
| Code | Description |
|---|---|
200 | Reservation cancelled successfully |
400 | vQuip not configured for this customer |
500 | Failed to cancel reservation |
Create an external invoice on a vQuip reservation
POST /vquip/reservations/{reservationId}/invoice
Create an external invoice linked to a vQuip reservation.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
reservationId | path | string | Yes | The vQuip reservation ID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes | |
amount | number | Yes | |
description | string | No |
Responses
| Code | Description |
|---|---|
201 | Invoice created successfully |
400 | Missing required parameters or vQuip not configured |
500 | Failed to create invoice |
Sync a RentalTide booking to vQuip
POST /vquip/sync-booking
Load a booking and create vQuip reservations for each assigned asset with a product mapping. Creates an invoice on the first reservation if totalPrice > 0.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
rentalId | string | Yes | |
customerId | string | Yes | |
locationId | string | Yes |
Responses
| Code | Description |
|---|---|
200 | Sync completed |
400 | Missing parameters or vQuip not configured |
500 | Sync failed |
Wave Integration
Initiate Wave OAuth2 flow
GET /auth/wave/connect
Generates an authorization URL to start the Wave OAuth2 connection process.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
businessId | query | string | Yes | The business ID to connect Wave to |
Responses
| Code | Description |
|---|---|
200 | Authorization URL generated successfully |
400 | Business ID required |
500 | Failed to initiate Wave connection |
Handle Wave OAuth2 callback
GET /auth/wave/callback
Handles the OAuth2 callback from Wave, exchanges authorization code for tokens.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
code | query | string | Yes | |
state | query | string | Yes |
Responses
| Code | Description |
|---|---|
302 | Redirects to frontend with connection status |
Get Wave integration status
GET /wave/integration-status
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
businessId | query | string | Yes |
Responses
| Code | Description |
|---|---|
200 | Integration status retrieved successfully |
Disconnect Wave integration
DELETE /wave/disconnect
Disconnects the Wave integration while preserving GL mappings.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
businessId | string | Yes |
Responses
| Code | Description |
|---|---|
200 | Wave disconnected successfully |
Fetch chart of accounts from Wave
GET /wave/chart-of-accounts
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
businessId | query | string | Yes |
Responses
| Code | Description |
|---|---|
200 | Chart of accounts fetched successfully |
Get Wave businesses for the connected account
GET /wave/businesses
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
businessId | query | string | Yes |
Responses
| Code | Description |
|---|---|
200 | Businesses fetched successfully |
Select which Wave business to use
PUT /wave/select-business
Request body
| Field | Type | Required | Description |
|---|---|---|---|
businessId | string | Yes | |
waveBusinessId | string | Yes | |
waveBusinessName | string | Yes |
Responses
| Code | Description |
|---|---|
200 | Business selected successfully |
Set bank account for invoice payments
PUT /wave/bank-account
Request body
| Field | Type | Required | Description |
|---|---|---|---|
businessId | string | Yes | |
bankAccountId | string | Yes |
Responses
| Code | Description |
|---|---|
200 | Bank account updated successfully |
Get current GL code mappings
GET /wave/gl-mappings
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
businessId | query | string | Yes |
Responses
| Code | Description |
|---|---|
200 | GL mappings retrieved successfully |
Update GL code mappings
PUT /wave/gl-mappings
Request body
| Field | Type | Required | Description |
|---|---|---|---|
businessId | string | Yes | |
glMappings | object | Yes |
Responses
| Code | Description |
|---|---|
200 | GL mappings updated successfully |
Voice
Handle incoming phone call
POST /communication/voice/incoming-call
Twilio webhook endpoint that handles incoming phone calls. Looks up the location by Twilio phone number, identifies the caller, and generates IVR menu response.
Responses
| Code | Description |
|---|---|
200 | TwiML response with IVR menu |
Handle IVR key press
POST /communication/voice/handle-key
Processes DTMF key presses from the IVR menu and executes the corresponding action (dial, voicemail, say message, etc.).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
locationId | query | string | Yes | The location ID |
callSid | query | string | Yes | The Twilio call SID |
Responses
| Code | Description |
|---|---|
200 | TwiML response with action result |
Handle sequential dial progression
POST /communication/voice/sequential-dial-next
Handles the progression of sequential dialing when a number doesn't answer. Moves to the next number in the ring list.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
locationId | query | string | Yes | The location ID |
callSid | query | string | Yes | The Twilio call SID |
currentIndex | query | integer | Yes | The current index in the ring list |
ringList | query | string | Yes | JSON-encoded array of phone numbers |
Responses
| Code | Description |
|---|---|
200 | TwiML response for next dial or message |
Handle recording webhook from Twilio
POST /communication/voice/recording-webhook
Webhook endpoint that receives call recording notifications from Twilio. Processes and uploads recordings to S3.
Responses
| Code | Description |
|---|---|
200 | Recording processed successfully |
400 | Missing required recording data |
500 | Error processing recording |
Handle voicemail recording completion
POST /communication/voice/handle-recording
Processes a completed voicemail recording and saves it to the database.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
locationId | query | string | Yes | The location ID |
Responses
| Code | Description |
|---|---|
200 | TwiML response with thank you message |
Get recorded calls with pagination
GET /communication/voice/recordings/{locationId}
Retrieves call recordings for a location with pagination and optional type filtering.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
locationId | path | string | Yes | The location ID |
page | query | integer | No | Page number |
limit | query | integer | No | Number of items per page (max 50) |
type | query | string | No | Filter by recording type |
Responses
| Code | Description |
|---|---|
200 | Recordings retrieved successfully |
500 | Failed to fetch recordings |
Get voicemails for a location
GET /communication/voice/voicemails/{locationId}
Legacy endpoint that retrieves voicemails for a specific location, sorted by timestamp descending.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
locationId | path | string | Yes | The location ID |
Responses
| Code | Description |
|---|---|
200 | Voicemails retrieved successfully |
500 | Failed to fetch voicemails |
Delete a voicemail
DELETE /communication/voice/voicemails/{voicemailId}
Permanently deletes a voicemail recording by its ID.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
voicemailId | path | string | Yes | The voicemail ID |
Responses
| Code | Description |
|---|---|
200 | Voicemail deleted successfully |
500 | Failed to delete voicemail |
Test OpenAI voice generation
GET /communication/voice/test-openai-voice
Test endpoint to verify OpenAI voice generation is working correctly.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
text | query | string | No | The text to convert to speech |
voice | query | string | No | The OpenAI voice to use |
Responses
| Code | Description |
|---|---|
200 | Voice generated successfully |
500 | OpenAI voice test failed |
Generate voice preview for IVR configuration
GET /communication/voice/voice-preview/{voice}
Generates a preview of a specific OpenAI voice for IVR configuration purposes.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
voice | path | string | Yes | The OpenAI voice identifier (e.g., alloy, echo, fable) |
Responses
| Code | Description |
|---|---|
200 | Voice preview generated successfully |
500 | Voice preview generation failed |
Configure location to use OpenAI voice
POST /communication/voice/configure-openai/{locationId}
Updates a location's IVR configuration to use OpenAI voice engine with the specified voice.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
locationId | path | string | Yes | The location ID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
voice | string | No | The OpenAI voice to use |
Responses
| Code | Description |
|---|---|
200 | Location configured for OpenAI voice successfully |
404 | Location not found |
500 | Failed to configure OpenAI voice |
Get call logs for a location with pagination
GET /communication/voice/logs/{locationId}
Retrieves call logs for a specific location with pagination support.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
locationId | path | string | Yes | The location ID |
page | query | integer | No | Page number |
limit | query | integer | No | Number of items per page (max 50) |
Responses
| Code | Description |
|---|---|
200 | Call logs retrieved successfully |
500 | Failed to fetch call logs |
Get all call logs (admin view)
GET /communication/voice/call-logs
Retrieves all call logs across all locations for admin purposes.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | No | Maximum number of logs to return |
Responses
| Code | Description |
|---|---|
200 | Call logs retrieved successfully |
500 | Failed to fetch call logs |
Handle call status webhook from Twilio
POST /communication/voice/call-status
Webhook endpoint that receives call status updates from Twilio and updates the call log.
Responses
| Code | Description |
|---|---|
200 | Call status update processed |
500 | Error updating call status |
Initiate callback call
POST /communication/voice/initiate-callback
Initiates a callback call where the user is called first, then connected to the destination number. Requires authentication.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
userPhone | string | Yes | The user's phone number to call first |
destinationPhone | string | Yes | The destination phone number to connect to |
locationId | string | Yes | The location ID for caller ID and authorization |
Responses
| Code | Description |
|---|---|
200 | Callback call initiated successfully |
400 | Missing required parameters |
403 | Unauthorized - location doesn't belong to user's account |
404 | Location not found |
500 | Failed to initiate callback call |
Handle callback call answer
POST /communication/voice/callback-answer
Twilio webhook called when the user answers the callback call. Dials the destination number.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sessionId | query | string | Yes | The callback session ID |
destinationPhone | query | string | Yes | The destination phone number to connect to |
Responses
| Code | Description |
|---|---|
200 | TwiML response to dial destination |
Handle callback call completion
POST /communication/voice/callback-complete
Twilio webhook called when the callback call is completed. Updates call log with final status.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sessionId | query | string | Yes | The callback session ID |
Responses
| Code | Description |
|---|---|
200 | TwiML response with completion message |
Search for customer by phone number
GET /communication/voice/search-renter/{phoneNumber}
Searches for a customer by phone number within the authenticated user's customer records. Requires authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
phoneNumber | path | string | Yes | The phone number to search for |
Responses
| Code | Description |
|---|---|
200 | Search result |
500 | Failed to search for customer |
Shipments
Create a new incoming shipment
POST /shipments
Creates a new incoming shipment record to track inventory deliveries.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
locationId | string | Yes | The location ID for the shipment |
expectedArrivalDate | string | Yes | Expected arrival date (ISO string) |
trackingNumber | string | No | Shipping tracking number |
notes | string | No | Additional notes |
items | array | Yes | |
shippingCost | number | No | |
importCost | number | No | |
taxes | number | No |
Responses
| Code | Description |
|---|---|
201 | Shipment created successfully |
400 | Missing required fields |
500 | Internal server error |
List all shipments for a location
GET /shipments
Retrieves all shipments for a given location.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
locationId | query | string | Yes | The location ID to get shipments for |
Responses
| Code | Description |
|---|---|
200 | Shipments retrieved successfully |
400 | Missing locationId parameter |
500 | Internal server error |
Get a single shipment
GET /shipments/{shipmentId}
Retrieves details for a specific shipment.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
shipmentId | path | string | Yes | The shipment ID |
Responses
| Code | Description |
|---|---|
200 | Shipment retrieved successfully |
400 | Missing shipmentId parameter |
404 | Shipment not found |
500 | Internal server error |
Delete a shipment
DELETE /shipments/{shipmentId}
Deletes a shipment if it has not been marked as arrived/received.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
shipmentId | path | string | Yes | The shipment ID |
Responses
| Code | Description |
|---|---|
200 | Shipment deleted successfully |
400 | Missing shipmentId or cannot delete arrived shipment |
404 | Shipment not found |
500 | Internal server error |
Mark shipment as arrived
PUT /shipments/{shipmentId}/arrived
Marks a shipment as arrived and updates inventory quantities accordingly.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
shipmentId | path | string | Yes | The shipment ID |
Responses
| Code | Description |
|---|---|
200 | Shipment marked as arrived and inventory updated |
400 | Missing shipmentId or shipment already arrived |
404 | Shipment not found |
500 | Internal server error |

