← API Docs Open GraphiQL

Order Schema

Orders, auctions, templates and forms.

Open in GraphiQL

Popular queries and mutations

Create order (mutation)

Creates a new order with loading and unloading depots. Get formId from orderForms, transportTypeId from formFields. Transport modes: road, rail, ship, air. Depot types: load, unload. Response message contains the created order ID.

mutation CreateOrder(
  $transportModeCode: String!
  $formId: String!
  $transportTypeId: Int!
  $depots: [DepotInput!]!
  $details: DetailsInput
) {
  createOrder(
    transportModeCode: $transportModeCode
    formId: $formId
    transportTypeId: $transportTypeId
    depots: $depots
    details: $details
  ) {
    success
    message
  }
}

# Variables (replace formId and transportTypeId):
{
  "transportModeCode": "road",
  "formId": "YOUR_ORDER_FORM_ID",
  "transportTypeId": 1,
  "depots": [
    {
      "position": 1,
      "type": "load",
      "dateStart": "2025-03-10",
      "dateEnd": "2025-03-10",
      "timeStart": "09:00",
      "timeEnd": "12:00",
      "warehouseName": "Warehouse A",
      "companyName": "Sender Ltd",
      "contactPerson": "John Doe",
      "contactPhone": "+1234567890",
      "location": {
        "country": "Germany",
        "region": "Bavaria",
        "city": "Munich",
        "fullAddress": "Munich, Bavaria, Germany",
        "countryCode": "DE",
        "lat": 48.1351,
        "lon": 11.5820
      }
    },
    {
      "position": 2,
      "type": "unload",
      "warehouseName": "Warehouse B",
      "companyName": "Receiver Ltd",
      "contactPerson": "Jane Smith",
      "contactPhone": "+0987654321",
      "location": {
        "country": "France",
        "region": "Île-de-France",
        "city": "Paris",
        "fullAddress": "Paris, Île-de-France, France",
        "countryCode": "FR",
        "lat": 48.8566,
        "lon": 2.3522
      }
    }
  ],
  "details": {
    "comment": "Fragile cargo",
    "capacityPallets": 33
  }
}

Get order with all fields (query)

Fetches order by ID with all available fields including depots, cargos, details, carrier and auction info.

query GetOrder($id: String!) {
  order(id: $id) {
    id
    internalId
    deliveryNumber
    formId
    route
    status
    isEditable
    payerId
    transportMode {
      id
      code
    }
    transportType {
      id
      code
    }
    user {
      id
      email
      firstName
      lastName
    }
    company {
      id
      name
      registrationNumber
    }
    depots {
      id
      position
      type
      dateStart
      dateEnd
      timeStart
      timeEnd
      warehouseName
      companyName
      contactPerson
      contactPhone
      terminalName
      etd
      eta
      location {
        id
        country
        region
        city
        street
        houseNumber
        fullAddress
        countryCode
        postalCode
        lat
        lon
      }
    }
    cargos {
      id
      name
      type
      weight
      capacity
      temperature
      packageType
      cargoItemsCount
    }
    details {
      distance
      transportDirection
      comment
      commentToAddress
      internalComment
      capacityPallets
      loadingType
    }
    detailsInternational { customsDeparture customsDestination declarationNumber }
    detailsRail { vanNumber vanType vanCount vanCapacity }
    detailsShip { vesselName voyageNumber bookingNumber }
    detailsAir { flightNumber awbNumber }
    carrier {
      id
      price
      currency
      paymentMethod
      vehicle { id }
      company { id name }
      counterparty { id name }
    }
    auction {
      auctionTypeCode
      currency
      startedAt
      plannedStopAt
      members { id }
      currentMinBet { price }
      currentMaxBet { price }
      winnerBet { id }
    }
  }
}

# Variables:
{ "id": "YOUR_ORDER_ID" }

Queries

Mutations

Run in GraphiQL