/mobile/v7/shipments/:id
interface ShipmentAPIResponse {
shipment: {
id: number;
state: string;
trackingRequired: boolean;
pallets: number;
floorLoaded: boolean;
nextStopId: number;
rate: number;
mapImage: string;
keepAwake: boolean;
pickups: ShipmentStopAPIResponse[];
deliveries: ShipmentStopAPIResponse[];
contact: {
phone: string;
};
loadOverview: {
title: string;
value: string;
}[];
equipmentAttrbutes: {
attribute: string;
value: string;
}[];
requirements: {
text: string;
}[];
};
};
interface ShipmentStopAPIResponse {
id: number;
address: {
stateCode: string;
city: string;
postalCode: string;
country_code: string;
};
commodity: string;
appointmentDateTime: string; // datetime in ISO 8601 format
timezone: string;
billOfLading: string;
poReference: string;
isDropTrailer: string;
instructions: {
text: string;
};
hours: string;
palletCount: number;
weight: number;
};
If this same serializer will be used for the driver's current shipment, there is a
keepAwake
property I'd like to retain, as well. It's one of those things that we could determine on the front-end, but if we ever want to change the logic, I'd rather a simple back-end deploy than a whole new app build.