Skip to content
Last updated

Getting Started with Yolcu360 Agency API

Overview

Yolcu360 Agency API is a RESTful API that allows our business partners to easily integrate with our car rental services. With this API, you can:

  • Search for locations
  • Query available vehicles
  • Create reservations
  • Process payments
  • Manage orders

Quick Start

1. Obtaining an API Key

To use the API, you first need to obtain an API key and secret. To do this, log in to the agency portal at pro.yolcu360.com and create a new key from the API Keys section.

2. Authentication

You need to obtain a JWT token using your API key:

curl -X POST https://staging.api.pro.yolcu360.com/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "key": "YOUR_API_KEY",
    "secret": "YOUR_API_SECRET"
  }'

Successful response:

{
  "accessToken": "eyJhbGciOiJIUzI1NiIs...",
  "refreshToken": "dGhpc2lzYXJlZnJlc2h0b2tlbg...",
  "accessTokenExpireAt": "2024-12-26T10:30:00Z",
  "refreshTokenExpireAt": "2024-12-27T10:00:00Z"
}

3. API Calls

Use the accessToken you received in the Authorization header for all API calls:

curl -X GET https://staging.api.pro.yolcu360.com/api/v1/locations?query=istanbul \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Environments

Our API serves in two different environments:

EnvironmentBase URLPurpose
Staginghttps://staging.api.pro.yolcu360.com/api/v1/Testing and development
Productionhttps://api.pro.yolcu360.com/api/v1/Live operations

⚠️ Important: Reservations made in the staging environment are not real. Payments in the staging environment are only supported for the "Yolcutest" vendor. If a payment is blocked due to this rule, API responds with code 6008.

Error Handling

The API uses standard HTTP status codes:

  • 200 OK - Request successful
  • 201 Created - Resource created
  • 400 Bad Request - Invalid request
  • 401 Unauthorized - Authentication error
  • 403 Forbidden - Authorization error
  • 404 Not Found - Resource not found
  • 429 Too Many Requests - Rate limit exceeded
  • 500 Internal Server Error - Server error

Error responses are in the following format:

{
  "code": 1001,
  "description": "Invalid request parameters",
  "details": {
    "field": "checkInDateTime",
    "message": "Must be a future date"
  }
}

Flow Diagram

API Key & Secret

Search Query

Search Results

Yes

No

Positive

Negative

Order Created

Credit Card

Credit Limit

Start

Authentication

Get JWT Token

Location Search

Get Location Details

Search Available Cars

Findeks Required?

Findeks Check

Get Extra Products

Process Terminated

Create Order

Process Payment

3D Secure Flow

Direct Payment

Payment Complete

End

API Key & Secret

Search Query

Search Results

Yes

No

Positive

Negative

Order Created

Credit Card

Credit Limit

Start

Authentication

Get JWT Token

Location Search

Get Location Details

Search Available Cars

Findeks Required?

Findeks Check

Get Extra Products

Process Terminated

Create Order

Process Payment

3D Secure Flow

Direct Payment

Payment Complete

End

Support

For technical support: