{"templateId":"markdown","versions":[{"version":"shipstation-v2","label":"ShipStation V2 API","link":"/apis/shipstation-v2/docs/partners/on-behalf-of","default":true,"active":false,"folderId":"58c9a61d"},{"version":"shipengine","label":"ShipStation API (formerly ShipEngine)","link":"/apis/shipengine/docs/partners/on-behalf-of","default":false,"active":true,"folderId":"58c9a61d"},{"version":"shipstation-v1","label":"ShipStation V1 API","link":"/apis/shipstation-v1/docs/partners/on-behalf-of","default":false,"active":false,"folderId":"58c9a61d"}],"sharedDataIds":{"sidebar":"sidebar-apis/@shipengine/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Using ShipStation API on Behalf of an Account","keywords":"shipping, labels, shipstation, documentation, api","siteUrl":"https://docs.shipstation.com","lang":"en-US","llmstxt":{"hide":false,"title":"ShipStation API LLM Docs","description":"Find links and references to all markdown documentation for use with LLMs","excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"using-shipstation-api-on-behalf-of-an-account","__idx":0},"children":["Using ShipStation API on Behalf of an Account"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once you've ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/partners/accounts/create"},"children":["created a ShipStation API account"]},", 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:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/carriers/connect"},"children":["Connect carrier accounts"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/labels/create-a-label"},"children":["Create a label"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/rates/rates"},"children":["Get shipping rates"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/tracking/tracking"},"children":["Track a package"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"the-on-behalf-of-header","__idx":1},"children":["The On-Behalf-Of Header"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All calls to the ShipStation API will require the following two headers:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Header Name"},"children":["Header Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["API-Key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is your ShipStation Partner API key. See the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/getting-started/get-started"},"children":["Getting Started"]}," page for details."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["On-Behalf-Of"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is the account ID of the ShipStation API account that you are operating on behalf of."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example-request--response","__idx":2},"children":["Example Request & Response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["POST /v1/labels"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /v1/labels HTTP/1.1\nHost: api.shipengine.com\nAPI-Key: __PARTNER_API_KEY_HERE__\nOn-Behalf-Of: __ACCOUNT_ID_HERE__\nContent-Type: application/json\n\n{\n  \"shipment\": {\n    \"service_code\": \"usps_priority_mail\",\n    \"ship_to\": {\n      \"name\": \"Mickey and Minnie Mouse\",\n      \"phone\": \"+1 (714) 781-4565\",\n      \"company_name\": \"The Walt Disney Company\",\n      \"address_line1\": \"500 South Buena Vista Street\",\n      \"city_locality\": \"Burbank\",\n      \"state_province\": \"CA\",\n      \"postal_code\": \"91521\",\n      \"country_code\": \"US\",\n      \"address_residential_indicator\": \"No\"\n    },\n    \"ship_from\": {\n      \"name\": \"Shippy\",\n      \"phone\": \"512-485-4282\",\n      \"company_name\": \"ShipStation API\",\n      \"address_line1\": \"3800 N. Lamar Blvd.\",\n      \"address_line2\": \"Suite 220\",\n      \"city_locality\": \"Austin\",\n      \"state_province\": \"TX\",\n      \"postal_code\": \"78756\",\n      \"country_code\": \"US\",\n      \"address_residential_indicator\": \"No\"\n    },\n    \"packages\": [\n      {\n        \"weight\": {\n          \"value\": 1.0,\n          \"unit\": \"ounce\"\n        }\n      }\n    ]\n  }\n}\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example response:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"label_id\": \"se-202887313\",\n  \"status\": \"completed\",\n  \"shipment_id\": \"se-202887313\",\n  \"ship_date\": \"2019-04-01T05:00:00.000Z\",\n  \"created_at\": \"2019-04-01T20:46:31.168Z\",\n  \"shipment_cost\": {\n    \"currency\": \"USD\",\n    \"amount\": 6.86\n  },\n  \"insurance_cost\": {\n    \"currency\": \"USD\",\n    \"amount\": 0.0\n  },\n  \"tracking_number\": \"9405511899560441854156\",\n  \"is_return_label\": false,\n  \"is_international\": false,\n  \"batch_id\": \"\",\n  \"carrier_id\": \"se-123890\",\n  \"service_code\": \"usps_priority_mail\",\n  \"package_code\": \"package\",\n  \"voided\": false,\n  \"label_format\": \"pdf\",\n  \"label_layout\": \"4x6\",\n  \"trackable\": false,\n  \"carrier_code\": \"stamps_com\",\n  \"tracking_status\": \"unknown\",\n  \"label_download\": {\n    \"href\": \"https://api.shipengine.com/v1/downloads/aFbxNUVCZ0SDHHp-BmcKjA/testlabel-202887313.pdf\"\n  },\n  \"form_download\": null,\n  \"insurance_claim\": null,\n  \"packages\": [\n    {\n      \"package_code\": \"package\",\n      \"weight\": {\n        \"value\": 1.00,\n        \"unit\": \"ounce\"\n      },\n      \"dimensions\": {\n        \"unit\": \"inch\",\n        \"length\": 0.0,\n        \"width\": 0.0,\n        \"height\": 0.0\n      },\n      \"insured_value\": {\n        \"currency\": \"usd\",\n        \"amount\": 0.00\n      },\n      \"tracking_number\": null,\n      \"label_messages\": {\n        \"reference1\": null,\n        \"reference2\": null,\n        \"reference3\": null\n      }\n    }\n  ]\n}\n","lang":"json"},"children":[]}]},"headings":[{"value":"Using ShipStation API on Behalf of an Account","id":"using-shipstation-api-on-behalf-of-an-account","depth":1},{"value":"The On-Behalf-Of Header","id":"the-on-behalf-of-header","depth":2},{"value":"Example Request & Response","id":"example-request--response","depth":2}],"frontmatter":{"seo":{"title":"Using ShipStation API on Behalf of an Account"}},"lastModified":"2026-04-08T10:47:45.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/apis/shipengine/docs/partners/on-behalf-of","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}