Merchant portal API

endpoints

GraphQL, because a merchant dashboard wants a shipment, its parcels and their scans in one round trip

GRAPHQLQueries4 endpointsQUERY shipment(id: ID!) · One shipment with its parcels and their current state · → ShipmentQUERYshipment(id: ID!)One shipment with its parcels and their current stateQUERY shipments(status: ParcelStatus, bookedSince: DateTime, first: Int, after: String) · The calling merchant's shipments, newest first · → ShipmentConnection!QUERYshipments(status: ParcelStatus, bookedSince: DateTime, fi…The calling merchant's shipments, newest firstQUERY parcel(trackingNumber: String!) · Everything known about one parcel, by its tracking number · → ParcelQUERYparcel(trackingNumber: String!)Everything known about one parcel, by its tracking numberQUERY depots · Depots and the postcodes they serve · → [Depot!]!QUERYdepotsDepots and the postcodes they serveMutations3 endpointsMUTATION bookShipment(input: BookShipmentInput!) · Book a shipment and mint a tracking number per parcel · → BookShipmentPayload!MUTATIONbookShipment(input: BookShipmentInput!)Book a shipment and mint a tracking number per parcelMUTATION cancelShipment(id: ID!) · Cancel before collection; fails once any parcel has been scanned · → CancelShipmentPayload!MUTATIONcancelShipment(id: ID!)Cancel before collection; fails once any parcel has been scannedMUTATION sequenceRoute(routeId: ID!) · Ask the routing engine to sequence a route's stops · → Route!MUTATIONsequenceRoute(routeId: ID!)Ask the routing engine to sequence a route's stopsSubscriptions1 endpointSUBSCRIPTION parcelScanned(shipmentId: ID) · Every scan on the calling merchant's parcels, as it is ingested · → Scan!SUBSCRIPTIONparcelScanned(shipmentId: ID)Every scan on the calling merchant's parcels, as it is ingestedTypes (19)DateTime — The merchant portal's API.DateTimescalar(no fields)ShipmentShipmentobjectid · ID!idID!reference · StringreferenceStringserviceLevel · ServiceLevel!serviceLevelServiceLevel!recipient · Recipient!recipientRecipient!destination · Address!destinationAddress!parcels · [Parcel!]!parcels[Parcel!]!bookedAt · DateTime!bookedAtDateTime!ShipmentConnectionShipmentConnectionobjectnodes · [Shipment!]!nodes[Shipment!]!cursor · StringcursorStringtotalCount · Int!totalCountInt!ParcelParcelobjectid · ID!idID!trackingNumber · String!trackingNumberString!status · ParcelStatus!statusParcelStatus!attempts · Int!attemptsInt!weightGrams · Int!weightGramsInt!scans · [Scan!]!scans[Scan!]!currentDepot · DepotcurrentDepotDepotScanScanobjectid · ID!idID!type · ScanType!typeScanType!scannedAt · DateTime!scannedAtDateTime!receivedAt · DateTime!receivedAtDateTime!depot · DepotdepotDepotDepotDepotobjectid · ID!idID!code · String!codeString!name · String!nameString!address · Address!addressAddress!RouteRouteobjectid · ID!idID!serviceDate · DateTime!serviceDateDateTime!sequencedAt · DateTimesequencedAtDateTimestops · [Stop!]!stops[Stop!]!StopStopobjectid · ID!idID!sequence · Int!sequenceInt!parcel · Parcel!parcelParcel!windowStart · DateTime!windowStartDateTime!windowEnd · DateTime!windowEndDateTime!RecipientRecipientobjectid · ID!idID!name · String!nameString!phone · StringphoneStringemail · StringemailStringAddressAddressobjectid · ID!idID!line1 · String!line1String!line2 · Stringline2Stringcity · String!cityString!postcode · String!postcodeString!country · String!countryString!BookShipmentInputBookShipmentInputinputreference · StringreferenceStringserviceLevel · ServiceLevel!serviceLevelServiceLevel!recipient · RecipientInput!recipientRecipientInput!destination · AddressInput!destinationAddressInput!parcels · [ParcelInput!]!parcels[ParcelInput!]!RecipientInputRecipientInputinputname · String!nameString!phone · StringphoneStringemail · StringemailStringAddressInputAddressInputinputline1 · String!line1String!line2 · Stringline2Stringcity · String!cityString!postcode · String!postcodeString!country · String!countryString!ParcelInputParcelInputinputweightGrams · Int!weightGramsInt!reference · StringreferenceStringBookShipmentPayloadBookShipmentPayloadobjectshipment · Shipment!shipmentShipment!labelUrl · String!labelUrlString!CancelShipmentPayloadCancelShipmentPaylo…objectshipment · Shipment!shipmentShipment!refundedMinor · Int!refundedMinorInt!ServiceLevelServiceLevelenumNEXT_DAYNEXT_DAYTWO_DAYTWO_DAYECONOMYECONOMYParcelStatusParcelStatusenumCREATEDCREATEDCOLLECTEDCOLLECTEDAT_DEPOTAT_DEPOTIN_TRANSITIN_TRANSITOUT_FOR_DELIVERYOUT_FOR_DELIVERYDELIVEREDDELIVEREDATTEMPT_FAILEDATTEMPT_FAILEDAWAITING_INSTRUCTIONAWAITING_INSTRUCTIONRETURNINGRETURNINGRETURNEDRETURNEDLOSTLOSTCANCELLEDCANCELLEDScanTypeScanTypeenumCOLLECTIONCOLLECTIONDEPOT_INBOUNDDEPOT_INBOUNDDEPOT_OUTBOUNDDEPOT_OUTBOUNDVEHICLE_LOADVEHICLE_LOADDELIVERYDELIVERYATTEMPT_FAILEDATTEMPT_FAILEDRETURNRETURN
drag to pan · wheel to zoom · click a node · Esc clears

Source

  • Imported from showcase/graphql/portal.graphql
  • 8 operations, 19 types shown