Vendor Shipping API
Connect your own website or store to Fast Link's delivery network. Create shipping orders, estimate cost, track deliveries, and receive status webhooks — without using Fast Link's vendor dashboard or storefront.
Introduction
The Vendor Shipping API is for businesses that already have their own website / e-commerce system and only need Fast Link as a shipping provider. You push delivery orders to Fast Link; our riders and shipping companies execute them; you get live tracking and webhooks.
You do not need Fast Link's vendor website, product catalog, or provider dashboard.
Every endpoint below lists its responses: the success body, and each error your request can get. Errors that apply to every endpoint (authentication, not found) are listed once, under Authentication and Errors.
How this differs from the Marketplace API
| Vendor Shipping API | Marketplace API | |
|---|---|---|
| Audience | Single vendor with own site | Multi-merchant platform |
| Merchants | Not needed — you are the shipper | CRUD merchants under your platform |
| Prefix | /vendor-api | /platform-api |
| API key prefix | vk_ / vs_ | pk_ / sk_ |
Who this is for
- Online stores with their own checkout that need last-mile delivery
- Vendors who refuse to migrate products/catalog to Fast Link
- Any system that only needs: quote shipping → create order → track → webhook
Authentication
Two ways to authenticate — pick per use case:
1) API key (server-to-server) — recommended
Send both headers on every request. Keys are issued by your Fast Link account manager (or from your portal if enabled).
# headers
X-API-Key: vk_xxxxxxxxxxxxxxxx
X-API-Secret: vs_xxxxxxxxxxxxxxxx
X-API-Key / X-API-Secret and no bearer token{ "error": { "message": "Authentication credentials were not provided.", "errors": [] } }{ "error": { "message": "Both X-API-Key and X-API-Secret are required.", "errors": [] } }{ "error": { "message": "Invalid API key.", "errors": [] } }{ "error": { "message": "Invalid API secret.", "errors": [] } }{ "error": { "message": "This vendor is deactivated.", "errors": [] } }2) Portal login (JWT)
A human portal user logs in and calls the same endpoints with a bearer token.
{ "phone": "+201000000002", "password": "••••••" }
# then send on every request
Authorization: Bearer <access token>
{
"access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…",
"refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…",
"user": {
"id": 3,
"phone": "+201000000002",
"name": "Omar Nabil",
"email": "",
"image": null,
"role": "owner"
},
"vendor": { "id": 1, "name": "ShopX", "slug": "shopx" }
}phone or password missing{ "detail": "phone and password are required." }{ "detail": "Invalid phone or password." }{ "detail": "This account is not an active vendor shipping portal user." }Base URL
https://backend.fastlink.cyparta.com
All endpoints below are prefixed with /vendor-api. Every request and response is JSON. Responses are scoped to your vendor automatically.
List endpoints are paginated, 10 per page, newest first: { "count", "next", "previous", "results": [ … ] }. Use ?page=2 for the next page.
Pickup addresses
Register one or more pickup locations (عناوين الاستلام). When an order omits pickup details, your default pickup address is used.
Create a pickup address
{
"label": "Main warehouse",
"address": "Nasr City, Cairo",
"latitude": "30.05",
"longitude": "31.34",
"contact_phone": "+201111111111",
"is_default": true
}
Creating an address with "is_default": true clears the flag on your other addresses.
{
"id": 1,
"label": "Main warehouse",
"address": "Nasr City, Cairo",
"latitude": "30.050000",
"longitude": "31.340000",
"governorate": null,
"area": null,
"contact_phone": "+201111111111",
"is_default": true,
"created_at": "2026-09-29T15:09:46.231367Z"
}address missing{ "error": { "message": "Invalid request", "errors": [ { "field": "address", "message": "This field is required." } ] } }latitude / longitude not a number{ "error": { "message": "Invalid request", "errors": [ { "field": "latitude", "message": "A valid number is required." } ] } }GET list — paginated pickup address objects{ "count": 1, "next": null, "previous": null, "results": [ { "id": 1, "label": "Main warehouse", "is_default": true, … } ] }GET /{id}/, PATCH /{id}/ — the pickup address object{ "id": 1, "label": "HQ", "address": "Nasr City, Cairo", "is_default": true, … }{ "error": { "message": "No VendorPickupAddress matches the given query.", "errors": [] } }DELETE /{id}/ — deleted, empty bodyShipping cost
Estimate the shipping cost for a route using the pricing Fast Link configured for your account (fixed, distance/weight formula, or weight-range tiers). All fields are optional; distance is 0 unless both pickup and destination are sent.
Call this from your checkout before creating the order, then optionally pass the quoted shipping_cost when creating the order.
# request { "pickup": "30.05,31.34", "destination": "30.0444,31.2357", "weight": "2.5" // or "items": [{ "weight": 1.5, "quantity": 2 }] }
{
"currency": "EGP",
"cost": "67.78",
"distance_km": 10.08,
"weight_kg": 2.5,
"breakdown": {
"type": "formula",
"base_fee": "20.00",
"price_per_km": "3.50",
"price_per_kg": "5.00",
"min_price": "25.00"
}
}breakdown depends on your pricing type: { "type": "fixed", "fixed_price" }, { "type": "weight_range", "weight_tiers", "min_price" }, or the formula fields above.
weight isn't a number{ "error": { "message": "Invalid request", "errors": [ { "field": "weight", "message": "A valid number is required." } ] } }quantity isn't a whole number{ "error": { "message": "Invalid request", "errors": [ { "field": "items.quantity", "message": "A valid integer is required." } ] } }Pricing types
| Type | How cost is computed |
|---|---|
fixed | Flat fixed_price (never below min_price). |
formula | base_fee + (price_per_km × distance_km) + (price_per_kg × weight_kg) |
weight_range | Price of the tier where min_weight ≤ weight ≤ max_weight (open-ended max allowed). |
Orders
Create and manage delivery (shipping) orders from your own system.
Create a shipping order
{
"external_order_id": "ORD-1001",
"customer_name": "Ahmed Ali",
"phone_number": "+201234567890",
"email": "ahmed@example.com",
"delivery_address": "12 Tahrir St, Cairo",
"coordinates": "30.0444,31.2357",
"pickup_address": "Nasr City warehouse",
"pickup_coordinates": "30.05,31.34",
"delivery_notes": "Call before arrival",
"building_number": "12",
"floor": "3",
"apartment": "8",
"shipping_cost": "67.78",
"items": [
{
"product_name": "Wireless headphones",
"quantity": 1,
"weight": "0.8",
"price": "450.00"
},
{
"product_name": "Phone case",
"quantity": 2,
"weight": "0.1",
"price": "50.00"
}
]
}
Required: customer_name, phone_number, delivery_address, and at least one item with product_name and quantity. total_amount is optional and defaults to the sum of the items. Coordinates are "lat,lng" strings.
The order is created and handed to Fast Link operations, then flows through the delivery lifecycle.
pickup_address or pickup_coordinates, the missing value is taken from your default pickup address. Register a default pickup address before sending orders: without one, an order that has no pickup details has no collection point.{
"detail": "Order created successfully.",
"order": {
"id": 3,
"order_number": "886FF6542D1F454AA336",
"external_order_id": "ORD-1001",
"status": "pending",
"assignment_type": "pending_admin",
"total_amount": "550.00",
"shipping_cost": "67.78",
… // full order object
}
}{ "error": { "message": "Invalid request", "errors": [
{ "field": "customer_name", "message": "This field is required." },
{ "field": "phone_number", "message": "This field is required." },
{ "field": "delivery_address", "message": "This field is required." },
{ "field": "items", "message": "At least one item is required." }
] } }items empty{ "error": { "message": "Invalid request", "errors": [ { "field": "items", "message": "At least one item is required." } ] } }items.){ "error": { "message": "Invalid request", "errors": [
{ "field": "items.product_name", "message": "This field is required." },
{ "field": "items.quantity", "message": "Ensure this value is greater than or equal to 1." }
] } }coordinates not in lat,lng format{ "error": { "message": "Invalid request", "errors": [ { "field": "coordinates", "message": "Must be in 'lat,lng' format." } ] } }List orders
GET /vendor-api/orders/ is paginated and newest first. Search and filters can be combined, and an order must match all of them.
GET /vendor-api/orders/?search=ahmed&status=pending,confirmed&created_from=2026-09-01
| Query | Matches |
|---|---|
?search=ahmed | Case-insensitive text search in the order number, your external_order_id, customer name, phone and email, delivery address and product names. Several words must all match. |
?status=delivered | Orders in that status. Comma-separate several: ?status=pending,confirmed. |
?external_order_id=ORD-1001 | Your own order reference (exact). |
?order_number=… | Fast Link's order number (exact). |
?created_from=2026-09-01 | Created on or after that date (YYYY-MM-DD). |
?created_to=2026-09-30 | Created on or before that date (YYYY-MM-DD). |
?page=2 | Next page of results. |
{ "count": 2, "next": null, "previous": null, "results": [ { "id": 4, "external_order_id": "ORD-1002", "status": "pending", … }, … ] }?created_from= / ?created_to= isn't a YYYY-MM-DD date{ "error": { "message": "Invalid request", "errors": [ { "field": "created_to", "message": "Enter a valid date." } ] } }Retrieve an order
/cancel/ and /tracking/){ "error": { "message": "No Order matches the given query.", "errors": [] } }Cancel an order
Allowed while the order is pending, confirmed, or preparing. The optional reason is stored in cancellation_reason, which defaults to "Cancelled by vendor". Orders can't be deleted: DELETE /orders/{id}/ returns 405.
POST /vendor-api/orders/{id}/cancel/
{ "reason": "Customer changed mind" }
{
"detail": "Order cancelled.",
"order": { "id": 3, "status": "cancelled", "status_display": "Cancelled", "cancellation_reason": "Customer changed mind", … }
}preparing, or is already cancelled{ "detail": "Order in status 'cancelled' cannot be cancelled." }If Fast Link operations cancel an order, they must enter a reason, and it arrives in the same cancellation_reason field. For failed, no_response and postponed orders, the rider's reason is carried there too.
Order tracking
Returns the order with its current status, driver and trip info, items, and the full status timeline.
{
"id": 3,
"order_number": "886FF6542D1F454AA336",
"external_order_id": "ORD-1001",
"status": "in_transit",
"rider": { "id": 7, "name": "…", "phone": "…", "vehicle_type": "…", "vehicle_number": "…", "is_online": true },
… // full order object
"timeline": [
{ "old_status": "pending", "new_status": "confirmed", "reason": "", "created_at": "2026-09-29T15:20:00+00:00" },
{ "old_status": "confirmed", "new_status": "in_transit", "reason": "", "created_at": "2026-09-29T16:05:00+00:00" }
]
}{ "error": { "message": "No Order matches the given query.", "errors": [] } }Webhooks
Register webhook URLs with your account manager, or from the portal while logged in. /vendor-api/webhooks/ accepts a portal login only; calling it with an API key returns 401 "Authentication credentials were not provided."
Fast Link POSTs a JSON event to each active webhook on every order transition:
{
"data": { "id": 3, "status": "cancelled", "cancellation_reason": "…", /* … full order object, without timeline */ },
"event": "order.status_changed",
"sent_at": "2026-01-01T10:00:00.000000+00:00"
}
The body is serialized with its keys sorted alphabetically, so data comes first and event / sent_at come after the full order. Read the order from data, e.g. data.id.
| Event | When |
|---|---|
order.created | An order was created for your vendor. |
order.status_changed | The order status changed (confirmed → … → delivered / cancelled). |
order.assigned | A rider or shipping company was assigned. |
Reply with any 2xx within 8 seconds to acknowledge a delivery.
Verifying signatures
If you set a signing secret on a webhook, each delivery includes an X-FastLink-Signature header — an HMAC-SHA256 of the raw request body using your secret. Recompute and compare to verify authenticity. The event type is also sent in X-FastLink-Event.
# Python example
import hmac, hashlib
def verify(secret, body_bytes, signature_header):
expected = hmac.new(secret.encode(), body_bytes, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, signature_header)
The order object
Returned by create, retrieve, list, cancel and tracking, and sent as data in webhooks. Money, weights and coordinates are strings; unknown values are null.
{
"id": 3,
"order_number": "886FF6542D1F454AA336",
"external_order_id": "ORD-1001",
"order_source": "vendor_api",
"status": "pending",
"status_display": "Pending",
"assignment_type": "pending_admin",
"total_amount": "550.00",
"shipping_cost": "67.78",
"cancellation_reason": null,
"vendor": { "id": 1, "name": "ShopX", "slug": "shopx" },
"customer": { "name": "Ahmed Ali", "phone": "+201234567890", "email": "ahmed@example.com" },
"delivery": {
"address": "12 Tahrir St, Cairo",
"notes": "Call before arrival",
"latitude": "30.044400",
"longitude": "31.235700",
"building_number": "12",
"floor": "3",
"apartment": "8",
"destination_address": "12 Tahrir St, Cairo"
},
"pickup": { "address": "Nasr City warehouse", "latitude": "30.050000", "longitude": "31.340000" },
"rider": null, // once assigned: { "id", "name", "phone", "vehicle_type", "vehicle_number", "is_online" }
"shipping_company": null, // once assigned: { "id", "name" }
"items": [
{ "id": 5, "product_name": "Wireless headphones", "quantity": 1, "weight": "0.800", "price": "450.00", "total_price": "450.00" },
{ "id": 6, "product_name": "Phone case", "quantity": 2, "weight": "0.100", "price": "50.00", "total_price": "100.00" }
],
"created_at": "2026-09-29T15:12:26.392192+00:00",
"confirmed_at": null,
"delivered_at": null,
"updated_at": "2026-09-29T15:12:26.392209+00:00"
}
Order statuses
| Status | Meaning |
|---|---|
pending | Received, awaiting operations. |
confirmed / preparing | Accepted / being prepared. |
arrived_at_pickup / in_transit / out_for_delivery | In progress. |
delivered | Completed. |
postponed / no_response / failed | Delivery issues. The reason is in cancellation_reason. |
cancelled | Cancelled. The reason is in cancellation_reason. |
Errors
Standard HTTP status codes are used. Validation, authentication and not-found errors come in this envelope, with one entry per invalid field:
{
"error": {
"message": "Invalid request",
"errors": [ { "field": "coordinates", "message": "Must be in 'lat,lng' format." } ]
}
}
For authentication and not-found errors, errors is empty and message says what went wrong. The portal login and order cancellation return { "detail": "…" } instead; their cases are listed with those endpoints.
| Code | Meaning |
|---|---|
| 200 / 201 | Success. |
| 204 | Deleted — empty body. |
| 400 | Validation error — check error.errors. |
| 401 | Missing/invalid API key, secret, or token, or your vendor account is deactivated. |
| 403 | Portal login refused, or not enough access. |
| 404 | Resource not found (or not on your vendor account). |
| 405 | Method not supported on that endpoint, e.g. deleting an order: { "error": { "message": "Method \"DELETE\" not allowed.", "errors": [] } } |
Recommended integration flow
- Receive API key + secret from Fast Link; store the secret securely.
POST /vendor-api/pickup-addresses/— register your warehouse(s), mark one default.- At checkout:
POST /vendor-api/shipping/calculate/— show the quote to the customer. - On payment success:
POST /vendor-api/orders/with items + optionalshipping_cost. - Store Fast Link
order.id/order_numberagainst yourexternal_order_id. - Listen to webhooks (or poll
/orders/{id}/tracking/) to update your UI. - Cancel via API only while status is
pending/confirmed/preparing.