How to create and close an order (Theatres)

Steps

  • Step 1 : Retrieve catalog
  • Step 2 : Check Point of Sales (PoS) configuration
  • Step 3 : Check availability for performance
  • Step 4 : Create the order
  • Step 5 : Close the order
  • Step joker : Checking order status

This sequence of calls can be executed on the following web services:

Catalog service
https://cube.demo-ws.secutix.com:443/tnseb/external-remoting/com.secutix.service.realtime.catalog.v1_33.CatalogService.webservice

External order facade
https://cube.demo-ws.secutix.com:443/tnseb/external-remoting/com.secutix.service.realtime.externalorder.v1_33.ExternalOrderFacade.webservice

External order service
https://cube.demo-ws.secutix.com:443/tnseb/external-remoting/com.secutix.service.realtime.externalorder.v1_33.ExternalOrderService.webservice

Availability service
https://cube.demo-ws.secutix.com/tnseb/external-remoting/com.secutix.service.realtime.availability.v1_33.AvailabilityService.webservice

Step 1: Retrieve catalog

Must be done once a day (see here)

Query
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:v1="http://v1_33.CatalogService.service.secutix.com">
    <soapenv:Header>
        <wsse:Security soapenv:mustUnderstand="1"
            xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
            xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:UsernameToken wsu:Id="UsernameToken-B375FF7B6FAD83ECAF15795998117091">
                <wsse:Username>CUBE_B2C</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">P@ssw0rd</wsse:Password>
            </wsse:UsernameToken>
        </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
        <v1:getCatalogDetailed/>
    </soapenv:Body>
</soapenv:Envelope>
Response

Here is a link with a zipped version of the response as the catalog is quite big.

Information extracted from response:

  • productId: 466498564
  • performanceId: 466506363
  • audSubCatId: 466507298
  • seatCatId: 466494155
  • amount (unit price): 64000

Step 2: Check Point of Sales (PoS) configuration

This can only be done occasionally. Important points to notice are posId (pointOfSalesId in subsequent calls) and payment methods (will be used to pay the order)

Query
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:v1="http://v1_33.CatalogService.service.secutix.com">
    <soapenv:Header>
        <wsse:Security soapenv:mustUnderstand="1"
            xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
            xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:UsernameToken wsu:Id="UsernameToken-BCC4CF7DDCCDA67DF715859090203102">
                <wsse:Username>CUBE_B2C</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">P@ssw0rd</wsse:Password>
            </wsse:UsernameToken>
        </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
        <v1:getPOSConfig/>
    </soapenv:Body>
</soapenv:Envelope>
Response

Link to zip file

Information extracted from response:

  • posId (Point of sales ID): 466533847
  • paymentMethodId: 16369

Step 3: Check availability for performance

All the fields are filled with the information above. eventId matches the productId.

Query
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:v1="http://v1_33.RTAvailabilityService.service.secutix.com">
    <soapenv:Header>
        <wsse:Security soapenv:mustUnderstand="1"
            xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
            xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:UsernameToken wsu:Id="UsernameToken-BCC4CF7DDCCDA67DF715859090203102">
                <wsse:Username>CUBE_B2C</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">P@ssw0rd</wsse:Password>
            </wsse:UsernameToken>
        </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
        <v1:getPerformanceAvailability>
            <pointOfSalesId>466533847</pointOfSalesId>
            <eventId>466498564</eventId>
            <performanceIds>466506363</performanceIds>
            <seatCategoryIds>466494155</seatCategoryIds>
        </v1:getPerformanceAvailability>
    </soapenv:Body>
</soapenv:Envelope>
Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
        <ns2:getPerformanceAvailabilityResponse xmlns:ns2="http://v1_33.RTAvailabilityService.service.secutix.com">
            <PerformanceAvailabilityResult>
                <requestId xsi:nil="true"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <statusCode>success</statusCode>
                <statusDetail xsi:nil="true"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <performanceAvailabilityData>
                    <performanceAvailabilities>
                        <availability>186</availability>
                        <availabilityLevel>GOOD</availabilityLevel>
                        <quota>188</quota>
                        <seatCategoryId>466494155</seatCategoryId>
                        <eventId>466498564</eventId>
                        <performanceId>466506363</performanceId>
                    </performanceAvailabilities>
                </performanceAvailabilityData>
            </PerformanceAvailabilityResult>
        </ns2:getPerformanceAvailabilityResponse>
    </S:Body>
</S:Envelope>

We can see there is a GOOD availability level. So we can proceed with the purchase.

Step 4: Create the order

pointOfSalesId comes from the getPosConfig response.
All the other ids are retrieved in the catalog.

