Campaign_BatchCreate
POST
/v1/Campaign/batch
const url = 'https://rms.dev.caspeco.net/api/booking/v1/Campaign/batch';const options = { method: 'POST', headers: { system: 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '[{"name":"example","displayName":"example","description":"example","startDate":"2026-04-15T12:00:00Z","endDate":"2026-04-15T12:00:00Z","requirements":[{"requirementType":0,"type":"example","campaignCodeIds":["example"],"campaignCodes":[{"id":"example","name":"example","code":"example","createdDate":"2026-04-15T12:00:00Z","createdBy":"example","usages":1,"maxUsage":1,"maxUsagePerCustomer":1,"isDirty":true,"doDelete":true}],"customerIds":["example"],"weekDays":["example"],"localTimeInterval":{"start":"example","end":"example"},"groups":[{"name":"example","quantity":1,"articles":[{"id":1,"uuid":"example"}]}],"totalAmountCents":1,"tierId":"example","rewardId":"example","voucherId":"example","numberOfCodes":1,"codeLength":1,"loggingSummary":"example"}],"benefits":[{"benefitType":0,"type":"example","amountCents":1,"percentage":1,"maxDiscountAmount":1}],"maxNumberOfOutcomes":1,"marketing":{"enabled":true,"imageMap":{"additionalProperty":"example"},"uploadImages":[{"tags":["example"],"cropRatios":[{"id":1,"imageId":1,"left":1,"top":1,"width":1,"height":1,"aspectRatio":"example"}],"image":"example","imageUrl":"example","imageFilename":"example","imageUploadData":"example"}],"sortOrder":1},"imageMap":{"additionalProperty":"example"},"uploadImages":[{"tags":["example"],"cropRatios":[{"id":1,"imageId":1,"left":1,"top":1,"width":1,"height":1,"aspectRatio":"example"}],"image":"example","imageUrl":"example","imageFilename":"example","imageUploadData":"example"}],"id":1,"campaignId":"example","status":0,"availableTiers":[{"id":"example","name":"example"}],"availableRewards":[{"id":"example","name":"example"}],"availableVouchers":[{"id":"example","name":"example"}]}]'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://rms.dev.caspeco.net/api/booking/v1/Campaign/batch \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'system: example' \ --data '[ { "name": "example", "displayName": "example", "description": "example", "startDate": "2026-04-15T12:00:00Z", "endDate": "2026-04-15T12:00:00Z", "requirements": [ { "requirementType": 0, "type": "example", "campaignCodeIds": [ "example" ], "campaignCodes": [ { "id": "example", "name": "example", "code": "example", "createdDate": "2026-04-15T12:00:00Z", "createdBy": "example", "usages": 1, "maxUsage": 1, "maxUsagePerCustomer": 1, "isDirty": true, "doDelete": true } ], "customerIds": [ "example" ], "weekDays": [ "example" ], "localTimeInterval": { "start": "example", "end": "example" }, "groups": [ { "name": "example", "quantity": 1, "articles": [ { "id": 1, "uuid": "example" } ] } ], "totalAmountCents": 1, "tierId": "example", "rewardId": "example", "voucherId": "example", "numberOfCodes": 1, "codeLength": 1, "loggingSummary": "example" } ], "benefits": [ { "benefitType": 0, "type": "example", "amountCents": 1, "percentage": 1, "maxDiscountAmount": 1 } ], "maxNumberOfOutcomes": 1, "marketing": { "enabled": true, "imageMap": { "additionalProperty": "example" }, "uploadImages": [ { "tags": [ "example" ], "cropRatios": [ { "id": 1, "imageId": 1, "left": 1, "top": 1, "width": 1, "height": 1, "aspectRatio": "example" } ], "image": "example", "imageUrl": "example", "imageFilename": "example", "imageUploadData": "example" } ], "sortOrder": 1 }, "imageMap": { "additionalProperty": "example" }, "uploadImages": [ { "tags": [ "example" ], "cropRatios": [ { "id": 1, "imageId": 1, "left": 1, "top": 1, "width": 1, "height": 1, "aspectRatio": "example" } ], "image": "example", "imageUrl": "example", "imageFilename": "example", "imageUploadData": "example" } ], "id": 1, "campaignId": "example", "status": 0, "availableTiers": [ { "id": "example", "name": "example" } ], "availableRewards": [ { "id": "example", "name": "example" } ], "availableVouchers": [ { "id": "example", "name": "example" } ] } ]'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”system
required
string
The system name / database to query
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Array
object
name
string
displayName
string
description
string
startDate
string format: date-time
endDate
string format: date-time
requirements
Array<object>
object
requirementType
integer
type
string
campaignCodeIds
Array<string>
campaignCodes
Array<object>
object
id
string
name
string
code
string
createdDate
string format: date-time
createdBy
string
usages
integer format: int32
maxUsage
integer format: int32
maxUsagePerCustomer
integer format: int32
isDirty
boolean
doDelete
boolean
customerIds
Array<string>
weekDays
Array<string>
localTimeInterval
One of:
object
start
string
end
string
groups
Array<object>
object
name
string
quantity
integer format: int32
articles
Array<object>
object
id
integer format: int64
uuid
string
totalAmountCents
integer format: int32
tierId
string
rewardId
string
voucherId
string
numberOfCodes
integer format: int32
codeLength
integer format: int32
loggingSummary
string
benefits
Array<object>
object
benefitType
integer
type
string
amountCents
integer format: int32
percentage
integer format: int32
maxDiscountAmount
integer format: int32
maxNumberOfOutcomes
integer format: int32
marketing
object
enabled
boolean
imageMap
object
key
additional properties
string
uploadImages
Array
object
tags
Array<string>
cropRatios
Array<object>
object
id
integer format: int64
imageId
integer format: int64
left
number format: double
top
number format: double
width
number format: double
height
number format: double
aspectRatio
string
image
string
imageUrl
string
imageFilename
string
imageUploadData
string
sortOrder
integer format: int32
imageMap
object
key
additional properties
string
uploadImages
Array
object
tags
Array<string>
cropRatios
Array<object>
object
id
integer format: int64
imageId
integer format: int64
left
number format: double
top
number format: double
width
number format: double
height
number format: double
aspectRatio
string
image
string
imageUrl
string
imageFilename
string
imageUploadData
string
id
integer format: int64
campaignId
string
status
integer
availableTiers
Array<object>
object
id
string
name
string
availableRewards
Array<object>
object
id
string
name
string
availableVouchers
Array<object>
object
id
string
name
string
Responses
Section titled “Responses”Media typeapplication/json
Array
object
name
string
displayName
string
description
string
startDate
string format: date-time
endDate
string format: date-time
requirements
Array<object>
object
requirementType
integer
type
string
campaignCodeIds
Array<string>
campaignCodes
Array<object>
object
id
string
name
string
code
string
createdDate
string format: date-time
createdBy
string
usages
integer format: int32
maxUsage
integer format: int32
maxUsagePerCustomer
integer format: int32
isDirty
boolean
doDelete
boolean
customerIds
Array<string>
weekDays
Array<string>
localTimeInterval
One of:
object
start
string
end
string
groups
Array<object>
object
name
string
quantity
integer format: int32
articles
Array<object>
object
id
integer format: int64
uuid
string
totalAmountCents
integer format: int32
tierId
string
rewardId
string
voucherId
string
numberOfCodes
integer format: int32
codeLength
integer format: int32
loggingSummary
string
benefits
Array<object>
object
benefitType
integer
type
string
amountCents
integer format: int32
percentage
integer format: int32
maxDiscountAmount
integer format: int32
maxNumberOfOutcomes
integer format: int32
marketing
object
enabled
boolean
imageMap
object
key
additional properties
string
uploadImages
Array
object
tags
Array<string>
cropRatios
Array<object>
object
id
integer format: int64
imageId
integer format: int64
left
number format: double
top
number format: double
width
number format: double
height
number format: double
aspectRatio
string
image
string
imageUrl
string
imageFilename
string
imageUploadData
string
sortOrder
integer format: int32
imageMap
object
key
additional properties
string
uploadImages
Array
object
tags
Array<string>
cropRatios
Array<object>
object
id
integer format: int64
imageId
integer format: int64
left
number format: double
top
number format: double
width
number format: double
height
number format: double
aspectRatio
string
image
string
imageUrl
string
imageFilename
string
imageUploadData
string
id
integer format: int64
campaignId
string
status
integer
availableTiers
Array<object>
object
id
string
name
string
availableRewards
Array<object>
object
id
string
name
string
availableVouchers
Array<object>
object
id
string
name
string
Example
[ { "requirements": [ { "requirementType": 0 } ], "benefits": [ { "benefitType": 0 } ], "status": 0 }]