Vendor shipping methods
Oldest first.
Authorization
better-auth.session_token In: cookie
Response Body
application/json
curl -X GET "https://example.com/api/v1/vendor/shipping-methods"[ { "id": "string", "store_id": "string", "name": "string", "provider": "string", "type": "string", "rate_config": {}, "estimated_days_min": 0, "estimated_days_max": 0, "is_active": true, "created_at": "string" }]rate_config shape depends on type: flat → { rate }; weight → { base_rate, per_kg }; dimension → { base_rate, per_cm3 }. Validation is currently jsonb-pass-through — storefront zod refines tighter.
Authorization
better-auth.session_token In: cookie
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "https://example.com/api/v1/vendor/shipping-methods" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "provider": "pos_laju", "type": "flat", "rate_config": {} }'Authorization
better-auth.session_token In: cookie
Path Parameters
Response Body
curl -X DELETE "https://example.com/api/v1/vendor/shipping-methods/string"Authorization
better-auth.session_token In: cookie
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X PUT "https://example.com/api/v1/vendor/shipping-methods/string" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "provider": "pos_laju", "type": "flat", "rate_config": {} }'Returns the new is_active value.
Authorization
better-auth.session_token In: cookie
Path Parameters
Response Body
curl -X PATCH "https://example.com/api/v1/vendor/shipping-methods/string/toggle-active"Body { active }. Deactivation (active=false) is unconditional. Activation for pos_laju / ninja_van runs the product weight+dimensions guard — returns success=false + blockedProducts[] when any non-draft product is missing data.
Authorization
better-auth.session_token In: cookie
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/vendor/shipping-methods/string/activate" \ -H "Content-Type: application/json" \ -d '{}'{ "success": true, "error": "string", "blockedProducts": [ { "id": "string", "name": "string" } ]}