> For the complete documentation index, see [llms.txt](https://wikiedoc.guru-soft.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wikiedoc.guru-soft.com/pe/integraciones-y-servicios/soap/emision/guia-de-remision.md).

# Guía de Remisión

## Introducción

La Guía de Remisión Electrónica Remitente – GRE, es el documento electrónico emitido por el usuario Remitente en formato digital para sustentar el transporte o traslado de bienes.

La Guía de Remisión Electrónica Transportista – GRE, es el documento electrónico emitido por el usuario Transportista en formato digital para sustentar el transporte o traslado de bienes.

El transportista emite una GRE - transportista en los siguientes casos:

* Por una unidad de transporte
* Por cada destino o punto de llegada
* Por cada destinatario
* Por cada remitente

Para simplificar la emisión de la GRE – transportista, se permite que el transportista pueda emitir una sola GRE- transportista cuando realice el traslado de bienes asociados a más de una GRE – remitente siempre que estas contengan información del mismo destinatario, punto de partida y punto de llegada.

Se exceptúa la obligación de emitir la GRE – transportista cuando el traslado se realice utilizando vehículos de las categorías L (comprende vehículos automotores de dos o tres ruedas y cuatriciclos destinados a circular por las vías públicas terrestres) y M1(comprende vehículos automotores de cuatro ruedas o más diseñados y construidos para el transporte de pasajeros que constan de 8 asientos o menos, sin contar el asiento del conductor) según la clasificación vehicular establecida en el Reglamento Nacional de vehículos aprobado por el Decreto Supremo N.° 058-2003-MTC. Sin embargo, esta excepción no será aplicable en aquellos casos en los que no se emita la guía de remisión remitente, pues de lo contrario no habrá ningún documento que sustente el traslado de bienes.

**Beneficios de la Facturación Electrónica**

* **Eficiencia Operativa:** La automatización del proceso de facturación reduce la carga administrativa, disminuyendo los errores humanos y acelerando las transacciones.
* **Reducción de Costos:** Menores gastos en papel, impresión, envío y almacenamiento de documentos físicos.
* **Acceso y Gestión Simplificados:** El almacenamiento digital facilita la búsqueda y gestión de documentos, lo que es especialmente útil para auditorías y cumplimiento fiscal

## Autenticación

Para acceder al servicio de facturación electrónica a través de nuestra API SOAP deben de identificarse y autenticarse usando una credencial única denominada **Clave**.

La autenticación se realiza incluyendo la credencial en el cuerpo del mensaje SOAP, dentro del nodo `<Clave>`. A continuación, se describe la estructura de la solicitud.

Ejemplo:

```xml
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:emis="https://pe.edocnube.com/api/emision" xmlns:gui="https://pe.edocnube.com/api/emision/guiaRemision" xmlns:des="https://pe.edocnube.com/api/emision/ubl/despatchAdvice" xmlns:des1="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.note" xmlns:des2="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty" xmlns:des3="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party" xmlns:des4="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification" xmlns:des5="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification.iD" xmlns:des6="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyLegalEntity" xmlns:des7="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty" xmlns:des8="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party" xmlns:des9="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification" xmlns:des10="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification.iD" xmlns:des11="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyLegalEntity" xmlns:des12="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty" xmlns:des13="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party" xmlns:des14="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification" xmlns:des15="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification.iD" xmlns:des16="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyLegalEntity" xmlns:des17="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty" xmlns:des18="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party" xmlns:des19="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification" xmlns:des20="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification.iD" xmlns:des21="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyLegalEntity" xmlns:des22="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty" xmlns:des23="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party" xmlns:des24="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification" xmlns:des25="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification.iD" xmlns:des26="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyLegalEntity" xmlns:des27="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference" xmlns:des28="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty" xmlns:des29="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification" xmlns:des30="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification.iD" xmlns:des31="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment" xmlns:des32="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.handlingInstruction" xmlns:des33="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.information" xmlns:des34="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.grossWeightMeasure" xmlns:des35="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.netWeightMeasure" xmlns:des36="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.specialInstruction" xmlns:des37="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment" xmlns:des38="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty" xmlns:des39="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification" xmlns:des40="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification.iD" xmlns:des41="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyLegalEntity" xmlns:des42="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage" xmlns:des43="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transitPeriod" xmlns:des44="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty" xmlns:des45="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification" xmlns:des46="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification.iD" xmlns:des47="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyLegalEntity" xmlns:des48="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty" xmlns:des49="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity" xmlns:des50="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity.companyID" xmlns:des51="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.loadingTransportEvent" xmlns:des52="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transportEvent" xmlns:des53="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson" xmlns:des54="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.iD" xmlns:des55="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.identityDocumentReference" xmlns:des56="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery" xmlns:des57="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress" xmlns:des58="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressTypeCode" xmlns:des59="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressLine" xmlns:des60="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.locationCoordinate" xmlns:des61="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch" xmlns:des62="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress" xmlns:des63="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressTypeCode" xmlns:des64="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressLine" xmlns:des65="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.locationCoordinate" xmlns:des66="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty" xmlns:des67="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification" xmlns:des68="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification.iD" xmlns:des69="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyLegalEntity" xmlns:des70="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty" xmlns:des71="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity" xmlns:des72="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity.companyID" xmlns:des73="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit" xmlns:des74="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment" xmlns:des75="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.applicableTransportMean" xmlns:des76="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment" xmlns:des77="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.applicableTransportMean" xmlns:des78="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference" xmlns:des79="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference.iD" xmlns:des80="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference" xmlns:des81="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference.iD" xmlns:des82="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.package" xmlns:des83="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.firstArrivalPortLocation" xmlns:des84="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine" xmlns:des85="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.deliveredQuantity" xmlns:des86="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.orderLineReference" xmlns:des87="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item" xmlns:des88="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.description" xmlns:des89="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.sellersItemIdentification" xmlns:des90="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification" xmlns:des91="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification.iD" xmlns:des92="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.commodityClassification" xmlns:des93="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.additionalItemProperty" xmlns:ext="https://pe.edocnube.com/api/emision/extensiones">
   <soapenv:Header/>
   <soapenv:Body>
      <emis:EmitirGuiaRemision>
         <emis:Clave>-------------</emis:Clave>
         <emis:GuiaRemision/>
      </emis:EmitirGuiaRemision>
   </soapenv:Body>
</soapenv:Envelope>
```

<table><thead><tr><th width="143">Elementos</th><th>Descripción</th></tr></thead><tbody><tr><td>Clave</td><td><strong>Requerido.</strong> Credencial única proporcionada a la empresa para autenticarse. Esta clave es específica y debe mantenerse confidencial.</td></tr></tbody></table>

{% tabs %}
{% tab title="JavaScript" %}

```javascript
 url = '/URL_SOAP_EMISION/EmitirDocumentoService.svc?wsdl';

// XML del mensaje SOAP
const soapRequest = `
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:emis="https://pe.edocnube.com/api/emision" xmlns:gui="https://pe.edocnube.com/api/emision/guiaRemision" xmlns:des="https://pe.edocnube.com/api/emision/ubl/despatchAdvice" xmlns:des1="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.note" xmlns:des2="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty" xmlns:des3="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party" xmlns:des4="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification" xmlns:des5="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification.iD" xmlns:des6="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyLegalEntity" xmlns:des7="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty" xmlns:des8="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party" xmlns:des9="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification" xmlns:des10="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification.iD" xmlns:des11="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyLegalEntity" xmlns:des12="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty" xmlns:des13="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party" xmlns:des14="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification" xmlns:des15="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification.iD" xmlns:des16="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyLegalEntity" xmlns:des17="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty" xmlns:des18="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party" xmlns:des19="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification" xmlns:des20="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification.iD" xmlns:des21="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyLegalEntity" xmlns:des22="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty" xmlns:des23="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party" xmlns:des24="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification" xmlns:des25="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification.iD" xmlns:des26="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyLegalEntity" xmlns:des27="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference" xmlns:des28="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty" xmlns:des29="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification" xmlns:des30="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification.iD" xmlns:des31="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment" xmlns:des32="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.handlingInstruction" xmlns:des33="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.information" xmlns:des34="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.grossWeightMeasure" xmlns:des35="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.netWeightMeasure" xmlns:des36="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.specialInstruction" xmlns:des37="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment" xmlns:des38="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty" xmlns:des39="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification" xmlns:des40="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification.iD" xmlns:des41="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyLegalEntity" xmlns:des42="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage" xmlns:des43="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transitPeriod" xmlns:des44="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty" xmlns:des45="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification" xmlns:des46="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification.iD" xmlns:des47="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyLegalEntity" xmlns:des48="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty" xmlns:des49="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity" xmlns:des50="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity.companyID" xmlns:des51="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.loadingTransportEvent" xmlns:des52="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transportEvent" xmlns:des53="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson" xmlns:des54="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.iD" xmlns:des55="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.identityDocumentReference" xmlns:des56="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery" xmlns:des57="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress" xmlns:des58="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressTypeCode" xmlns:des59="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressLine" xmlns:des60="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.locationCoordinate" xmlns:des61="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch" xmlns:des62="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress" xmlns:des63="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressTypeCode" xmlns:des64="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressLine" xmlns:des65="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.locationCoordinate" xmlns:des66="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty" xmlns:des67="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification" xmlns:des68="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification.iD" xmlns:des69="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyLegalEntity" xmlns:des70="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty" xmlns:des71="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity" xmlns:des72="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity.companyID" xmlns:des73="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit" xmlns:des74="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment" xmlns:des75="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.applicableTransportMean" xmlns:des76="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment" xmlns:des77="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.applicableTransportMean" xmlns:des78="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference" xmlns:des79="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference.iD" xmlns:des80="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference" xmlns:des81="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference.iD" xmlns:des82="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.package" xmlns:des83="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.firstArrivalPortLocation" xmlns:des84="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine" xmlns:des85="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.deliveredQuantity" xmlns:des86="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.orderLineReference" xmlns:des87="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item" xmlns:des88="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.description" xmlns:des89="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.sellersItemIdentification" xmlns:des90="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification" xmlns:des91="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification.iD" xmlns:des92="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.commodityClassification" xmlns:des93="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.additionalItemProperty" xmlns:ext="https://pe.edocnube.com/api/emision/extensiones">
   <soapenv:Header/>
   <soapenv:Body>
      <emis:EmitirGuiaRemision>
         <emis:Clave>-------------</emis:Clave>
         <emis:GuiaRemision/>
      </emis:EmitirGuiaRemision>
   </soapenv:Body>
</soapenv:Envelope>
`;

// Configuración de la solicitud HTTP
const headers = {
  'Content-Type': 'text/xml; charset=utf-8', // Tipo de contenido para SOAP
  SOAPAction: 'http://tempuri.org/EmitirDocumentoService/EmitirGuiaRemision', // Acción SOAP específica
};

// Realizar la solicitud con fetch
fetch(url, {
  method: 'POST',
  headers: headers,
  body: soapRequest,
})
  .then((response) => {
    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }
    return response.text();
  })
  .then((data) => {
    console.log('Respuesta SOAP:', data);
  })
  .catch((error) => {
    console.error('Error en la solicitud SOAP:', error.message);
  });

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
// URL del servicio WSDL
$wsdl = "/URL_SOAP_EMISION/EmitirDocumentoService.svc?wsdl";

try {
    // Crear un cliente SOAP
    $client = new SoapClient($wsdl, [
        'trace' => true,       // Habilitar trazas para depuración
        'cache_wsdl' => WSDL_CACHE_NONE, // No cachear el WSDL
        'exceptions' => true   // Lanzar excepciones en errores
    ]);

    // Parámetros para el método
    $params = [
        "Clave" => "{CLAVE_VALOR}", // Credencial única
        "GuiaRemision" => null
    ];

    // Llamar al método
    $response = $client->__soapCall("EmitirGuiaRemision", [$params]);

    // Mostrar la respuesta
    echo "Respuesta SOAP:\n";
    print_r($response);
} catch (SoapFault $fault) {
    // Manejo de errores
    echo "Error SOAP: " . $fault->getMessage() . "\n";
    echo "Código de error: " . $fault->faultcode . "\n";
    echo "Detalles:\n" . $fault->detail . "\n";
}
?>

```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static async Task Main(string[] args)
    {
        string url = "/URL_SOAP_EMISION/EmitirDocumentoService.svc";
        string soapAction = "http://tempuri.org/EmitirDocumentoService/EmitirGuiaRemision";
        
        string soapEnvelope = @" <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:emis="https://pe.edocnube.com/api/emision" xmlns:gui="https://pe.edocnube.com/api/emision/guiaRemision" xmlns:des="https://pe.edocnube.com/api/emision/ubl/despatchAdvice" xmlns:des1="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.note" xmlns:des2="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty" xmlns:des3="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party" xmlns:des4="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification" xmlns:des5="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification.iD" xmlns:des6="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyLegalEntity" xmlns:des7="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty" xmlns:des8="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party" xmlns:des9="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification" xmlns:des10="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification.iD" xmlns:des11="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyLegalEntity" xmlns:des12="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty" xmlns:des13="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party" xmlns:des14="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification" xmlns:des15="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification.iD" xmlns:des16="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyLegalEntity" xmlns:des17="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty" xmlns:des18="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party" xmlns:des19="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification" xmlns:des20="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification.iD" xmlns:des21="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyLegalEntity" xmlns:des22="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty" xmlns:des23="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party" xmlns:des24="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification" xmlns:des25="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification.iD" xmlns:des26="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyLegalEntity" xmlns:des27="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference" xmlns:des28="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty" xmlns:des29="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification" xmlns:des30="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification.iD" xmlns:des31="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment" xmlns:des32="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.handlingInstruction" xmlns:des33="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.information" xmlns:des34="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.grossWeightMeasure" xmlns:des35="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.netWeightMeasure" xmlns:des36="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.specialInstruction" xmlns:des37="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment" xmlns:des38="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty" xmlns:des39="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification" xmlns:des40="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification.iD" xmlns:des41="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyLegalEntity" xmlns:des42="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage" xmlns:des43="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transitPeriod" xmlns:des44="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty" xmlns:des45="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification" xmlns:des46="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification.iD" xmlns:des47="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyLegalEntity" xmlns:des48="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty" xmlns:des49="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity" xmlns:des50="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity.companyID" xmlns:des51="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.loadingTransportEvent" xmlns:des52="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transportEvent" xmlns:des53="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson" xmlns:des54="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.iD" xmlns:des55="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.identityDocumentReference" xmlns:des56="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery" xmlns:des57="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress" xmlns:des58="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressTypeCode" xmlns:des59="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressLine" xmlns:des60="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.locationCoordinate" xmlns:des61="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch" xmlns:des62="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress" xmlns:des63="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressTypeCode" xmlns:des64="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressLine" xmlns:des65="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.locationCoordinate" xmlns:des66="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty" xmlns:des67="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification" xmlns:des68="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification.iD" xmlns:des69="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyLegalEntity" xmlns:des70="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty" xmlns:des71="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity" xmlns:des72="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity.companyID" xmlns:des73="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit" xmlns:des74="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment" xmlns:des75="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.applicableTransportMean" xmlns:des76="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment" xmlns:des77="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.applicableTransportMean" xmlns:des78="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference" xmlns:des79="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference.iD" xmlns:des80="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference" xmlns:des81="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference.iD" xmlns:des82="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.package" xmlns:des83="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.firstArrivalPortLocation" xmlns:des84="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine" xmlns:des85="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.deliveredQuantity" xmlns:des86="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.orderLineReference" xmlns:des87="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item" xmlns:des88="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.description" xmlns:des89="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.sellersItemIdentification" xmlns:des90="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification" xmlns:des91="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification.iD" xmlns:des92="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.commodityClassification" xmlns:des93="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.additionalItemProperty" xmlns:ext="https://pe.edocnube.com/api/emision/extensiones">
           <soapenv:Header/>
           <soapenv:Body>
              <emis:EmitirGuiaRemision>
                 <emis:Clave>-------------</emis:Clave>
                 <emis:GuiaRemision/>
              </emis:EmitirGuiaRemision>
           </soapenv:Body>
        </soapenv:Envelope>";

        using (HttpClient client = new HttpClient())
        {
            var request = new HttpRequestMessage(HttpMethod.Post, url)
            {
                Content = new StringContent(soapEnvelope, Encoding.UTF8, "text/xml")
            };
            request.Headers.Add("SOAPAction", soapAction);

            HttpResponseMessage response = await client.SendAsync(request);
            string responseContent = await response.Content.ReadAsStringAsync();

            Console.WriteLine("Respuesta del servidor:");
            Console.WriteLine(responseContent);
        }
    }
}

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

