Create API keys and OAuth tokens
Last reviewed on by DeltaVelocity team
Overview
Brand admins can create self-serve API keys (brand_api_user) to integrate custom storefronts, ERPs or warehouses with https://api-prod.deltavelocity.in/v1.
See Shipping API and MCP and the API integration overview for available endpoints.
Create a brand API key
- Sign in to the DeltaVelocity dashboard as a brand admin.
- Open Settings, then Developer, then API Keys.
- Select Create API Key and enter a clear name for the integration.
- Select only the scopes this integration needs, such as
orders:readortracking:read. - Copy the
client_idandclient_secretimmediately.
DeltaVelocity shows client_secret once at creation. Afterward, the dashboard displays only the last four characters as a hint.
Exchange keys for an OAuth access token
Call the token endpoint before sending REST requests:
POST https://api-prod.deltavelocity.in/v1/oauth/token
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials&client_id=<your_client_id>&client_secret=<your_client_secret>
You can also send the same fields as JSON. Omit resource for REST calls.
Pass the returned bearer token on every /v1 request in the Authorization: Bearer <access_token> header. Request a new token before expires_in seconds elapse.
Retry writes safely with Message-Id
Network timeouts can leave you unsure whether a booking or cancellation ran. Add a unique Message-Id header (1 to 255 printable ASCII characters) on every POST write request.
- DeltaVelocity stores completed responses per brand for 24 hours.
- Retrying the exact same request with the same
Message-Idreturns the saved answer withMessage-Id-Replayed: true. - Reusing a
Message-Idwith a different path or body returns HTTP422. - Endpoints that return secrets send
Cache-Control: no-store, so DeltaVelocity never caches those responses.
Update, rotate or revoke keys
- Update scopes: Edit a key's scopes anytime. Changes apply on the key's next request.
- Rotate secrets: Rotating generates a new secret while keeping the previous secret valid during a grace window so your servers switch without downtime.
- Revoke a key: Revoking deactivates the key immediately and invalidates active tokens.
Next, read set up webhooks and rotate secrets to receive live shipment events.
Related
Read the full reference in the DeltaVelocity docs
Ship with DeltaVelocity
Connect your store, compare couriers and track COD remittance from one dashboard.