Skip to main content

registerCarrier

Register a new carrier for a company. This mutation allows you to register a new carrier for a specific company. The company can be specified by the company_id argument. If company_id is not provided, the carrier will be registered globally.

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_id (DEPRECATED)IDThe 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.
company_idIDThe company ID to register the carrier for. 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 company_id is not a valid company 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 common

Parameters for RegisterCarrier

Type

Carrier object shipments

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