# URL del servicio SOAP
url = "/URL_SOAP_EMISION/EmitirDocumentoService.svc"

# Cabeceras HTTP
headers = {
    "Content-Type": "text/xml; charset=utf-8",
    "SOAPAction": "http://tempuri.org/EmitirDocumentoService/EmitirGuiaRemision"
}

# Cuerpo del mensaje SOAP
soap_body = """<?xml version="1.0" encoding="utf-8"?>
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:emis="https://pe.edocnube.com/api/emision" xmlns:gui="https://pe.edocnube.com/api/emision/guiaRemision" xmlns:des="https://pe.edocnube.com/api/emision/ubl/despatchAdvice" xmlns:des1="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.note" xmlns:des2="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty" xmlns:des3="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party" xmlns:des4="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification" xmlns:des5="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification.iD" xmlns:des6="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyLegalEntity" xmlns:des7="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty" xmlns:des8="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party" xmlns:des9="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification" xmlns:des10="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification.iD" xmlns:des11="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyLegalEntity" xmlns:des12="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty" xmlns:des13="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party" xmlns:des14="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification" xmlns:des15="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification.iD" xmlns:des16="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyLegalEntity" xmlns:des17="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty" xmlns:des18="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party" xmlns:des19="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification" xmlns:des20="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification.iD" xmlns:des21="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyLegalEntity" xmlns:des22="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty" xmlns:des23="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party" xmlns:des24="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification" xmlns:des25="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification.iD" xmlns:des26="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyLegalEntity" xmlns:des27="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference" xmlns:des28="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty" xmlns:des29="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification" xmlns:des30="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification.iD" xmlns:des31="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment" xmlns:des32="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.handlingInstruction" xmlns:des33="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.information" xmlns:des34="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.grossWeightMeasure" xmlns:des35="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.netWeightMeasure" xmlns:des36="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.specialInstruction" xmlns:des37="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment" xmlns:des38="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty" xmlns:des39="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification" xmlns:des40="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification.iD" xmlns:des41="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyLegalEntity" xmlns:des42="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage" xmlns:des43="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transitPeriod" xmlns:des44="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty" xmlns:des45="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification" xmlns:des46="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification.iD" xmlns:des47="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyLegalEntity" xmlns:des48="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty" xmlns:des49="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity" xmlns:des50="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity.companyID" xmlns:des51="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.loadingTransportEvent" xmlns:des52="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transportEvent" xmlns:des53="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson" xmlns:des54="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.iD" xmlns:des55="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.identityDocumentReference" xmlns:des56="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery" xmlns:des57="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress" xmlns:des58="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressTypeCode" xmlns:des59="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressLine" xmlns:des60="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.locationCoordinate" xmlns:des61="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch" xmlns:des62="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress" xmlns:des63="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressTypeCode" xmlns:des64="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressLine" xmlns:des65="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.locationCoordinate" xmlns:des66="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty" xmlns:des67="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification" xmlns:des68="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification.iD" xmlns:des69="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyLegalEntity" xmlns:des70="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty" xmlns:des71="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity" xmlns:des72="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity.companyID" xmlns:des73="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit" xmlns:des74="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment" xmlns:des75="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.applicableTransportMean" xmlns:des76="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment" xmlns:des77="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.applicableTransportMean" xmlns:des78="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference" xmlns:des79="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference.iD" xmlns:des80="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference" xmlns:des81="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference.iD" xmlns:des82="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.package" xmlns:des83="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.firstArrivalPortLocation" xmlns:des84="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine" xmlns:des85="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.deliveredQuantity" xmlns:des86="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.orderLineReference" xmlns:des87="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item" xmlns:des88="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.description" xmlns:des89="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.sellersItemIdentification" xmlns:des90="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification" xmlns:des91="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification.iD" xmlns:des92="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.commodityClassification" xmlns:des93="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.additionalItemProperty" xmlns:ext="https://pe.edocnube.com/api/emision/extensiones">
   <soapenv:Header/>
   <soapenv:Body>
      <emis:EmitirGuiaRemision>
         <emis:Clave>-------------</emis:Clave>
         <emis:GuiaRemision/>
      </emis:EmitirGuiaRemision>
   </soapenv:Body>
</soapenv:Envelope>"""

