curl --request POST \
--url https://api.teleship.com/api/pickups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"startAt": "2024-01-15T08:00",
"endAt": "2024-01-15T12:00",
"shipmentIds": [
"a7c8961f-8693-44cf-b325-99b3c4b37b08",
"b8d9072g-9704-55dg-c436-00c4d5c48c19"
],
"address": {
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+44 20 7946 0958",
"company": "Sample Exports Co",
"address": {
"addressLine1": "123 Oxford Street",
"addressLine2": "Suite 456",
"city": "London",
"state": "England",
"postalCode": "W1D 1BS",
"country": "GB"
}
},
"reference": "PICKUP-2024-001"
}
'{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
],
"pickup": {
"id": "<string>",
"status": "created",
"startAt": "2024-01-15T08:00:00.000Z",
"endAt": "2024-01-15T12:00:00.000Z",
"createdAt": "2023-11-07T05:31:56Z",
"address": {},
"reference": "<string>"
}
}{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
]
}{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
]
}{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
]
}Schedule pickup
Schedule a pickup request for your shipments, scheduling a collection from your location.
What happens:
- Validates your pickup window (startAt and endAt times)
- Ensures pickup window is between 1 hour and 12 hours
- Validates pickup window is within available hours (2AM-12PM Mon-Fri by default)
- Schedules the pickup with the selected time window
- Returns pickup confirmation
Pickup Window Requirements:
- Window duration: 1 hour (3600 seconds) to 12 hours (43200 seconds)
- Available hours: 2AM-12PM Monday-Friday (configurable per account)
- Both startAt and endAt must be in the future
- Both times must be on weekdays
- Times are validated as-is (no timezone conversion)
Why use this? Schedule collections for multiple shipments at once, optimizing logistics operations.
curl --request POST \
--url https://api.teleship.com/api/pickups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"startAt": "2024-01-15T08:00",
"endAt": "2024-01-15T12:00",
"shipmentIds": [
"a7c8961f-8693-44cf-b325-99b3c4b37b08",
"b8d9072g-9704-55dg-c436-00c4d5c48c19"
],
"address": {
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+44 20 7946 0958",
"company": "Sample Exports Co",
"address": {
"addressLine1": "123 Oxford Street",
"addressLine2": "Suite 456",
"city": "London",
"state": "England",
"postalCode": "W1D 1BS",
"country": "GB"
}
},
"reference": "PICKUP-2024-001"
}
'{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
],
"pickup": {
"id": "<string>",
"status": "created",
"startAt": "2024-01-15T08:00:00.000Z",
"endAt": "2024-01-15T12:00:00.000Z",
"createdAt": "2023-11-07T05:31:56Z",
"address": {},
"reference": "<string>"
}
}{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
]
}{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
]
}{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The start time of the pickup window. Must be at least one non-holiday, business day in the future. The pickup window must be between 1 hour and 12 hours, and within your account's pickup availability hours (default: 2AM-12PM Mon-Fri). Supports flexible formats: "2024-01-15T08:00", "2024-01-15 08:00", "2024-01-15T08:00:00.000Z"
"2024-01-15T08:00:00.000Z"
The end time of the pickup window. Must be at least one non-holiday, business day in the future. The pickup window must be between 1 hour and 12 hours, and within your account's pickup availability hours (default: 2AM-12PM Mon-Fri). Supports flexible formats: "2024-01-15T12:00", "2024-01-15 12:00", "2024-01-15T12:00:00.000Z"
"2024-01-15T12:00:00.000Z"
Show child attributes
Show child attributes
Was this page helpful?