How to create and close an order (Museums)

Steps

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

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

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

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

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

Step 1: Retrieve catalog

It must be done only 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" 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>MOSA_B2C</ns2:Username>
        <ns2:Password>P@ssw0rd</ns2:Password>
      </ns2:UsernameToken>
    </ns2:Security>
  </soapenv:Header>
  <soapenv:Body>
    <v1:getCatalogDetailed></v1:getCatalogDetailed>
  </soapenv:Body>
</soapenv:Envelope>
Response

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

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" 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>MOSA_B2C</ns2:Username>
        <ns2:Password>P@ssw0rd</ns2:Password>
      </ns2:UsernameToken>
    </ns2:Security>
  </soapenv:Header>
  <soapenv:Body>
    <v1:getPOSConfig></v1:getPOSConfig>
  </soapenv:Body>
</soapenv:Envelope>
Response

Link to zip file

Step 3: 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">
   <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>MOSA_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:createOrUpdateOrder>
         <pointOfSalesId>466653735</pointOfSalesId>
         <orderType>SALE</orderType>
         <purchasersInfo>
            <contactReference>5442</contactReference>
         </purchasersInfo>
         <simpleProductOperations>
            <audienceSubCategoryId>306159078</audienceSubCategoryId>
            <quantity>1</quantity>
            <itemId>466638397</itemId>
         </simpleProductOperations>
      </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/>
               <mainOperationId>10228331768439</mainOperationId>
               <movementDataUpdates>
                  <attributionMatch>NO_EXPECTATION</attributionMatch>
                  <contingent>Ventes en ligne</contingent>
                  <contingentId>466646159</contingentId>
                  <endValidityDate>2022-08-24T00:00:00+02:00</endValidityDate>
                  <instanceNumber>2784</instanceNumber>
                  <movementId>10228331768741</movementId>
                  <operationId>10228331768439</operationId>
                  <resumed>false</resumed>
                  <startValidityDate>2021-08-25T00:00:00+02:00</startValidityDate>
                  <transferable>false</transferable>
                  <type>SIMPLE_PRODUCT</type>
               </movementDataUpdates>
               <operationDataUpdates>
                  <audienceCatId>15655</audienceCatId>
                  <audienceSubCategory>Adulte</audienceSubCategory>
                  <audienceSubCategoryExternalDescription>&lt;p>Plein Tarif&lt;/p></audienceSubCategoryExternalDescription>
                  <audienceSubCategoryId>306159078</audienceSubCategoryId>
                  <audienceSubCategoryRank>1</audienceSubCategoryRank>
                  <audienceSubCategoryRequireAttachment>false</audienceSubCategoryRequireAttachment>
                  <basePrice>17000</basePrice>
                  <catalogCurrency>
                     <currencyCode>EUR</currencyCode>
                     <fractionDigit>2</fractionDigit>
                     <minAmount>10</minAmount>
                     <symbol>€</symbol>
                  </catalogCurrency>
                  <comfortVariableValues/>
                  <contingent>Ventes en ligne</contingent>
                  <contingentId>466646159</contingentId>
                  <exchangeable>false</exchangeable>
                  <fileId>34757</fileId>
                  <isNominative>false</isNominative>
                  <itemDisplayExternalDesignation>Entrée VIP</itemDisplayExternalDesignation>
                  <itemId>466638397</itemId>
                  <kind>SIMPLE_PRODUCT</kind>
                  <locations>
                     <siteAddress>
                        <countryCode>FR</countryCode>
                        <firstAddressLine>62, rue de Lille</firstAddressLine>
                        <locality>Paris</locality>
                        <zipCode>75007</zipCode>
                     </siteAddress>
                     <siteCode>MOSA</siteCode>
                     <siteExternalName>
                        <translations>
                           <locale>fr</locale>
                           <value>MoSA Musée</value>
                        </translations>
                        <translations>
                           <locale>en</locale>
                           <value>MoSA Museum</value>
                        </translations>
                        <translations>
                           <locale>es</locale>
                           <value>Museo MoSA</value>
                        </translations>
                        <translations>
                           <locale>de</locale>
                           <value>MWK-Museum</value>
                        </translations>
                        <translations>
                           <locale>it</locale>
                           <value>Museo MoSA</value>
                        </translations>
                     </siteExternalName>
                     <spaceCode>MUSEUM</spaceCode>
                     <spaceExternalName>
                        <translations>
                           <locale>fr</locale>
                           <value>Museum</value>
                        </translations>
                        <translations>
                           <locale>en</locale>
                           <value>Museum</value>
                        </translations>
                        <translations>
                           <locale>es</locale>
                           <value>Museo</value>
                        </translations>
                        <translations>
                           <locale>de</locale>
                           <value>Museum</value>
                        </translations>
                        <translations>
                           <locale>it</locale>
                           <value>Museo</value>
                        </translations>
                     </spaceExternalName>
                  </locations>
                  <numbered>false</numbered>
                  <operationId>10228331768439</operationId>
                  <operationNumber>1</operationNumber>
                  <product>Entrée VIP</product>
                  <productCode>VIPentry</productCode>
                  <productFamilySubType>OPEN_PASS</productFamilySubType>
                  <productFamilyType>PASS</productFamilyType>
                  <productId>466637980</productId>
                  <quantity>1</quantity>
                  <season>Saison 1</season>
                  <selfPaidVat>false</selfPaidVat>
                  <totalAmount>17000</totalAmount>
                  <type>PRE_SALE</type>
                  <unitPrice>17000</unitPrice>
                  <vatCountryCode>FR</vatCountryCode>
                  <vatRate>0</vatRate>
                  <waitingAccountBalance>0</waitingAccountBalance>
                  <withoutVatTotalAmount>17000</withoutVatTotalAmount>
               </operationDataUpdates>
               <orderId>10000437289</orderId>
               <orderSecretId>9dd535da-9ddb-49fd-b978-da68a6b6d3fc_10000437289</orderSecretId>
               <origin>
                  <toCreateToken>false</toCreateToken>
               </origin>
            </orderUpdateData>
         </OrderUpdateResult>
      </ns2:createOrUpdateOrderResponse>
   </S:Body>
</S:Envelope>

Step 4: Close the order

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_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>MOSA_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>5443</contactReference>
         </purchaserInfo>
         <orderId>10000437289</orderId>
         <generateBarCodes>true</generateBarCodes>
         <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>MOSA_B2C</ns2:Username>
        <ns2:Password>P@ssw0rd</ns2:Password>
      </ns2:UsernameToken>
    </ns2:Security>
  </soapenv:Header>
  <soapenv:Body>
    <v1:getOrderDetails>
      <orderId>10000437289</orderId>
    </v1:getOrderDetails>
  </soapenv:Body>
</soapenv:Envelope>