Query
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:v1="http://v1_33.ExternalOrderFacade.service.secutix.com"
    xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <soapenv:Header>
        <ns2:Security>
            <ns2:UsernameToken>
                <ns2:Username>CUBE_B2C</ns2:Username>
                <ns2:Password>P@ssw0rd</ns2:Password>
            </ns2:UsernameToken>
        </ns2:Security>
    </soapenv:Header>
    <soapenv:Body>
        <v1:createOrUpdateOrder>
            <pointOfSalesId>466533847</pointOfSalesId>
            <orderType>SALE</orderType>
            <purchaserInfo>
                <contactReference>1</contactReference>
            </purchaserInfo>
            <singleEntryAttributionOperations>
                <operationAttributions>
                    <audienceSubCategoryId>466507298</audienceSubCategoryId>
                    <quantity>1</quantity>
                    <performanceId>466506363</performanceId>
                    <seatCategoryId>466494155</seatCategoryId>
                    <unitAmount>64000</unitAmount>
                </operationAttributions>
            </singleEntryAttributionOperations>
        </v1:createOrUpdateOrder>
    </soapenv:Body>
</soapenv:Envelope>
Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:createOrUpdateOrderResponse xmlns:ns2="http://v1_33.ExternalOrderFacade.service.secutix.com">
         <OrderUpdateResult>
            <requestId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            <statusCode>success</statusCode>
            <statusDetail xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            <expectedException>false</expectedException>
            <orderUpdateData>
               <catalogCurrency>
                  <currencyCode>EUR</currencyCode>
                  <fractionDigit>2</fractionDigit>
                  <minAmount>10</minAmount>
                  <symbol>€</symbol>
               </catalogCurrency>
               <generatedContactQualities/>
               <generatedContiguities>
                  <contiguous>true</contiguous>
                  <performanceId>466506363</performanceId>
                  <seatCategoryId>466494155</seatCategoryId>
                  <segments>
                     <movementIds>10228331768742</movementIds>
                  </segments>
               </generatedContiguities>
               <mainOperationId>10228331768440</mainOperationId>
               <movementDataUpdates>
                  <area>Amphithéâtre</area>
                  <areaId>466491539</areaId>
                  <areaKind>INDIFFERENT</areaKind>
                  <attributionMatch>NO_EXPECTATION</attributionMatch>
                  <entrance>Impair</entrance>
                  <entranceCode>Impair</entranceCode>
                  <entranceId>466491427</entranceId>
                  <movementId>10228331768742</movementId>
                  <operationId>10228331768440</operationId>
                  <resumed>false</resumed>
                  <saleSeatId>64089803</saleSeatId>
                  <scenePhotoLink>garnier/AMP-0-15-33.jpg</scenePhotoLink>
                  <seatCategory>Cat 2</seatCategory>
                  <seatCategoryId>466494155</seatCategoryId>
                  <seatId>466491973</seatId>
                  <seatNumber>19</seatNumber>
                  <seatOrientation>180</seatOrientation>
                  <seatQuality>Siège</seatQuality>
                  <seatQualityCode>Siège</seatQualityCode>
                  <seatQualityId>2427</seatQualityId>
                  <stageVisibility>VISIBLE</stageVisibility>
                  <titlingVisibility>VISIBLE</titlingVisibility>
                  <transferable>false</transferable>
                  <type>SEAT</type>
                  <xCoordinate>2895</xCoordinate>
                  <yCoordinate>563</yCoordinate>
               </movementDataUpdates>
               <operationDataUpdates>
                  <activityType>LIVE_SPECT</activityType>
                  <audienceCatId>15655</audienceCatId>
                  <audienceSubCategory>TR3SC 20%</audienceSubCategory>
                  <audienceSubCategoryId>466507298</audienceSubCategoryId>
                  <audienceSubCategoryRank>7</audienceSubCategoryRank>
                  <audienceSubCategoryRequireAttachment>false</audienceSubCategoryRequireAttachment>
                  <basePrice>64000</basePrice>
                  <catalogCurrency>
                     <currencyCode>EUR</currencyCode>
                     <fractionDigit>2</fractionDigit>
                     <minAmount>10</minAmount>
                     <symbol>€</symbol>
                  </catalogCurrency>
                  <comfortVariableValues/>
                  <contingentId>0</contingentId>
                  <eventId>466498564</eventId>
                  <exchangeable>false</exchangeable>
                  <fileId>10000004136</fileId>
                  <isNominative>false</isNominative>
                  <itemDisplayExternalDesignation>La Clemenza di Tito</itemDisplayExternalDesignation>
                  <itemId>466596125</itemId>
                  <kind>SINGLE_ENTRY</kind>
                  <locations>
                     <siteAddress>
                        <countryCode>FR</countryCode>
                        <firstAddressLine>24 rue de Londres</firstAddressLine>
                        <locality>PARIS</locality>
                        <zipCode>75009</zipCode>
                     </siteAddress>
                     <siteCode>Theatre</siteCode>
                     <siteExternalName>
                        <translations>
                           <locale>fr</locale>
                           <value>Théâtre</value>
                        </translations>
                        <translations>
                           <locale>en</locale>
                           <value>Theatre</value>
                        </translations>
                        <translations>
                           <locale>de</locale>
                           <value>Theater</value>
                        </translations>
                        <translations>
                           <locale>es</locale>
                           <value>Teatro</value>
                        </translations>
                     </siteExternalName>
                     <spaceCode>Grande</spaceCode>
                     <spaceExternalName>
                        <translations>
                           <locale>fr</locale>
                           <value>Grande Salle</value>
                        </translations>
                        <translations>
                           <locale>en</locale>
                           <value>Large room</value>
                        </translations>
                        <translations>
                           <locale>de</locale>
                           <value>Grosser Saal</value>
                        </translations>
                        <translations>
                           <locale>es</locale>
                           <value>Gran sala</value>
                        </translations>
                     </spaceExternalName>
                  </locations>
                  <numbered>true</numbered>
                  <operationId>10228331768440</operationId>
                  <operationNumber>1</operationNumber>
                  <performance>La Clemenza di Tito</performance>
                  <performanceCode>Clemenza</performanceCode>
                  <performanceDate>2021-10-16T19:30:00+02:00</performanceDate>
                  <performanceDuration>10500</performanceDuration>
                  <performanceId>466506363</performanceId>
                  <physicalConfigurationId>466491326</physicalConfigurationId>
                  <product>La Clemenza di Tito</product>
                  <productCode>Clemenza</productCode>
                  <productFamilySubType>SIMPLE_TICKET</productFamilySubType>
                  <productFamilyType>SINGLE_ENTRY</productFamilyType>
                  <productId>466498564</productId>
                  <quantity>1</quantity>
                  <season>Saison 1</season>
                  <seatCategory>Cat 2</seatCategory>
                  <seatCategoryBgColor>1C73BA</seatCategoryBgColor>
                  <seatCategoryId>466494155</seatCategoryId>
                  <seatCategoryRank>2</seatCategoryRank>
                  <selfPaidVat>false</selfPaidVat>
                  <site>Théâtre</site>
                  <siteAddress>
                     <countryCode>FR</countryCode>
                     <firstAddressLine>24 rue de Londres</firstAddressLine>
                     <locality>PARIS</locality>
                     <zipCode>75009</zipCode>
                  </siteAddress>
                  <siteId>466491023</siteId>
                  <space>Grande Salle</space>
                  <totalAmount>64000</totalAmount>
                  <type>PRE_SALE</type>
                  <unitPrice>64000</unitPrice>
                  <vatCountryCode>FR</vatCountryCode>
                  <vatRate>2100</vatRate>
                  <waitingAccountBalance>0</waitingAccountBalance>
                  <withoutVatTotalAmount>62680</withoutVatTotalAmount>
               </operationDataUpdates>
               <orderId>10000006628</orderId>
               <orderSecretId>92e5b3bc-93cc-40ca-a302-37aad16d25ed_10000006628</orderSecretId>
               <origin>
                  <toCreateToken>false</toCreateToken>
               </origin>
            </orderUpdateData>
         </OrderUpdateResult>
      </ns2:createOrUpdateOrderResponse>
   </S:Body>