try:
    # Enviar la solicitud POST
    response = requests.post(url, data=soap_body, headers=headers)

    # Verificar el estado de la respuesta
    if response.status_code == 200:
        print("Respuesta del servidor:")
        print(response.text)
    else:
        print(f"Error en la solicitud: {response.status_code}")
        print(response.text)

except requests.exceptions.RequestException as e:
    print(f"Error al realizar la solicitud: {e}")

```

{% endtab %}

{% tab title="Curl" %}

```bash
curl -X POST "/URL_SOAP_EMISION/EmitirDocumentoService.svc" \
-H "Content-Type: text/xml; charset=utf-8" \
-H "SOAPAction: http://tempuri.org/EmitirDocumentoService/EmitirGuiaRemision" \
-d '<?xml version="1.0" encoding="utf-8"?>
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:emis="https://pe.edocnube.com/api/emision" xmlns:gui="https://pe.edocnube.com/api/emision/guiaRemision" xmlns:des="https://pe.edocnube.com/api/emision/ubl/despatchAdvice" xmlns:des1="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.note" xmlns:des2="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty" xmlns:des3="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party" xmlns:des4="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification" xmlns:des5="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification.iD" xmlns:des6="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyLegalEntity" xmlns:des7="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty" xmlns:des8="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party" xmlns:des9="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification" xmlns:des10="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification.iD" xmlns:des11="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyLegalEntity" xmlns:des12="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty" xmlns:des13="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party" xmlns:des14="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification" xmlns:des15="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification.iD" xmlns:des16="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyLegalEntity" xmlns:des17="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty" xmlns:des18="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party" xmlns:des19="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification" xmlns:des20="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification.iD" xmlns:des21="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyLegalEntity" xmlns:des22="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty" xmlns:des23="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party" xmlns:des24="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification" xmlns:des25="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification.iD" xmlns:des26="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyLegalEntity" xmlns:des27="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference" xmlns:des28="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty" xmlns:des29="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification" xmlns:des30="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification.iD" xmlns:des31="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment" xmlns:des32="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.handlingInstruction" xmlns:des33="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.information" xmlns:des34="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.grossWeightMeasure" xmlns:des35="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.netWeightMeasure" xmlns:des36="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.specialInstruction" xmlns:des37="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment" xmlns:des38="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty" xmlns:des39="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification" xmlns:des40="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification.iD" xmlns:des41="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyLegalEntity" xmlns:des42="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage" xmlns:des43="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transitPeriod" xmlns:des44="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty" xmlns:des45="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification" xmlns:des46="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification.iD" xmlns:des47="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyLegalEntity" xmlns:des48="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty" xmlns:des49="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity" xmlns:des50="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity.companyID" xmlns:des51="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.loadingTransportEvent" xmlns:des52="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transportEvent" xmlns:des53="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson" xmlns:des54="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.iD" xmlns:des55="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.identityDocumentReference" xmlns:des56="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery" xmlns:des57="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress" xmlns:des58="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressTypeCode" xmlns:des59="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressLine" xmlns:des60="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.locationCoordinate" xmlns:des61="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch" xmlns:des62="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress" xmlns:des63="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressTypeCode" xmlns:des64="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressLine" xmlns:des65="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.locationCoordinate" xmlns:des66="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty" xmlns:des67="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification" xmlns:des68="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification.iD" xmlns:des69="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyLegalEntity" xmlns:des70="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty" xmlns:des71="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity" xmlns:des72="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity.companyID" xmlns:des73="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit" xmlns:des74="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment" xmlns:des75="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.applicableTransportMean" xmlns:des76="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment" xmlns:des77="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.applicableTransportMean" xmlns:des78="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference" xmlns:des79="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference.iD" xmlns:des80="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference" xmlns:des81="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference.iD" xmlns:des82="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.package" xmlns:des83="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.firstArrivalPortLocation" xmlns:des84="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine" xmlns:des85="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.deliveredQuantity" xmlns:des86="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.orderLineReference" xmlns:des87="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item" xmlns:des88="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.description" xmlns:des89="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.sellersItemIdentification" xmlns:des90="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification" xmlns:des91="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification.iD" xmlns:des92="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.commodityClassification" xmlns:des93="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.additionalItemProperty" xmlns:ext="https://pe.edocnube.com/api/emision/extensiones">
   <soapenv:Header/>
   <soapenv:Body>
      <emis:EmitirGuiaRemision>
         <emis:Clave>-------------</emis:Clave>
         <emis:GuiaRemision/>
      </emis:EmitirGuiaRemision>
   </soapenv:Body>
