Update a campaign
Changed onPartial update. Send only the fields you want to change; omitted fields keep their values, and a field you do send replaces the stored value in full (arrays included).
adSchedule accepts a preset name (ALL_HOURS_ALL_DAYS, BUSINESS_HOURS) or a structured schedule; adScheduleStructured is recomputed on every write. For human-friendly input (09:00 to 17:00, weekdays, a time zone) use Set the ad schedule instead.
Leave _platformBudgets out to keep where the campaign runs. Sending it replaces the whole split, and it must still switch at least one platform on. Removing a platform the campaign is live on pauses it there at the next sync.
Changes reach the ad platforms on the next sync.
Errors
- 404 NOT_FOUND: no campaign with this id in the active Space.
- 409 CAMPAIGN_IS_DRAFT: the campaign is an unconfirmed draft; it can only be confirmed in the app.
- 400 PLATFORMS_REQUIRED: the new _platformBudgets switches every platform off.
- 400 UNKNOWN_PLATFORM: a platform id in _platformBudgets is not one Growomat delivers to.
- 400 VALIDATION_ERROR: the body failed validation; details.issues[] names each field.
- 400 AD_SCHEDULE_TOO_MANY_WINDOWS: more than 84 schedule windows.
Request
- Base URL: https://api.growomat.com
- URL: https://api.growomat.com/api/v1/campaigns/{id}
- Auth: HTTP bearer
Path parameters
The campaign id.
Headers
The Space to work in, for example spc_8f3aK2. Omit it to use your personal Space. List your Spaces returns the ids. A Space that does not exist returns 404 SPACE_NOT_FOUND; one you are not a member of returns 403 NOT_A_MEMBER.
Request body
Response
OK. The result is in data. List responses also carry meta with nextCursor and total.
Changes
- info
the request property
//became optional
- info