</S:Envelope>

Information extracted from response:

  • orderId: 10000006628
  • movementId: 10228263917608
  • amount: 64000

Step 5: Close the order

orderId and movementId and amount all come from the response to the order creation.

Query
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://v1_33.ExternalOrderService.service.secutix.com">
   <soapenv:Header>
      <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>CUBE_B2C</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">P@ssw0rd</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <v1:closeOrder>
          <purchaserInfo>
              <contactReference>1</contactReference>
          </purchaserInfo>
         <orderId>10000006628</orderId>
         <maxWaitingTime>2000</maxWaitingTime>
         <orderType>SALE</orderType>
      </v1:closeOrder>
   </soapenv:Body>
</soapenv:Envelope>

Step joker: Checking order status

Query
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://v1_33.ExternalOrderService.service.secutix.com" xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
  <soapenv:Header>
    <ns2:Security>
      <ns2:UsernameToken>
        <ns2:Username>CUBE_B2C</ns2:Username>
        <ns2:Password>P@ssw0rd</ns2:Password>
      </ns2:UsernameToken>
    </ns2:Security>
  </soapenv:Header>
  <soapenv:Body>
    <v1:getOrderDetails>
      <orderId>10000006628</orderId>
    </v1:getOrderDetails>
  </soapenv:Body>
</soapenv:Envelope>