</soapenv:Envelope>'

```

{% endtab %}
{% endtabs %}

## Emisión de Guía de Remisión <a href="#emision-de-factura" id="emision-de-factura"></a>

En esta sección, abordaremos los detalles técnicos específicos del proceso de emisión de guías de remisión electrónicas utilizando la tecnología SOAP. Exploraremos cómo este enfoque facilita la integración eficiente y segura de los sistemas de facturación dentro de las infraestructuras empresariales existentes, asegurando la conformidad con los estándares legales y fiscales relevantes. Nos centraremos en la implementación de SOAP para describir las interacciones entre los sistemas y los métodos empleados para la transmisión de datos de facturación electrónica.

## Estados eDoc

La gestión adecuada de los estados eDoc es crucial en el sistema de facturación electrónica, ya que cada estado refleja una etapa específica en el proceso de validación y envío de documentos a la entidad tributaria. A continuación, se presenta una tabla que describe cada uno de los estados eDoc, proporcionando claridad sobre las acciones necesarias según el estado en que se encuentre el documento.

<table><thead><tr><th width="93">Estado</th><th width="216">Descripción</th><th width="285">Causa</th><th width="206">Solución</th></tr></thead><tbody><tr><td>2</td><td>Documento autorizado por el ente tributario</td><td>Documento autorizado por la SUNAT</td><td>No aplica</td></tr><tr><td>3</td><td>Documento no autorizado por el ente tributario</td><td>Documento no superó la validación debido al incumplimiento de las reglas de negocio establecidas por la SUNAT</td><td>Realizar la corrección de los datos del documento y emitirlo nuevamente</td></tr><tr><td>4</td><td>Error al emitir o consultar el documento en eDoc</td><td>Ha ocurrido un error en eDoc, el cual ha sido identificado con un código para su seguimiento y solución</td><td>Levantar un ticket de atención en el portal de soporte técnico de GuruSoft</td></tr><tr><td>5</td><td>Documento en espera de autorización por parte del ente tributario</td><td>eDoc no pudo establecer una conexión con la SUNAT para consultar la autorización del documento, se realizará una reconsulta automática posteriormente</td><td>Realizar la consulta del estado del documento mediante la API correspondiente, una vez transcurrido un intervalo de tiempo adecuado</td></tr><tr><td>6</td><td>Documento devuelto por el ente tributario.</td><td>Documento no cumplió con las validaciones de estructura y/o formato XML requeridas por la SUNAT</td><td>Realizar la corrección de los datos del documento y emitirlo nuevamente</td></tr><tr><td>7</td><td>Documento en espera de recepción por parte del ente tributario</td><td>eDoc no pudo establecer una conexión con la SUNAT para transmitir el documento, se realizará un reenvío automático posteriormente</td><td>Realizar la consulta del estado del documento mediante la API correspondiente, una vez transcurrido un intervalo de tiempo adecuado</td></tr><tr><td>11</td><td>Documento anulado en eDoc</td><td>Documento ha sido anulado por el emisor mediante el portal web de la SUNAT</td><td>Una vez alcanzado este estado, el documento no puede ser modificado ni revertido</td></tr><tr><td>15</td><td>Emisión o consulta del documento fue devuelta por eDoc.</td><td>Solicitud de emisión o consulta no cumplió con las validaciones de estructura y/o formato XML requeridas por eDoc</td><td>Realizar la corrección de los datos del documento y emitirlo nuevamente</td></tr><tr><td>18</td><td>Documento no encontrado en eDoc</td><td>Documento consultado no fue encontrando en eDoc</td><td>Realizar la corrección de los parámetros de la consulta y repetir el proceso</td></tr></tbody></table>

* **Estado Autorizado (2):** Este estado indica que el documento ha sido autorizado por la entidad tributaria. En este punto, no se requiere ninguna acción adicional como reenvío o consulta del estado, pues el documento ya ha completado su proceso satisfactoriamente.
* **Estado No autorizado (3):** Este estado indica que el documento no ha sido aprobado y requiere **corrección** para poder ser autorizado en un nuevo intento. Se permite un máximo de tres envíos por documento (incluyendo el primero). En caso de que el documento permanezca en estado No autorizado, deberá esperar al siguiente día para realizar un nuevo envío.
* **Estados Transitorios (5, 7):** Estos estados reflejan las fases intermedias en el proceso de envío y recepción de documentos con la entidad tributaria. En todos estos casos, no se deben reenviar los documentos, sino consultar su estado hasta que cambien a una situación definitiva.
* **Estados de Error y Corrección (4, 6, 15):** El estado 4 indica un error en el proceso de envío o procesamiento, y no debe reenviarse automáticamente; es necesario revisar el error específico y corregirlo si es posible. El estado 6 se asigna a documentos rechazados por la entidad tributaria y requiere corrección manual antes de un reenvío. El estado 15 sugiere que el documento fue devuelto por eDoc empresarial y debe ser analizado para determinar la causa y decidir las acciones correctivas apropiadas. En estos casos, la corrección de errores es fundamental antes de cualquier intento de reenvío.
* **Estado de Anulación (11):** Este estado indica que el documento ha sido anulado y, por lo tanto, ya no tiene validez legal o administrativa. No se requieren acciones adicionales para documentos en este estado, ya que han sido efectivamente retirados del proceso.

**Consideraciones Importantes**

* **Consultas de Estado:** Para los estados que sugieren consultar el estado del documento, es recomendable establecer un intervalo regular de consultas para evitar la saturación del sistema y asegurar la actualización oportuna del estado del documento.
* **Notificaciones a Soporte:** En casos de errores que no pueden ser resueltos directamente por el usuario, como el estado 4, es fundamental notificar al soporte técnico proporcionando todos los detalles necesarios para una rápida resolución del problema.

## Diccionario de datos

{% embed url="<https://wiki.edocnube.com/diccionario/Documentation/FromXml?p1=AJkuNFFcBIW7i1zn63Wd0zMug5qnw8YUY1NhX7Snt2ckF/8g/noeOSaYKXbSXxMXT8BxOaiGovx5ie0jKchVfk+6ew/lOrk7NO5ER4sRhcVs3zES0sjDvA==&p2=EoWbYb/FBQ6+UhF+UJE7oB3g3J1gzmJ9WSrEyqM35Wg=&p3=1IpcfzFxFmE=&p4=L5lbnPmTSNE=&p5=ojGLJBGmPXo=&p6=0h6AVWZOsDA=>" %}

## Consumo

### Request

{% tabs %}
{% tab title="JavaScript" %}

```javascript
 url = '/URL_SOAP_EMISION/EmitirDocumentoService.svc?wsdl';

