Ostorya dev docs

Admin API/Shipping and fulfillment/Mutations

parcelsSend

mutation

Sends confirmed orders to a delivery company connected by API (Orders › Send parcel). Each order that the company accepts ships at once with its tracking number; refused ones stay to ship with the company's message.

Returns DeliveryApiPayload!

mutation ParcelsSend($carrierAccountId: ID!, $orderIds: [ID!]!) {
  parcelsSend(carrierAccountId: $carrierAccountId, orderIds: $orderIds) {
    result
    userErrors {
      code
      message
      field
    }
  }
}

# Variables
{
  "carrierAccountId": "gid://ostorya/CarrierAccount/0f8c5b1e-…",
  "orderIds": [
    "gid://ostorya/Order/0f8c5b1e-…"
  ]
}

Arguments

carrierAccountIdID!required
deliveryFeesJSON
orderIds[ID!]!required

Payload

resultJSON
userErrors[UserError!]!required