# Customs

## Cars Customs Quote

<mark style="color:green;">`POST`</mark> `https://docs.send.ng/customs/cars`

This endpoint allows you to get quote prices for car customs.

#### Headers

| Name   | Type   | Description                                         |
| ------ | ------ | --------------------------------------------------- |
| apikey | string | This is the **apikey** of an existing freight user. |

#### Request Body

| Name               | Type    | Description                                                                                 |
| ------------------ | ------- | ------------------------------------------------------------------------------------------- |
| cars               | array   | An array of cars. Includes make, model, value, year, and quantity.                          |
| shipmentType       | string  | This is how you would like your goods to be shipped. **Container/RoRo. RoRo** by default.   |
| requiredelivery    | boolean | **true** if you need these cars delivered to your destination country. **true** by default. |
| destinationcountry | string  | goods would be shipped to this country.                                                     |
| destinationstate   | string  | goods would be shipped to this state.                                                       |
| originstate        | string  | goods would be shipped from this state.                                                     |
| origincountry      | string  | goods would be shipped from this country.                                                   |

{% tabs %}
{% tab title="200 Cars Custom Quote successfully created." %}

```
{   
    "status": true,
    "message": "Successfully created quote for cars.",
    "result": {
        "cars": [
           {
                "make": "Hyundai",
                "model": "Compy",
                "year": "2004",
                "message": "Could not find this car (model)",
                "value": 0,
                "clearancecost": 0
            },
            {
                "make": "Hyundai",
                "model": "Azera",
                "year": "2004",
                "message": "Success",
                "value": 15500,
                "quantity": 2,
                "clearancecost": 31000
            }
        ],
       "expirydate": "Dec 16, 2020",
        "deliverycost": 40000,
        "totalclearancecost": 81000,
        "shippingcost": 10000,
        "currency": "NGN",
        "quotenumber": "QN-S42QY79U",
        "quotestatus": "Pending"
    }
}
```

{% endtab %}

{% tab title="401 Invalid API-KEY." %}

```
{
     status: 'failed',
     message: 'Unathorized Request. Header `apikey` not found',
}
```

{% endtab %}

{% tab title="404 Could not find the user account related to the provided apikey." %}

```
{
   status: 'failed',
   message: 'User cannot be found. Enter a valid userid',
}
```

{% endtab %}

{% tab title="406 This is thrown when the total cost is 0. It means the cars selected are not available in our system." %}

```
{
    status: 'failed', 
    message: 'Total Cost must be more than 0. Please select cars that are available.'
}
```

{% endtab %}

{% tab title="500 Could not find some values in your request body." %}

```
{
    "status":"failed",
    "message": "Error getting car custom price."
}
```

{% endtab %}
{% endtabs %}

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

```javascript
curl https://docs.send.ng/customs/cars
-H "Authorization: apikey"
-H "Content-Type: application/json"
-d '{ destinationcountry: "Nigeria", destinationstate: "Abuja", 
				origincountry: "Nigeria", originstate: "Lagos", shipmentType: "RoRo", 
				cars: [
								{"make": "Hyundai", "model": "Compy", "year": 2004, "value": 15020},	
								{"make": "Hyundai", "model": "Azera", "year": 2004, "value": 15500, "quantity": 2},
				      ]
	   }'
-X POST

```

{% endtab %}
{% endtabs %}
