Ir al contenido principal
Todas las coleccionesAPI
5-Actualizar un shipping
5-Actualizar un shipping

5-Actualizar un shipping

A
Escrito por Axel Candia
Actualizado hace más de una semana

Metodo: PUT

URL base para el entorno de prueba: https://api-dev.moova. io/b2b

URL base para el entorno Real: https://api-prod.moova.io/b2b

Params:

appId

Shipping Id

Body:

Todos los campos que se enviaron al momento de la creación del envió pueden ser actualizados. En caso de hacer un cambio en alguna de las direcciones el envió se volverá a cotizar según las nuevas distancias.

{ 
"scheduledDate": "2021-02-20 15:00:00",
"currency": "ARS",
"type": "minutes_90",
"flow": "automatic",
"from": {
    "googlePlaceId": "ChIJYVOqvJrKvJURbO0qQqXC8MA",
"floor": "6to",
"apartment": "C",
"instructions": "No funciona el timbre. Llamar antes",
"contact": {
"firstName": "Juan",
"lastName": "Perez",
"email": "",
"phone": "+54 11 8786 1232"
},
"message": ""
},
"to": {
    "googlePlaceId": null,
"street": "Avenida Córdoba",
"number": "1500",
"floor": "3to",
"apartment": "F",
"city": "CABA",
"state": "CABA",
"postalCode": "1055",
"country": "AR",
"instructions": "Entregar al Portero. Almuerza a la 1",
"contact": {
"firstName": "Juan",
"lastName": "Perez",
"email": "[email protected]",
"phone": "+54 11 6765 8765"
},
"message": ""
},
"internalCode": "X23454",
"description": "string",
"label": "string",
"extra": {},
"settings": [1, 2],
"conf": {
"assurance": false,
"items": [
{
"item": {
"description": "iPhone",
"price": 150,
"weight": 2000,
"length": 20,
"width": 20,
"height": 20
}
}
]
}
}

Response

{
"id": "b9255870-6166-11ea-914b-ff471ce5170b",
"scheduledDate": "2021-02-20 15:00:00",
"type": "minutes_90",
"priceFormatted": "$ 200,00",
"price": "200.00",
"currency": "ARS",
"from": {
"placeId": 63,
"googlePlaceId": "ChIJYVOqvJrKvJURbO0qQqXC8MA",
"address": "Av. Santa Fe 2678, C1425BGO CABA, Argentina",
"addressExtra": "6to C",
"contact": "Juan Perez",
"email": "",
"phone": "+54 11 8786 1232",
"instructions": "No funciona el timbre. Llamar antes"
},
"to": {
"placeId": 258,
"googlePlaceId": "ChIJGTa0WcfKvJUReHvuhmo0zpE",
"address": "Av. Córdoba 1500, C1055AAR CABA, Argentina",
"addressExtra": "3to F",
"contact": "Juan Perez",
"email": "[email protected]",
"phone": "+54 11 6765 8765",
"instructions": "Entregar al Portero. Almuerza a la 1"
},
"status": "WAITING",
"secretCode": "6975",
"internalCode": "X23454",
"internalOrderId": null,
"description": "string",
"hash": "eff81c0aaefe7a39e43e1c5ff52762eda533fd77aad5d743d3841b5ba1e90d0d",
"message": "",
"extra": [],
"conf": {
"items": [
{
"item": {
"price": 150,
"width": 20,
"height": 20,
"length": 20,
"weight": 2000,
"description": "iPhone"
}
}
],
"assurance": false
},
"deliveryInfo": {
"courier": null,
"lat": null,
"lng": null
},
"statusHistory": [
{
"status": "WAITING",
"details": null,
"createdAt": "2020-03-08 18:00:40"
}
],
"activeSettings": [
{
"id": 1,
"name": "PickupSignature",
"description": "In order to pick up this shipping the sender must provide a signature",
"created_at": "2020-02-10 14:31:44",
"updated_at": "2020-02-10 14:31:44",
"deleted_at": null,
"shipping_id": "b9255870-6166-11ea-914b-ff471ce5170b"
},
{
"id": 2,
"name": "PickupPhoto",
"description": "In order to pick up this shipping is mandatory to take a picture of the package",
"created_at": "2020-02-10 14:31:44",
"updated_at": "2020-02-10 14:31:44",
"deleted_at": null,
"shipping_id": "b9255870-6166-11ea-914b-ff471ce5170b"
}
],
"createdAt": "2020-03-08 18:00:40"
}

ejemplo en curl del put

curl -X PUT "https://api-dev.moova.io/b2b/shippings/b9255870-6166-11ea-914b-ff471ce5170b?appId=999a9999-9999-aaaa-aa9a-aa9a999a99a" -H "accept: application/json" -H "Authorization: 9999999aa9999aaaaa999aaaaaaaa9999aa9aa9a9a99" -H "Content-Type: application/json" -d "{ \"scheduledDate\": \"2021-02-20 15:00:00\", \"currency\": \"ARS\", \"type\": \"minutes_90\", \"flow\": \"automatic\", \"from\": { \t\"googlePlaceId\": \"ChIJYVOqvJrKvJURbO0qQqXC8MA\", \"floor\": \"6to\", \"apartment\": \"C\", \"instructions\": \"No funciona el timbre. Llamar antes\", \"contact\": { \"firstName\": \"Juan\", \"lastName\": \"Perez\", \"email\": \"\", \"phone\": \"+54 11 8786 1232\" }, \"message\": \"\" }, \"to\": { \t\"googlePlaceId\": null, \"street\": \"Avenida Córdoba\", \"number\": \"1500\", \"floor\": \"3to\", \"apartment\": \"F\", \"city\": \"CABA\", \"state\": \"CABA\", \"postalCode\": \"1055\", \"country\": \"AR\", \"instructions\": \"Entregar al Portero. Almuerza a la 1\", \"contact\": { \"firstName\": \"Juan\", \"lastName\": \"Perez\", \"email\": \"[email protected]\", \"phone\": \"+54 11 6765 8765\" }, \"message\": \"\" }, \"internalCode\": \"X23454\", \"description\": \"string\", \"label\": \"string\", \"extra\": {}, \"settings\": [1, 2], \"conf\": { \"assurance\": false, \"items\": [ { \"item\": { \"description\": \"iPhone\", \"price\": 150, \"weight\": 2000, \"length\": 20, \"width\": 20, \"height\": 20 } } ] }}".  
¿Ha quedado contestada tu pregunta?