# Update Status

## Test update status(after shipped))

<mark style="color:green;">`POST`</mark> `https://wms.eshopbox.com/api/update-status`

This endpoint allows you to update shipment status.\ <br>

#### Request Body

| Name                      | Type   | Description                                        |
| ------------------------- | ------ | -------------------------------------------------- |
| status\_description       | string | shipment status corresponding to the shipment code |
| waybill                   | string | shipment tracking id                               |
| cp\_name                  | string | courier partner name                               |
| status                    | string | shipment status                                    |
| status\_code              | number | shipment status code                               |
| location                  | string | shipment location                                  |
| additional                | object | shipment details                                   |
| additional.latest\_status | object | shipment status details                            |
| timestamp                 | string | current timestamp                                  |
| remark                    | string | additional remarks                                 |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
    "meta": {
        "success": true,
        "status": 200,
        "message": "SUCCESS"
    }
}
```

{% endtab %}
{% endtabs %}

**The latest\_status object**

| **Attribute**       | Type   | Description                                        |
| ------------------- | ------ | -------------------------------------------------- |
| status\_description | string | shipment status corresponding to the shipment code |
| remark              | string | any additional remark against  the shipment        |
| status              | string | shipment status                                    |
| status\_code        | number | status code from the below table                   |
| location            | string | shipment location                                  |
| timestamp           | string | Timestamp                                          |

**Status type with their code.**

| status\_code | status\_description |
| ------------ | ------------------- |
| 5            | InTransit           |
| 6            | out\_for\_delivery  |
| 8            | delivered           |
| 9            | failed\_delivery    |
| 4            | picked\_up          |
| 10           | cancelled\_order    |

```
curl --location --request POST '{{api_url}}/update-status' \
--header 'Content-Type: application/json' \
--data-raw '{
	"status_description":"Delivered",
	"waybill":"1704610028453",
	"cp_name":"Delhivery",
	"status":"Delivered",
	"status_code":8,
	"location":"GGN_DPC (Haryana)",
	"additional":
	{
		"latest_status":
		{
			"status_description":"Delivered",
			"remark":"Added to IST",
			"status":"In Transit",
			"status_code":8,
			"location":"GGN_DPC (Haryana)",
			"timestamp":"2018-07-12T12:58:40.910000Z"
			
		}
		
	},
	"timestamp":"2018-07-12T11:53:39.902000Z",
	"remark":"Bagged at destination city PC"}'
```
