Update promotion
const url = 'https://kynectlocal-production.up.railway.app/v1/v1/brands/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/locations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/promotions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://kynectlocal-production.up.railway.app/v1/v1/brands/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/locations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/promotions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'Authorizations
Section titled βAuthorizations βParameters
Section titled β Parameters βPath Parameters
Section titled βPath Parameters βBrand identifier
Location identifier
Responses
Section titled β Responses βSuccess
object
object
object
Promotion identifier
Parent brand
Promotion name
Promotion type
Promotion headline
Promotion status
Body copy
Badge text
Urgency copy
Promotion image URL
CTA type
Button label
Button URL
Associated form ID
Popup trigger
Popup delay in milliseconds
Scroll percentage to trigger popup
Whether to set a dismiss cookie
Days before popup reappears
Popup CTA type
Popup button label
Popup button URL
Popup associated form ID
Display mode
Adoption mode
Number of locations running this promotion
Scheduled start time
Scheduled end time
Creation timestamp
Last update timestamp
Example
{ "data": { "promotion": { "type": "lead_gen", "status": "draft", "ctaType": "none", "popupTrigger": "load", "popupCtaType": "button", "displayMode": "banner", "adoption": "opt_in" } }}Validation error
object
Error envelope
object
Machine-readable error code
Human-readable error description
Additional context, e.g. validation field errors
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}Unauthenticated
object
Error envelope
object
Machine-readable error code
Human-readable error description
Additional context, e.g. validation field errors
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}Forbidden
object
Error envelope
object
Machine-readable error code
Human-readable error description
Additional context, e.g. validation field errors
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}Not found
object
Error envelope
object
Machine-readable error code
Human-readable error description
Additional context, e.g. validation field errors
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}Unprocessable
object
Error envelope
object
Machine-readable error code
Human-readable error description
Additional context, e.g. validation field errors
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}