// XML del mensaje SOAP
const soapRequest = `
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:emis="https://pe.edocnube.com/api/emision" xmlns:gui="https://pe.edocnube.com/api/emision/guiaRemision" xmlns:des="https://pe.edocnube.com/api/emision/ubl/despatchAdvice" xmlns:des1="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.note" xmlns:des2="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty" xmlns:des3="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party" xmlns:des4="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification" xmlns:des5="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification.iD" xmlns:des6="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyLegalEntity" xmlns:des7="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty" xmlns:des8="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party" xmlns:des9="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification" xmlns:des10="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification.iD" xmlns:des11="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyLegalEntity" xmlns:des12="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty" xmlns:des13="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party" xmlns:des14="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification" xmlns:des15="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification.iD" xmlns:des16="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyLegalEntity" xmlns:des17="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty" xmlns:des18="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party" xmlns:des19="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification" xmlns:des20="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification.iD" xmlns:des21="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyLegalEntity" xmlns:des22="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty" xmlns:des23="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party" xmlns:des24="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification" xmlns:des25="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification.iD" xmlns:des26="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyLegalEntity" xmlns:des27="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference" xmlns:des28="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty" xmlns:des29="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification" xmlns:des30="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification.iD" xmlns:des31="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment" xmlns:des32="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.handlingInstruction" xmlns:des33="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.information" xmlns:des34="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.grossWeightMeasure" xmlns:des35="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.netWeightMeasure" xmlns:des36="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.specialInstruction" xmlns:des37="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment" xmlns:des38="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty" xmlns:des39="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification" xmlns:des40="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification.iD" xmlns:des41="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyLegalEntity" xmlns:des42="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage" xmlns:des43="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transitPeriod" xmlns:des44="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty" xmlns:des45="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification" xmlns:des46="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification.iD" xmlns:des47="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyLegalEntity" xmlns:des48="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty" xmlns:des49="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity" xmlns:des50="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity.companyID" xmlns:des51="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.loadingTransportEvent" xmlns:des52="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transportEvent" xmlns:des53="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson" xmlns:des54="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.iD" xmlns:des55="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.identityDocumentReference" xmlns:des56="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery" xmlns:des57="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress" xmlns:des58="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressTypeCode" xmlns:des59="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressLine" xmlns:des60="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.locationCoordinate" xmlns:des61="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch" xmlns:des62="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress" xmlns:des63="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressTypeCode" xmlns:des64="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressLine" xmlns:des65="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.locationCoordinate" xmlns:des66="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty" xmlns:des67="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification" xmlns:des68="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification.iD" xmlns:des69="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyLegalEntity" xmlns:des70="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty" xmlns:des71="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity" xmlns:des72="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity.companyID" xmlns:des73="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit" xmlns:des74="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment" xmlns:des75="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.applicableTransportMean" xmlns:des76="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment" xmlns:des77="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.applicableTransportMean" xmlns:des78="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference" xmlns:des79="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference.iD" xmlns:des80="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference" xmlns:des81="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference.iD" xmlns:des82="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.package" xmlns:des83="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.firstArrivalPortLocation" xmlns:des84="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine" xmlns:des85="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.deliveredQuantity" xmlns:des86="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.orderLineReference" xmlns:des87="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item" xmlns:des88="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.description" xmlns:des89="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.sellersItemIdentification" xmlns:des90="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification" xmlns:des91="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification.iD" xmlns:des92="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.commodityClassification" xmlns:des93="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.additionalItemProperty" xmlns:ext="https://pe.edocnube.com/api/emision/extensiones">
   <soapenv:Header/>
   <soapenv:Body>
      <emis:EmitirGuiaRemision>
         <emis:Clave>-------------</emis:Clave>
         <emis:GuiaRemision/>
      </emis:EmitirGuiaRemision>
   </soapenv:Body>
</soapenv:Envelope>
`;

