Informe de agencia (getAgencyReport)
El método getAgencyReport devuelve el informe de agencia de una reserva o de un presupuesto en formato PDF, con los importes y comisiones de la agencia.
Parámetros
Sección titulada «Parámetros»| Parámetro | Obligatorio | Descripción |
|---|---|---|
authenticationData |
Sí | Credenciales (ver autenticación). |
bookingReference |
Sí | Localizador de la reserva o del presupuesto. |
bookingType |
No | BOOKING_QUOTE para presupuestos; si se omite, reserva. |
multiBankCodeMandatory |
Sí | Obligatorio en el esquema, pero hoy no altera el resultado. Envía false. |
Ejemplo
Sección titulada «Ejemplo»Code getAgencyReport
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bar="http://barcelo.ws.barcelo.com/"> <soapenv:Header/> <soapenv:Body> <bar:getAgencyReport> <authenticationData> <bar:user>USUARIO</bar:user> <bar:password>CLAVE</bar:password> <bar:locale>es_ES</bar:locale> <bar:domain>barcelo</bar:domain> </authenticationData> <bookingReference>12345678</bookingReference> <bookingType>BOOKING</bookingType> <multiBankCodeMandatory>false</multiBankCodeMandatory> </bar:getAgencyReport> </soapenv:Body></soapenv:Envelope>Response getAgencyReport
La respuesta es un mensaje multipart MTOM. El PDF viaja como adjunto binario y el cuerpo SOAP lo referencia con xop:Include:
--uuid:0c51d204-e832-4e45-b9e0-b08346d258f5Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"Content-Transfer-Encoding: binaryContent-ID: <root.message@cxf.apache.org>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:getAgencyReportResponse xmlns:ns2="http://barcelo.ws.barcelo.com/"> <agencyReport> <xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:7e1f5a2c-1b3d-4c9e-9f0a-2d8b6c4e1a77-1@cxf.apache.org"/> </agencyReport> </ns2:getAgencyReportResponse> </soap:Body></soap:Envelope>--uuid:0c51d204-e832-4e45-b9e0-b08346d258f5Content-Type: application/pdfContent-Transfer-Encoding: binaryContent-ID: <7e1f5a2c-1b3d-4c9e-9f0a-2d8b6c4e1a77-1@cxf.apache.org>
%PDF-1.7 ... (contenido binario del PDF)--uuid:0c51d204-e832-4e45-b9e0-b08346d258f5--Respuesta
Sección titulada «Respuesta»El elemento agencyReport (tipo base64Binary en el WSDL) contiene el PDF. Los clientes con soporte MTOM lo reciben como adjunto binario; los clientes sin soporte MTOM lo reciben codificado en base64 dentro del propio elemento.
Errores
Sección titulada «Errores»Esta operación devuelve un fault genérico: el código de error va al final de faultstring. Ver Códigos de error.
Siguientes pasos
Sección titulada «Siguientes pasos» getBooking → Consulta el detalle completo de la reserva.
Códigos de error → Consulta el formato de los errores del servicio.