Getting All Shipping Rates
Endpoint: GET /admin/shipping_rates
Purpose
This API retrieves a list of all shipping rates available in the system, including their rate policies, applicable conditions, and configuration details such as tax inclusion, handling costs, and more.
Path Parameters
No path parameters for this endpoint.
Query Parameters
Parameter | Type | Description |
---|---|---|
limit | Integer | Number of products per request. |
offset | Integer | Starting point for pagination. |
order_by | String | Field to sort results by. |
direction | String | Sort order by ascending or descending. |
Use Case
This endpoint enables administrators to view all configured shipping rates, along with conditional policies, allowing them to manage shipping cost strategies based on order amount, weight, or item attributes.
Request Body
No data is required for the request body.
Response
Returns a paginated list of shipping rates. Each shipping rate includes policy details like type, additional charges, tax settings, and associated conditions defining when and how the rate applies.
{
"shipping_rates": [
{
"id": SHIPPING_RATE_ID,
"name": "NAME",
"policy_type": "POLICY_TYPE",
"additional_amount": ADDITIONAL_AMOUNT,
"additional_cost": ADDITIONAL_COST,
"is_cumulative": BOOLEAN,
"includes_tax": BOOLEAN,
"is_additional": BOOLEAN,
"conditions": [
{
"id": CONDITION_ID_1,
"from_amount": FROM_AMOUNT,
"to_amount": TO_AMOUNT,
"packet_weight": PACKET_WEIGHT,
"handling_cost": HANDLING_COST,
"shipping_cost": SHIPPING_COST,
"shipping_cost_type": "SHIPPING_COST_TYPE",
"handling_cost_type": "HANDLING_COST_TYPE",
"api_type": API_TYPE,
"api_service_type": API_SERVICE_TYPE,
"extra_cover": EXTRA_COVER,
"packing_algorithm": PACKING_ALGORITHM,
"item_attributes": ITEM_ATTRIBUTES,
"shipping_policy": [
{
"id": SHIPPING_RATE_ID
}
]
}
],
"created_at": "YYYY-MM-DDTHH:MM:SS",
"updated_at": "YYYY-MM-DDTHH:MM:SS"
}
],
"pagination": {
"records": TOTAL_RECORDS,
"limit": PAGINATION_LIMIT,
"offset": PAGINATION_OFFSET,
"previous_page": "PREVIOUS_PAGE_URL",
"next_page": "NEXT_PAGE_URL"
}
}
Getting a Specific Shipping Rate
Endpoint: GET /admin/shipping_rates/{shipping_rate_id}
Purpose
This API retrieves detailed information for a specific shipping rate using its unique ID. The response includes policy attributes and conditions for how the rate is applied to qualifying orders.
Path Parameters
Parameter | Type | Description |
---|---|---|
shipping_rate_id | Integer | Required. ID of the shipping rate. |
Query Parameters
No query parameters for this endpoint.
Use Case
Admins use this endpoint to view full configuration details of a particular shipping rate, including thresholds, fees, tax settings, and applicable conditions, for review or editing purposes.
Request Body
No data is required for the request body.
Response
Returns a single shipping rate object containing its ID, name, policy type, additional cost configurations, and an array of condition objects that specify when the rate is triggered.
{
"shipping_rate": [
{
"id": SHIPPING_RATE_ID,
"name": "NAME",
"policy_type": "POLICY_TYPE",
"additional_amount": ADDITIONAL_AMOUNT,
"additional_cost": ADDITIONAL_COST,
"is_cumulative": BOOLEAN,
"includes_tax": BOOLEAN,
"is_additional": BOOLEAN,
"conditions": [
{
"id": CONDITION_ID,
"from_amount": FROM_AMOUNT,
"to_amount": TO_AMOUNT,
"packet_weight": PACKET_WEIGHT,
"handling_cost": HANDLING_COST,
"shipping_cost": SHIPPING_COST,
"shipping_cost_type": "SHIPPING_COST_TYPE",
"handling_cost_type": "HANDLING_COST_TYPE",
"api_type": API_TYPE,
"api_service_type": API_SERVICE_TYPE,
"extra_cover": EXTRA_COVER,
"packing_algorithm": PACKING_ALGORITHM,
"item_attributes": ITEM_ATTRIBUTES,
"shipping_policy": [
{
"id": SHIPPING_RATE_ID
}
]
}
],
"created_at": "YYYY-MM-DDTHH:MM:SS",
"updated_at": "YYYY-MM-DDTHH:MM:SS"
}
]
}