Getting All Shipping Profiles
Endpoints: GET /admin/shipping_profiles
Purpose
The GET /admin/shipping_profiles
API retrieves a list of all available shipping profiles. Shipping profiles define how products are shipped, including associated rules and policies. This API helps administrators manage and view shipping configurations, ensuring accurate and flexible delivery options for customers.
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
Administrators use this API to fetch and review all shipping profiles configured in the system. It is useful for managing multiple shipping methods, validating the correctness of shipping rules, and ensuring consistency across different regions. This API is also essential for auditing and updating shipping strategies as business needs evolve.
Request Body
No data is required for the request body.
Response
The response provides a paginated list of shipping profiles, including their unique identifiers, names, rule preferences, associated shipping rules, and policies. Each profile includes metadata such as descriptions and timestamps for when it was created and last updated. Pagination details help navigate through large sets of shipping profiles efficiently.
{
"shipping_profiles": [
{
"id": SHIPPING_PROFILE_ID,
"name": SHIPPING_PROFILE_NAME,
"rule_preference": RULE_PREFERENCE,
"shipping_rules": [
{
"id": SHIPPING_RULE_ID,
"name": SHIPPING_RULE_NAME,
"shipping_policy": {
"id": SHIPPING_POLICY_ID,
"name": SHIPPING_POLICY_NAME
}
}
],
"description": DESCRIPTION,
"created_at": CREATED_AT_TIMESTAMP,
"updated_at": UPDATED_AT_TIMESTAMP
}
],
"pagination": {
"records": TOTAL_RECORDS,
"limit": PAGE_LIMIT,
"offset": PAGE_OFFSET,
"previous_page": PREVIOUS_PAGE,
"next_page": NEXT_PAGE
}
}
Getting Specific Shipping Profiles
Endpoints: GET /admin/shipping_profiles/{id}
Purpose
The GET /admin/shipping_profiles/{id}
API retrieves the details of a specific shipping profile by its unique identifier. This endpoint is useful for viewing detailed information about a particular shipping profile, including its associated rules and policies.
Path Parameters
Field |
Type |
Description |
---|---|---|
id |
integer |
The unique identifier of the categories |
Query Parameters
This endpoint does not have any query parameters.
Use Case
Administrators use this API to fetch comprehensive information about a specific shipping profile. It is helpful for inspecting individual profiles when troubleshooting shipping issues, verifying policy settings, or preparing for updates or modifications. This endpoint is also beneficial for ensuring that the correct shipping profile is applied to products.
Request Body
No data is required for the request body.
Response
The response contains detailed information about the requested shipping profile, including its unique identifier, name, rule preference, associated shipping rules, and policies. Additionally, it provides metadata such as descriptions and timestamps for creation and last update.
{
"shipping_profile": {
"id": SHIPPING_PROFILE_ID,
"name": SHIPPING_PROFILE_NAME,
"rule_preference": RULE_PREFERENCE,
"shipping_rules": [
{
"id": SHIPPING_RULE_ID,
"name": SHIPPING_RULE_NAME,
"shipping_policy": {
"id": SHIPPING_POLICY_ID,
"name": SHIPPING_POLICY_NAME
}
}
],
"description": DESCRIPTION,
"created_at": CREATED_AT_TIMESTAMP,
"updated_at": UPDATED_AT_TIMESTAMP
}
}