// Configuración de la solicitud HTTP
const headers = {
  'Content-Type': 'text/xml; charset=utf-8', // Tipo de contenido para SOAP
  SOAPAction: 'http://tempuri.org/EmitirDocumentoService/EmitirGuiaRemision', // Acción SOAP específica
};

// Realizar la solicitud con fetch
fetch(url, {
  method: 'POST',
  headers: headers,
  body: soapRequest,
})
  .then((response) => {
    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }
    return response.text();
  })
  .then((data) => {
    console.log('Respuesta SOAP:', data);
  })
  .catch((error) => {
    console.error('Error en la solicitud SOAP:', error.message);
  });

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
// URL del servicio WSDL
$wsdl = "/URL_SOAP_EMISION/EmitirDocumentoService.svc?wsdl";

try {
    // Crear un cliente SOAP
    $client = new SoapClient($wsdl, [
        'trace' => true,       // Habilitar trazas para depuración
        'cache_wsdl' => WSDL_CACHE_NONE, // No cachear el WSDL
        'exceptions' => true   // Lanzar excepciones en errores
    ]);

    // Parámetros para el método
    $params = [
        "Clave" => "{CLAVE_VALOR}", // Credencial única
        "GuiaRemision" => null
    ];

    // Llamar al método
    $response = $client->__soapCall("EmitirGuiaRemision", [$params]);

    // Mostrar la respuesta
    echo "Respuesta SOAP:\n";
    print_r($response);
} catch (SoapFault $fault) {
    // Manejo de errores
    echo "Error SOAP: " . $fault->getMessage() . "\n";
    echo "Código de error: " . $fault->faultcode . "\n";
    echo "Detalles:\n" . $fault->detail . "\n";
}
?>

