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
| Name | Type | Description |
|---|---|---|
| name | String | The name of the carrier. This is a required argument. |
| description | String | The description of the carrier. This is an optional argument. |
| category | CarrierCategoryEnum | The category of the carrier. This is an |
optional argument with a default value of :standard. | ||
| status | StatusEnum | The status of the carrier. This is an optional argument with a default value of 'ACTIVE'. |
| brand_id (DEPRECATED) | ID | The 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_id | ID | The company ID to register the carrier for. This is an optional argument. |
| global | Boolean | Whether 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 providedcompany_idis 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.