{"_id":"54cc2149380ecd0d00ca18b9","version":{"_id":"54cc2148380ecd0d00ca18aa","__v":2,"forked_from":"5436a1e1d0ffee0e00f18f8f","project":"5436a1e1d0ffee0e00f18f8c","createdAt":"2015-01-31T00:26:48.753Z","releaseDate":"2015-01-31T00:26:48.753Z","categories":["54cc2149380ecd0d00ca18ab","54cc2149380ecd0d00ca18ac","54cc2149380ecd0d00ca18ad","54cc2149380ecd0d00ca18ae","54cc2149380ecd0d00ca18af","54cc2149380ecd0d00ca18b0","54cc2149380ecd0d00ca18b1","54cc2149380ecd0d00ca18b2","54cc2149380ecd0d00ca18b3","552f29ca633a5b0d00e99d09"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.1.0","version":"1.1"},"__v":7,"user":"543967302e0fd70e00ec63d3","category":{"_id":"54cc2149380ecd0d00ca18af","pages":["54cc2149380ecd0d00ca18b9","552d359b3e1c280d00f76385"],"project":"5436a1e1d0ffee0e00f18f8c","__v":2,"version":"54cc2148380ecd0d00ca18aa","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-11T18:38:30.393Z","from_sync":false,"order":4,"slug":"easyship-api","title":"EasyShip API"},"parentDoc":null,"project":"5436a1e1d0ffee0e00f18f8c","updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-10-11T18:45:57.858Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"Success","code":"{\n  \"session\": {\n    \"token\": \"XXXXXXXXXXXXXXXXXXXXX\",\n    \"email\": \"john:::at:::partner-ecommerce.com\",\n    \"name\": \"Acme Inc.\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"external_identifier\": \"3781876\"\n  }\n}","language":"json"},{"language":"json","name":"Failure","code":"{\n\n}"}]},"method":"post","auth":"never","params":[],"url":"/partners/sessions"},"isReference":false,"order":0,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Example Payload\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"session\\\": {\\n    \\\"email\\\": \\\"john@partner-ecommerce.com\\\",\\n    \\\"name\\\": \\\"Acme Inc.\\\",\\n    \\\"first_name\\\": \\\"John\\\",\\n    \\\"last_name\\\": \\\"Doe\\\",\\n    \\\"external_identifier\\\": \\\"3781876\\\",\\n    \\\"lifetime_in_seconds\\\": 5,\\n    \\\"single_use\\\": true\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"email\",\n    \"1-0\": \"name\",\n    \"2-0\": \"external_identifier\",\n    \"2-1\": \"The unique ID of the customer in your system. This ID will be used when reconciling shipping label purchases.\",\n    \"0-1\": \"The email address of the customer.\",\n    \"1-1\": \"The company name of the customer for whom you are generating a session\",\n    \"3-0\": \"lifetime_in_seconds\",\n    \"4-0\": \"single_use\",\n    \"3-1\": \"Integer\\n\\nLength of time in seconds that the session token will stay active. The default is 900 seconds (15 minutes). Must be a value between 5 and 1800 seconds.\",\n    \"4-1\": \"Boolean\\n\\nDefault is false. When set to true the session token is expired immediately after its first use.\",\n    \"5-0\": \"first_name\",\n    \"5-1\": \"First name of the merchant or customer for whom you are generating a session. \\n\\nThis field is required if you want EasyShip to offer an option for insuring the shipment.\",\n    \"6-1\": \"Last name of the merchant or customer for whom you are generating a session.\\n\\nThis field is required if you want EasyShip to offer an option for insuring the shipment.\",\n    \"6-0\": \"last_name\",\n    \"7-0\": \"webhook_url\",\n    \"7-1\": \"*optional* \\n\\nTypically your webhook URL is configured on your partner account and is static. However, if you have a need for dynamic webhook URL's that vary based on your customer, you may specify an override that will only be used for the shipment associated with this session token.\"\n  },\n  \"cols\": 2,\n  \"rows\": 8\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Signing requests\"\n}\n[/block]\nAll ShippingEasy Partner API requests must be signed using a public API key and private API secret. Read more here: http://shippingeasy.readme.io/docs/authentication-signing-requests.","excerpt":"Partner sessions","slug":"partners-api-sessions","type":"endpoint","title":"/partners/api/sessions"}

post/partners/api/sessions

Partner sessions

Definition

{{ api_url }}{{ page_api_url }}

Result Format


Documentation

[block:api-header] { "type": "basic", "title": "Example Payload" } [/block] [block:code] { "codes": [ { "code": "{\n \"session\": {\n \"email\": \"john@partner-ecommerce.com\",\n \"name\": \"Acme Inc.\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"external_identifier\": \"3781876\",\n \"lifetime_in_seconds\": 5,\n \"single_use\": true\n }\n}", "language": "json" } ] } [/block] [block:parameters] { "data": { "h-0": "Field", "h-1": "Description", "0-0": "email", "1-0": "name", "2-0": "external_identifier", "2-1": "The unique ID of the customer in your system. This ID will be used when reconciling shipping label purchases.", "0-1": "The email address of the customer.", "1-1": "The company name of the customer for whom you are generating a session", "3-0": "lifetime_in_seconds", "4-0": "single_use", "3-1": "Integer\n\nLength of time in seconds that the session token will stay active. The default is 900 seconds (15 minutes). Must be a value between 5 and 1800 seconds.", "4-1": "Boolean\n\nDefault is false. When set to true the session token is expired immediately after its first use.", "5-0": "first_name", "5-1": "First name of the merchant or customer for whom you are generating a session. \n\nThis field is required if you want EasyShip to offer an option for insuring the shipment.", "6-1": "Last name of the merchant or customer for whom you are generating a session.\n\nThis field is required if you want EasyShip to offer an option for insuring the shipment.", "6-0": "last_name", "7-0": "webhook_url", "7-1": "*optional* \n\nTypically your webhook URL is configured on your partner account and is static. However, if you have a need for dynamic webhook URL's that vary based on your customer, you may specify an override that will only be used for the shipment associated with this session token." }, "cols": 2, "rows": 8 } [/block] [block:api-header] { "type": "basic", "title": "Signing requests" } [/block] All ShippingEasy Partner API requests must be signed using a public API key and private API secret. Read more here: http://shippingeasy.readme.io/docs/authentication-signing-requests.