```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static async Task Main(string[] args)
    {
        string url = "/URL_SOAP_EMISION/EmitirDocumentoService.svc";
        string soapAction = "http://tempuri.org/EmitirDocumentoService/EmitirGuiaRemision";
        
        string soapEnvelope = @" <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:emis="https://pe.edocnube.com/api/emision" xmlns:gui="https://pe.edocnube.com/api/emision/guiaRemision" xmlns:des="https://pe.edocnube.com/api/emision/ubl/despatchAdvice" xmlns:des1="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.note" xmlns:des2="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty" xmlns:des3="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party" xmlns:des4="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification" xmlns:des5="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification.iD" xmlns:des6="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyLegalEntity" xmlns:des7="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty" xmlns:des8="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party" xmlns:des9="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification" xmlns:des10="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification.iD" xmlns:des11="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyLegalEntity" xmlns:des12="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty" xmlns:des13="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party" xmlns:des14="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification" xmlns:des15="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification.iD" xmlns:des16="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyLegalEntity" xmlns:des17="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty" xmlns:des18="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party" xmlns:des19="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification" xmlns:des20="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification.iD" xmlns:des21="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyLegalEntity" xmlns:des22="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty" xmlns:des23="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party" xmlns:des24="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification" xmlns:des25="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification.iD" xmlns:des26="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyLegalEntity" xmlns:des27="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference" xmlns:des28="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty" xmlns:des29="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification" xmlns:des30="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification.iD" xmlns:des31="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment" xmlns:des32="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.handlingInstruction" xmlns:des33="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.information" xmlns:des34="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.grossWeightMeasure" xmlns:des35="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.netWeightMeasure" xmlns:des36="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.specialInstruction" xmlns:des37="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment" xmlns:des38="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty" xmlns:des39="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification" xmlns:des40="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification.iD" xmlns:des41="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyLegalEntity" xmlns:des42="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage" xmlns:des43="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transitPeriod" xmlns:des44="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty" xmlns:des45="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification" xmlns:des46="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification.iD" xmlns:des47="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyLegalEntity" xmlns:des48="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty" xmlns:des49="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity" xmlns:des50="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity.companyID" xmlns:des51="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.loadingTransportEvent" xmlns:des52="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transportEvent" xmlns:des53="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson" xmlns:des54="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.iD" xmlns:des55="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.identityDocumentReference" xmlns:des56="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery" xmlns:des57="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress" xmlns:des58="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressTypeCode" xmlns:des59="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressLine" xmlns:des60="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.locationCoordinate" xmlns:des61="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch" xmlns:des62="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress" xmlns:des63="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressTypeCode" xmlns:des64="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressLine" xmlns:des65="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.locationCoordinate" xmlns:des66="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty" xmlns:des67="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification" xmlns:des68="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification.iD" xmlns:des69="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyLegalEntity" xmlns:des70="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty" xmlns:des71="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity" xmlns:des72="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity.companyID" xmlns:des73="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit" xmlns:des74="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment" xmlns:des75="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.applicableTransportMean" xmlns:des76="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment" xmlns:des77="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.applicableTransportMean" xmlns:des78="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference" xmlns:des79="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference.iD" xmlns:des80="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference" xmlns:des81="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference.iD" xmlns:des82="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.package" xmlns:des83="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.firstArrivalPortLocation" xmlns:des84="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine" xmlns:des85="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.deliveredQuantity" xmlns:des86="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.orderLineReference" xmlns:des87="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item" xmlns:des88="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.description" xmlns:des89="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.sellersItemIdentification" xmlns:des90="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification" xmlns:des91="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification.iD" xmlns:des92="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.commodityClassification" xmlns:des93="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.additionalItemProperty" xmlns:ext="https://pe.edocnube.com/api/emision/extensiones">
           <soapenv:Header/>
           <soapenv:Body>
              <emis:EmitirGuiaRemision>
                 <emis:Clave>-------------</emis:Clave>
                 <emis:GuiaRemision/>
              </emis:EmitirGuiaRemision>
           </soapenv:Body>
        </soapenv:Envelope>";

        using (HttpClient client = new HttpClient())
        {
            var request = new HttpRequestMessage(HttpMethod.Post, url)
            {
                Content = new StringContent(soapEnvelope, Encoding.UTF8, "text/xml")
            };
            request.Headers.Add("SOAPAction", soapAction);

            HttpResponseMessage response = await client.SendAsync(request);
            string responseContent = await response.Content.ReadAsStringAsync();

            Console.WriteLine("Respuesta del servidor:");
            Console.WriteLine(responseContent);
        }
    }
}

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

# URL del servicio SOAP
url = "/URL_SOAP_EMISION/EmitirDocumentoService.svc"

# Cabeceras HTTP
headers = {
    "Content-Type": "text/xml; charset=utf-8",
    "SOAPAction": "http://tempuri.org/EmitirDocumentoService/EmitirGuiaRemision"
}

# Cuerpo del mensaje SOAP
soap_body = """<?xml version="1.0" encoding="utf-8"?>
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:emis="https://pe.edocnube.com/api/emision" xmlns:gui="https://pe.edocnube.com/api/emision/guiaRemision" xmlns:des="https://pe.edocnube.com/api/emision/ubl/despatchAdvice" xmlns:des1="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.note" xmlns:des2="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty" xmlns:des3="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party" xmlns:des4="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification" xmlns:des5="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification.iD" xmlns:des6="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyLegalEntity" xmlns:des7="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty" xmlns:des8="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party" xmlns:des9="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification" xmlns:des10="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification.iD" xmlns:des11="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyLegalEntity" xmlns:des12="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty" xmlns:des13="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party" xmlns:des14="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification" xmlns:des15="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification.iD" xmlns:des16="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyLegalEntity" xmlns:des17="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty" xmlns:des18="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party" xmlns:des19="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification" xmlns:des20="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification.iD" xmlns:des21="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyLegalEntity" xmlns:des22="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty" xmlns:des23="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party" xmlns:des24="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification" xmlns:des25="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification.iD" xmlns:des26="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyLegalEntity" xmlns:des27="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference" xmlns:des28="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty" xmlns:des29="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification" xmlns:des30="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification.iD" xmlns:des31="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment" xmlns:des32="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.handlingInstruction" xmlns:des33="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.information" xmlns:des34="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.grossWeightMeasure" xmlns:des35="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.netWeightMeasure" xmlns:des36="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.specialInstruction" xmlns:des37="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment" xmlns:des38="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty" xmlns:des39="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification" xmlns:des40="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification.iD" xmlns:des41="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyLegalEntity" xmlns:des42="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage" xmlns:des43="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transitPeriod" xmlns:des44="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty" xmlns:des45="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification" xmlns:des46="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification.iD" xmlns:des47="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyLegalEntity" xmlns:des48="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty" xmlns:des49="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity" xmlns:des50="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity.companyID" xmlns:des51="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.loadingTransportEvent" xmlns:des52="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transportEvent" xmlns:des53="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson" xmlns:des54="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.iD" xmlns:des55="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.identityDocumentReference" xmlns:des56="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery" xmlns:des57="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress" xmlns:des58="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressTypeCode" xmlns:des59="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressLine" xmlns:des60="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.locationCoordinate" xmlns:des61="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch" xmlns:des62="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress" xmlns:des63="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressTypeCode" xmlns:des64="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressLine" xmlns:des65="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.locationCoordinate" xmlns:des66="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty" xmlns:des67="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification" xmlns:des68="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification.iD" xmlns:des69="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyLegalEntity" xmlns:des70="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty" xmlns:des71="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity" xmlns:des72="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity.companyID" xmlns:des73="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit" xmlns:des74="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment" xmlns:des75="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.applicableTransportMean" xmlns:des76="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment" xmlns:des77="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.applicableTransportMean" xmlns:des78="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference" xmlns:des79="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference.iD" xmlns:des80="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference" xmlns:des81="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference.iD" xmlns:des82="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.package" xmlns:des83="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.firstArrivalPortLocation" xmlns:des84="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine" xmlns:des85="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.deliveredQuantity" xmlns:des86="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.orderLineReference" xmlns:des87="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item" xmlns:des88="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.description" xmlns:des89="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.sellersItemIdentification" xmlns:des90="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification" xmlns:des91="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification.iD" xmlns:des92="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.commodityClassification" xmlns:des93="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.additionalItemProperty" xmlns:ext="https://pe.edocnube.com/api/emision/extensiones">
   <soapenv:Header/>
   <soapenv:Body>
      <emis:EmitirGuiaRemision>
         <emis:Clave>-------------</emis:Clave>
         <emis:GuiaRemision/>
      </emis:EmitirGuiaRemision>
   </soapenv:Body>
</soapenv:Envelope>"""

try:
    # Enviar la solicitud POST
    response = requests.post(url, data=soap_body, headers=headers)

    # Verificar el estado de la respuesta
    if response.status_code == 200:
        print("Respuesta del servidor:")
        print(response.text)
    else:
        print(f"Error en la solicitud: {response.status_code}")
        print(response.text)

except requests.exceptions.RequestException as e:
    print(f"Error al realizar la solicitud: {e}")

```

