shipment_create_shipping_label

Arguments

ArgumentTypeRequiredDefaultDescription
dataCreateShippingLabelInput!Yes

Return Type

CreateShippingLabelOutput

Mutation

mutation shipment_create_shipping_label(
  $data: CreateShippingLabelInput!
) {
  shipment_create_shipping_label(
    data: $data
  ) {
    request_id
    complexity
    shipping_label {
      ...ShippingLabelFragment
    }
  }
}

Variables

{
  "data": {
    "customer_account_id": "QWNjb3VudDoxMjM0",
    "carrier": "ups",
    "shipping_name": "UPS Ground",
    "shipping_method": "ups_ground",
    "cost": "19.99",
    "address": {address1: "123 Fulfillment Ave", city: "New York", country: "US"},
    "dimensions": {length: 12.5, width: 8.0, height: 4.0},
    "label": {tracking_number: "1Z999AA10123456784", carrier: "ups"},
    "line_item_ids": ["U2hpcG1lbnRMaW5lSXRlbToxMjM0", "U2hpcG1lbnRMaW5lSXRlbTo1Njc4"],
    "tracking_number": "1Z999AA10123456784",
    "shipment_id": "U2hpcG1lbnQ6MTIzNA=="
  }
}

Response

{
  "data": {
    "shipment_create_shipping_label": {
      "request_id": "UmVjb3JkOjEyMzQ=",
      "complexity": 100,
      "shipping_label": {tracking_number: "1Z999AA10123456784", carrier: "ups"}
    }
  }
}