# Using the ShipStation API Once you've [created a ShipStation API account](/apis/shipengine/docs/partners/create-shipengine-api-key), the next step is to make API calls on behalf of that account. You can perform any ShipStation API operation on behalf of your customer, such as: - [Connect carrier accounts](/apis/shipengine/docs/carriers/connect), - [Create a label](/apis/shipengine/docs/labels/create-a-label), - [Get shipping rates](/apis/shipengine/docs/rates/get-shipment-rates), or - [Track a package](/apis/shipengine/docs/tracking/tracking). ## The On-Behalf-Of header All calls to the ShipStation API will require the following two headers: | Header Name | Description | | --- | --- | | `API-Key` | This is your ShipStation Partner API key. See the [Getting Started](/apis/shipengine/docs/getting-started/get-started) page for details. | | `On-Behalf-Of` | This is the Account ID of the ShipStation API account that you are operating on behalf of. | ## Example Here's an example of how to [create a shipping label](/apis/shipengine/docs/labels/create-a-label) on behalf of a ShipStation API account. In this example, the ShipStation API account ID is `se-123456`. ```http POST /v1/labels HTTP/1.1 Host: api.shipengine.com API-Key: __PARTNER_API_KEY_HERE__ On-Behalf-Of: se-123456 Content-Type: application/json { "shipment": { "service_code": "usps_priority_mail", "ship_to": { "name": "Mickey and Minnie Mouse", "phone": "+1 (714) 781-4565", "company_name": "The Walt Disney Company", "address_line1": "500 South Buena Vista Street", "city_locality": "Burbank", "state_province": "CA", "postal_code": "91521", "country_code": "US", "address_residential_indicator": "No" }, "ship_from": { "name": "Shippy", "phone": "512-485-4282", "company_name": "ShipStation API", "address_line1": "3800 N. Lamar Blvd.", "address_line2": "Suite 220", "city_locality": "Austin", "state_province": "TX", "postal_code": "78756", "country_code": "US", "address_residential_indicator": "No" }, "packages": [ { "weight": { "value": 1.0, "unit": "ounce" } } ] } } ``` ```json { "label_id": "se-202887313", "status": "completed", "shipment_id": "se-202887313", "ship_date": "2019-04-01T05:00:00.000Z", "created_at": "2019-04-01T20:46:31.168Z", "shipment_cost": { "currency": "USD", "amount": 6.86 }, "insurance_cost": { "currency": "USD", "amount": 0.0 }, "tracking_number": "9405511899560441854156", "is_return_label": false, "is_international": false, "batch_id": "", "carrier_id": "se-123890", "service_code": "usps_priority_mail", "package_code": "package", "voided": false, "label_format": "pdf", "label_layout": "4x6", "trackable": false, "carrier_code": "stamps_com", "tracking_status": "unknown", "label_download": { "href": "https://api.shipengine.com/v1/downloads/aFbxNUVCZ0SDHHp-BmcKjA/testlabel-202887313.pdf" }, "form_download": null, "insurance_claim": null, "packages": [ { "package_code": "package", "weight": { "value": 1.00, "unit": "ounce" }, "dimensions": { "unit": "inch", "length": 0.0, "width": 0.0, "height": 0.0 }, "insured_value": { "currency": "usd", "amount": 0.00 }, "tracking_number": null, "label_messages": { "reference1": null, "reference2": null, "reference3": null } } ] } ```