inventory_subtract

Arguments

ArgumentTypeRequiredDefaultDescription
dataUpdateInventoryInput!Yes

Return Type

UpdateInventoryOutput

Mutation

mutation inventory_subtract(
  $data: UpdateInventoryInput!
) {
  inventory_subtract(
    data: $data
  ) {
    request_id
    complexity
    warehouse_product {
      ...WarehouseProductFragment
    }
  }
}

Variables

{
  "data": {
    "customer_account_id": "QWNjb3VudDoxMjM0",
    "sku": "BLUE-TEE-M",
    "warehouse_id": "V2FyZWhvdXNlOjEyMzQ=",
    "quantity": 2,
    "reason": "Customer requested expedited handling.",
    "location_id": "TG9jYXRpb246MTIzNA==",
    "lpn_id": "TGljZW5zZVBsYXRlTnVtYmVyOjEyMzQ="
  }
}

Response

{
  "data": {
    "inventory_subtract": {
      "request_id": "UmVjb3JkOjEyMzQ=",
      "complexity": 100,
      "warehouse_product": {sku: "BLUE-TEE-M", name: "Blue Tee"}
    }
  }
}