Skip to main content
HomeBlogGuidesShipping API Testing Checklist: Rates, Labels, Tracking, Voids, and Error Recovery

Shipping API Testing Checklist: Rates, Labels, Tracking, Voids, and Error Recovery

17TRACK

A shipping API test is complete only when the integration handles both the successful workflow and the failures that interrupt it. Test rates against the intended shipment details, verify that purchased labels can be retrieved and reconciled, confirm how tracking updates reach your system, and check what a void request actually changes. Then test timeouts, duplicate requests, rejected inputs, and recovery from partial failures before sending production shipments.

Shipping API Testing Checklist Rates Labels Tracking Voids and Error

This checklist is for developers and operations teams validating a carrier API, a shipping platform, or an integration that combines multiple services. Those services may not offer the same functions: a tracking API, for example, should be tested for tracking behavior, not assumed to create labels or void shipments. Use the provider’s documentation to define the expected result for each operation, then use the checks below to find gaps between that contract and your implementation.

Start with a test plan that reflects the real workflow

Map the sequence your application will perform: collect addresses and parcel details, request rates, select a service, create a shipment or label, store its identifiers, monitor tracking, and void the label if the shipment is canceled. Record which system owns each step. A tracking service may receive a tracking number created elsewhere, while a label-purchasing service may have its own shipment and transaction identifiers. Keeping those identifiers distinct prevents a tracking update from being attached to the wrong order.

Before running the checklist, prepare test cases for a routine domestic shipment, a supported international shipment if applicable, an invalid address, an unsupported service or destination, and a request interrupted after it was submitted. Use test credentials or a documented test environment where available. Do not assume a test environment reproduces production behavior exactly; confirm any differences that matter to your release. For every case, retain the request, response, relevant webhook payload, correlation ID, and the order or shipment record that your application produced. Mask personal data and credentials in logs.

Rates: check eligibility and the quote, not just HTTP success

A successful response is not proof that a rate is usable. Verify that the quote corresponds to the addresses, parcel dimensions, weight, service, and other options your application sent. A rate returned for a different package or service can produce a checkout price that does not match the label your team later purchases.

  • Input validation: Test missing postal codes, invalid country and region combinations, zero or negative weights, unsupported units, and parcels outside the services you intend to offer. Confirm whether rejection occurs in your application or at the API.
  • Service selection: Check that the chosen rate retains the provider’s service identifier and any other data required for label creation. Do not rely on a displayed service name alone.
  • Money and units: Preserve the returned currency, amount, weight unit, and dimension unit. Check rounding in your own calculations, and do not silently treat a quoted amount as a final invoice or guaranteed charge.
  • Unavailable rates: Distinguish a valid response with no eligible service from a malformed request, authentication failure, or temporary provider error. Each needs a different user message and operational response.
  • Changed shipment details: Re-rate when a material input changes. Test what happens if the buyer changes the destination or the fulfillment team changes the parcel after checkout.

Where the provider exposes quote expiration or purchase conditions, test them explicitly. If those details are not documented, avoid assuming a rate remains valid indefinitely; decide how your application will handle a label purchase that returns a different amount or fails after a quote was displayed.

Labels: verify the artifact and the shipment record

Label tests should confirm both that the API accepted the request and that fulfillment can use the resulting artifact. Create a label from a selected service and verify the recipient, sender, package details, service, and any declared values or customs information your workflow requires. Confirm that your system stores the provider’s identifiers and the resulting tracking number in the correct order record.

  • Format and retrieval: Request the label format your printers or warehouse workflow expects, where the API supports format selection. Verify that a returned URL or file can actually be retrieved and that your application handles an expired or unavailable download.
  • Content: Inspect a sample label rather than checking only that a file exists. Confirm that its human-readable details agree with the transaction response.
  • Persistence: Test a database write failure after label creation. The label may exist even if your order record was not updated; a retry must not blindly purchase another one.
  • International fields: If you ship internationally, test the product descriptions, values, origin information, and other fields required by the relevant service. Confirm the provider’s requirements for the routes you actually use.
  • Reprints: Determine whether your application should retrieve an existing label or initiate a new purchase when an operator clicks “print again.” Test that distinction in the interface.

Set a release criterion that a purchased label can be found through your internal order record without depending on a transient browser session. If a request times out after submission, investigate whether the purchase succeeded before repeating it.

Tracking: test delayed, duplicate, and out-of-order information

Tracking is usually asynchronous. A newly created tracking number may not yet have a scan, and a delivered event may reach your application through a different channel than the label response. Test the entire path from tracking-number storage to the status shown to staff or customers, including any polling job or webhook receiver.

  • Identifier matching: Confirm that tracking numbers are associated with the correct carrier, shipment, and order. Test a correction or replacement number without overwriting the history of another shipment.
  • No-event state: Show a clear pending state when a valid tracking number has no carrier events yet. Do not interpret an empty event list as proof that the parcel was lost.
  • Event processing: Feed the consumer duplicate events, events received out of order, and updates with missing optional fields. Check that customer-visible status does not move backward solely because an older event arrived late.
  • Time handling: Preserve the event timestamp and its timezone information where supplied. Distinguish when an event occurred from when your system received it.
  • Delivery claims: If your workflow uses a delivery timestamp, location, or proof-of-delivery detail, verify that the particular service and shipment actually return it. Do not infer proof of delivery from a generic status label.
  • Webhook security: Follow the provider’s documented authentication or signature procedure if webhooks are offered. Test invalid signatures, repeated deliveries, processing failures, and the response your endpoint returns.

