u
This commit is contained in:
31
src/api/shipment.js
Normal file
31
src/api/shipment.js
Normal file
@@ -0,0 +1,31 @@
|
||||
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
|
||||
};
|
||||
Reference in New Issue
Block a user