Create CarrierService

🔒

Requires write_product access 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:

  1. Registering custom carrier services for store-specific shipping requirements.
  2. Managing third-party integrations for shipping rate calculations.
  3. Simplifying the carrier service lifecycle management with internal tools.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Body Parameters

NameTypeRequiredExampleDescription
namestringYes"DHL Express"Carrier Service Name (used as both English and Chinese names internally).
callback_urlstringYes"http://example.com/calculate"The endpoint URL Shoplazza calls to calculate shipping rates.
activebooleanYestrueIndicates whether the carrier service is active. true enables the service.
carrier_codestringNo"dhl"Unique code representing the carrier service (e.g., "dhl").
logostringNo"http://example.com/logo.png"URL of the carrier service's logo.
short_descstringNo"Fast and secure shipping"Brief description of the carrier service.

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Successful Response

NameTypeExampleDescription
carrier_service.idstring"1"Unique identifier for the carrier service.
carrier_service.cn_namestring"shipzipservice1"Carrier service name in Chinese (defaults to name).
carrier_service.en_namestring"DHL Express"Carrier service name in English (defaults to name).
carrier_service.store_idstring"70808"ID of the store associated with the carrier service.
carrier_service.activestring"true"Status of the carrier service. true means active.
carrier_service.callback_urlstring"http://example.com/calculate"Endpoint URL for shipping rate calculations.
carrier_service.scopestring"calculateSeparately"Scope of the carrier service.
carrier_service.carrier_service_codestring"shipzip"The code representing the carrier service.
carrier_service.logostring"http://example.com/logo.png"URL of the carrier service's logo.
carrier_service.short_descstring"Fast and secure shipping"Brief description of the carrier service.
carrier_service.create_atstring"2024-07-01"Timestamp of when the carrier service was created.
carrier_service.update_atstring"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.

FieldTypeExampleDescription
errorsArray[ "invalid line_item id"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorString "store is not active"Indicates an error encountered during the process

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!