Aurora API: Promotion Basket

Promotion Basket

Using this controller you can add, edit, delete, and retrieve all Basket Promotions.

Add

Deferred: No

Example Request:

<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope>
  <Header>
    <AuthToken>...</AuthToken>
  </Header>
  <Requests>
    <Request>
      <Promotion>
        <Basket>
          <Add>
            <PromotionStatus>1</PromotionStatus>
            <StartDate>2013-11-01</StartDate>
            <EndDate>2013-11-30</EndDate>
            <PromotionName>£10 Off!</PromotionName>
            <PromotionDescription>Get a tenner off!</PromotionDescription>
            <BasketText>10 Quid OFF!</BasketText>
            <ProductDetailsText>Get a tenner off!</ProductDetailsText>
            <ProductListingText>Get a tenner off!</ProductListingText>
            <MembersContentText language="en-gb">Massive savings!</MembersContentText>
            <DisplayMembersContent>1</DisplayMembersContent>
            <PromotionType>buy_x_for_y</PromotionType>
            <AmountValue>10</AmountValue>
            <AmountType>reduce_fixed</AmountType>
            <EntranceUrlQuery></EntranceUrlQuery>
            <FreeShippingRules></FreeShippingRules>
            <MaxUsage>100</MaxUsage>
            <PromotionPriority>100</PromotionPriority>
            <StopFurtherRules>0</StopFurtherRules>
            <CreateCategory>1</CreateCategory>
            <PromotionConditions></PromotionConditions>
            <PromotionActions></PromotionActions>
            <Coupons>
              <Coupon>
                <CouponStatus>1</CouponStatus>
                <CouponCode>10OFF</CouponCode>
                <CouponName>10 Quid OFF</CouponName>
                <CouponDescription>10 Quid OFF</CouponDescription>
                <CustomerDescription>10 Quid OFF</CustomerDescription>
                <CouponDiscount>10</CouponDiscount>
                <CouponType>fixed</CouponType>
                <MinimumSpend>100</MinimumSpend>
                <MaximumSpend>1000</MaximumSpend>
                <FreeShippingRules></FreeShippingRules>
                <StartDate>2013-11-01</StartDate>
                <EndDate>2013-11-30</EndDate>
                <UseWithBasketPromotions>1</UseWithBasketPromotions>
                <ExcludeBasketPromoItems>1</ExcludeBasketPromoItems>
                <OnePerCustomer>0</OnePerCustomer>
                <TotalUses>1000</TotalUses>
                <PaymentType>1</PaymentType>
              </Coupon>
            </Coupons>
          </Add>
        </Basket>
      </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>74</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 provide 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>
        <Basket>
          <Update>
            <PromotionID>74</PromotionID>
            <ProductDetailsText>Get a tenner off when you spend over £100!</ProductDetailsText>
            <ProductListingText>Get a tenner off when you spend over £100!</ProductListingText>
          </Update>
        </Basket>
      </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>74</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>
        <Basket>
          <Delete>
            <PromotionIDs>
              <PromotionID>416</PromotionID>
            </PromotionIDs>
          </Delete>
        </Basket>
      </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

FieldValuesAPI VersionDescriptionRequired
PromotionIDsContainer1.4+No
PromotionIDs.PromotionIDInteger1.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 effect 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>
        <Basket>
          <Get>
            <Paging>
              <Limit>1</Limit>
              <Page>1</Page>
            </Paging>
          </Get>
        </Basket>
      </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>3b049f94a1b35dc5602b717299e28531685</Token>
      </Paging>
      <Data>
        <Promotion>
          <Basket>
            <PromotionID>50</PromotionID>
            <PromotionStatus>1</PromotionStatus>
            <StartDate>2011-11-14</StartDate>
            <EndDate>2012-01-01</EndDate>
            <PromotionName language="en-gb">10% Off Goodwill Gesture</PromotionName>
            <PromotionDescription language="en-gb"/>
            <BasketText language="en-gb"/>
            <ProductDetailsText language="en-gb"/>
            <ProductListingText language="en-gb"/>
            <MembersContentText language="en-gb"/>
            <DisplayMembersContent>0</DisplayMembersContent>
            <PromotionType>buy_x_for_y</PromotionType>
            <AmountValue>10.00</AmountValue>
            <AmountType>percent</AmountType>
            <EntranceUrlQuery/>
            <FreeShippingRules/>
            <MaxUsage>1</MaxUsage>
            <PromotionPriority>0</PromotionPriority>
            <StopFurtherRules>0</StopFurtherRules>
            <CategoryID/>
            <PromotionConditions></PromotionConditions>
            <PromotionActions/>
            <DateCreated>2011-11-14 11:11:16</DateCreated>
            <Coupons>
              <Coupon>
                <CouponID>72</CouponID>
                <CouponStatus>1</CouponStatus>
                <CouponCode>10OFF</CouponCode>
                <CouponName language="en-gb">10 percent off</CouponName>
                <CouponDescription language="en-gb">10% Off</CouponDescription>
                <CustomerDescription language="en-gb"></CustomerDescription>
                <CouponDiscount>10.00</CouponDiscount>
                <CouponType>percent</CouponType>
                <MinimumSpend>100.00</MinimumSpend>
                <MaximumSpend>1000.00</MaximumSpend>
                <FreeShippingRules/>
                <StartDate>2013-11-14 00:00:00</StartDate>
                <EndDate>2013-01-01 23:59:59</EndDate>
                <UseWithBasketPromotions>1</UseWithBasketPromotions>
                <ExcludeBasketPromoItems>1</ExcludeBasketPromoItems>
                <OnePerCustomer>1</OnePerCustomer>
                <TotalUses>1</TotalUses>
                <PaymentType/>
                <DateCreated>2012-05-15 15:14:41</DateCreated>
              </Coupon>
            </Coupons>
          </Basket>
        </Promotion>
      </Data>
    </Response>
  </Responses>
</AuroraResponseEnvelope> 

Request Fields

FieldValuesAPI VersionDescriptionRequired
PromotionIDsContainer1.4+No
PromotionIDs.PromotionIDInteger1.4+The ID to restrict the result to.Only if 'PromotionIDs' is provided
DetailLevelDetail Levels1.4+This allows the client to request varying volumes of data when receiving data back from the server.No
Language"all" or language ISO1.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
TrackingRequest Tracking1.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
LimitInteger > 01.4+The number of records to returnNo
PagingContainer1.4+See PagingNo
Paging.TokenString1.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.LimitInteger > 01.4+The number of results to return in the page being requestedNo
Paging.PageInteger > 01.4+The page number to return the results forOnly if 'Token' is provided