{% endtab %}

{% tab title="Curl" %}

```bash
curl -X POST "/URL_SOAP_EMISION/EmitirDocumentoService.svc" \
-H "Content-Type: text/xml; charset=utf-8" \
-H "SOAPAction: http://tempuri.org/EmitirDocumentoService/EmitirGuiaRemision" \
-d '<?xml version="1.0" encoding="utf-8"?>
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:emis="https://pe.edocnube.com/api/emision" xmlns:gui="https://pe.edocnube.com/api/emision/guiaRemision" xmlns:des="https://pe.edocnube.com/api/emision/ubl/despatchAdvice" xmlns:des1="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.note" xmlns:des2="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty" xmlns:des3="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party" xmlns:des4="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification" xmlns:des5="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyIdentification.iD" xmlns:des6="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchSupplierParty.party.partyLegalEntity" xmlns:des7="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty" xmlns:des8="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party" xmlns:des9="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification" xmlns:des10="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyIdentification.iD" xmlns:des11="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.deliveryCustomerParty.party.partyLegalEntity" xmlns:des12="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty" xmlns:des13="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party" xmlns:des14="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification" xmlns:des15="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyIdentification.iD" xmlns:des16="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.buyerCustomerParty.party.partyLegalEntity" xmlns:des17="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty" xmlns:des18="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party" xmlns:des19="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification" xmlns:des20="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyIdentification.iD" xmlns:des21="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.sellerSupplierParty.party.partyLegalEntity" xmlns:des22="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty" xmlns:des23="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party" xmlns:des24="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification" xmlns:des25="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyIdentification.iD" xmlns:des26="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.originatorCustomerParty.party.partyLegalEntity" xmlns:des27="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference" xmlns:des28="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty" xmlns:des29="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification" xmlns:des30="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.additionalDocumentReference.issuerParty.partyIdentification.iD" xmlns:des31="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment" xmlns:des32="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.handlingInstruction" xmlns:des33="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.information" xmlns:des34="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.grossWeightMeasure" xmlns:des35="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.netWeightMeasure" xmlns:des36="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.specialInstruction" xmlns:des37="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment" xmlns:des38="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty" xmlns:des39="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification" xmlns:des40="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyIdentification.iD" xmlns:des41="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.consignment.logisticsOperatorParty.partyLegalEntity" xmlns:des42="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage" xmlns:des43="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transitPeriod" xmlns:des44="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty" xmlns:des45="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification" xmlns:des46="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyIdentification.iD" xmlns:des47="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.partyLegalEntity" xmlns:des48="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty" xmlns:des49="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity" xmlns:des50="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.carrierParty.agentParty.partyLegalEntity.companyID" xmlns:des51="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.loadingTransportEvent" xmlns:des52="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.transportEvent" xmlns:des53="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson" xmlns:des54="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.iD" xmlns:des55="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.shipmentStage.driverPerson.identityDocumentReference" xmlns:des56="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery" xmlns:des57="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress" xmlns:des58="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressTypeCode" xmlns:des59="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.addressLine" xmlns:des60="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.deliveryAddress.locationCoordinate" xmlns:des61="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch" xmlns:des62="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress" xmlns:des63="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressTypeCode" xmlns:des64="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.addressLine" xmlns:des65="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchAddress.locationCoordinate" xmlns:des66="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty" xmlns:des67="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification" xmlns:des68="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyIdentification.iD" xmlns:des69="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.partyLegalEntity" xmlns:des70="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty" xmlns:des71="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity" xmlns:des72="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.delivery.despatch.despatchParty.agentParty.partyLegalEntity.companyID" xmlns:des73="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit" xmlns:des74="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment" xmlns:des75="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.applicableTransportMean" xmlns:des76="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment" xmlns:des77="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.applicableTransportMean" xmlns:des78="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference" xmlns:des79="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.attachedTransportEquipment.shipmentDocumentReference.iD" xmlns:des80="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference" xmlns:des81="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.transportEquipment.shipmentDocumentReference.iD" xmlns:des82="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.transportHandlingUnit.package" xmlns:des83="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.shipment.firstArrivalPortLocation" xmlns:des84="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine" xmlns:des85="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.deliveredQuantity" xmlns:des86="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.orderLineReference" xmlns:des87="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item" xmlns:des88="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.description" xmlns:des89="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.sellersItemIdentification" xmlns:des90="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification" xmlns:des91="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.standardItemIdentification.iD" xmlns:des92="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.commodityClassification" xmlns:des93="https://pe.edocnube.com/api/emision/ubl/despatchAdvice.despatchLine.item.additionalItemProperty" xmlns:ext="https://pe.edocnube.com/api/emision/extensiones">
   <soapenv:Header/>
   <soapenv:Body>
      <emis:EmitirGuiaRemision>
         <emis:Clave>-------------</emis:Clave>
         <emis:GuiaRemision/>
      </emis:EmitirGuiaRemision>
   </soapenv:Body>
</soapenv:Envelope>'

```

{% endtab %}
{% endtabs %}

### Response

* **200 (OK)**: La solicitud se procesó correctamente y devuelve un mensaje SOAP en XML con los detalles de la respuesta.
* **401 (Unauthorized)**: Las credenciales proporcionadas son inválidas. Verifique las credenciales antes de volver a intentar.
* **500 (Internal Server Error)**: Se produjo un error en el servidor. Revise los mensajes de excepción y comuníquese con soporte.

Estas respuestas permiten manejar adecuadamente los distintos escenarios de comunicación.

{% tabs %}
{% tab title="Estado HTTP 200" %}

```xml

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <EmitirGuiaRemisionResponse xmlns="https://pe.edocnube.com/api/emision" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
         <Estado>2</Estado>
         <FechaAutorizacion>2026-05-13T10:33:45.000-05:00</FechaAutorizacion>
         <MensajeError>El Comprobante numero T020-00000200, ha sido aceptado</MensajeError>
      </EmitirGuiaRemisionResponse>
   </s:Body>
</s:Envelope>

```

{% endtab %}

{% tab title="Estado HTTP 401" %}
Credenciales inválidas
{% endtab %}

{% tab title="Estado HTTP 500" %}
Error. Verificar mensaje de excepción y comunicarse con soporte.
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://wikiedoc.guru-soft.com/pe/integraciones-y-servicios/soap/emision/guia-de-remision.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
