---
title: "Start Publishing Job"
method: POST
path: "/api/integrazu/publish/start"
tags: ["Integrazu Publishing Jobs"]
---

# Start Publishing Job

`POST /api/integrazu/publish/start`

Start vehicle publishing workflow(s) - supports multiple brands.

Creates one job per brand. Each brand has its own Integrazu token and location,
so each requires a separate advert creation and publishing flow.

**Request Format:**
```json
{
    "vehicle_id": 1234,
    "brands": [
        {"brand_id": 5, "platforms": ["standvirtual", "olx"], "location_id": "539"},
        {"brand_id": 8, "platforms": ["carmine"], "location_id": "742"}
    ],
    "advert_data": { ... },
    "image_urls": ["https://..."]
}
```

**Setup:**
- Use GET /api/integrazu/data/brands-platforms to get brands with their location_ids and available platforms

**Workflow (per brand):**
- "A criar anuncio"
- "A carregar imagens" (if image_urls provided)
- "A publicar em {Platform}" (for each platform)

**Error Handling:**
- Each brand's job is independent - if one fails, others continue
- Within a job: if advert creation fails, that job fails
- If image upload fails: continues with publishing
- If a portal fails: continues with remaining portals

**Polling:**
Use GET /api/integrazu/publish/{job_id} for each job_id returned

## Headers

- `x-api-token` string, nullable

## Request body

