# getOrderDetail(JSON dataOrder)

Al invocar este método, se obtienen los detalles de un pedido en el sistema onDelivery en formato JSON.

<div id="bkmrk-los-par%C3%A1metros-reque">Los parámetros requeridos en el Json son: - **order\_id:** ID del pedido con el que se identifica en el sistema

</div>##### Ejemplo de JSON:

```JavaScript
let dataOrder = {
	 'order_id':124
}
```

<div id="bkmrk-ejemplo-de-solicitud"><span style="color: #bbbbbb; font-size: 1.4em; font-weight: 400;">Ejemplo de solicitud en JS:</span></div>```JavaScript
try {
      const order  = await _gpsApiv2.getOrderDetail(dataOrder); 
 	} catch (error) {
	  console.error(error);
	}
```

<details class="mb-m" id="bkmrk-body-parametersparam"><summary class="text-muted">A continuación se describen los atributos que se reciben como respuesta de la solicitud en JSON:</summary>

<div></div><div><table class="table" style="height: 2527px; width: 789px;" width="811"><tbody><tr style="height: 41px;"><th style="width: 320px; height: 41px;">Atributos</th><th style="width: 220px; height: 41px;"> </th><th style="width: 301px; height: 41px;">Definición </th></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**cantidad**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">Cantidad de productos del pedido</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**cliente**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">Nombre del cliente

</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**codigo\_rastreo**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">Código del rastreo del pedido</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**comentarios**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">Comentario para la entrega del pedido</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**costo\_total**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">Costo total del pedido</td></tr><tr style="height: 58px;"><td style="width: 320px; height: 58px;">**detalle**</td><td style="width: 220px; height: 58px;"> </td><td style="width: 301px; height: 58px;">Detalle del pedido</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**cantidad**</td><td style="width: 301px; height: 41px;">Hora (HH:mm:ss) de inicio de labores del activo</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**costo**</td><td style="width: 301px; height: 41px;">Costo del producto</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**estado**</td><td style="width: 301px; height: 41px;">Estatus en el que se encuentra el producto</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**id**</td><td style="width: 301px; height: 41px;">ID del producto con el que se identifica en el sistema</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**idinventario**</td><td style="width: 301px; height: 41px;">ID del inventario con el que se identifica en el sistema</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**idmoneda**</td><td style="width: 301px; height: 41px;">ID de la moneda con el que se identifica en el sistema</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**idpedido**</td><td style="width: 301px; height: 41px;">ID del pedido con el que se identifica en el sistema</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**idpedido\_od**</td><td style="width: 301px; height: 41px;">ID del pedido de onDelivery con el que se identifica en el sistema</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**idproducto\_od**</td><td style="width: 301px; height: 41px;">ID del producto de onDelivery con el que se identifica en el sistema</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**impuesto**</td><td style="width: 301px; height: 41px;">Impuesto del producto</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**impuesto\_producto**</td><td style="width: 301px; height: 41px;">Impuesto del producto</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**moneda**</td><td style="width: 301px; height: 41px;">Acrónimo de la moneda utilizada en el producto</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**peso**</td><td style="width: 301px; height: 41px;">Peso del producto</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**precio\_manual**</td><td style="width: 301px; height: 41px;">Precio personalizado del producto</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**precio\_unitario**</td><td style="width: 301px; height: 41px;">Precio por pieza del producto</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**producto**</td><td style="width: 301px; height: 41px;">Nombre del producto</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**subtotal**</td><td style="width: 301px; height: 41px;">Subtotal del producto</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**total**</td><td style="width: 301px; height: 41px;">Total del coste del producto</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**unidad\_peso**</td><td style="width: 301px; height: 41px;">Unidad de medición del peso</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**unidad\_volumen**</td><td style="width: 301px; height: 41px;">Unidad de medición del volumen</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"> </td><td style="width: 220px; height: 41px;">**volumen**</td><td style="width: 301px; height: 41px;">Volumen del producto</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**estado**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">Estatus en el que se encuentra el pedido</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**id**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">ID del pedido con el que se identifica en el sistema</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**idalmacen\_od**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">ID del almacén con el que se identifica en el sistema</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**idcliente\_distribuidor**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">ID del distribuidor con el que se identifica en el sistema</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**idcliente\_od**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">ID del cliente en onDelivery con el que se identifica en el sistema</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**idcliente\_sistema**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">ID del cliente con el que se identifica en el sistema</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**iddomicilio\_cliente\_od**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">ID del domicilio con el que se identifica en el sistema</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**idmoneda**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">ID de la moneda con el que se identifica en el sistema</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**idstatus\_pedido\_od**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">ID del estatus con el que se identifica en el sistema</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**idusuario\_sistema**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">ID del usuario con el que se identifica en el sistema</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**idvehiculo\_od**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">ID del activo con el que se identifica en el sistema

</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**impuesto**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">Impuesto del pedido</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**inventario\_afectado**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">?</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**moneda**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">Moneda utilizada en el pedido</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**num\_factura**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">Número de factura del pedido</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**numero\_pedido**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">Número del pedido</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**pagado**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">Estatus del pago</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**peso\_total**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">Peso total del pedido</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**status\_pedido**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">Estatus del pedido</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**subtotal**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">Subtotal del pedido</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**tiempo\_servicio**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">?</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**timestamp\_fin**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;">Fecha y hora máxima de la entrega del pedido</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**timestamp\_inicio**</td><td style="width: 220px; height: 41px;"> </td><td style="width: 301px; height: 41px;"> Fecha y hora inicial de la entrega del pedido</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**volumen\_total**</td><td style="width: 320px; height: 41px;"> </td><td style="width: 301px; height: 41px;">Volumen total del pedido</td></tr></tbody></table>

</div></details>##### Respuesta de ejemplo:

```JSON
{
	 status:'200'
	 data:{
		 cantidad:'0'
		 cliente:'super deux 1'
		 codigo_rastreo:null
		 comentarios:'Llamar al cliente 5 minutos antes de llegar a su domicilio'
		 costo_total:'1132.16'
		 detalle:[
			 0:{
				 cantidad:'1'
				 costo:'62'
				 estado:'1'
				 id:'132'
				 idinventario:'0'
				 idmoneda:'4'
				 idpedido:'1'
				 idpedido_od:'124'
				 idproducto_od:'1'
				 impuesto:'9.92'
				 impuesto_producto:'9.92'
				 moneda:'COP'
				 peso:'500'
				 precio_manual:'0'
				 precio_unitario:'62'
				 producto:'Mi Prodducto 1.1'
				 subtotal:'62'
				 total:'71.92'
				 unidad_peso:null
				 unidad_volumen:null
				 volumen:'30'
			 }, n:{...}
		 ]
		 estado:'1'
		 id:'124'
		 idalmacen_od:'0'
		 idcliente_distribuidor:'4220'
		 idcliente_od:'6'
		 idcliente_sistema:'4221'
		 iddomicilio_cliente_od:'432'
		 idmoneda:'4'
		 idstatus_pedido_od:'3'
		 idusuario_sistema:'5163'
		 idvehiculo_od:'5'
		 impuesto:'156.16'
		 inventario_afectado:'0'
		 moneda:'COP'
		 num_factura:'0987654321'
		 numero_pedido:null
		 pagado:'0'
		 peso_total:'3082.00'
		 status_pedido:'Entregado'
		 subtotal:'976'
		 tiempo_servicio:'15'
		 timestamp_fin:'2020-08-21 20:00:00'
		 timestamp_inicio:'2020-08-21 08:00:00'
		 volumen_total:'832.00'
	 }
}
```