Skip to main content

registerCarrier

Register a new carrier for a brand. This mutation allows you to register a new carrier for a specific brand. The brand can be specified by the brand_id argument. If brand_id is not provided, the brand will be determined by the X-Brand-Id header.

Arguments

NameTypeDescription
nameStringThe name of the carrier. This is a required argument.
descriptionStringThe description of the carrier. This is an optional argument.
categoryCarrierCategoryEnumThe category of the carrier. This is an
optional argument with a default value of :standard.
statusStatusEnumThe status of the carrier. This is an optional argument with a default value of 'ACTIVE'.
brand_idIDThe brand ID to register the carrier for. If not provided,
will use the brand provided in the X-Brand-Id header. This is an optional argument.
globalBooleanWhether the carrier is global. This is an optional argument with a default value of false.

Errors

This mutation may return the following errors:

  • NotFoundError: If the provided brand_id is not a valid brand ID.

Return Value

This mutation returns a CarrierType object representing the newly registered carrier.

registerCarrier(
input: RegisterCarrierInput!
): Carrier

Arguments

registerCarrier.input ● RegisterCarrierInput! non-null input

Parameters for RegisterCarrier

Type

Carrier object

This type represents a carrier. A carrier is a company that provides shipping services.