batches

Get batch by external ID

Changed on

Get Batch By External ID

get/v1/batches/external_batch_id/{external_batch_id}

Request

  • Base URL: https://api.shipengine.com
  • URL: https://api.shipengine.com/v1/batches/external_batch_id/{external_batch_id}
  • Auth: API key in header API-Key

Response

The request was a success.

label_layout'4x6' | 'letter' | 'A4' | 'A6' required

The available layouts (sizes) in which shipping labels can be downloaded. The label format determines which sizes are supported. 4x6 is supported for all label formats, whereas letter (8.5" x 11") is only supported for pdf format.

label_format'pdf' | 'png' | 'zpl' required

The possible file formats in which shipping labels can be downloaded. We recommend pdf format because it is supported by all carriers, whereas some carriers do not support the png or zpl formats.

Label FormatSupported Carriers
pdfAll carriers
pngfedex <br> stamps_com <br> ups <br> usps
zplaccess_worldwide <br> apc <br> asendia <br> dhl_global_mail <br> dhl_express <br> dhl_express_australia <br> dhl_express_canada <br> dhl_express_worldwide <br> dhl_express_uk <br> dpd <br> endicia <br> fedex <br> fedex_uk <br> firstmile <br> imex <br> newgistics <br> ontrac <br> stamps_com <br> ups <br> usps
batch_idstring required

A string that uniquely identifies a ShipEngine resource, such as a carrier, label, shipment, etc.

batch_numberstring required

The batch number.

external_batch_idstring nullable required

A string that uniquely identifies the external batch

batch_notesstring nullable required

Custom notes you can add for each created batch

assigned_userstring uuid nullable

The ID of the user assigned to the batch, or null if no user is assigned.

created_atstring date-time required

An ISO 8601 string that represents a date and time.

processed_atstring date-time nullable required

The date and time the batch was processed in ShipEngine

errorsinteger required

The number of errors that occurred while generating the batch

warningsinteger required

The number of warnings that occurred while generating the batch

completedinteger required

The number of labels generated in the batch

formsinteger required

The number of forms for customs that are available for download

countinteger required

The total of errors, warnings, and completed properties

status'open' | 'queued' | 'processing' | 'completed' | 'completed_with_errors' | 'archived' | 'notifying' | 'invalid' required

The possible batch status values

Example response

{
  "batch_id": "se-28529731",
  "batch_notes": "Batch for morning shipment",
  "assigned_user": "a2df9fa5-b7ee-467f-be4e-9c660542c187",
  "created_at": "2018-09-23T15:00:00.000Z",
  "processed_at": "2018-09-23T15:00:00.000Z",
  "errors": 2,
  "process_errors": [
    {
      "error_source": "shipengine",
      "error_type": "validation",
      "error_code": "invalid_field_value",
      "message": "Body of request cannot be null.",
      "carrier_id": "se-28529731",
      "carrier_code": "dhl_express",
      "field_name": "shipment.ship_to.phone_number"
    }
  ],
  "warnings": 1,
  "completed": 1,
  "forms": 3,
  "count": 2,
  "batch_shipments_url": {
    "href": "https://example.com/resource"
  },
  "batch_labels_url": {
    "href": "https://example.com/resource"
  },
  "batch_errors_url": {
    "href": "https://example.com/resource"
  },
  "label_download": {
    "href": "https://example.com/resource",
    "pdf": "https://example.com/resource",
    "png": "https://example.com/resource",
    "zpl": "https://example.com/resource"
  },
  "packing_slip_download": {
    "href": "https://example.com/resource"
  },
  "form_download": {
    "href": "https://example.com/resource"
  },
  "paperless_download": {
    "href": "https://example.com/resource"
  }
}

Changes

    • warning

      added the new bring_your_own_label_not_supported enum value to the /// response property for the response status

    • warning

      added the new bring_your_own_label_not_supported enum value to the // response property for the response status

    • warning

      added the new bring_your_own_label_not_supported enum value to the // response property for the response status

    • warning

      added the new bring_your_own_label_not_supported enum value to the // response property for the response status

    • warning

      added the new multiple_sales_orders enum value to the /// response property for the response status

    • warning

      added the new multiple_sales_orders enum value to the // response property for the response status

    • warning

      added the new multiple_sales_orders enum value to the // response property for the response status

    • warning

      added the new multiple_sales_orders enum value to the // response property for the response status

    • warning

      added the new sales_order_link_required enum value to the /// response property for the response status

    • warning

      added the new sales_order_link_required enum value to the // response property for the response status

    • warning

      added the new sales_order_link_required enum value to the // response property for the response status

    • warning

      added the new sales_order_link_required enum value to the // response property for the response status

    • breaking

      the // response's property type changed from no type to object for status

    • breaking

      the / response's property type changed from no type to object for status

    • breaking

      the / response's property type changed from no type to object for status

    • breaking

      the / response's property type changed from no type to object for status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      removed from the // response property allOf list for the response status

    • info

      removed from the / response property allOf list for the response status

    • info

      removed from the / response property allOf list for the response status

    • info

      removed from the / response property allOf list for the response status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status