Skip to main content

Integration reference

API reference

Every operation the Rocket Partner API exposes, and the complete error-code table behind {error:{code,message,requestId,retryable}}.

Authentication

POST/api/partner/v1/oauth/token
Exchange client_id/client_secret for a bearer token. Form-encoded, unscoped.

Reference data

GET/api/partner/v1/fleetscope: fleet:read
All published vehicles with a complete partner specification.
GET/api/partner/v1/fleet/{vehicleCode}scope: fleet:read
A single vehicle by Rocket code.
GET/api/partner/v1/locationsscope: locations:read
The eight active locations.
GET/api/partner/v1/locations/{locationCode}scope: locations:read
A single location by Rocket code.
GET/api/partner/v1/ratesscope: rates:read
Your own account and rate codes.

Shop & quote

POST/api/partner/v1/availabilityscope: availability:read
Search for offerable vehicle classes at a location and date range.
POST/api/partner/v1/quotesscope: quotes:write
Price a specific vehicle class for booking.

Reservations

POST/api/partner/v1/reservationsscope: reservations:write
Create a reservation. Requires Idempotency-Key.
GET/api/partner/v1/reservationsscope: reservations:read
List your own reservations.
GET/api/partner/v1/reservations/{reservationId}scope: reservations:read
A single reservation.
PATCH/api/partner/v1/reservations/{reservationId}scope: reservations:write
Deliberately answers 501 MODIFICATION_NOT_SUPPORTED. Cancel and re-book.
POST/api/partner/v1/reservations/{reservationId}/cancelscope: reservations:cancel
Cancel a reservation. If money has already been taken, returns 409 CANCELLATION_NEEDS_STAFF instead of cancelling — a human applies the refund policy.
Reservations cannot be modified in v1. Changing dates or vehicle means re-pricing, re-checking rate-plan validity, and deciding who absorbs a price difference — a commercial question with no agreed answer yet. Rocket would rather return an honest 501 than an endpoint whose behaviour on a price change nobody has decided.

Idempotency

Reservation creation requires an Idempotency-Key header, 8–200 characters, unique per attempt. An identical retry (same key, same body) replays the original response with Idempotent-Replay: true — no second booking is created. The same key with a different body returns 409 IDEMPOTENCY_CONFLICT; nothing is created. A key reused after 24 hours is treated as fresh.

Reuse the same key for every retry of the same booking, including after a timeout. A timeout is not evidence that the booking failed; retrying with the same key is how you find out safely. The Idempotency-Key is the only thing protecting you from double-booking — a quote is not single-use, so presenting the same quoteId under a new key creates a second real reservation rather than a replay. Send a partnerReference as a second belt: one reference is one rental, permanently.

Rate limits

Limits are per API client, not per IP. A 429 carries Retry-After in whole seconds — honour it. Every response from a rate-limited endpoint carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, on success as well as on a 429. X-RateLimit-Reset is an ISO-8601 timestamp, not epoch seconds.

POST /oauth/token is the exception: it is limited on two separate buckets (per client and per source IP), so it reports neither as X-RateLimit-*. Back off on its Retry-After. Request one token per ~10 minutes and you will never see it.

Error codes

Switch on code, never on message. retryable is true only when retrying the identical request may succeed.

CodeHTTPRetryableMeaning
UNAUTHORIZED401NoAuthentication required.
INVALID_CLIENT401NoClient authentication failed.
INVALID_TOKEN401NoThe access token is missing, malformed, or expired.
INSUFFICIENT_SCOPE403NoThe access token does not carry the scope this operation requires.
PARTNER_DISABLED403NoThis partner account is not active.
VALIDATION_ERROR400NoThe request body failed validation.
MALFORMED_JSON400NoThe request body is not valid JSON.
MALFORMED_XML400NoThe request body is not valid Rocket Partner XML.
NOT_ACCEPTABLE406NoAccept must allow application/json, application/xml, or text/xml.
REQUEST_TOO_LARGE413NoThe request body exceeds the maximum size.
UNSUPPORTED_MEDIA_TYPE415NoContent-Type must be application/json, application/xml, or text/xml.
INVALID_ACCOUNT_CODE400NoThe account code is unknown or not enabled for this partner.
INVALID_RATE_CODE400NoThe rate code is unknown, not enabled, or outside its validity window.
RATE_NOT_APPROVED409NoThis rate plan is awaiting Rocket commercial approval and cannot be sold yet.
INVALID_LOCATION400NoThe location code is unknown or not active.
LOCATION_NOT_ONE_WAY400NoOne-way rental is not available between these locations.
INVALID_RENTAL_WINDOW400NoPickup and dropoff must be valid Vietnam local times, with dropoff after pickup.
INVALID_VEHICLE400NoThe vehicle code is unknown or not published to partners.
FLEET_PROFILE_INCOMPLETE409NoThis vehicle has no complete partner specification yet and cannot be sold through the API.
NOT_FOUND404NoThe requested resource does not exist.
NO_AVAILABILITY409NoNo vehicle class is offerable for the requested criteria.
QUOTE_EXPIRED409NoThe quote has expired. Request a new quote.
QUOTE_INVALID400NoThe quote reference is not valid for this partner or has been tampered with.
QUOTE_STALE409NoThe price has changed since the quote was issued. Request a new quote.
IDEMPOTENCY_KEY_REQUIRED400NoThis operation requires an Idempotency-Key header.
IDEMPOTENCY_CONFLICT409NoThis Idempotency-Key was already used with a different request body.
IDEMPOTENT_REPLAY_IN_FLIGHT409YesAn identical request is still being processed. Retry shortly.
DUPLICATE_PARTNER_REFERENCE409NoA reservation already exists for this partner reference.
RESERVATION_REJECTED422NoRocket declined the reservation. Quote the requestId to support for the reason.
INVALID_STATE_TRANSITION409NoThe reservation is not in a state that allows this operation.
CANCELLATION_NEEDS_STAFF409NoA rental payment or security deposit is associated with this reservation, so Rocket staff must review the cancellation. The request has been recorded and Rocket has been alerted.
MODIFICATION_NOT_SUPPORTED501NoReservation modification is not supported in v1. Cancel and re-book.
RATE_LIMITED429YesRate limit exceeded.
API_DISABLED503YesThe partner API is not enabled on this environment.
DEPENDENCY_UNAVAILABLE503YesA downstream dependency is temporarily unavailable.
INTERNAL_ERROR500YesUnexpected error. Quote the requestId when reporting it.