createReturnLabel
Creates a return label for all items of an order with the carrier of the order's shipping method, and returns it with its tracking codes and the download URLs of its documents. Every call creates another return label, so read the return labels the order already has first if one is enough. The carrier and the shop's shipping configuration can reject the label, e.g. for an incomplete address; the error then carries their reason.
Required scopes
The token needs the shipping_labels:write access scope.
createReturnLabel(
orderId: ID!
shippingMethodId: ID
): ShippingLabel!
Arguments
createReturnLabel.orderId ● ID! non-null scalar
ID of the order to create the return label for.
createReturnLabel.shippingMethodId ● ID scalar
ID of the shipping method whose carrier and configuration are used for the return label. Defaults to the shipping method of the order.
Type
ShippingLabel object
A shipping label created with a carrier, together with the tracking codes the carrier assigned to its parcels.