import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
dhl: {
type: "app",
app: "dhl",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.dhl.$auth.api_url}/track/shipments`,
headers: {
"content-type": `application/json`,
"dhl-api-key": `${this.dhl.$auth.api_key}`,
},
params: {
trackingNumber: `${this.dhl.$auth.tracking_number}`,
},
})
},
})
DHL uses API keys for authentication. When you connect your DHL account, Pipedream securely stores the keys so you can easily authenticate to DHL APIs in both code and no-code steps.