Promotion - GET

Helps to get all your promotion information.

/promotion

Request

Headers

Key Details Example
Authorization* {token_type} {access_token} Bearer c3499c2729730a7f807efb8676a92dcb6f8a3f8f
Method* GET GET
x-accept-version {recommended_latest_version_number} 2
storeIds {comma_separated_storeIds} 1,2,4 //Returns all if not supplied
promotionIds {comma_separated_promotionIds} 1,2,4 //Returns all if not supplied
imminent {true_or_false} true
expired {true_or_false} true
active {true_or_false} true

Response

Headers

Key Details Data Type Example
statusCode Very important to check this for shopwave server uptime. 200 for success. int 200

Body

Key Details Data Type
promotions[{promotionId}].id Unique identifier for a promotion. int
promotions[{promotionId}].merchantId Your merchantId int
promotions[{promotionId}].storeId An array of all the store Ids that are associated to the promotion array
promotions[{promotionId}].title Title of a promotion string
promotions[{promotionId}].details Details of a promotion string
promotions[{promotionId}].terms Terms & conditions of the promotion string
promotions[{promotionId}].startDate YYYY-MM-DDTHH:ii:ssmmmZ format of promotion start date. Datetime
promotions[{promotionId}].endDate YYYY-MM-DDTHH:ii:ssmmmZ format of promotion end date. tinyint
promotions[{promotionId}].daysAvaliable 0 to 6 representing the days of weeks the promotion availability. array
promotions[{promotionId}].automatic 1 or 0 flag representing weather the promotion is automatically applied or only through selection. tinyint

                                                

Attribute Options

Days Available

ID Value
0 Sunday
1 Monday
2 Tuesday
3 Wednesday
4 Thursday
5 Friday
6 Saturday

Status Codes

Error

Please check the live API calls for more details on the API messages.

ID Status Code Title Details
908 401 Expired Token Token expired or invalid. Please renew your token
911 401 Authorization Header Invalid The authorization header is invalid. The correct format is Authorization: {token_type} {accessToken}
899 500 Unknown Error Something went wrong. Please contact the site administrator

Success

Please check the live API calls for more info on the API messages.

ID Status Code Title Details
203 200 Request Processed Successfully The request has been successfully completed.
202 200 Token is valid Token is validated and found valid.
204 204 No content to return End of the page or no content to return for your request
preloader