post https://{shopdomain}.myshoplaza.com/openapi/2022-01/carrier_services/
Requires
write_productaccess scope. More access scope
The Create CarrierService API enables users to create a new carrier service for calculating shipping rates. It sends a request to the internal service layer to manage and register a new carrier service within Shoplazza's system.
This API is especially useful for:
- Registering custom carrier services for store-specific shipping requirements.
 - Managing third-party integrations for shipping rate calculations.
 - Simplifying the carrier service lifecycle management with internal tools.
 
Request Parameters
Public Request Parameters
Body Parameters
| Name | Type | Required | Example | Description | 
|---|---|---|---|---|
name | string | Yes | "DHL Express" | Carrier Service Name (used as both English and Chinese names internally). | 
callback_url | string | Yes | "http://example.com/calculate" | The endpoint URL Shoplazza calls to calculate shipping rates. | 
active | boolean | Yes | true | Indicates whether the carrier service is active. true enables the service. | 
carrier_code | string | No | "dhl" | Unique code representing the carrier service (e.g., "dhl"). | 
logo | string | No | "http://example.com/logo.png" | URL of the carrier service's logo. | 
short_desc | string | No | "Fast and secure shipping" | Brief description of the carrier service. | 
Response Explanation
Public Response Parameters
Successful Response
| Name | Type | Example | Description | 
|---|---|---|---|
carrier_service. | 
      string | "1" | Unique identifier for the carrier service. | 
carrier_service. | 
      string | "shipzipservice1" | Carrier service name in Chinese (defaults to name). | 
    
carrier_service. | 
      string | "DHL Express" | Carrier service name in English (defaults to name). | 
    
carrier_service. | 
      string | "70808" | ID of the store associated with the carrier service. | 
carrier_service. | 
      string | "true" | Status of the carrier service. true means active. | 
    
carrier_service. | 
      string | http://example.com/calculate | Endpoint URL for shipping rate calculations. | 
carrier_service. | 
      string | "calculateSeparately" | Scope of the carrier service. | 
carrier_service. | 
      string | "shipzip" | The code representing the carrier service. | 
carrier_service. | 
      string | http://example.com/logo.png | URL of the carrier service's logo. | 
carrier_service. | 
      string | "Fast and secure shipping" | Brief description of the carrier service. | 
carrier_service. | 
      string | "2024-07-01" | Timestamp of when the carrier service was created. | 
carrier_service. | 
      string | "2024-07-02" | Timestamp of the last update to the carrier service. | 
Error Response
Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.
| Field | Type | Example | Description | 
|---|---|---|---|
errors | Array | [ "invalid line_item id"] | A list of errors encountered during the request processing. | 
| Field | Type | Example | Description | 
|---|---|---|---|
error | String |  "store is not active" | Indicates an error encountered during the process | 
Error Detail
| Status Code | Message | Possible Reason | Example Response | 
|---|---|---|---|
| 400 | Bad Request | Invalid input format or request structure (e.g., missing required fields or incorrect data types). | Bad Request | 
| Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized | 
