# Remove shipments from a batch Removes shipments from an existing batch shipment. Endpoint: POST /batches/{BatchId}/remove_shipments Version: 2018-02-08 Security: APIKeyHeader ## Path parameters: - `BatchId` (string, required) Object ID of the batch ## Header parameters: - `SHIPPO-API-VERSION` (string) Optional string used to pick a non-default API version to use. See our API version guide. Example: "2018-02-08" ## Response 200 fields (application/json): - `default_carrier_account` (string, required) ID of the Carrier Account object to use as the default for all shipments in this Batch. The carrier account can be changed on a per-shipment basis by changing the carrier_account in the corresponding BatchShipment object. Example: "078870331023437cb917f5187429b093" - `default_servicelevel_token` (string, required) Token of the service level to use as the default for all shipments in this Batch. The servicelevel can be changed on a per-shipment basis by changing the servicelevel_token in the corresponding BatchShipment object. Servicelevel tokens can be found here. Example: "usps_priority" - `label_filetype` (string) Print format of the label. If empty, will use the default format set from the Shippo dashboard. Enum: "PNG", "PNG_2.3x7.5", "PDF", "PDF_2.3x7.5", "PDF_4x6", "PDF_4x8", "PDF_A4", "PDF_A5", "PDF_A6", "ZPLII" - `metadata` (string) A string of up to 100 characters that can be filled with any additional information you want to attach to the object. Example: "BATCH #1" - `batch_shipments` (object, required) Array of BatchShipment objects. The response keeps the same order as in the request array. - `batch_shipments.next` (string) Example: "baseurl?page=3&results=10" - `batch_shipments.previous` (string) Example: "baseurl?page=1&results=10" - `batch_shipments.results` (array) - `batch_shipments.results.carrier_account` (string) Object ID of the carrier account to be used for this shipment (will override batch default) Example: "a4391cd4ab974f478f55dc08b5c8e3b3" - `batch_shipments.results.metadata` (string) A string of up to 100 characters that can be filled with any additional information you want to attach to the object. Example: "SHIPMENT #1" - `batch_shipments.results.servicelevel_token` (string) A token that sets the shipping method for the batch, overriding the batch default. Servicelevel tokens can be found in this list or at this endpoint. Example: "fedex_ground" - `batch_shipments.results.messages` (array) List of Shipment and Transaction error messages. - `batch_shipments.results.object_id` (string, required) Object ID of this batch shipment. Can be used in the remove_shipments endpoint. Example: "e11c95a6788d4ddcaa22f03175838740" - `batch_shipments.results.shipment` (string, required) Object ID of the shipment object created for this batch shipment. Example: "adcfdddf8ec64b84ad22772bce3ea37a" - `batch_shipments.results.status` (string, required) INVALID batch shipments cannot be purchased and will have to be removed, fixed, and added to the batch again. VALID batch shipments can be purchased. Batch shipments with the status TRANSACTION_FAILED were not able to be purchased and the error will be displayed on the message field INCOMPLETE batch shipments have an issue with the Address and will need to be removed, fixed, and added to the batch again. Enum: "INVALID", "VALID", "INCOMPLETE", "TRANSACTION_FAILED" - `batch_shipments.results.transaction` (string) Object ID of the transaction object created for this batch shipment. Example: "4c33736a67e2450da88b38c42deef6b7" - `label_url` (array, required) An array of URLs each pointing to a merged file of 100 labels each - `object_created` (string, required) Date and time of Batch creation Example: "2016-01-04T00:15:44.394Z" - `object_id` (string, required) Unique identifier of the given Batch object Example: "5ef63c54f5bf45d3b1f8fb37dcb1c5f4" - `object_owner` (string, required) Username of the user who created the Batch object. Example: "shippo@shippo.com" - `object_results` (object, required) An object containing the following counts:creation_succeededcreation_failedpurchase_succeededpurchase_failed - `object_results.creation_failed` (integer, required) Example: 3 - `object_results.creation_succeeded` (integer, required) Example: 5 - `object_results.purchase_failed` (integer, required) - `object_results.purchase_succeeded` (integer, required) - `object_updated` (string, required) Date and time of last update to the Batch Example: "2016-01-04T00:48:13.841Z" - `status` (string, required) Batches that are VALIDATING are being created and validated VALID batches can be purchased INVALID batches cannot be purchased, INVALID BatchShipments must be removed Batches that are in the PURCHASING state are being purchased PURCHASED batches are finished purchasing. Enum: "VALIDATING", "VALID", "INVALID", "PURCHASING", "PURCHASED" - `test` (boolean)