How to create and close an order (Theatres)

Steps

  • Step 1 : retrieve catalog
  • Step 2 : check point of sales 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_26.CatalogService.webservice

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

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

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

Step 1: retreive catalog

Must be done once a day (see here)

Query
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:v1="http://v1_26.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 configuration

This can only be done once in a while. 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_26.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_26.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_26.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_26.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>
            <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_26.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>10228263917608</movementIds>
                  </segments>
               </generatedContiguities>
               <mainOperationId>10228263917505</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>10228263917608</movementId>
                  <operationId>10228263917505</operationId>
                  <resumed>false</resumed>
                  <saleSeatId>64089806</saleSeatId>
                  <scenePhotoLink>garnier/AMP-0-S83-30.jpg</scenePhotoLink>
                  <seatCategory>Cat 2</seatCategory>
                  <seatCategoryId>466494155</seatCategoryId>
                  <seatId>466493048</seatId>
                  <seatNumber>25</seatNumber>
                  <seatOrientation>180</seatOrientation>
                  <seatQuality>Siège</seatQuality>
                  <seatQualityCode>Siège</seatQualityCode>
                  <seatQualityId>2427</seatQualityId>
                  <stageVisibility>VISIBLE</stageVisibility>
                  <titlingVisibility>VISIBLE</titlingVisibility>
                  <type>SEAT</type>
                  <xCoordinate>2763</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>
                  <comfortVariableValues/>
                  <contingentId>0</contingentId>
                  <eventId>466498564</eventId>
                  <fileId>10000002565</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>10228263917505</operationId>
                  <operationNumber>1</operationNumber>
                  <performance>La Clemenza di Tito</performance>
                  <performanceCode>Clemenza</performanceCode>
                  <performanceDate>2020-06-12T19: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>2085D7</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>
                  <unitPrice>64000</unitPrice>
                  <vatCountryCode>FR</vatCountryCode>
                  <vatRate>2100</vatRate>
                  <waitingAccountBalance>0</waitingAccountBalance>
                  <withoutVatTotalAmount>62680</withoutVatTotalAmount>
               </operationDataUpdates>
               <orderId>11000361531</orderId>
               <orderSecretId>47ddf38f-a5d6-4442-a8a8-60a64ca1a3de_11000361531</orderSecretId>
               <origin>
                  <toCreateToken>false</toCreateToken>
               </origin>
            </orderUpdateData>
         </OrderUpdateResult>
      </ns2:createOrUpdateOrderResponse>
   </S:Body>
</S:Envelope>

Information extracted from response:

  • orderId: 11000361531
  • movementId: 10228263917608
  • amount: 64000

Step 5: close the order and create payment

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

Contact reference, here is a given contact able to handle waiting account payments. Contact reference can also be obtained by searching/creating contact through contact web services.

paymentMethodId comes from getPosConfig response.

Query
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:v1="http://v1_26.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:createPaymentsAndCloseOrder>
            <orderId>11000361531</orderId>
            <payments>
                <amount>64000</amount>
                <paymentMethodId>16369</paymentMethodId>
            </payments>
            <paymentParams>
                <contactNumber>44602</contactNumber>
                <pointOfSalesId>466533847</pointOfSalesId>
                <totalAmount>64000</totalAmount>
            </paymentParams>
            <orderType>SALE</orderType>
            <maxWaitingTime>0</maxWaitingTime>
            <purchasersInfo>
                <contactReference>44602</contactReference>
            </purchasersInfo>
        </v1:createPaymentsAndCloseOrder>
    </soapenv:Body>
</soapenv:Envelope>

Step joker: Checking order status

Query
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://v1_26.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>11000361531</orderId>
    </v1:getOrderDetails>
  </soapenv:Body>
</soapenv:Envelope>