For a separate tracking integration such as the 17TRACK Tracking API, keep these checks scoped to tracking. Review the API documentation for the applicable registration, status, and notification behavior before writing fixtures. Label purchasing and label voiding still need tests against whichever system actually performs those operations.

Voids: separate the request from its outcome

“Void,” “cancel,” and “refund” should not be treated as interchangeable states. Your application needs to know whether a void request was accepted, whether the label can still be used, and whether any financial adjustment is pending or complete under the provider’s rules. Test those outcomes using the provider’s documented workflow rather than assuming an accepted API request means an immediate refund.

  • Eligible label: Void a label that your application created but will not use. Verify which transaction identifier the operation requires and record the provider’s response.
  • Repeated action: Submit the same void action again, or simulate an operator double-click. The resulting internal state should remain coherent even if the provider responds differently to the second request.
  • Ineligible label: Test the provider’s response when the label is already voided, has progressed beyond the permitted point, or otherwise cannot be voided. Do not erase the original purchase record.
  • Ambiguous result: Interrupt the connection after the void request is sent. Reconcile the provider-side status before deciding whether to retry or escalate.
  • Operational follow-through: Confirm that a voided label is removed from the pick-and-pack workflow and that a replacement label, if needed, is linked to the same order without losing the history.

Check void eligibility and financial treatment in the specific provider’s terms and documentation. The correct test expectation may vary by service and transaction; a generic “void succeeded” flag is not enough for accounting or support.

Error recovery: make uncertain outcomes visible

The most expensive integration failures are often ambiguous rather than explicit. A validation error can be shown to an operator. A timeout after a purchase request leaves a harder question: did the provider create the label? Build a response policy for each failure class before enabling automatic retries.

  • Invalid requests: Correct the data rather than retrying the same payload. Keep the provider’s field-level error, if supplied, available to the operator without exposing sensitive internals to customers.
  • Authentication and authorization: Alert the integration owner when credentials expire, are revoked, or lack permission. Repeating the request without fixing access will not recover the workflow.
  • Rate limits and temporary failures: Respect documented retry guidance. The HTTP specifications define the Retry-After header, and HTTP 429 identifies a too-many-requests response; do not assume every API implements either behavior the same way. Use bounded retries with backoff and an escalation path.
  • Connection loss after submission: Treat the outcome as unknown, not as a confirmed failure. Look up the transaction using supported identifiers or request a documented status check before resubmitting.
  • Duplicate prevention: If the provider supports idempotency keys or equivalent safeguards, test them according to its documentation. Otherwise, protect the workflow with your own order-level state and reconciliation checks; a local lock alone cannot prove what happened remotely.
  • Webhook failure: Make event handling safe to repeat. Store enough information to investigate an unprocessed notification, and test how missed updates will be recovered if the provider offers a status query.

For each failure, specify who is notified, whether the customer may proceed, and what evidence an operator needs to resolve the case. Avoid displaying a shipment as “label created” or “voided” while the provider-side outcome is still unknown.

Use a release gate instead of a single successful demo

Run repeatable automated tests for request construction, response parsing, state transitions, and duplicate-event handling. Add integration tests against the provider’s test environment where available, then verify a small set of permitted real-world workflows before broader rollout. Keep fixtures versioned so a changed API response does not silently change your application’s interpretation.

A practical release gate requires evidence for five questions: Can the application select an eligible rate? Can it create and retrieve the intended label without accidental duplicate purchases? Can it display tracking without treating missing or late events as final? Can it record the real outcome of a void request? Can staff recover an order after a timeout or partial database failure? If any answer is unknown, document the gap and assign an owner before increasing shipment volume.

FAQ

Can I test shipping APIs without purchasing real labels?

Many providers document test credentials, test endpoints, or other validation methods, but their capabilities differ. Use the method your provider specifies and check whether it exercises the same label, tracking, and void behavior you depend on. Do not assume a simulated success proves that a production purchase or carrier scan will behave identically.

Should I retry a label request after a timeout?

Not until you have addressed the possibility that the first request succeeded. Check for an existing transaction using the provider’s supported lookup method and your stored request identifiers. If the result remains uncertain, route the order for investigation rather than automatically purchasing another label.

Why is tracking empty after a label is created?

Label creation and carrier tracking are separate events. A tracking number may exist before the carrier has reported an initial scan or before a tracking service has received an update. Test a pending state and confirm the provider’s documented update process instead of treating an empty history as a delivery exception.

Does a successful void response mean the shipping charge has been refunded?

Not necessarily. A void request, its acceptance, label validity, and any credit or refund may have different statuses. Use the specific provider’s documented terms and transaction records to decide what your application can safely show.

Sources