All URIs are relative to https://open-api.divar.ir
| Method | HTTP request | Description |
|---|---|---|
| assetsGetBodyStatuses | GET /v1/open-platform/assets/body-status | لیست گزینههای وضعیت بدنه |
| assetsGetBrandModels | GET /v1/open-platform/assets/brand-model/{category} | لیست مدل برندها بر اساس دستهبندی |
| assetsGetCategories | GET /v1/open-platform/assets/category | لیست همه دستهبندیها |
| assetsGetCities | GET /v1/open-platform/assets/city | لیست همه شهرها |
| assetsGetColors | GET /v1/open-platform/assets/color/{category} | لیست رنگها بر اساس دستهبندی |
| assetsGetDistricts | GET /v1/open-platform/assets/district | لیست محلهها |
| assetsGetDistricts2 | GET /v1/open-platform/assets/district/{city_slug} | لیست محلهها |
| assetsGetInternalStorages | GET /v1/open-platform/assets/internal-storage | لیست گزینههای حافظه داخلی |
| assetsGetOAuthScopes | GET /v1/open-platform/assets/oauth-scope | لیست دامنههای OAuth |
| assetsGetPermissions | GET /v1/open-platform/assets/permission | لیست مجوزهای کنار دیوار |
| assetsGetRamMemories | GET /v1/open-platform/assets/ram-memory | لیست گزینههای حافظه RAM |
| assetsGetServiceTypes | GET /v1/open-platform/assets/service-type | لیست انواع سرویس |
| assetsGetSubmitSchema | GET /v1/open-platform/assets/submit-schema/{category_slug} | دریافت schema ثبت آگهی |
AssetsGetBodyStatusesResponse assetsGetBodyStatuses()
لیست گزینههای وضعیت بدنه
این API امکان دریافت گزینههای وضعیت بدنه موجود برای دستهبندیهای خودرو را فراهم میکند.
import KenarApiClient from 'kenar-api-client';
let defaultClient = KenarApiClient.ApiClient.instance;
// Configure API key authorization: APIKey
let APIKey = defaultClient.authentications['APIKey'];
APIKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKey.apiKeyPrefix = 'Token';
let apiInstance = new KenarApiClient.AssetsApi();
apiInstance.assetsGetBodyStatuses().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
AssetsGetBrandModelsResponse assetsGetBrandModels(category)
لیست مدل برندها بر اساس دستهبندی
این API امکان دریافت مدل برندها برای یک دستهبندی خاص را فراهم میکند. دستهبندیهای پشتیبانی شده: `light` (خودرو) و `mobile-phones`. نکات مهم: - مدل برندها با نامهای فارسی برگردانده میشوند - دستهبندی باید یکی از دستهبندیهای پشتیبانی شده باشد، در غیر این صورت خطا برمیگردد
import KenarApiClient from 'kenar-api-client';
let defaultClient = KenarApiClient.ApiClient.instance;
// Configure API key authorization: APIKey
let APIKey = defaultClient.authentications['APIKey'];
APIKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKey.apiKeyPrefix = 'Token';
let apiInstance = new KenarApiClient.AssetsApi();
let category = "category_example"; // String |
apiInstance.assetsGetBrandModels(category).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| category | String |
- Content-Type: Not defined
- Accept: application/json
AssetsGetCategoriesResponse assetsGetCategories()
لیست همه دستهبندیها
این API امکان دریافت همه دستهبندیهای دیوار را فراهم میکند. شناسه دستهبندیها و نامهای فارسی آنها برای استفاده در ثبت و جستجوی آگهی برمیگردد.
import KenarApiClient from 'kenar-api-client';
let defaultClient = KenarApiClient.ApiClient.instance;
// Configure API key authorization: APIKey
let APIKey = defaultClient.authentications['APIKey'];
APIKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKey.apiKeyPrefix = 'Token';
let apiInstance = new KenarApiClient.AssetsApi();
apiInstance.assetsGetCategories().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
AssetsGetCitiesResponse assetsGetCities()
لیست همه شهرها
این API امکان دریافت همه شهرهای دیوار را فراهم میکند. شناسه شهرها و نامهای فارسی آنها برای استفاده در ثبت و جستجوی آگهی برمیگردد.
import KenarApiClient from 'kenar-api-client';
let defaultClient = KenarApiClient.ApiClient.instance;
// Configure API key authorization: APIKey
let APIKey = defaultClient.authentications['APIKey'];
APIKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKey.apiKeyPrefix = 'Token';
let apiInstance = new KenarApiClient.AssetsApi();
apiInstance.assetsGetCities().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
AssetsGetColorsResponse assetsGetColors(category)
لیست رنگها بر اساس دستهبندی
این API امکان دریافت رنگهای موجود برای یک دستهبندی خاص را فراهم میکند. دستهبندیهای پشتیبانی شده: `light` (خودرو) و `mobile-phones`. نکات مهم: - رنگها با نامهای فارسی برگردانده میشوند - دستهبندی باید یکی از دستهبندیهای پشتیبانی شده باشد، در غیر این صورت خطا برمیگردد
import KenarApiClient from 'kenar-api-client';
let defaultClient = KenarApiClient.ApiClient.instance;
// Configure API key authorization: APIKey
let APIKey = defaultClient.authentications['APIKey'];
APIKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKey.apiKeyPrefix = 'Token';
let apiInstance = new KenarApiClient.AssetsApi();
let category = "category_example"; // String |
apiInstance.assetsGetColors(category).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| category | String |
- Content-Type: Not defined
- Accept: application/json
AssetsGetDistrictsResponse assetsGetDistricts(opts)
لیست محلهها
این API امکان دریافت محلههای دیوار را فراهم میکند. میتوان بدون پارامتر برای دریافت همه محلهها یا با city_slug برای دریافت محلههای یک شهر خاص فراخوانی کرد.
import KenarApiClient from 'kenar-api-client';
let defaultClient = KenarApiClient.ApiClient.instance;
// Configure API key authorization: APIKey
let APIKey = defaultClient.authentications['APIKey'];
APIKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKey.apiKeyPrefix = 'Token';
let apiInstance = new KenarApiClient.AssetsApi();
let opts = {
'citySlug': "citySlug_example" // String |
};
apiInstance.assetsGetDistricts(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| citySlug | String | [optional] |
- Content-Type: Not defined
- Accept: application/json
AssetsGetDistrictsResponse assetsGetDistricts2(citySlug)
لیست محلهها
این API امکان دریافت محلههای دیوار را فراهم میکند. میتوان بدون پارامتر برای دریافت همه محلهها یا با city_slug برای دریافت محلههای یک شهر خاص فراخوانی کرد.
import KenarApiClient from 'kenar-api-client';
let defaultClient = KenarApiClient.ApiClient.instance;
// Configure API key authorization: APIKey
let APIKey = defaultClient.authentications['APIKey'];
APIKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKey.apiKeyPrefix = 'Token';
let apiInstance = new KenarApiClient.AssetsApi();
let citySlug = "citySlug_example"; // String |
apiInstance.assetsGetDistricts2(citySlug).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| citySlug | String |
- Content-Type: Not defined
- Accept: application/json
AssetsGetInternalStoragesResponse assetsGetInternalStorages()
لیست گزینههای حافظه داخلی
این API امکان دریافت گزینههای حافظه داخلی موجود برای دستهبندیهای موبایل، تبلت و لپتاپ را فراهم میکند.
import KenarApiClient from 'kenar-api-client';
let defaultClient = KenarApiClient.ApiClient.instance;
// Configure API key authorization: APIKey
let APIKey = defaultClient.authentications['APIKey'];
APIKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKey.apiKeyPrefix = 'Token';
let apiInstance = new KenarApiClient.AssetsApi();
apiInstance.assetsGetInternalStorages().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});This endpoint does not need any parameter.
AssetsGetInternalStoragesResponse
- Content-Type: Not defined
- Accept: application/json
AssetsGetOAuthScopesResponse assetsGetOAuthScopes()
لیست دامنههای OAuth
این API لیست OAuth اسکوپهای موجود برای کنار دیوار را برمیگرداند. از این اسکوپها در جریان OAuth برای درخواست دسترسی به دادههای کاربر استفاده کنید. نکات مهم: - هر اسکوپ شامل وضعیت چرخه حیات است (آزمایشی، فعال، در حال منسوخ شدن، منسوخ شده) - برخی اسکوپها نیاز به resource id دارند (مثلاً توکن آگهی، شناسه مکالمه)
import KenarApiClient from 'kenar-api-client';
let defaultClient = KenarApiClient.ApiClient.instance;
// Configure API key authorization: APIKey
let APIKey = defaultClient.authentications['APIKey'];
APIKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKey.apiKeyPrefix = 'Token';
let apiInstance = new KenarApiClient.AssetsApi();
apiInstance.assetsGetOAuthScopes().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
AssetsGetPermissionsResponse assetsGetPermissions()
لیست مجوزهای کنار دیوار
این API امکان دریافت مجوزهای موجود کنار دیوار را فراهم میکند. این مجوزها برای کنترل دسترسی در اپلیکیشنهای کنار دیوار استفاده میشوند و با دامنههای OAuth متفاوت هستند. نکات مهم: - مجوزها برای استفاده داخلی هستند و اپلیکیشنها نباید مستقیماً به آنها وابسته باشند - هر مجوز شامل وضعیت چرخه حیات آن است (آزمایشی، فعال، در حال منسوخ شدن، منسوخ شده)
import KenarApiClient from 'kenar-api-client';
let defaultClient = KenarApiClient.ApiClient.instance;
// Configure API key authorization: APIKey
let APIKey = defaultClient.authentications['APIKey'];
APIKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKey.apiKeyPrefix = 'Token';
let apiInstance = new KenarApiClient.AssetsApi();
apiInstance.assetsGetPermissions().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
AssetsGetRamMemoriesResponse assetsGetRamMemories()
لیست گزینههای حافظه RAM
این API امکان دریافت گزینههای حافظه RAM موجود برای دستهبندیهای موبایل، تبلت و لپتاپ را فراهم میکند.
import KenarApiClient from 'kenar-api-client';
let defaultClient = KenarApiClient.ApiClient.instance;
// Configure API key authorization: APIKey
let APIKey = defaultClient.authentications['APIKey'];
APIKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKey.apiKeyPrefix = 'Token';
let apiInstance = new KenarApiClient.AssetsApi();
apiInstance.assetsGetRamMemories().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
AssetsGetServiceTypesResponse assetsGetServiceTypes()
لیست انواع سرویس
این API امکان دریافت انواع سرویس موجود در کنار دیوار را فراهم میکند. انواع سرویس برای گروهبندی سرویسهای مشابه استفاده میشوند. نکات مهم: - میتوان انواع سرویس جدید را در صورت نیاز درخواست داد
import KenarApiClient from 'kenar-api-client';
let defaultClient = KenarApiClient.ApiClient.instance;
// Configure API key authorization: APIKey
let APIKey = defaultClient.authentications['APIKey'];
APIKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKey.apiKeyPrefix = 'Token';
let apiInstance = new KenarApiClient.AssetsApi();
apiInstance.assetsGetServiceTypes().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
AssetsGetSubmitSchemaResponse assetsGetSubmitSchema(categorySlug)
دریافت schema ثبت آگهی
این API به شما امکان دریافت قالب ثبت آگهی برای یک دستهبندی مشخص را میدهد. پاسخ در قالب JSON Schema است. قالب تعریف کننده ساختار و قوانین برای فیلدهای فرم زمانی که آگهی در یک دستهبندی مشخص ثبت میشود. هر فیلد در قالب میتواند یکی از انواع زیر را داشته باشد: انواع اصلی: - `string`: فیلدهای ورودی متنی (مانند عنوان، توضیحات، مقادیر زمانی) - `integer`: فیلدهای ورودی عددی برای اعداد صحیح (مانند قیمت، تعداد، اندازه) - `float`: فیلدهای ورودی عددی برای اعداد اعشاری - `boolean`: فیلدهای ورودی بولین (صحیح/غلط) - `array`: فیلدهای ورودی چندگانه که امکان انتخاب چند مقدار را دارند فیلدهای Enum: فیلدها با گزینههای پیشتعریف شده از `enum` و `enumNames` استفاده میکنند: - `enum`: آرایه از مقادیر داخلی استفاده شده برای ارتباط API - `enumNames`: آرایه از برچسبهای نمایشی نشان داده شده به کاربر (معمولاً به زبان فارسی) - اینها برای فیلدهای ورودی چندگانه (مانند انتخاب طبقه، امکان استفاده از پارکینگ) استفاده میشوند فیلدهای آرایه با Enum: فیلدهای ورودی چندگانه ترکیب `type: "array"` با کلید Enum را دارند: - `items.enum`: گزینههای موجود برای انتخاب - `items.enumNames`: برچسبهای نمایشی برای هر گزینه - کاربران میتوانند چند مقدار را انتخاب کنند (مانند امکانات رفاهی، سیستمهای گرمایش) ویژگیهای فیلد: - `title`: نام نمایشی فارسی برای فیلد - `required`: آرایه از نام فیلدهای اجباری که باید ارائه شوند - `type`: نوع داده فیلد مثال استفاده: ```json { "properties": { "size": { "title": "متراژ (متر مربع)", "type": "integer" }, "elevator": { "enum": ["دارد", "ندارد"], "enumNames": ["دارد", "ندارد"], "title": "آسانسور", "type": "string" }, "comfort_amenities": { "items": { "enum": ["اینترنت_پرسرعت", "تلویزیون"], "enumNames": ["اینترنت پرسرعت", "تلویزیون"], "type": "string" }, "title": "امکانات رفاهی", "type": "array" } } } ```
import KenarApiClient from 'kenar-api-client';
let defaultClient = KenarApiClient.ApiClient.instance;
// Configure API key authorization: APIKey
let APIKey = defaultClient.authentications['APIKey'];
APIKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKey.apiKeyPrefix = 'Token';
let apiInstance = new KenarApiClient.AssetsApi();
let categorySlug = "categorySlug_example"; // String |
apiInstance.assetsGetSubmitSchema(categorySlug).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| categorySlug | String |
- Content-Type: Not defined
- Accept: application/json