Test with Postman
Import our official Postman collection to explore and test the JustKalm API. Includes pre-configured environments, authentication, and automated tests.
Collection Structure
Create, get, list, and batch valuations
Product lookup and search
Webhook management and testing
Team and member management
Usage and performance metrics
API key validation
Environment Variables
| Variable | Initial Value | Description |
|---|---|---|
{{base_url}} | https://api.justkalm.com/v1 | API base URL |
{{api_key}} | jk_test_... | Your API key |
{{organization_id}} | org_... | Organization ID |
{{valuation_id}} | (auto) | Auto-populated from responses |
{{webhook_secret}} | whsec_... | Webhook signing secret |
Pre-request Script
Automatically adds authentication headers and idempotency keys to all requests.
// Pre-request script for authentication
const apiKey = pm.environment.get("api_key");
if (!apiKey) {
console.error("API key not set in environment");
throw new Error("Missing API key");
}
// Set authorization header
pm.request.headers.add({
key: "Authorization",
value: "Bearer " + apiKey
});
// Set idempotency key for POST requests
if (pm.request.method === "POST") {
const idempotencyKey = pm.variables.get("idempotency_key")
|| "idem_" + Date.now() + "_" + Math.random().toString(36).substr(2, 9);
pm.request.headers.add({
key: "Idempotency-Key",
value: idempotencyKey
});
}
// Log request details
console.log("Request:", pm.request.method, pm.request.url.toString());Test Scripts
Validate responses and chain requests by storing IDs in environment variables.
// Post-request test script
pm.test("Status code is successful", function () {
pm.expect(pm.response.code).to.be.oneOf([200, 201, 202, 204]);
});
pm.test("Response time is acceptable", function () {
pm.expect(pm.response.responseTime).to.be.below(2000);
});
pm.test("Response has correct content type", function () {
pm.expect(pm.response.headers.get("Content-Type"))
.to.include("application/json");
});
// Parse response
const jsonData = pm.response.json();
pm.test("Response has required fields", function () {
pm.expect(jsonData).to.have.property("data");
});
// Store IDs for chained requests
if (jsonData.data && jsonData.data.id) {
pm.environment.set("valuation_id", jsonData.data.id);
console.log("Stored valuation_id:", jsonData.data.id);
}
// Validate valuation response
if (jsonData.data && jsonData.data.estimated_value) {
pm.test("Valuation has valid price range", function () {
pm.expect(jsonData.data.estimated_value.min)
.to.be.below(jsonData.data.estimated_value.max);
});
pm.test("Confidence is valid", function () {
pm.expect(jsonData.data.confidence)
.to.be.oneOf(["high", "medium", "low"]);
});
}Collection Runner
Run bulk tests with data files for regression testing and performance benchmarking.
// Collection runner configuration
{
"collection": "JustKalm API",
"environment": "Production",
"iteration_count": 1,
"delay": 100,
"data": [
{
"sku": "HERMES-BIRKIN-35",
"brand": "Hermès",
"category": "bags",
"condition": "excellent"
},
{
"sku": "CHANEL-CF-MEDIUM",
"brand": "Chanel",
"category": "bags",
"condition": "very_good"
},
{
"sku": "LV-NEVERFULL-MM",
"brand": "Louis Vuitton",
"category": "bags",
"condition": "good"
}
],
"save_responses": true
}Best Practices
Use Sandbox First
Always test in sandbox environment before production. Use jk_test_ keys to avoid real charges.
Chain Requests
Store response IDs in environment variables to create end-to-end test workflows.
Version Control
Export and commit collection changes to git. Use Postman's built-in versioning.
Newman CI/CD
Run collections in CI/CD with Newman. Export HTML/JSON reports for test results.
Start Testing Now
Import the collection and make your first API call in minutes.