{
    "info": {
        "name": "TRANSiA Platform API",
        "description": "Generated from the live route table at https://transia1.com/developers. Set apiKey (and, for JWT routes, accessToken + deviceId) in the collection variables.",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "variable": [
        {
            "key": "baseUrl",
            "value": "https://transia1.com"
        },
        {
            "key": "apiKey",
            "value": "",
            "type": "string"
        },
        {
            "key": "accessToken",
            "value": "",
            "type": "string"
        },
        {
            "key": "deviceId",
            "value": "postman-1",
            "type": "string"
        }
    ],
    "item": [
        {
            "name": "No authentication",
            "description": "Callable without credentials.",
            "item": [
                {
                    "name": "POST /api/auth/token",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "description": "Exchange credentials for a device-bound access + refresh token.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\"email\":\"ops@carrier.ca\",\"password\":\"your-password\",\"device_id\":\"ios-9f3c1b7e\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": {
                            "raw": "{{baseUrl}}/api/auth/token",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "auth",
                                "token"
                            ]
                        }
                    }
                },
                {
                    "name": "POST /api/auth/token/refresh",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "description": "Trade a refresh token for a fresh access token.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\"refresh_token\":\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\"device_id\":\"ios-9f3c1b7e\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": {
                            "raw": "{{baseUrl}}/api/auth/token/refresh",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "auth",
                                "token",
                                "refresh"
                            ]
                        }
                    }
                }
            ]
        },
        {
            "name": "Device-bound JWT",
            "description": "For mobile apps and SPAs. Access tokens are pinned to the device that asked for them.",
            "item": [
                {
                    "name": "GET /api/auth/me",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Authorization",
                                "value": "Bearer {{accessToken}}"
                            },
                            {
                                "key": "X-Device-Id",
                                "value": "{{deviceId}}"
                            }
                        ],
                        "description": "The account behind the current access token.",
                        "url": {
                            "raw": "{{baseUrl}}/api/auth/me",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "auth",
                                "me"
                            ]
                        }
                    }
                }
            ]
        },
        {
            "name": "Vendor API key",
            "description": "Server to server. One key belongs to one carrier and can never read another carrier's data.",
            "item": [
                {
                    "name": "GET /api/v1/ping",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Authorization",
                                "value": "Bearer {{apiKey}}"
                            }
                        ],
                        "description": "Confirm a key works and see which carrier it is scoped to.",
                        "url": {
                            "raw": "{{baseUrl}}/api/v1/ping",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "ping"
                            ]
                        }
                    }
                },
                {
                    "name": "GET /api/v1/routes",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Authorization",
                                "value": "Bearer {{apiKey}}"
                            }
                        ],
                        "description": "Every route this carrier operates.",
                        "url": {
                            "raw": "{{baseUrl}}/api/v1/routes",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "routes"
                            ]
                        }
                    }
                },
                {
                    "name": "GET /api/v1/schedules",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Authorization",
                                "value": "Bearer {{apiKey}}"
                            }
                        ],
                        "description": "Upcoming departures, soonest first. Paginated, 50 per page.",
                        "url": {
                            "raw": "{{baseUrl}}/api/v1/schedules",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "schedules"
                            ]
                        }
                    }
                },
                {
                    "name": "GET /api/v1/bookings",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Authorization",
                                "value": "Bearer {{apiKey}}"
                            }
                        ],
                        "description": "Bookings sold against this carrier.",
                        "url": {
                            "raw": "{{baseUrl}}/api/v1/bookings",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "bookings"
                            ]
                        }
                    }
                },
                {
                    "name": "GET /api/v1/parcels",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Authorization",
                                "value": "Bearer {{apiKey}}"
                            }
                        ],
                        "description": "Parcels this carrier is carrying.",
                        "url": {
                            "raw": "{{baseUrl}}/api/v1/parcels",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "parcels"
                            ]
                        }
                    }
                },
                {
                    "name": "PATCH /api/v1/parcels/{parcel}/status",
                    "request": {
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Authorization",
                                "value": "Bearer {{apiKey}}"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "description": "Move a parcel to its next state.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\"status\":\"out_for_delivery\",\"location\":\"Ottawa Hub\",\"note\":\"On van 12\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": {
                            "raw": "{{baseUrl}}/api/v1/parcels/{parcel}/status",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "parcels",
                                "{parcel}",
                                "status"
                            ]
                        }
                    }
                },
                {
                    "name": "GET /api/v1/freight-orders",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Authorization",
                                "value": "Bearer {{apiKey}}"
                            }
                        ],
                        "description": "Freight orders assigned to this carrier.",
                        "url": {
                            "raw": "{{baseUrl}}/api/v1/freight-orders",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "freight-orders"
                            ]
                        }
                    }
                },
                {
                    "name": "POST /api/v1/telemetry/positions",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Authorization",
                                "value": "Bearer {{apiKey}}"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "description": "Push real GPS/AVL positions. Batched, up to 1000 per call.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\"positions\":[{\"vehicle_ref\":\"BUS-114\",\"route_code\":\"B502\",\"lat\":43.6452,\"lng\":-79.3806,\"heading\":84,\"speed_kmh\":47,\"occupancy_pct\":62,\"status\":\"in_transit_to\",\"reported_at\":\"2026-01-01T09:00:00Z\"}]}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": {
                            "raw": "{{baseUrl}}/api/v1/telemetry/positions",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "telemetry",
                                "positions"
                            ]
                        }
                    }
                }
            ]
        }
    ]
}