Files
dashfront/src/api/shipment.js
2026-10-12 20:03:43 +02:00

32 lines
802 B
JavaScript

import { http } from './http.js';
/**
* Outbound shipments (manifest type = shipment).
* Manifest number format: <orderNumber><shipmentPrefix><index>, e.g. AU-1001-L-1.
*/
export const shipment = {
// #region GET /api/order/:id/shipment — listByOrder
listByOrder(orderId) {
return http(`/api/order/${orderId}/shipment`);
},
// #endregion
// #region POST /api/order/:id/shipment — create
create(orderId, body) {
return http(`/api/order/${orderId}/shipment`, { method: 'POST', body });
},
// #endregion
// #region GET /api/shipment/:id — get
get(id) {
return http(`/api/shipment/${id}`);
},
// #endregion
// #region DELETE /api/shipment/:id — delete
delete(id) {
return http(`/api/shipment/${id}`, { method: 'DELETE' });
},
// #endregion
};