Skip to content

Commit 1bf3a75

Browse files
docs: improve TESTING_SKILL.md with correct endpoints and operational guidance
1 parent 430c945 commit 1bf3a75

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

carrier-testing/TESTING_SKILL.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,17 +136,26 @@ x-test-mode: true (if connection is in test mode)
136136

137137
**Important:** Always pass the token directly in single-quoted curl headers (`-H 'Authorization: Bearer <token>'`). Do NOT store the token in a bash variable with double quotes — JWT tokens can contain characters that get misinterpreted by the shell, causing silent auth failures.
138138

139+
### Verify Server is Running
140+
141+
Before testing, confirm the Karrio server is reachable by calling `GET <api_url>/v1/connections` with the provided token (API URL from Step 0). If it fails, ask the user to start the server — do not attempt to start it yourself.
142+
139143
### Key Endpoints
140144

141-
| Action | Method | Endpoint |
142-
|---|---|---|
143-
| List connections | GET | `/v1/connections` |
144-
| Fetch rates | POST | `/v1/rates` |
145-
| Create shipment | POST | `/v1/shipments` |
146-
| Cancel shipment | POST | `/v1/shipments/<id>/cancel` |
147-
| Track shipment | GET | `/v1/trackers/<carrier>/<tracking_number>` |
148-
| Schedule pickup | POST | `/v1/pickups` |
149-
| Cancel pickup | POST | `/v1/pickups/<id>/cancel` |
145+
Karrio has two types of endpoints:
146+
147+
- **Resource endpoints** (`/v1/shipments`, `/v1/pickups`, `/v1/trackers`) — Create and manage Karrio resources. These call the carrier API internally and store results. **Use these for testing.**
148+
- **Proxy endpoints** (`/v1/proxy/rates`, `/v1/proxy/tracking`) — Direct carrier API passthrough without storing results. Only use `/v1/proxy/rates` for rate fetching (there is no `/v1/rates` resource endpoint for fetching rates).
149+
150+
| Action | Method | Endpoint | Notes |
151+
|---|---|---|---|
152+
| List connections | GET | `/v1/connections` | |
153+
| Fetch rates | POST | `/v1/proxy/rates` | Proxy-only — no resource endpoint |
154+
| Create shipment | POST | `/v1/shipments` | Rate + ship in one call |
155+
| Cancel shipment | POST | `/v1/shipments/<id>/cancel` | |
156+
| Track shipment | GET | `/v1/trackers/<carrier_name>/<tracking_number>` | `carrier_name` is the system name (e.g., `ups`), not the carrier_id |
157+
| Schedule pickup | POST | `/v1/pickups` | |
158+
| Cancel pickup | POST | `/v1/pickups/<id>/cancel` | |
150159

151160
---
152161

0 commit comments

Comments
 (0)