update 20.10.2025
This commit is contained in:
parent
8c11130b5d
commit
a939cd51ef
616 changed files with 84821 additions and 4121 deletions
24
tests/DHL/run_dhl_orders_request.sh
Normal file
24
tests/DHL/run_dhl_orders_request.sh
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
# === Secrets & Variablen (BITTE AUSFÜLLEN) ===
|
||||
export DHL_API_KEY="AxGBdF8DBdIAmuhqvG0ASBRKFvyV7ypX"
|
||||
export DHL_USER="user-valid"
|
||||
export DHL_PASS="SandboxPasswort2023!"
|
||||
|
||||
export PRINT_FORMAT="910-300-400"
|
||||
export DOC_FORMAT="PDF"
|
||||
export VALIDATE="false"
|
||||
|
||||
JSON_FILE="$(dirname "$0")/DHL_orders_request_template.json"
|
||||
|
||||
BASE="https://api-sandbox.dhl.com/parcel/de/shipping/v2"
|
||||
URL="$BASE/orders?printFormat=$PRINT_FORMAT&docFormat=$DOC_FORMAT&validate=$VALIDATE"
|
||||
|
||||
curl -v --http1.1 "$URL" -H "Accept: application/json" -H "Content-Type: application/json" -H "dhl-api-key: $DHL_API_KEY" -H "Authorization: Basic $(printf "%s:%s" "$DHL_USER" "$DHL_PASS" | base64 -w 0)" --data @"$JSON_FILE" --max-time 30 --trace-ascii "$(dirname "$0")/curl-trace.txt" -o "$(dirname "$0")/response.json" -w "\n----\nHTTP %{http_code}\nRemote %{remote_ip}\n"
|
||||
|
||||
echo
|
||||
echo "Fertig. Artefakte:"
|
||||
echo " - response.json (Antwortkörper)"
|
||||
echo " - curl-trace.txt (vollständiger Request/Response-Trace inkl. Header)"
|
||||
echo " - DHL_orders_request_template.json (gesendeter Request-Body)"
|
||||
Loading…
Add table
Add a link
Reference in a new issue