Create Shipping Method
Create Shipping Method — vendor REST API endpoint.
/vendor/me/shipping-methodsVendor bearer token requiredCreate Shipping Method
Create a new shipping method for your vendor.
Adds a shipping method with per-country rates. Requires OWNER, ADMIN, or EDITOR role. Use FLAT_RATE with countryRates[].flatRate, or WEIGHT_BASED with baseRate + weightTiers.
When to use this
- Setting up flat-rate or weight-based shipping for your catalog.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Method display name. |
| pricingType | string | No | `FLAT_RATE` or `WEIGHT_BASED`. Defaults to server default when omitted. |
| currency | string | No | ISO currency code (max 3). |
| description | string | No | Optional description. |
| weightLimitMin | number | No | Optional minimum shipment weight. |
| weightLimitMax | number | No | Optional maximum shipment weight. |
| countryRates[].countryCode | string | Yes | ISO country code for this rate (max 10). |
| countryRates[].flatRate | number | Yes | Flat rate for this country. Required for `FLAT_RATE` methods. |
| countryRates[].baseRate | number | No | Base rate for `WEIGHT_BASED` methods (used with weightTiers). |
| countryRates[].weightTiers | array | No | Weight tiers for `WEIGHT_BASED`: `[{ "minWeight": 0, "maxWeight": 5, "rate": 8.99 }]`. Omit for flat-rate methods. |
Request example
curl -X POST 'https://api.next.gcommerce.glass/api/v1/vendor/me/shipping-methods' \
-H 'Content-Type: application/json' \
-d '{
"name": "Standard Shipping",
"pricingType": "FLAT_RATE",
"currency": "USD",
"description": "5-7 business days",
"countryRates": [
{
"countryCode": "US",
"flatRate": 9.99
}
]
}'Response examples
{
"id": "550e8400-e29b-41d4-a716-446655440060",
"name": "Standard Shipping",
"isActive": true,
"pricingType": "FLAT_RATE",
"weightLimitMin": null,
"weightLimitMax": null,
"currency": "USD",
"description": "5-7 business days",
"countryRates": [
{
"id": "550e8400-e29b-41d4-a716-446655440061",
"methodId": "550e8400-e29b-41d4-a716-446655440060",
"countryCode": "US",
"flatRate": "9.99",
"baseRate": null,
"weightTiers": []
}
],
"createdAt": "2025-03-01T10:00:00.000Z",
"updatedAt": "2025-03-01T10:00:00.000Z"
}Status codes
OK
Request succeeded.
Unauthorized
Missing or invalid bearer token.
Forbidden
Insufficient permissions for this action.
Bad Request
Validation failed or invalid parameters.
Not Found
Resource not found.
Too Many Requests
Global rate limit exceeded (10,000 requests per 10 minutes per IP).
Internal Server Error
Unexpected server error.
Forbidden
No vendor membership, or insufficient vendor role (requires OWNER, ADMIN, or EDITOR for write operations).
Try it
Uses your saved session from login. Edit values and send a live request, or copy the cURL command.