paccurate
Version:
Reduce fulfillment costs and wasted material by finding the optimal way to pack every shipment, in real time.
18 lines • 612 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.pack = pack;
const request_1 = require("./request");
/**
* Finds the optimal way to pack a shipment.
*
* @param body - Packing configuration.
* @param url - Paccurate API endpoint.
* @returns - Pack response.
*/
function pack(body, url = 'https://api.paccurate.io/') {
const key = body?.key;
// @ts-expect-error The operand of a 'delete' operator must be optional.
delete body?.key;
return (0, request_1.post)(url, body, { headers: { Authorization: `apikey ${key}` } });
}
//# sourceMappingURL=pack.js.map