Skip to main content

Partner integration

API and XML integration

Rocket exposes the same partner operations as JSON or as a typed Rocket XML representation over HTTPS.

Rocket Partner API v1 · contract release 1.4.0

Use the existing REST paths and OAuth scopes. JSON remains the default. Send Accept: application/xml or Accept: text/xml for XML business responses; send Content-Type: application/xml with the Rocket envelope on operations that accept a request body. The XML namespace is urn:rocket:partner-api:v1.

1. Transport and contract

Partner API transport
Base URLhttps://rocketcarrentalsvietnam.com/api/partner/v1
TransportHTTPS only, TLS 1.2 minimum
Business media typesapplication/json, application/xml or text/xml
AuthenticationOAuth 2.0 client credentials; send a bearer token on each business call
Token endpointPOST /oauth/token takes application/x-www-form-urlencoded and always returns JSON
XML namespaceurn:rocket:partner-api:v1
Contract filesOpenAPI 3.1.2

JSON is selected when Accept is absent. If both are acceptable, the higher q value wins and ties choose JSON. XML responses use the selected type (application/xml or text/xml) with UTF-8. An unsupported Accept returns 406 NOT_ACCEPTABLE with a JSON error. OAuth, scopes, validation, rate limits and business rules are shared by both representations. XML does not grant additional access. The token endpoint is the exception: its request and OAuth success/error responses remain form-encoded and JSON.

2. Rocket XML mapping

Each XML business request starts with request; each XML business response starts with response. The root has version="1" and one direct object child. Every element belongs to the Rocket namespace. The prefix is optional; a default namespace is also valid.

XML elements and JSON values
objectAn object containing one property element for each key
property name="key"Maps the name attribute to the JSON property name; names must be unique in the object; its one typed child is the value
arrayAn array containing zero or more item elements
itemOne typed JSON value, including nested objects and arrays
stringText value; escape XML special characters
numberFinite JSON number; integer, decimal or exponent notation
booleanExactly true or false
null<null/> or whitespace-only null

A missing property is different from a property set to null. Duplicate property names and the names __proto__, prototype and constructor are rejected. Only predefined and numeric character references are accepted. A standard XML 1.0 declaration with optional UTF-8 encoding is accepted at the document start. Document types, comments, CDATA, other processing instructions and custom entities are rejected. Bodies must be valid UTF-8, at most 32,000 bytes, no deeper than 32 levels and no larger than 4,096 XML nodes/items. The XSD checks recursive XML shape, while each endpoint's existing request schema checks allowed and required fields.

Rocket converts XML to the same JSON-shaped value used by the JSON API and applies the same Zod validation and business service. The response uses the same field names and values, encoded with the same typed elements. The parser rejects invalid UTF-8, malformed XML, forbidden XML constructs and excessive nesting or node counts with 400 MALFORMED_XML; request bodies over 32,000 bytes receive 413.

3. Authenticate and call availability

Exchange credentials once and reuse the token for 600 seconds. HTTP Basic is preferred; form-body client authentication is also accepted.

curl --user "$ROCKET_CLIENT_ID:$ROCKET_CLIENT_SECRET" \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data 'grant_type=client_credentials&scope=availability:read' \
  https://rocketcarrentalsvietnam.com/api/partner/v1/oauth/token

Save the JSON access_token and send it as a bearer token.

Example request body for POST /availability (scope availability:read):

<rocket:request xmlns:rocket="urn:rocket:partner-api:v1" version="1">
  <rocket:object>
    <rocket:property name="pickupLocation"><rocket:string>HCM-APT</rocket:string></rocket:property>
    <rocket:property name="dropoffLocation"><rocket:string>HCM-CITY</rocket:string></rocket:property>
    <rocket:property name="pickupDate"><rocket:string>2026-10-20</rocket:string></rocket:property>
    <rocket:property name="pickupTime"><rocket:string>10:00</rocket:string></rocket:property>
    <rocket:property name="dropoffDate"><rocket:string>2026-10-23</rocket:string></rocket:property>
    <rocket:property name="dropoffTime"><rocket:string>10:00</rocket:string></rocket:property>
  </rocket:object>
</rocket:request>

Send it in availability.xml:

curl --include --request POST \
  --header "Authorization: Bearer $ROCKET_ACCESS_TOKEN" \
  --header 'Content-Type: application/xml' \
  --header 'Accept: application/xml' \
  --data-binary @availability.xml \
  https://rocketcarrentalsvietnam.com/api/partner/v1/availability

The result is wrapped in response and uses the same typed mapping. Business errors use that envelope too, with the same error fields and HTTP status as JSON. Log X-Request-Id and quote it when contacting support.

4. Operations and scopes

XML is available on the existing business paths:

Partner API capabilities and OAuth scopes
CapabilityOperationsScope
Vehicle catalogueGET /fleet · GET /fleet/{vehicleCode}fleet:read
Location catalogueGET /locations · GET /locations/{locationCode}locations:read
Rate and account codesGET /ratesrates:read
ShoppingPOST /availabilityavailability:read
PricingPOST /quotesquotes:write
Reservation creationPOST /reservationsreservations:write
Reservation retrievalGET /reservations · GET /reservations/{reservationId}reservations:read
Reservation cancellationPOST /reservations/{reservationId}/cancelreservations:cancel

Available scopes: fleet:read · locations:read · rates:read · availability:read · quotes:write · reservations:read · reservations:write · reservations:cancel.

Reservation changes remain limited

PATCH /reservations/{reservationId} returns 501 MODIFICATION_NOT_SUPPORTED. Reservation creation requires an Idempotency-Key between 8 and 200 characters; reuse the same key and body after a timeout. Reads return current state through polling, at-least-once. Process repeated observations idempotently. Webhooks and a transition history are not available.

5. Product and commercial limits

  • Availability is model-level; there is no unit inventory or decrementing allotment, and no physical vehicle is guaranteed at reservation time.
  • Cancellation changes booking state; it does not calculate or promise a refund. A booking with money taken may require Rocket staff.
  • There is no isolated sandbox. Initial integration credentials can read live catalogue and pricing data but have no reservation scope.
  • Executed data-protection terms are required before live traveller bookings.
  • Rocket XML is proprietary. It is not SOAP, has no WSDL, and does not imply OpenTravel/OTA compatibility or membership/certification.

These limits apply to JSON and XML alike. They do not add pricing, settlement, support or service-level terms; those are settled in the distribution agreement.