# Process Batch Processing a batch means you'll be creating and purchasing the labels for the shipments included in that batch. Once processed, you can then [get the batch details by batch ID](/apis/shipengine/docs/reference/get-batch-by-id) to download the batch labels and forms as well as check that batch status and the review any errors that may have occurred. If you are new to batches in ShipStation API, be sure to read the [Label Batches](/apis/shipengine/docs/labels/bulk) overview first. To use batches successfully, you should also understand how to [create a shipment](/apis/shipengine/docs/shipping/create-a-shipment), how to [get shipping rates](/apis/shipengine/docs/rates/get-shipment-rates), and the basics around [carrier services](/apis/shipengine/docs/reference/list-carriers). > **TIP:** ### Use Webhooks [Setting up webhooks](/apis/shipengine/docs/tracking/webhooks) will improve your batch experience since a webhook will be called when a batch is completed. ## Requirements * The `batch_id` for the batch you wish to process. * All shipments in a batch, whether added with `shipment_id` or `rate_id` must have a `carrier_id` and `service_code`. If the shipments included in the batch do not explicitly specify their carrier and service, you'll recieve an error. * All shipments in a batch must be [shipped from the same warehouse](/apis/shipengine/docs/shipping/ship-from-a-warehouse). This means all shipments in a batch **must** be assigned the same `warehouse_id`. ### Specifying a Label Format & Layout You may optionally specify a [format and layout](/apis/shipengine/docs/labels/formats) for all the labels created with a batch. Unless otherwise specified, labels will be generated as 4x6 PDFs. ## Example Request **POST /v1/batches/:batch_id/process/labels** In this example request, we specify label layout, format, and `ship_date`. ```http POST /v1/batches/se-1010644/process/labels HTTP/1.1 Host: api.shipengine.com API-Key: __YOUR_API_KEY_HERE__ Content-Type: application/json { "ship_date": "2019-07-25T05:00:00.000Z", "label_layout": "4x6", "label_format": "pdf" } ``` ## Error Handling Errors in batches must be handled differently from synchronous requests. You must retrieve the status of your batch by [getting a batch](/apis/shipengine/docs/reference/get-batch-by-id) and getting an overview of the statuses, or by [listing the batch errors](/apis/shipengine/docs/reference/list-batch-errors). ### Invalid or Completed with Errors If the batch enters an Invalid or Completed with Errors state, you cannot re-use the batch. 1. [List the batch errors](/apis/shipengine/docs/reference/list-batch-errors) to extract the shipments and the reasons why they failed. 2. Correct the errors in the shipments by [updating the shipment](/apis/shipengine/docs/reference/update-shipment). 3. [Create a new batch](/apis/shipengine/docs/reference/create-batch) for the shipments and rates in the invalid or error state. 4. [Process the new batch](/apis/shipengine/docs/reference/process-batch).