Plixstar
API Reference

Vendor shipping methods

GET
/api/v1/vendor/shipping-methods

Oldest first.

Authorization

better-auth.session_token
better-auth.session_token<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"  }]
POST
/api/v1/vendor/shipping-methods

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
better-auth.session_token<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": {}  }'
Empty
DELETE
/api/v1/vendor/shipping-methods/{id}

Authorization

better-auth.session_token
better-auth.session_token<token>

In: cookie

Path Parameters

id*string

Response Body

curl -X DELETE "https://example.com/api/v1/vendor/shipping-methods/string"
Empty
PUT
/api/v1/vendor/shipping-methods/{id}

Authorization

better-auth.session_token
better-auth.session_token<token>

In: cookie

Path Parameters

id*string

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": {}  }'
Empty
PATCH
/api/v1/vendor/shipping-methods/{id}/toggle-active

Returns the new is_active value.

Authorization

better-auth.session_token
better-auth.session_token<token>

In: cookie

Path Parameters

id*string

Response Body

curl -X PATCH "https://example.com/api/v1/vendor/shipping-methods/string/toggle-active"
Empty
POST
/api/v1/vendor/shipping-methods/{id}/activate

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
better-auth.session_token<token>

In: cookie

Path Parameters

id*string

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"    }  ]}