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 SOAP
<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>
Query REST

https://cube.demo-ws.secutix.com/tnseb/backend-apis/catalogService/v1_33/getCatalogDetailed

{

}
Response SOAP and REST

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

Here is a link with a zipped version REST 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 SOAP
<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>
Query REST

https://cube.demo-ws.secutix.com/tnseb/backend-apis/catalogService/v1_33/getPOSConfig

{

}
Response SOAP and REST

Link to zip file SOAP

Link to zip file REST

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 SOAP
<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>
Query REST

https://cube.demo-ws.secutix.com/tnseb/backend-apis/availabilityService/v1_33/getPerformanceAvailability

{
  "pointOfSalesId": "466533847",
  "eventId": "466498564",
  "performanceIds": ["466506363"],
  "seatCategoryIds": ["466494155"]
}
Response SOAP
<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.

Response REST
{
  "statusCode": "success",
  "performanceAvailabilityData": {
    "performanceAvailabilities": [
      {
        "availabilityLevel": "GOOD",
        "availability": 186,
        "seatCategoryId": 466494155,
        "quota": 188,
        "eventId": 466498564,
        "performanceId": 466506363
      }
    ]
  }
}

Step 4: Create the order

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

Query SOAP
<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>
Query REST

https://cube.demo-ws.secutix.com/tnseb/backend-apis/externalOrderFacade/v1_33/createOrUpdateOrder

{
  "pointOfSalesId": "466533847",
  "orderType": "SALE",
  "purchasersInfo": [{
    "contactReference": "1"
  }],
  "singleEntryAttributionOperations" :[{
    "operationAttributions" : [{
      "audienceSubCategoryId": "466507298",
      "quantity" : "1",
      "performanceId" : "466506363",
      "seatCategoryId" : "466494155",
      "unitPriceAmount" : "64000"
    }]
  }]
}
Response SOAP
<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>
Response REST
{
  "statusCode": "success",
  "expectedException": false,
  "orderUpdateData": {
    "orderId": 10000014868,
    "operationDataUpdates": [
      {
        "operationId": 10228464930526,
        "kind": "SINGLE_ENTRY",
        "type": "PRE_SALE",
        "quantity": 1,
        "basePrice": 64000,
        "unitPrice": 64000,
        "withoutVatTotalAmount": 62680,
        "totalAmount": 64000,
        "productId": 466498564,
        "product": "La Clemenza di Tito",
        "productCode": "Clemenza",
        "itemId": 466596125,
        "performanceId": 466506363,
        "performance": "La Clemenza di Tito",
        "eventId": 466498564,
        "physicalConfigurationId": 466491326,
        "siteId": 466491023,
        "site": "Théâtre",
        "siteAddress": {
          "firstAddressLine": "24 rue de Londres",
          "zipCode": "75009",
          "locality": "PARIS",
          "countryCode": "FR"
        },
        "space": "Grande Salle",
        "contingentId": 0,
        "numbered": true,
        "seatCategoryId": 466494155,
        "seatCategory": "Cat 2",
        "seatCategoryRank": 2,
        "audienceSubCategoryId": 466507298,
        "audienceSubCategory": "TR3SC 20%",
        "audienceSubCategoryRank": 7,
        "audienceSubCategoryRequireAttachment": false,
        "vatRate": 2100,
        "vatCountryCode": "FR",
        "selfPaidVat": false,
        "operationNumber": 1,
        "productFamilyType": "SINGLE_ENTRY",
        "productFamilySubType": "SIMPLE_TICKET",
        "activityType": "LIVE_SPECT",
        "performanceDate": "2022-03-11T19:30:00.000+01:00",
        "performanceDuration": 10500,
        "itemDisplayExternalDesignation": "La Clemenza di Tito",
        "locations": [
          {
            "spaceCode": "Grande",
            "siteCode": "Theatre",
            "spaceExternalName": {
              "translations": [
                {
                  "locale": "fr",
                  "value": "Grande Salle"
                },
                {
                  "locale": "en",
                  "value": "Large room"
                },
                {
                  "locale": "de",
                  "value": "Grosser Saal"
                },
                {
                  "locale": "es",
                  "value": "Gran sala"
                }
              ]
            },
            "siteExternalName": {
              "translations": [
                {
                  "locale": "fr",
                  "value": "Théâtre"
                },
                {
                  "locale": "en",
                  "value": "Theatre"
                },
                {
                  "locale": "de",
                  "value": "Theater"
                },
                {
                  "locale": "es",
                  "value": "Teatro"
                }
              ]
            },
            "siteAddress": {
              "firstAddressLine": "24 rue de Londres",
              "zipCode": "75009",
              "locality": "PARIS",
              "countryCode": "FR"
            }
          }
        ],
        "fileId": 10000009696,
        "waitingAccountBalance": 0,
        "seatCategoryBgColor": "1C73BA",
        "season": "Saison 1",
        "crossSellParentOperationIds": [],
        "comfortVariableValues": {},
        "performanceCode": "Clemenza",
        "audienceCatId": 15655,
        "exchangeable": false,
        "isNominative": false
      }
    ],
    "removeOperationIds": [],
    "movementDataUpdates": [
      {
        "movementId": 10228464930626,
        "operationId": 10228464930526,
        "type": "SEAT",
        "seatId": 466493061,
        "saleSeatId": 64089805,
        "seatCategoryId": 466494155,
        "seatCategory": "Cat 2",
        "areaId": 466491539,
        "area": "Amphithéâtre",
        "entranceId": 466491427,
        "entrance": "Impair",
        "entranceCode": "Impair",
        "seatNumber": "23",
        "seatQualityId": 2427,
        "seatQuality": "Siège",
        "seatQualityCode": "Siège",
        "yCoordinate": 563,
        "xCoordinate": 2807,
        "seatOrientation": 180,
        "scenePhotoLink": "garnier/AMP-0-S83-30.jpg",
        "titlingVisibility": "VISIBLE",
        "stageVisibility": "VISIBLE",
        "areaKind": "INDIFFERENT",
        "resumed": false,
        "attributionMatch": "NO_EXPECTATION",
        "externalReferences": []
      }
    ],
    "removeMovementIds": [],
    "mainOperationId": 10228464930526,
    "generatedContiguities": [
      {
        "performanceId": 466506363,
        "contiguous": true,
        "seatCategoryId": 466494155,
        "segments": [
          {
            "movementIds": [
              10228464930626
            ]
          }
        ]
      }
    ],
    "generatedContactQualities": {},
    "origin": {
      "toCreateToken": false
    },
    "orderSecretId": "a23ac130-e1de-4512-a5cb-4b7cf29f7b4c_10000014868",
    "catalogCurrency": {
      "currencyCode": "EUR",
      "symbol": "€",
      "fractionDigit": 2,
      "minAmount": 10
    }
  }
}

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 SOAP
<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>
Query REST

https://cube.demo-ws.secutix.com/tnseb/backend-apis/externalOrderService/v1_33/closeOrder

{
  "purchaserInfo": {
      "contactReference": "1"
    },
  "orderId" : "10000014774",
  "maxWaitingTime" : "2000",
  "orderType" : "SALE"
}

Step joker: Checking order status

Query SOAP
<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>
Query REST

https://cube.demo-ws.secutix.com/tnseb/backend-apis/externalOrderService/v1_33/getOrderDetails

{
  "orderId": "10000006628"
}