# ParcelXpert sandbox integration acceptance

Sandbox base URL: https://sandbox-api.parcelxpert.com/v1
Portal: https://developer.parcelxpert.com
Guide: https://developer.parcelxpert.com/docs/quickstart#client-handoff
Contract: https://developer.parcelxpert.com/openapi.yaml

Use one organisation per company, an application per integration, and individually attributable TEST credentials. Never share credentials between Megway and Urbnhaus. Existing PX customer access does not automatically confer developer access. A verified owner creates the organisation/application; trusted PX staff approves test access. No live access is implied.

- [ ] Verify the company owner email and exact organisation/application IDs with PX.
- [ ] Generate a scoped px_test_ bearer once; store in the company's backend secret manager. Do not email it, export it with Postman or put it in browser code.
- [ ] Request domestic, international and multi-parcel quotes; reject invalid postcodes/parcels and unavailable routes.
- [ ] Persist body + Idempotency-Key BEFORE POST /shipments. Repeated/concurrent requests must retain the same shipment. Changed payload + same key must return 409 idempotency_conflict.
- [ ] Exercise temporary_failure and uncertain_outcome. Retry the ORIGINAL body/key; never start a replacement purchase on a timeout. Retain X-Request-ID and PX reference for support.
- [ ] Retrieve/list/filter shipments and follow cursor pagination without changing its filters.
- [ ] Download A4 and thermal PDFs, prominently TEST / VOID, never valid postage.
- [ ] Exercise delivery/exception and cancellation eligibility using sandbox-only controls.
- [ ] Prove another company's credential cannot retrieve your shipment, label, tracking or webhook history. Arrange the test with PX; never guess customer IDs.
- [ ] Verify insufficient scopes, revoked-key rejection and explicit key rotation. Preserve recovery journals across retries; do not delete financial/booking evidence.
- [ ] Respect 429 and Retry-After. Stop at the first 429 and wait; never evade limits with another key.
- [ ] Register only a controlled HTTPS test webhook receiver. Save its one-time signing secret privately; verify raw-body HMAC, reject stale/bad signatures, deduplicate event IDs and exercise retry/history/replay. Do not send unsolicited events to customer endpoints.
- [ ] Record date, application, environment, runtime if provided, request IDs, PX references and actual pass/fail/not-run results. Exclude secrets, customer PII and raw provider diagnostics.

Imported orders are unavailable (422 operation_not_enabled). Sandbox carrier prices, times, labels and events are synthetic. Gated production extensions Address.state/tax_id/eori/is_business, ShipmentRequest.service_options and Quote.requirements are not accepted/returned by the current sandbox. Omit them from sandbox requests; they are marked x-sandbox-availability=unavailable in OpenAPI. The core request examples use the supported shared fields. No payment, wallet, live label, live collection or production webhook occurs. No self-service reset or automatic retention deadline is promised. Contact PX before resetting test data; keep idempotency evidence.

Postman: import parcelxpert-sandbox.postman_collection.json plus the empty environment. Run only folders 01 then 02 for the core journey. Optional cancellation, collection, webhook rotation/replay and lifecycle requests need their documented prerequisites; inspect each before sending. For a NEW booking, intentionally archive the old request/result and clear the prior quote/shipment/merchant-reference/idempotency variables. For RECOVERY, retain them exactly. Never export the populated environment.

Standalone Node 22 verifier: set PX_API_KEY privately, download verify-sandbox.mjs, then run node verify-sandbox.mjs in a private test directory. Preserve px-sandbox-verification.json and VOID PDFs. It does not certify onboarding, another tenant, key revocation, webhook delivery or rate-limit exhaustion by itself.

Moving to live is a separately approved phase: authorised PX shipping-account binding, billing consent/permissions, carrier/service certification and explicit activation are required. Preserve the core REST paths and DTOs, configure the separately issued live key/base URL in the merchant backend, remove sandbox scenario controls, and verify real service requirements. This sandbox collection/verifier intentionally refuses the live host. Website/API shipments and billing belong to the same PX shipping account; there is no developer wallet.
