Returns a single Promotion Category 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.promotionCategories.show({
bearer_token: '7381273269536713689562374856'
id: '1'
})
Creates a new Promotion Category 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.promotionCategories.create({
bearer_token: '7381273269536713689562374856',
promotion_category: {
name: 'Promotions Used in 2021',
code: '2021-PROMOS'
}
})
Update selected Promotion Category. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.promotionCategories.update({
bearer_token: '7381273269536713689562374856',
id: '1',
promotion_category: {
name: 'Promotions Used in 2021',
code: '2021-PROMOS'
}
})
This endpoint removes the specified Promotion Category. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.promotionCategories.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 Promotion Categories. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example: