# Get a service Retrieve a service by ID. The response includes vendor info and charges. Endpoint: GET /services/{id} Version: 1.0.0 Security: BearerAuth ## Path parameters: - `id` (string, required) Resource ID (UUID) or client key Example: "550e8400-e29b-41d4-a716-446655440000" ## Query parameters: - `by` (string) Specify lookup type for faster retrieval. If omitted, defaults to looking up by ID first, then falls back to client key if not found. Use by=key when you know you're providing a client key for best performance. Enum: "id", "key" ## Response 200 fields (application/json): - `id` (string, required) Example: "550e8400-e29b-41d4-a716-446655440000" - `key` (string,null) Human-readable service ID Example: "SVC-12345" - `shipmentId` (string) Parent shipment - `shipmentKey` (string,null) Parent shipment friendly ID - `vendor` (object) Enhanced reference to a vendor profile. Includes full vendor details in addition to id/key. - `vendor.id` (string, required) Vendor UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `vendor.key` (string,null) Client-defined reference ID if set Example: "ERP-VENDOR-ABC-001" - `vendor.friendlyId` (string, required) Human-readable vendor identifier Example: "V123456" - `vendor.name` (string, required) Vendor legal name Example: "ABC Warehouse Services" - `vendor.email` (string,null) Primary email address Example: "billing@abcwarehouse.com" - `vendor.phone` (string,null) Primary phone number Example: "+1-555-123-4567" - `vendor.status` (string,null) Vendor status Example: "ACTIVE" - `vendor.currency` (string,null) Preferred currency code (ISO 4217) Example: "USD" - `vendor.createdAt` (string, required) When the vendor was created Example: "2025-01-15T10:00:00Z" - `vendor.updatedAt` (string, required) When the vendor was last updated Example: "2025-01-15T14:30:00Z" - `vendorContact` (object) - `vendorContact.name` (string) - `vendorContact.phone` (string,null) - `vendorContact.email` (string,null) - `serviceType` (string) Type of service. - DRAYAGE: Port/rail drayage - CUSTOMS_CLEARANCE: Customs brokerage - WAREHOUSING: Warehouse storage - CROSS_DOCK: Cross-dock handling - TRANSLOAD: Transloading service - FUMIGATION: Cargo fumigation - INSPECTION: Cargo inspection - DOCUMENTATION: Documentation handling - INSURANCE: Cargo insurance - CARGO_HANDLING: General cargo handling - OTHER: Other service type Enum: "DRAYAGE", "CUSTOMS_CLEARANCE", "WAREHOUSING", "CROSS_DOCK", "TRANSLOAD", "FUMIGATION", "INSPECTION", "DOCUMENTATION", "INSURANCE", "CARGO_HANDLING", "OTHER" - `status` (string, required) Current status of the service. Active states: - ACTIVE: Service is active/in progress Billing states (AP): - AWAITING_INVOICE: Waiting for vendor invoice - INVOICE_IN_REVIEW: Invoice received, under review - APPROVED_TO_PAY: Approved for payment - PAID: Paid to vendor Final states: - CANCELED: Service canceled Enum: "ACTIVE", "AWAITING_INVOICE", "INVOICE_IN_REVIEW", "APPROVED_TO_PAY", "PAID", "CANCELED" - `description` (string,null) Service description - `charges` (array) Flattened charges array - `charges.chargeCode` (object) Reference to another resource (returned in responses) - `charges.chargeCode.id` (string, required) Resource UUID - `charges.description` (string,null) - `charges.amount` (number) - `charges.quantity` (number) - `totalCost` (number,null) Sum of all charges - `scheduledDate` (string,null) - `completedDate` (string,null) - `referenceNumber` (string,null) Vendor reference number - `createdAt` (string, required) - `updatedAt` (string,null) ## Response 401 fields (application/json): - `error` (string, required) Error code - `message` (string, required) Human-readable error message ## Response 404 fields (application/json): - `error` (string, required) Error code - `message` (string, required) Human-readable error message