Listings - Admin
Create or update listing with smart Integrazu integration
Unified save endpoint that:
- IF listing_id is null: Creates new listing in ViaturasEasyDataGreen IF listing_id is provided: Updates existing listing
- IF brands with platforms are provided:
- Checks existing Integrazu state
- Decides whether to start a job or send direct update
- IF website_ids are provided:
- Creates Z_WebsiteExports records
Decision Logic for Integrazu:
- No advert exists -> Start job (create + photos + publish)
- Advert exists + new platforms -> Start job (publish only)
- Advert exists + all platforms synced -> Direct PUT update (no job)
Args: request_body: ListingSaveRequest with listing_id (optional), listing_data, brands, website_ids, image_urls
Returns: ListingSaveResponse with results per brand
post/api/listings/save
Headers
x-api-tokenstring nullable
Request body
Response
Successful Response
Example response
{
"integrazu": {
"brands": [
{
"action": "job_started",
"brand_id": 5,
"job_id": 123,
"platforms_to_publish": [
"carmine",
"standvirtual"
],
"reason": "no_advert_exists"
},
{
"action": "update_sent",
"brand_id": 8,
"reason": "all_platforms_already_published"
}
]
},
"listing_id": 925,
"listing_saved": true,
"website_exports_created": 2,
"website_exports_removed": 1
}