# Physical Check Batches
> Physical Check Batches are groups of checks that are mailed in the same parcel. Tracking updates are propagated to every related Check Transfer.

## The Physical Check Batch object
### Example
```json
{
  "created_at": "2020-01-31T23:59:59Z",
  "id": "physical_check_batch_yzdwjhdbw0in6191whce",
  "idempotency_key": null,
  "mailing_address": {
    "city": "New York",
    "line1": "33 Liberty Street",
    "line2": null,
    "name": "Ian Crease",
    "phone": null,
    "postal_code": "10045",
    "state": "NY"
  },
  "return_address": {
    "city": "New York",
    "line1": "33 Liberty Street",
    "line2": null,
    "name": "National Phonograph Company",
    "phone": null,
    "postal_code": "10045",
    "state": "NY"
  },
  "shipping_method": "usps_first_class",
  "status": "pending",
  "type": "physical_check_batch"
}
```
### Attributes
- `created_at` (string)
  The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Physical Check Batch was created.

- `id` (string)
  The Physical Check Batch's identifier.

- `idempotency_key` (string, nullable)
  The idempotency key you chose for this object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).

- `mailing_address` (dictionary)
  The mailing address of the parcel.

  - `mailing_address.city` (string)
    The city of the address.

  - `mailing_address.line1` (string)
    The first line of the address.

  - `mailing_address.line2` (string, nullable)
    The second line of the address.

  - `mailing_address.name` (string)
    The name component of the address.

  - `mailing_address.phone` (string, nullable)
    The phone number that is used for delivery issues.

  - `mailing_address.postal_code` (string)
    The postal code of the address.

  - `mailing_address.state` (string)
    The state of the address.

- `return_address` (dictionary)
  The return address of the parcel.

  - `return_address.city` (string)
    The city of the return address.

  - `return_address.line1` (string)
    The first line of the return address.

  - `return_address.line2` (string, nullable)
    The second line of the return address.

  - `return_address.name` (string)
    The name component of the return address.

  - `return_address.phone` (string, nullable)
    The phone number that is used for delivery issues.

  - `return_address.postal_code` (string)
    The postal code of the return address.

  - `return_address.state` (string)
    The state of the return address.

- `shipping_method` (enum)
  The shipping method for the parcel.
  Cases:
  * `usps_first_class` (USPS First Class)
  * `fedex_overnight` (FedEx Overnight)

- `status` (enum)
  The lifecycle status of the Physical Check Batch.
  Cases:
  * `pending` (The batch is pending completion and is open to accepting new checks.)
  * `completed` (The batch has been completed.)
  * `canceled` (The batch and all checks related to it have been canceled.)
  * `requires_attention` (The batch requires attention from an Increase operator.)

- `type` (string)
  A constant representing the object's type. For this resource it will always be `physical_check_batch`.

## Create a Physical Check Batch
POST /physical_check_batches

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/physical_check_batches" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "mailing_address": {
      "city": "New York",
      "line1": "33 Liberty Street",
      "name": "Ian Crease",
      "postal_code": "10045",
      "state": "NY"
    },
    "return_address": {
      "city": "New York",
      "line1": "33 Liberty Street",
      "name": "National Phonograph Company",
      "postal_code": "10045",
      "state": "NY"
    }
  }'
```

### Body Parameters
- `mailing_address` (dictionary, required)
  Details for where the parcel will be mailed.

  - `mailing_address.city` (string, required)
    The city of the destination address.

  - `mailing_address.line1` (string, required)
    The first line of the destination address.

  - `mailing_address.line2` (string, optional)
    The second line of the destination address.

  - `mailing_address.name` (string, required)
    The recipient at the destination address.

  - `mailing_address.phone` (string, optional)
    The phone number used for delivery issues at the destination address. Only used when `shipping_method` is `fedex_overnight`.

  - `mailing_address.postal_code` (string, required)
    The postal code of the destination address.

  - `mailing_address.state` (string, required)
    The US state of the destination address.

- `return_address` (dictionary, required)
  Details for where the parcel should return if it is unable to be delivered.

  - `return_address.city` (string, required)
    The city of the return address.

  - `return_address.line1` (string, required)
    The first line of the return address.

  - `return_address.line2` (string, optional)
    The second line of the return address.

  - `return_address.name` (string, required)
    The recipient at the return address.

  - `return_address.phone` (string, optional)
    The phone number used for delivery issues at the return address. Only used when `shipping_method` is `fedex_overnight`.

  - `return_address.postal_code` (string, required)
    The postal code of the return address.

  - `return_address.state` (string, required)
    The US state of the return address.

- `shipping_method` (enum, optional)
  How to ship the batch.
  Default: `usps_first_class`
  Cases:
  * `usps_first_class` (USPS First Class)
  * `fedex_overnight` (FedEx Overnight)

## Cancel a Physical Check Batch
POST /physical_check_batches/{physical_check_batch_id}/cancel
> Cancel a pending Physical Check Batch, which cancels all of its related checks.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/physical_check_batches/physical_check_batch_yzdwjhdbw0in6191whce/cancel" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `physical_check_batch_id` (string, required)
  The identifier of the pending Physical Check Batch to cancel.

## Complete a Physical Check Batch
POST /physical_check_batches/{physical_check_batch_id}/complete
> Completing a Physical Check Batch closes it to new Physical Checks and begins the process of printing and mailing it.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/physical_check_batches/physical_check_batch_yzdwjhdbw0in6191whce/complete" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `physical_check_batch_id` (string, required)
  The identifier of the Physical Check Batch to complete.