# E-Invoice & E-WayBills: Close E-Waybill

This API is used to close ewayBill.

## URL

```
POST https://cloud.octagst.com/api/octa/einvoice/closeewb?gstin={value}
```

## Query Parameters

| Name    | Description                  |
| ------- | ---------------------------- |
| `gstin` | It specifies GSTIN of seller |

## Request Payload

### Structure

| Parameter   | Data Type   | Type      | Description                             |
| ----------- | ----------- | --------- | --------------------------------------- |
| ewbNo       | String(20)  | Mandatory | e-Waybill number                        |
| closureDate | String(1)   | Mandatory | e-Waybill closure date<br/>`DD/MM/YYYY` |
| remarks     | String(100) | Mandatory | Reason for closing eway bill            |

### Sample

```json
{
  "ewbNo": "791008693652",
  "closureDate": "21/07/2026",
  "remarks": "Material delivered "
}
```

## Response Payload

### Success

Response payload will contain the success status.

| Parameter      | Data Type | Description                                                      |
| -------------- | --------- | ---------------------------------------------------------------- |
| Success        | Boolean   | `true` in case of success                                        |
| ClosureAckTime | String    | e-Waybill closure acknowledgement time<br/>`DD/MM/YYYY HH:MM:SS` |

```json
{
  "Success": true,
  "ClosureAckTime": "21/07/20206 09:34:11"
}
```

### Failure

If API request fails for some reason, response payload will contain the failure status and a list of errors.

```json
{
  "Success": false,
  "Errors": [
    {
      "Code": "ERR_CODE_1",
      "Message": "ERR MESSAGE 1"
    },
    {
      "Code": "ERR_CODE_n",
      "Message": "ERR MESSAGE n"
    }
  ]
}
```