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
| 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 | 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. | ||
| 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 providedbrand_idis 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.