# ShipStation API v2 Version: 2.0.0 License: MIT ## Servers Production ``` https://api.shipstation.com ``` ## Security ### api_keys Generate your secret API key in the app settings. Type: apiKey In: header Name: api-key ## Download OpenAPI description [ShipStation API v2](https://docs.shipstation.com/_bundle/openapi.yaml) ## Batches Process labels in bulk and receive a large number of labels and customs forms in bulk responses. Batching is ideal for workflows that need to process hundreds or thousands of labels quickly. ### List batches - [GET /v2/batches](https://docs.shipstation.com/openapi/batches/list_batches.md): List the batches associated with your ShipStation account. ### Create a batch - [POST /v2/batches](https://docs.shipstation.com/openapi/batches/create_batch.md): Create a batch containing multiple labels. ### Get batch by external id - [GET /v2/batches/external_batch_id/{external_batch_id}](https://docs.shipstation.com/openapi/batches/get_batch_by_external_id.md): Retreive a batch using an external batch ID ### Delete batch by id - [DELETE /v2/batches/{batch_id}](https://docs.shipstation.com/openapi/batches/delete_batch.md): Delete a batch based on its batch id. Sets its status to 'archived'. ### Get batch by id - [GET /v2/batches/{batch_id}](https://docs.shipstation.com/openapi/batches/get_batch_by_id.md): Get batch details for a specific batch id. ### Update batch status to 'archived' by id - [PUT /v2/batches/{batch_id}](https://docs.shipstation.com/openapi/batches/update_batch.md): Update a batch by id setting its status to 'archived'. ### Add to a batch - [POST /v2/batches/{batch_id}/add](https://docs.shipstation.com/openapi/batches/add_to_batch.md): Add a shipment or rate to a batch. ### Get batch errors - [GET /v2/batches/{batch_id}/errors](https://docs.shipstation.com/openapi/batches/list_batch_errors.md): Errors in batches must be handled differently from synchronous requests. You must retrieve the status of your batch by getting a batch and getting an overview of the statuses or by listing the batch errors. ### Process batch id labels - [POST /v2/batches/{batch_id}/process/labels](https://docs.shipstation.com/openapi/batches/process_batch.md): Create and purchase the labels for the shipments included in the batch. ### Remove from batch - [POST /v2/batches/{batch_id}/remove](https://docs.shipstation.com/openapi/batches/remove_from_batch.md): Remove specific shipment ids or rate ids from a batch. ## Carriers Retreive useful details about the carriers connected to your accounts, including carrier IDs, service IDs, advanced options, and available carrier package types. ### List carriers - [GET /v2/carriers](https://docs.shipstation.com/openapi/carriers/list_carriers.md): List all carriers that have been added to this account. ### Get carrier by id - [GET /v2/carriers/{carrier_id}](https://docs.shipstation.com/openapi/carriers/get_carrier_by_id.md): Retrive details about a specific carrier by its carrier id. ### Get carrier options - [GET /v2/carriers/{carrier_id}/options](https://docs.shipstation.com/openapi/carriers/get_carrier_options.md): Get a list of the options available for a specific carriers. ### List carrier package types - [GET /v2/carriers/{carrier_id}/packages](https://docs.shipstation.com/openapi/carriers/list_carrier_package_types.md): List the package types associated with a specific carrier. ### List carrier services - [GET /v2/carriers/{carrier_id}/services](https://docs.shipstation.com/openapi/carriers/list_carrier_services.md): List the services associated with a specific carrier id. ## Downloads Download your label files in PDF, PNG, and ZPL. ### Download file - [GET /v2/downloads/{dir}/{subdir}/{filename}](https://docs.shipstation.com/openapi/downloads/download_file.md): Download labels and other shipment-related documents. ## Fulfillments Manage fulfillments which represent completed shipments. Create fulfillments to mark orders as shipped with tracking information and notify customers and marketplaces. ### List fulfillments - [GET /v2/fulfillments](https://docs.shipstation.com/openapi/fulfillments/list_fulfillments.md): Retrieve a list of fulfillments based on various filter criteria. You can filter by shipment details, tracking information, dates, and more to find the specific fulfillments you need. ### Create fulfillments - [POST /v2/fulfillments](https://docs.shipstation.com/openapi/fulfillments/create_fulfillments.md): Create one or more fulfillments by marking shipments as shipped with tracking information. This will notify customers and marketplaces according to your configuration. ## Inventory Manage inventory, adjust quantities, and handle warehouses and locations. ### List SKU inventory levels - [GET /v2/inventory](https://docs.shipstation.com/openapi/inventory/getinventorylevels.md) ### Update SKU stock levels and related properties - [POST /v2/inventory](https://docs.shipstation.com/openapi/inventory/updateskustocklevels.md) ### List all inventory warehouses - [GET /v2/inventory_warehouses](https://docs.shipstation.com/openapi/inventory/getinventorywarehouses.md) ### Create a new inventory warehouse - [POST /v2/inventory_warehouses](https://docs.shipstation.com/openapi/inventory/addnewinventorywarehouse.md) ### Get a specific inventory warehouse and related properties using its warehouse ID - [GET /v2/inventory_warehouses/{inventory_warehouse_id}](https://docs.shipstation.com/openapi/inventory/getinventorywarehousebyid.md) ### Update an inventory warehouse name - [PUT /v2/inventory_warehouses/{inventory_warehouse_id}](https://docs.shipstation.com/openapi/inventory/updateinventorywarehouse.md) ### Delete an inventory warehouse - [DELETE /v2/inventory_warehouses/{inventory_warehouse_id}](https://docs.shipstation.com/openapi/inventory/deleteinventorywarehouse.md) ### List all inventory locations - [GET /v2/inventory_locations](https://docs.shipstation.com/openapi/inventory/listinventorylocations.md) ### Create a new inventory location - [POST /v2/inventory_locations](https://docs.shipstation.com/openapi/inventory/createinventorylocation.md) ### Get inventory location by ID - [GET /v2/inventory_locations/{inventory_location_id}](https://docs.shipstation.com/openapi/inventory/getinventorylocationbyid.md) ### Update an inventory location - [PUT /v2/inventory_locations/{inventory_location_id}](https://docs.shipstation.com/openapi/inventory/updateinventorylocation.md) ### Delete an inventory location - [DELETE /v2/inventory_locations/{inventory_location_id}](https://docs.shipstation.com/openapi/inventory/deleteinventorylocationbyid.md) ## Labels Purchase and print shipping labels for any carrier active on your account. The labels endpoint also supports creating return labels, voiding labels, and getting label details like tracking. ### List labels - [GET /v2/labels](https://docs.shipstation.com/openapi/labels/list_labels.md): This method returns a list of labels that you've created. You can optionally filter the results as well as control their sort order and the number of results returned at a time. By default all labels are returned 25 at a time, starting with the most recently created ones. You can combine multiple filter options to narrow-down the results. For example, if you only want your UPS labels for your east coast warehouse you could query by both warehouse_id and carrier_id. ### Purchase label - [POST /v2/labels](https://docs.shipstation.com/openapi/labels/create_label.md): Purchase and print a label for shipment. ### Purchase label with rate id - [POST /v2/labels/rates/{rate_id}](https://docs.shipstation.com/openapi/labels/create_label_from_rate.md): When retrieving rates for shipments using the /rates endpoint, the returned information contains a rate_id property that can be used to generate a label without having to refill in the shipment information repeatedly. ### Purchase label with shipment id - [POST /v2/labels/shipment/{shipment_id}](https://docs.shipstation.com/openapi/labels/create_label_from_shipment.md): Purchase a label using a shipment ID that has already been created with the desired address and package info. ### Purchase label with rate shopper - [POST /v2/labels/rate_shopper_id/{rate_shopper_id}](https://docs.shipstation.com/openapi/labels/create_label_from_rate_shopper.md): Create a label using Rate Shopper to automatically select the best carrier and service based on the specified strategy. For more information about Rate Shopper strategies and use cases, see Rate Shopping. ### Get label by id - [GET /v2/labels/{label_id}](https://docs.shipstation.com/openapi/labels/get_label_by_id.md): Retrieve a specific label by its label id. ### Create a return label - [POST /v2/labels/{label_id}/return](https://docs.shipstation.com/openapi/labels/create_return_label.md): Create a return label for a previously created outbound label. The return label will automatically swap the ship to and ship from addresses from the original label. ### Get label tracking information - [GET /v2/labels/{label_id}/track](https://docs.shipstation.com/openapi/labels/get_tracking_log_from_label.md): Retrieve the label's tracking details. ### Void a label by id - [PUT /v2/labels/{label_id}/void](https://docs.shipstation.com/openapi/labels/void_label.md): Void a specific label using its label id. For labels that are paid for at time of label creation, this will also request a refund from the carrier. ### Purchase label with rate shopper - [POST /v2/labels/rate_shopper_id/{rate_shopper_id}](https://docs.shipstation.com/openapi/rates/create_label_from_rate_shopper.md): Create a label using Rate Shopper to automatically select the best carrier and service based on the specified strategy. For more information about Rate Shopper strategies and use cases, see Rate Shopping. ## Rates Quickly compare rates using the Rates endpoint. You can see and compare rates for the carriers connected to your account (as long as they support sending rates). ### Purchase label with rate shopper - [POST /v2/labels/rate_shopper_id/{rate_shopper_id}](https://docs.shipstation.com/openapi/labels/create_label_from_rate_shopper.md): Create a label using Rate Shopper to automatically select the best carrier and service based on the specified strategy. For more information about Rate Shopper strategies and use cases, see Rate Shopping. ### Purchase label with rate shopper - [POST /v2/labels/rate_shopper_id/{rate_shopper_id}](https://docs.shipstation.com/openapi/rates/create_label_from_rate_shopper.md): Create a label using Rate Shopper to automatically select the best carrier and service based on the specified strategy. For more information about Rate Shopper strategies and use cases, see Rate Shopping. ### Get shipping rates - [POST /v2/rates](https://docs.shipstation.com/openapi/rates/calculate_rates.md): It's not uncommon that you want to give your customer the choice between whether they want to ship the fastest, cheapest, or the most trusted route. Most companies don't solely ship things using a single shipping option; so we provide functionality to show you all your options! ### Estimate rates - [POST /v2/rates/estimate](https://docs.shipstation.com/openapi/rates/estimate_rates.md): Get Rate Estimates ### Get rate by id - [GET /v2/rates/{rate_id}](https://docs.shipstation.com/openapi/rates/get_rate_by_id.md): Retrieve a previously queried rate by its ID ## Manifests A manifest is a document that provides a list of the day's shipments. It typically contains a barcode that allows the pickup driver to scan a single document to register all shipments, rather than scanning each shipment individually. ### List manifests - [GET /v2/manifests](https://docs.shipstation.com/openapi/manifests/list_manifests.md): Similar to querying shipments, we allow you to query manifests since there will likely be a large number over a long period of time. ### Create manifest - [POST /v2/manifests](https://docs.shipstation.com/openapi/manifests/create_manifest.md): Each ShipStation manifest is created for a specific warehouse, so you'll need to provide the warehouse_id rather than the ship_from address. You can create a warehouse for each location that you want to create manifests for. ### Get manifest by id - [GET /v2/manifests/{manifest_id}](https://docs.shipstation.com/openapi/manifests/get_manifest_by_id.md): Get Manifest By Id ## Package Pickups Scheduled pickups and manage pickup requests for supported carriers. ### List scheduled pickups - [GET /v2/pickups](https://docs.shipstation.com/openapi/package_pickups/list_scheduled_pickups.md): List all pickups that have been scheduled for this carrier ### Schedule a pickup - [POST /v2/pickups](https://docs.shipstation.com/openapi/package_pickups/schedule_pickup.md): Schedule a package pickup with a carrier ### Get pickup by id - [GET /v2/pickups/{pickup_id}](https://docs.shipstation.com/openapi/package_pickups/get_pickup_by_id.md): Get Pickup By ID ### Delete a scheduled pickup - [DELETE /v2/pickups/{pickup_id}](https://docs.shipstation.com/openapi/package_pickups/delete_scheduled_pickup.md): Delete a previously-scheduled pickup by ID ## Package Types Create custom package types to use for your shipments, rather than the carriers' default package types. ### List custom package types - [GET /v2/packages](https://docs.shipstation.com/openapi/package_types/list_package_types.md): List the custom package types associated with the account ### Create custom package type - [POST /v2/packages](https://docs.shipstation.com/openapi/package_types/create_package_type.md): Create a custom package type to better assist in getting accurate rate estimates ### Get custom package type by id - [GET /v2/packages/{package_id}](https://docs.shipstation.com/openapi/package_types/get_package_type_by_id.md): Get Custom Package Type by ID ### Update custom package type by id - [PUT /v2/packages/{package_id}](https://docs.shipstation.com/openapi/package_types/update_package_type.md): Update the custom package type object by ID ### Delete a custom package by id - [DELETE /v2/packages/{package_id}](https://docs.shipstation.com/openapi/package_types/delete_package_typ.md): Delete a custom package using the ID ## Products Manage products in your ShipStation account. Products represent the items you sell and ship to customers. ### List products - [GET /v2/products](https://docs.shipstation.com/openapi/products/listproducts.md) ## Shipments Shipments are at the core of most ShipStation capabilities. Shipment objects are required for cretaing labels and manifests, as well as getting rates. ### List shipments - [GET /v2/shipments](https://docs.shipstation.com/openapi/shipments/list_shipments.md): Get list of Shipments ### Create shipments - [POST /v2/shipments](https://docs.shipstation.com/openapi/shipments/create_shipments.md): Create one or more shipments ### Get shipment by external id - [GET /v2/shipments/external_shipment_id/{external_shipment_id}](https://docs.shipstation.com/openapi/shipments/get_shipment_by_external_id.md): Query Shipments created using your own custom ID convention using this endpoint ### Get shipment by id - [GET /v2/shipments/{shipment_id}](https://docs.shipstation.com/openapi/shipments/get_shipment_by_id.md): Get an individual shipment based on its ID ### Cancel a shipment - [PUT /v2/shipments/{shipment_id}/cancel](https://docs.shipstation.com/openapi/shipments/cancel_shipments.md): Mark a shipment cancelled, if it is no longer needed or being used by your organized. Any label associated with the shipment needs to be voided first An example use case would be if a batch label creation job is going to run at a set time and only queries pending shipments. Marking a shipment as cancelled would remove it from this process ### Get shipment rates - [GET /v2/shipments/{shipment_id}/rates](https://docs.shipstation.com/openapi/shipments/list_shipment_rates.md): Get Rates for the shipment information associated with the shipment ID ### Add tag to shipment - [POST /v2/shipments/{shipment_id}/tags/{tag_name}](https://docs.shipstation.com/openapi/shipments/tag_shipment.md): Add a tag to the shipment object ### Remove tag from shipment - [DELETE /v2/shipments/{shipment_id}/tags/{tag_name}](https://docs.shipstation.com/openapi/shipments/untag_shipment.md): Remove an existing tag from the Shipment object ## Tags Tags are text-based identifiers you can add to shipments to help in your shipment management workflows. ### Get tags - [GET /v2/tags](https://docs.shipstation.com/openapi/tags/list_tags.md): Get a list of all tags associated with an account. ### Create a new tag - [POST /v2/tags/{tag_name}](https://docs.shipstation.com/openapi/tags/create_tag.md): Create a new Tag for customizing how you track your shipments ## Totes Manage totes (bins or containers) used in warehouse picking and packing operations. Create, update, delete totes and track tote quantities by warehouse. ### List totes - [GET /v2/totes](https://docs.shipstation.com/openapi/totes/listtotes.md): Get all totes for the seller, optionally filtered by warehouse. ### Create totes in batch - [POST /v2/totes](https://docs.shipstation.com/openapi/totes/createtotesbatch.md): Create multiple totes at once. Returns both successfully created totes and any failures. ### Get tote quantities - [GET /v2/totes/quantities](https://docs.shipstation.com/openapi/totes/gettotequantities.md): Get the number of totes in each warehouse. ### Get tote by ID - [GET /v2/totes/{tote_id}](https://docs.shipstation.com/openapi/totes/gettotebyid.md): Retrieve details of a specific tote. ### Update tote - [PUT /v2/totes/{tote_id}](https://docs.shipstation.com/openapi/totes/updatetote.md): Update the name or barcode of an existing tote. ### Delete tote - [DELETE /v2/totes/{tote_id}](https://docs.shipstation.com/openapi/totes/deletetote.md): Delete a tote by its ID. ## Tracking Use the tracking endpoint to stop receiving tracking updates (more dedicated tracking endpoint methods coming soon). ### Stop tracking a package - [POST /v2/tracking/stop](https://docs.shipstation.com/openapi/tracking/stop_tracking.md): Unsubscribe from tracking updates for a package. ## Warehouses Get warehouse details like warehouse ID and related addresses using the warehouses endpoint. ### List warehouses - [GET /v2/warehouses](https://docs.shipstation.com/openapi/warehouses/list_warehouses.md): Retrieve a list of warehouses associated with this account. ### Get warehouse by id - [GET /v2/warehouses/{warehouse_id}](https://docs.shipstation.com/openapi/warehouses/get_warehouse_by_id.md): Retrieve warehouse data based on the warehouse ID ## Users Manage and retrieve user information for the ShipStation account. This endpoint allows you to list users with various filtering options. ### List users - [GET /v2/users](https://docs.shipstation.com/openapi/users/listusers.md) ## Webhooks Webhooks are a powerful feature that can save you from sending repeated polling requests to check on the state of something. With webhooks, ShipStation will automatically contact your servers when the stage changes. This can include parcel tracking events, notification when a batch operation completes, and more. ### List webhooks - [GET /v2/environment/webhooks](https://docs.shipstation.com/openapi/webhooks/list_webhooks.md): List all webhooks currently enabled for the account. ### Create a webhook - [POST /v2/environment/webhooks](https://docs.shipstation.com/openapi/webhooks/create_webhook.md): Create a webhook for specific events in the environment. ### Get webhook by id - [GET /v2/environment/webhooks/{webhook_id}](https://docs.shipstation.com/openapi/webhooks/get_webhook_by_id.md): Retrieve individual webhook by an ID ### Update a webhook - [PUT /v2/environment/webhooks/{webhook_id}](https://docs.shipstation.com/openapi/webhooks/update_webhook.md): Update the webhook url property ### Delete webhook by id - [DELETE /v2/environment/webhooks/{webhook_id}](https://docs.shipstation.com/openapi/webhooks/delete_webhook.md): Delete a webhook