Aurora API: Promotion Price
Promotion Price
Using this controller you can add, edit, delete, and retrieve all Price Promotions.
Add
Deferred: No
Example Request:
<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope>
<Header>
<AuthToken>...</AuthToken>
</Header>
<Requests>
<Request>
<Promotion>
<Price>
<Add>
<PromotionStatus>1</PromotionStatus>
<PromotionName>A test promotion</PromotionName>
<AmountValue>25</AmountValue>
<AmountType>reduce_fixed</AmountType>
<ProductDetailsText>25 pounds off!</ProductDetailsText>
<ProductListingText>£25 off!</ProductListingText>
</Add>
</Price>
</Promotion>
</Request>
</Requests>
</AuroraRequestEnvelope>
Example Response:
<?xml version="1.0" encoding="utf-8"?>
<AuroraResponseEnvelope>
<Header>
<Summary>
<Ack>OK</Ack>
<RequestsProcessed>1</RequestsProcessed>
<RequestsSucceeded>1</RequestsSucceeded>
<RequestErrors>0</RequestErrors>
</Summary>
</Header>
<Responses>
<Response>
<RequestID>1</RequestID>
<Ack>OK</Ack>
<Data>
<PromotionID>41</PromotionID>
</Data>
</Response>
</Responses>
</AuroraResponseEnvelope>
Update
Deferred: No
The 'Update' call is almost identical to the 'Add' call with the only real difference being that most of the fields are now optional. While adding a new item requires that you provided all necessary information at once, when using the 'Update' method, you can just provide the information you wish to change and leave out all of the rest (excluding the relevant ID fields of course which are used to identify the records to be updated).
Example Request:
<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope>
<Header>
<AuthToken>...</AuthToken>
</Header>
<Requests>
<Request>
<Promotion>
<Price>
<Update>
<PromotionID>41</PromotionID>
<PromotionName>A test promotion updated</PromotionName>
</Update>
</Price>
</Promotion>
</Request>
</Requests>
</AuroraRequestEnvelope>
Example Response:
<?xml version="1.0" encoding="utf-8"?>
<AuroraResponseEnvelope>
<Header>
<Summary>
<Ack>OK</Ack>
<RequestsProcessed>1</RequestsProcessed>
<RequestsSucceeded>1</RequestsSucceeded>
<RequestErrors>0</RequestErrors>
</Summary>
</Header>
<Responses>
<Response>
<RequestID>1</RequestID>
<Ack>OK</Ack>
<Data>
<PromotionID>41</PromotionID>
</Data>
</Response>
</Responses>
</AuroraResponseEnvelope>
Delete
Deferred: No
Example Request:
<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope>
<Header>
<AuthToken>...</AuthToken>
</Header>
<Requests>
<Request>
<Promotion>
<Price>
<Delete>
<PromotionIDs>
<PromotionID>416</PromotionID>
</PromotionIDs>
</Delete>
</Price>
</Promotion>
</Request>
</Requests>
</AuroraRequestEnvelope>
Example Response:
<?xml version="1.0" encoding="utf-8"?>
<AuroraResponseEnvelope>
<Header>
<Summary>
<Ack>OK</Ack>
<RequestsProcessed>1</RequestsProcessed>
<RequestsSucceeded>1</RequestsSucceeded>
<RequestErrors>0</RequestErrors>
</Summary>
</Header>
<Responses>
<Response>
<RequestID>1</RequestID>
<Ack>OK</Ack>
<Data/>
</Response>
</Responses>
</AuroraResponseEnvelope>
Request Fields
Field | Values | API Version | Description | Required |
---|---|---|---|---|
PromotionIDs | Container | 1.4+ | No | |
PromotionIDs.PromotionID | Integer | 1.4+ | The ID of the Promotion to delete. | Only if 'PromotionIDs' is provided |
Get
Deferred: No
Records returned by this call are currently always ordered by the date they were created. This may change, so you should consider specifying the sort order of your results if this is going to affect your systems performance in the future.
The 'tracking' attribute can be used to denote whether or not tracking should be enabled, please see Request Tracking for more details.
Example Request:
<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope>
<Header>
<AuthToken>...</AuthToken>
</Header>
<Requests>
<Request>
<Promotion>
<Price>
<Get>
<Paging>
<Limit>1</Limit>
<Page>1</Page>
</Paging>
</Get>
</Price>
</Promotion>
</Request>
</Requests>
</AuroraRequestEnvelope>
Example Response:
<?xml version="1.0" encoding="utf-8"?>
<AuroraResponseEnvelope>
<Header>
<Summary>
<Ack>OK</Ack>
<RequestsProcessed>1</RequestsProcessed>
<RequestsSucceeded>1</RequestsSucceeded>
<RequestErrors>0</RequestErrors>
</Summary>
</Header>
<Responses>
<Response>
<RequestID>1</RequestID>
<Ack>OK</Ack>
<Paging>
<Token>15bfbe95edcbc936f6b5e99cce7a394c627</Token>
</Paging>
<Data>
<Promotion>
<Price>
<PromotionID>29</PromotionID>
<PromotionStatus>1</PromotionStatus>
<PromotionName language="en-gb">Product-Name-Price-Promo</PromotionName>
<AmountValue>11.00</AmountValue>
<AmountType>reduce_fixed</AmountType>
<ProductDetailsText language="en-gb"/>
<ProductListingText language="en-gb"/>
<DateCreated>2013-09-09 15:28:45</DateCreated>
</Price>
</Promotion>
</Data>
</Response>
</Responses>
</AuroraResponseEnvelope>
Request Fields
Field | Values | API Version | Description | Required |
---|---|---|---|---|
PromotionIDs | Container | 1.4+ | No | |
PromotionIDs.PromotionID | Integer | 1.4+ | The ID to restrict the result to. | Only if 'PromotionIDs' is provided |
DetailLevel | Detail Levels | 1.4+ | This allows the client to request varying volumes of data when receiving data back from the server. | No |
Language | "all" or language ISO | 1.4+ | This allows the client to request specific or all languages to be returned. If not included in the request the default language will be returned. | No |
Tracking | Request Tracking | 1.4+ | If this is set to 'unsent' then any orders previously retrieved via the current API account while 'tracking' was active will be excluded from the results. This allows for unique order exports to be set-up easily to avoid duplicate orders being downloaded. | No |
Limit | Integer > 0 | 1.4+ | The number of records to return | No |
Paging | Container | 1.4+ | See Paging | No |
Paging.Token | String | 1.4+ | This is the Token string issued from any previous Get call featuring paging. Providing this will have the API collect the data from the previously generated set of data, ensuring accurate and consistent dataset results for every page. You cannot change the request properties previously provided when using a Token, so these are ignored by the API. | No |
Paging.Limit | Integer > 0 | 1.4+ | The number of results to return in the page being requested | No |
Paging.Page | Integer > 0 | 1.4+ | The page number to return the results for | Only if 'Token' is provided |
Updated over 2 years ago