پرش به مطلب اصلی

PostEditPostV2Body

category_dataobject

فیلدهای ویژه هر دسته‌بندی که باید مطابق قالب مشخص شده تکمیل شوند. قالب را از اینجا ببینید: https://kenar.divar.dev/openapi-doc/assets-get-submit-schema/

general_data object
category_slugstringrequired

نام دسته‌بندی هدف. دسته‌بندی‌های موجود را در این آدرس بیابید: https://kenar.divar.dev/openapi-doc/assets-get-categories/

Example: apartment-sell
chat_enabledbooleanrequired

امکان چت فعال باشد

Example: true
citystringrequired

شهر آگهی

Example: tehran
descriptionstringrequired

توضیحات آگهی

Example: I'm available only in chat.
districtstring

محله آگهی

Example: abshar
hide_phonebooleanrequired

عدم نمایش شماره تماس به کاربران

Example: true
imagesstring[]required
latitudenumber<double>

عرض جغرافیایی آگهی

Example: 35.7152
location_typepostLocationType (string)required

نوع موقعیت

Possible values: [LOCATION_TYPE_EMPTY, LOCATION_TYPE_EXACT, LOCATION_TYPE_APPROXIMATE]

Example: LOCATION_TYPE_EXACT
longitudenumber<double>

طول جغرافیایی آگهی

Example: 51.4043
titlestringrequired

عنوان آگهی

Example: Temporary Residence for Rent in Tehran
video object
durationstring<uint64>required

Duration of the video in seconds

Example: 34
namestringrequired

Name of the video, retrieved from video_name field in the response of upload video endpoint

Example: raw/4786eb10-eac6-4077-b622-78c1c42855c7.mp4
thumbnail_namestringrequired

Thumbnail of the video, retrieved from thumbnail_name field in the response of upload video endpoint. It will be the first frame of the uploaded video

Example: thumbnail/4786eb10-eac6-4077-b622-78c1c42855c7.jpg
update_maskstring[]required

فیلد ماسک مشخص می‌کند کدام فیلدها به‌روزرسانی شوند. از مسیرهای تو در تو برای هر دو general_data و category_data استفاده کنید (مثلاً، 'general_data.title'، 'category_data.price'). این امکان تمایز بین حذف یک فیلد و به‌روزرسانی نکردن آن را فراهم می‌کند.

Example: ["general_data.title","general_data.description","general_data.video","category_data.price"]
PostEditPostV2Body
{
"category_data": {},
"general_data": {
"category_slug": "apartment-sell",
"chat_enabled": true,
"city": "tehran",
"description": "I'm available only in chat.",
"district": "abshar",
"hide_phone": true,
"images": [
"string"
],
"latitude": 35.7152,
"location_type": "LOCATION_TYPE_EXACT",
"longitude": 51.4043,
"title": "Temporary Residence for Rent in Tehran",
"video": {
"duration": 34,
"name": "raw/4786eb10-eac6-4077-b622-78c1c42855c7.mp4",
"thumbnail_name": "thumbnail/4786eb10-eac6-4077-b622-78c1c42855c7.jpg"
}
},
"update_mask": [
"general_data.title",
"general_data.description",
"general_data.video",
"category_data.price"
]
}