- PublishJobCreateRequest — Request to start publishing workflow(s) for a vehicle - supports multiple brands.
  - `vehicle_id` integer, required — Viatura.ID - the vehicle to publish
  - `pv_id` integer, required — PontosDeVenda.ID - the point of sale (used for token lookup and ViaturasEasyDataGreen)
  - `brands` BrandPublishConfig[], required — List of brands to publish to, each with their platforms and website exports
    - `brand_id` integer, required — Z_Brands.id for Integrazu token lookup
    - `platforms` string[], required — List of platforms to publish to for this brand
    - `website_ids` integer[], nullable — List of Websites.id to export this listing to (Z_WebsiteExports). Optional.
    - `renew` boolean — If True, the advert will auto-renew on platforms. Stored in Z_PortalExports.renew
  - `listing_id` integer, nullable — ViaturasEasyDataGreen.ID - if provided, uses existing listing instead of creating new one
  - `listing_data` ListingAdvertData — Listing advert data matching ViaturasEasyDataGreen table schema. REQUIRED fields (for Integrazu): - make_id (brand_id), model_id, fuel_id, type_id (category_id) - color_id, transmission_id (gearbox_id), seats_id (capacity_id) - doors_id, state_id (condition_id), traction - version_id OR version (one required) - mileage, engine_power, engine_capacity, price - warranty_id (can be 0) All types match SQL Server column types.
    - `make_id` integer, required — Make/brand ID (Integrazu: brand_id)
    - `model_id` integer, required — Model ID (Integrazu: model_id)
    - `fuel_id` integer, required — Fuel type ID (Integrazu: fuel_id)
    - `type_id` integer, required — Vehicle type/category ID (Integrazu: category_id)
    - `state_id` integer, required — Vehicle condition ID (Integrazu: condition_id)
    - `seats_id` integer, required — Seats/capacity ID (Integrazu: capacity_id)
    - `doors_id` integer, required — Doors ID (Integrazu: doors_id)
    - `transmission_id` integer, required — Transmission/gearbox ID (Integrazu: gearbox_id)
    - `color_id` integer, required — Exterior color ID (Integrazu: color_id)
    - `traction` string, nullable — Traction type
    - `mileage` integer, required — Kilometers (Integrazu: mileage)
    - `engine_power` integer, required — Engine power in HP (Integrazu: power)
    - `engine_capacity` integer, required — Engine capacity in cc (Integrazu: engine_capacity)
    - `price` number, required — Sale price (Integrazu: price)
    - `warranty_id` integer — Warranty months ID (Integrazu: vendors_warranty_months)
    - `version_id` integer, nullable — Version ID (Integrazu: version_id)
    - `version` string, nullable — Version/trim designation
    - `interior_color_id` integer, nullable — Interior color ID
    - `toll_class` integer, nullable — Toll class ID
    - `gearbox_shift_id` integer, nullable — Gearbox shift ID
    - `gearbox_type_id` integer, nullable — Gearbox type ID
    - `section_id` integer, nullable — Section ID
    - `year` integer, nullable — First registration year
    - `month` integer, nullable — First registration month 1-12
    - `iuc_month` integer, nullable — IUC month
    - `stand_id` integer, nullable — Stand ID
    - `warranty_mileage` integer, nullable — Warranty km limit
    - `co2_emissions` number, nullable — CO2 emissions g/km
    - `maximum_speed` number, nullable — Maximum speed km/h
    - `engine_torque` number, nullable — Engine torque
    - `performance_zero_hundred` number, nullable — 0-100 km/h time
    - `urban_consumption` number, nullable — Urban consumption L/100km
    - `extra_urban_consumption` number, nullable — Extra-urban consumption
    - `combined_consumption` number, nullable — Combined consumption
    - `year_construction` number, nullable — Year of construction
    - `number_cylinders` number, nullable — Number of cylinders
    - `iuc_value` number, nullable — Annual road tax IUC
    - `stamp_tax` number, nullable — Stamp tax
    - `credit_down_payment` number, nullable — Credit down payment
    - `semi_trucks_body` number, nullable — Semi truck body
    - `importation_isv` number, nullable — ISV importation
    - `importation_transport` number, nullable — Transport importation cost
    - `importation_legal_costs` number, nullable — Legal costs importation
    - `active` integer, nullable — Active 1/0
    - `sold` integer, nullable — Sold 1/0
    - `reserved` integer, nullable — Reserved 1/0
    - `by_order` integer, nullable — By order 1/0
    - `available_soon` integer, nullable — Available soon 1/0
    - `approved` integer, nullable — Approved 1/0
    - `metallic` integer, nullable — Metallic paint 1/0
    - `accept_returns` integer, nullable — Accepts returns 1/0
    - `financing_possibility` integer, nullable — Accepts financing 1/0
    - `promotion_price` integer, nullable — Promotion price 1/0
    - `commercial` integer, nullable — Commercial vehicle 1/0
    - `without_iva` integer, nullable — Without IVA 1/0
    - `without_isv` integer, nullable — Without ISV 1/0
    - `second_key` integer, nullable — Has second key 1/0
    - `manuals` integer, nullable — Has manuals/service book 1/0
    - `export_vin` integer, nullable — Export VIN 1/0
    - `license_plate_export` integer, nullable — Export license plate 1/0
    - `importation_legalization` integer, nullable — Legalization 1/0
    - `credit_month_payment` integer, nullable — Credit month payment
    - `life_insurance` integer, nullable — Life insurance 1/0
    - `export_easysite` integer, nullable — Export to easysite 1/0
    - `export_portals` integer, nullable — Export to portals 1/0
    - `export_carmine` integer, nullable — Export to Carmine 1/0
    - `export_standvirtual` integer, nullable — Export to StandVirtual 1/0
    - `active_standvirtual` integer, nullable — Active on StandVirtual 1/0
    - `renew_standvirtual` integer, nullable — Renew on StandVirtual 1/0
    - `export_olx` integer, nullable — Export to OLX 1/0
    - `renew_olx` integer, nullable — Renew on OLX 1/0
    - `export_autosapo` integer, nullable — Export to AutoSapo 1/0
    - `active_autosapo` integer, nullable — Active on AutoSapo 1/0
    - `export_hellocar` integer, nullable — Export to HelloCar 1/0
    - `active_hellocar` integer, nullable — Active on HelloCar 1/0
    - `renew_hellocar` integer, nullable — Renew on HelloCar 1/0
    - `export_piscapisca` integer, nullable — Export to PiscaPisca 1/0
    - `active_piscapisca` integer, nullable — Active on PiscaPisca 1/0
    - `renew_piscapisca` integer, nullable — Renew on PiscaPisca 1/0
    - `export_custojusto` integer, nullable — Export to CustoJusto 1/0
    - `active_custojusto` integer, nullable — Active on CustoJusto 1/0
    - `export_seucarro` integer, nullable — Export to SeuCarro 1/0
    - `negotiable` boolean, nullable — Price negotiable
    - `iva_deductible` boolean, nullable — Tax deductible
    - `iva_discriminated` boolean, nullable — Tax itemized
    - `destaque` boolean, nullable — Featured/highlighted
    - `classic` boolean, nullable — Classic vehicle
    - `damaged` boolean, nullable — Damaged vehicle
    - `non_smoking` boolean, nullable — Non-smoking vehicle
    - `particle_filter` boolean, nullable — Has particle filter
    - `salvage` boolean, nullable — Salvage vehicle
    - `brand_program_edp` boolean, nullable — EDP brand program
    - `license_plate` string, nullable — License plate
    - `registrations` string, nullable — Registration type
    - `origin` string, nullable — Origin
    - `vin` string, nullable — VIN
    - `video_url` string, nullable — Video URL
    - `observations` string, nullable — Vehicle description
    - `observations_english` string, nullable — English description
    - `tag_img` string, nullable — Image tag
    - `inspection_expiration` string, nullable — Inspection valid until
    - `warranty_date` string, nullable — Warranty end date
    - `maintenance_history` string, nullable — Maintenance history
    - `hashtag` string, nullable — Hashtag
    - `reference` string, nullable — Reference
    - `supplier_type` string, nullable — Supplier type
    - `monthly_amount` string, nullable — Monthly amount
    - `rpm` string, nullable — RPM
    - `sold_to_city` string, nullable — Sold to city
    - `sold_to_district` string, nullable — Sold to district
    - `date_campaigns` string, nullable — Campaign dates
    - `max_fuel_range` string, nullable — Max fuel range km
    - `credit` string, nullable — Credit info
    - `credit_tan_value` string, nullable — Credit TAN value
    - `credit_taeg_value` string, nullable — Credit TAEG value
    - `credit_mtic` string, nullable — Credit MTIC
    - `credit_cpp` string, nullable — Credit CPP
    - `credit_cac` string, nullable — Credit CAC
    - `credit_financial` string, nullable — Credit financial
    - `credit_legal_text` string, nullable — Credit legal text
    - `credit_date` string, nullable — Credit date
    - `semi_trucks_bed` string, nullable — Semi truck bed
    - `semi_trucks_height` string, nullable — Semi truck height
    - `semi_trucks_length` string, nullable — Semi truck length
    - `semi_trucks_suspension` string, nullable — Semi truck suspension
    - `semi_trucks_load` string, nullable — Semi truck load
    - `text_campaigns` string, nullable — Campaign text
    - `equipments` string, nullable — Equipment IDs comma-separated
    - `batery_type` integer, nullable — Battery type ID
    - `wltp_autonomy` integer, nullable — WLTP autonomy km
    - `autonomy` integer, nullable — Autonomy km
    - `battery_type_id` integer, nullable — Battery type ID
    - `brake_energy_recovery_id` integer, nullable — Brake energy recovery ID
    - `charging_connector_type_id` integer, nullable — Charging connector type ID
    - `type_of_current_id` integer, nullable — Type of current ID
    - `number_charging_cycles` integer, nullable — Number of charging cycles
    - `number_batteries` integer, nullable — Number of batteries
    - `number_engines` integer, nullable — Number of engines
    - `electric_power_peak` integer, nullable — Electric power peak
    - `battery_condition` integer, nullable — Battery condition
    - `hybrid_system_power_hp` integer, nullable — Hybrid system power HP
    - `charging_time_100` number, nullable — Charging time to 100%
    - `charging_time_80` number, nullable — Charging time to 80%
    - `charging_time_home` number, nullable — Charging time at home
    - `max_charging_power` number, nullable — Max charging power
    - `battery_capacity` number, nullable — Battery capacity
    - `avg_consumption` number, nullable — Average consumption
    - `license_plate_date` string, nullable — License plate date
  - `image_urls` string[], nullable — List of image URLs to upload. If not provided, uses photos from LocalizacaoFotos table.

## Response `200`

Successful Response

- PublishJobCreateResponse — Response after creating publishing jobs (one per brand).
  - `jobs` PublishJobCreatedInfo[], required
    - `job_id` integer, required
    - `brand_id` integer, required
    - `brand_name` string, nullable
    - `platforms` string[], required
    - `status` string
  - `total_jobs` integer, required
  - `message` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/multigest/apis/multigest-protected-api.md) · [All operations](https://skmtc.dev/multigest/apis/multigest-protected-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/multigest/multigest-protected-api/revisions/4b44eb76b3ee/schema)
