DHL carrier account-forbindelsen validerer credentials og sikrer korrekt konfiguration til rates og labels. Ved forbindelse laver Zonos et test rating-kald for at verificere, før credentials gemmes.
For at registrere hos DHL Express eller opsætte via Zonos Dashboard, følg trinene i denne guide.
Forbind via API
Forbind DHL Carrier Account
Forbind sikkert din DHL carrier account for at få adgang til forhandlede shipping rates og oprette labels direkte via Zonos.
Kom i gang
DHL carrier account-forbindelsen validerer credentials og sikrer korrekt konfiguration til rates og labels. Ved forbindelse laver Zonos et test rating-kald for at verificere, før credentials gemmes.
For at registrere hos DHL Express eller opsætte via Zonos Dashboard, følg trinene i denne guide.
Sådan virker DHL carrier account-forbindelse
Forbindelse af DHL carrier account:
Når forbundet kan kontoen bruges til realtids shipping rates (forhandlede, hvis relevant) og DHL labels.
Forbind din DHL-konto
Brug
carrierAccountConnect-mutationen til at forbinde DHL carrier account med credentials.Mutation
Brug denne mutation til at forbinde DHL carrier account og validere credentials.
mutation CarrierAccountConnect($input: CarrierAccountConnectInput!) {carrierAccountConnect(input: $input) {errorscarrierAccount {credentialProvideridintegrationTypeorganizationrateTypecarrier {idcodename}credentials {typevalue}}}}Variables
Mutationen kræver DHL carrier code, rate type og DHL credentials.
{"input": {"carrierCode": "DHL","rateType": "NEGOTIATED","credentials": [{"type": "API_KEY","value": "actual_api_key_value"},{"type": "API_PASSWORD","value": "actual_api_password_value"},{"type": "ACCOUNT_NUMBER","value": "actual_account_number_value"}]}}DHL kræver følgende credential-typer:
API_KEY- Din DHL API keyAPI_PASSWORD- Dit DHL API passwordACCOUNT_NUMBER- Dit DHL account numberFind credentials i DHL account portal eller via din DHL account representative.
Response-eksempler
Vellykket forbindelse
Når credentials er gyldige og DHL returnerer rates:
{"data": {"carrierAccountConnect": {"errors": [],"carrierAccount": {"credentialProvider": "ORGANIZATION","id": "carrier_account_123","integrationType": "REST","organization": "organization_id","rateType": "NEGOTIATED","carrier": {"id": "carrier_123","code": "dhl","name": "DHL"},"credentials": [{"type": "API_KEY","value": "actual_api_key_value"},{"type": "API_PASSWORD","value": "actual_api_password_value"},{"type": "ACCOUNT_NUMBER","value": "actual_account_number_value"}]}}}}Fejl: Unsupported credential type
Hvis du angiver en credential type, DHL ikke understøtter:
{"data": {"carrierAccountConnect": {"errors": ["Credential type SITE_ID is not supported by carrier DHL"],"carrierAccount": null}}}Fejl: Invalid credentials
Hvis credential-typerne er gyldige, men autentificering mod DHL fejler:
{"data": {"carrierAccountConnect": {"errors": ["Failed to get rating from DHL API"],"carrierAccount": null}}}Efter forbindelse
Når DHL carrier account er forbundet:
Næste skridt
Efter forbindelse af DHL carrier account:
CarrierAccountConnectInput
carrierAccountConnect
Var denne side nyttig?