# Card Fulfillment Configuration

This document will describe the card fulfillment process from the initial stage to the delivery of the card.

**Delivery Partners:**

* Delhivery
* Bluedart

The client shall have the freedom to select the priority of the delivery partner.\
Please note that, if the selected delivery partner does not deliver to the specified PIN location, the fallback delivery partner shall take charge of that package. However, if the fallback partner also does not deliver to the specified PIN code, the card file shall move to the given client’s premises address. Please provide the address of the premises with your ISAC spoc for this addition.

**Card File Transitions:**

Once the card has been ordered, the following are the state transitions which are followed:

| **Status Name** | **Type**                                                                                                                                             |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| Ordered         | Card File has been successfully ordered in the system                                                                                                |
| Manifested      | Card File is processed by Delivery Partner & scheduled for pick up from warehouse                                                                    |
| Not Picked      | Card File is not physically picked up from warehouse                                                                                                 |
| In Transit      | Card File is in transit state from warehouse to client’s location                                                                                    |
| Pending         | Card File has reached Delivery Centre but yet to be dispatched                                                                                       |
| Dispatched      | Card File is dispatched for delivery                                                                                                                 |
| Delivered       | <p>Card File is delivered to the end customer.</p><p>Note: This is the terminal state for a card transition</p>                                      |
| RTO             | <p>Card File is getting returned to origin. Delivery could not happen successfully.</p><p>Note: This is the terminal state for a card transition</p> |

The WebHooks received will contain the following details:

{% code overflow="wrap" fullWidth="true" %}

```json
{
	"created_at": "2022-02-06T23:00:49.771139+05:30",
	"status": "In-Transit",
	"location": "Card ",
	"description": "Manifest uploaded",
	"card_file_id": "4xx8",
	"awb": "5014510xxxx0825",
	"partner_name": "delhivery",
	"tracking_link": "https://www.delhivery.com/track/package/5014510xxxx825"
}
```

{% endcode %}

Additionally, the client can also pull the status of the card from [**Get Card Fulfillments - V2**](https://isac.happay.in/v2/api#card) API which will provide the following response:

```json
{
	"awb": "501451xxxx560",
	"card_file_id": "1",
	"partner_name": "Delhivery",
	"tracking_data": [
		[
			{
				"created_at": "2019-10-03T11:24:49.487929Z",
				"description": "Pickup scheduled",
				"location": "Race Course Rd Bengaluru, Karnataka",
				"status": "ISSUED"
			}
		]
	],
	"tracking_link": "https://www.delhivery.com/track/package/88285104xxxx6"
}
```

**Configuring the RTO:**

For RTO to be configured, the client will have to provide the following details. This is because in case the delivery does not happen due to some unexpected turnarounds, the card will have to Return To its Origin.

```json
"client_return_add": {
      "return_add":"3rd Floor, Delta Block, Sigma Technology Park, Varthur Rd, Whitefield",
      "return_pin":"560066",
      "return_city":"Bengaluru",
      "return_name":"VATECH",
      "return_phone":"9xxx3550",
      "return_state":"Karnataka",
      "return_country":"India"
   }
```
