Shipping Sites API Guide
Managing warehouse locations and their relationships with carrier accounts and operations.
Introduction
A Shipping Site represents a physical warehouse or fulfillment center location within a tenant. Shipping sites are fundamental to the iDrive platform and are required for some shipping operations.
Shipping sites determine:
- Where shipments originate from
- Which carrier accounts are available for a location
- How manifesting is scoped and processed
- Origin address information for rate calculations
Important: Some shipping operations require a valid
shippingSiteId. Using the wrong shipping site ID can result in failed API calls, incorrect carrier account access, or manifesting errors.
Base URLs
Use the correct base URL for your environment:
Sandbox: https://api.beta.idrivelogistics.com
Production: https://api.idrivelogistics.com
Append the specific API route to the base URL (e.g., /api/v1/shippingSites).
Environment Warning: Shipping site IDs are unique to each environment. A shipping site ID from the sandbox environment will not work in production and vice versa. Always verify you're using the correct ID for your target environment.
API Endpoints Overview
The Shipping Sites API provides the following endpoints:
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/shippingSites | List all shipping sites |
| POST | /api/v1/shippingSites | Create a new shipping site |
| GET | /api/v1/shippingSites/{id} | Get a specific shipping site |
| PUT | /api/v1/shippingSites/{id} | Update a shipping site |
| DELETE | /api/v1/shippingSites/{id} | Delete a shipping site |
List of Shipping Sites
Retrieve all shipping sites for the specified tenant.
GET /api/v1/shippingSites
Headers
Authorization: Bearer YOUR_ACCESS_TOKEN
x-tenant-id: YOUR_TENANT_ID
Example Response
{
"items": [
{
"address": {
"company": "string",
"name": "string",
"email": "string",
"phone": "string",
"addressLine1": "string",
"addressLine2": "string",
"addressLine3": "string",
"city": "string",
"stateProvince": "string",
"postalCode": "string",
"countryCode": "string",
"isResidential": true
},
"name": "string",
"priority": 0,
"externalLocationIds": [
"string"
],
"id": "string",
"createdAt": "string",
"updatedAt": "string"
}
],
"itemCount": 0,
"totalItems": 0,
"pageNumber": 0,
"nextPageToken": "string"
}Response Fields
id— Unique identifier for the shipping sitename— Display name of the warehouse locationaddress— Physical address of the warehouse
API Reference: https://idrivelogistics.readme.io/reference/get_api-v1-shippingsites
Create a Shipping Site
Create a new shipping site for a tenant.
POST /api/v1/shippingSites
Headers
Authorization: Bearer YOUR_ACCESS_TOKEN
x-tenant-id: YOUR_TENANT_ID
Content-Type: application/json
Example Request
{
"name": "West Coast Distribution Center",
"address": {
"street1": "456 Logistics Way",
"city": "Los Angeles",
"state": "CA",
"postalCode": "90001",
"country": "US"
},
"contact": {
"name": "John Smith",
"email": "[email protected]",
"phone": "310-555-0200"
},
"isActive": true
}Request Fields
name— (Required) Name of the shipping siteaddress— (Required) Complete warehouse addresscontact— (Optional) Contact information for the locationisActive— (Optional) Whether the site is active (defaults to true)
API Reference: https://idrivelogistics.readme.io/reference/post_api-v1-shippingsites
Get Shipping Site by ID
Retrieve detailed information about a specific shipping site.
GET /api/v1/shippingSites/{id}
Path Parameters
id— TheshippingSiteIdto retrieve
Example Request
GET /api/v1/shippingSites/cmelk2trg00uht7ogrvotf85r
Authorization: Bearer YOUR_ACCESS_TOKEN
x-tenant-id: YOUR_TENANT_ID
API Reference: https://idrivelogistics.readme.io/reference/get_api-v1-shippingsites-id
Update Shipping Site
Modify an existing shipping site's information.
PUT /api/v1/shippingSites/{id}
Example Request
{
"name": "West Coast DC - Expanded",
"contact": {
"email": "[email protected]"
}
}API Reference: https://idrivelogistics.readme.io/reference/put_api-v1-shippingsites-id
Delete Shipping Site
Remove a shipping site from the system.
DELETE /api/v1/shippingSites/{id}
Warning: Deleting a shipping site may impact carrier account associations, existing shipments, and manifesting operations. Ensure the site is no longer needed before deletion as this will be a permanent change.
API Reference: https://idrivelogistics.readme.io/reference/delete_api-v1-shippingsites-id
Working with Shipping Sites in Different Operations
Manifesting
Manifesting operations require a shippingSiteId to:
- Group shipments by physical location
- Generate location-specific end-of-day manifests
- Ensure carrier pickup requests are sent to the correct warehouse
Key Concept: Manifests are always location-specific. You cannot create a single manifest for shipments across multiple locations. Each warehouse must generate its own manifest.
Best Practices
- Document your shipping site IDs — Keep a reference document mapping warehouse locations to their production and sandbox shipping site IDs
- Use descriptive names — Name shipping sites clearly (e.g., "Nashville TN Distribution Center" rather than "Site 1")
- Verify environment-specific IDs — Always double-check you're using production IDs in production and sandbox IDs in sandbox
- Configure carrier accounts carefully — Review the
locationIdsarray for each carrier account to ensure proper location associations - Test manifesting thoroughly — Verify manifesting works correctly for each location before going live
- Keep addresses up to date — Ensure shipping site addresses are accurate, as they appear on shipping labels
Troubleshooting Common Issues
Issue: "Invalid shipping site ID" errors
Solution: Verify you're using the correct environment's shipping site ID. Use GET /api/v1/shippingSites to retrieve valid IDs.
Issue: No carrier accounts available for a shipping site
Solution: Check carrier account locationIds. Either create location-specific carrier accounts or ensure your carrier accounts have an empty locationIds array to enable them globally.
Issue: Manifest showing zero shipments
Solution: Confirm that labels were generated using the same shippingSiteId you're using for manifesting. Shipments can only be manifested from the location where they were created.
Issue: Wrong origin address on labels
Solution: Verify the shipping site's address is correct using GET /api/v1/shippingSites/{id} and update if necessary.
Need Help?
- API Reference: https://idrivelogistics.readme.io/reference/get_api-v1-shippingsites
- Getting Started Guide: Review authentication and basic API concepts
- Support: Contact your iDrive account representative
Updated 5 months ago
