Returns a single Promotion by its ID. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.promotions.show({
bearer_token: '7381273269536713689562374856'
id: '1'
})
Creates a new Promotion and returns its attributes. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.promotions.create({
bearer_token: '7381273269536713689562374856',
promotion: {
name: 'Promotions Used in 2021',
code: 'BLK-FRI',
description: 'Save today with discount code XYZ at checkout.',
usage_limit: 100,
advertise: true,
starts_at: 'string',
ends_at: 'string',
store_ids: ['2']
}
})
Update the selected Promotion. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.pages.update({
bearer_token: '7381273269536713689562374856',
id: '1',
promotion: {
name: 'Promotions Used in 2021',
code: 'CYB-MON',
description: 'Save today with discount code XYZ at checkout.',
usage_limit: 100,
advertise: true,
starts_at: 'string',
ends_at: 'string',
store_ids: ['2']
}
})
This endpoint removes the specified Promotion. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.promotions.remove({
bearer_token: '7381273269536713689562374856',
id: '1'
})
Protected
spreeOptional
tokens: ITokenOptional
params: anyOptional
responseParsing: ResponseParsingProtected
classifyProtected
processProtected
processProtected
spreeGenerated using TypeDoc
Returns a list of all Promotions. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example: