API key authentication using the ShippoToken scheme.
Format: Authorization: ShippoToken <API_TOKEN>
Example: Authorization: ShippoToken shippo_live_abc123
Optional. The object ID of a Managed Shippo Account. Platform accounts set this to make the request on behalf of one of their managed accounts. See the Platform accounts guide.
ID of the Carrier Account object to use as the default for all shipments in this Batch.
The carrier account can be changed on a per-shipment basis by changing the carrier_account in the corresponding BatchShipment object.
Token of the service level to use as the default for all shipments in this Batch.
The servicelevel can be changed on a per-shipment basis by changing the servicelevel_token in the corresponding BatchShipment object. Servicelevel tokens can be found here.
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"Shippo API Documentation","description":"Shippo is a multi-carrier shipping API for rates, labels, tracking, address validation, and customs across 40+ carriers, available over REST, official SDKs, or natural language through the hosted Shippo MCP server at mcp.shippo.com (OAuth) for AI assistants and agents.","colors":{"primary":"#0D9373","light":"#07C983","dark":"#0D9373"},"logo":{"light":"https://mintcdn.com/shippo-f4b7b609/CzPpJjP8aG1OLSSj/logo/light.svg?fit=max\u0026auto=format\u0026n=CzPpJjP8aG1OLSSj\u0026q=85\u0026s=2fe6acfa46f91132348a2f3bf5f1b18a","dark":"https://mintcdn.com/shippo-f4b7b609/CzPpJjP8aG1OLSSj/logo/dark.svg?fit=max\u0026auto=format\u0026n=CzPpJjP8aG1OLSSj\u0026q=85\u0026s=3d04ad869d96fc212c40d790ac14a6ef"},"favicon":"https://mintcdn.com/shippo-f4b7b609/MNzp7C4JbkmwernT/favicon.svg?fit=max\u0026auto=format\u0026n=MNzp7C4JbkmwernT\u0026q=85\u0026s=5b633a85ae6f5c45472dcb5720a3caa6","navbar":{"primary":{"type":"button","label":"Get Started","href":"https://apps.goshippo.com/join"}},"seo":{"metatags":{"canonical":"https://docs.goshippo.com"},"organization":{"id":"https://goshippo.com/#organization","name":"Shippo","legalName":"Shippo, Inc.","url":"https://goshippo.com","logo":"https://docs.goshippo.com/logo/light.svg","sameAs":["https://www.linkedin.com/company/shippo","https://x.com/goshippo","https://github.com/goshippo"]},"indexing":"navigable"},"fonts":{"heading":{"family":"Rethink Sans","weight":700},"body":{"family":"Neue Haas Unica","weight":400,"source":"fonts/NeueHaasUnica-Regular.woff2","format":"woff2"}},"contextual":{"options":["copy","view","assistant","chatgpt","claude","perplexity",{"title":"Connect Shippo MCP","description":"Set up the hosted Shippo MCP server (mcp.shippo.com): rates, labels, and tracking from your AI client","icon":"sparkles","href":"https://docs.goshippo.com/guides/mcp-server"},"download-spec"],"display":"header"},"metadata":{"timestamp":true},"markdown":{"instructions":"Shippo is a multi-carrier shipping API. For agent integrations that execute shipping operations (rates, labels, tracking, address validation, customs), connect the hosted Shippo MCP server at https://mcp.shippo.com (per-user OAuth; setup at /guides/mcp-server). To search and read this documentation from an agent, a docs search MCP is available at https://docs.goshippo.com/mcp. Shipping workflow knowledge (agent skills and a knowledge pack) is published at https://github.com/goshippo/ai. For REST integrations start at /guides/api-quickstart; test mode uses shippo_test_ API keys."},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"shippo-f4b7b609","hasAudioNarration":false,"actualSubdomain":"shippo-f4b7b609","customDomains":["docs.goshippo.com"],"gitSource":{"type":"github","owner":"goshippo","repo":"api-metadata-specs","deployBranch":"master","contentDirectory":"mintlify","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aeb5c4586e5c4288ac5e9d5","collectionId":"0adeec5f-fd13-4d7d-a920-fc67f915b52e","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aeb5c4586e5c4288ac5e9d5"},"feedback":{"thumbs":true,"agentFeedback":true,"contextualFeedback":{"allowEmail":true}},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aeb5c4586e5c4288ac5e9d5","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"Documentation","count":123},{"language":"default","tag":"API Reference","count":97},{"language":"default","tag":"Guides","count":89},{"language":"default","tag":"Shippo API","count":74},{"language":"default","tag":"Carriers","count":23},{"language":"default","tag":"Shipping Elements","count":20},{"language":"default","tag":"Shipments","count":16},{"language":"default","tag":"Concepts","count":15},{"language":"default","tag":"Reporting API","count":14},{"language":"default","tag":"Integration guides","count":13}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":true,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@shippo.com","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[{"_id":"69b9aa85e87230effc9b2684","deploymentId":"69b97e1329ae8a96c1f2f28f","questionText":"Can you walk me through how to add a customs declaration?","status":"active","generatedBy":"manual","createdAt":"2026-03-17T19:24:53.544Z","updatedAt":"2026-03-17T19:24:53.544Z","__v":0},{"_id":"69b9aa56e87230effc9b25c8","deploymentId":"69b97e1329ae8a96c1f2f28f","questionText":"How can I check which carriers are enabled on my account?","status":"active","generatedBy":"manual","createdAt":"2026-03-17T19:24:06.090Z","updatedAt":"2026-03-18T00:30:13.282Z","__v":0},{"_id":"69b9aa4ee87230effc9b25a3","deploymentId":"69b97e1329ae8a96c1f2f28f","questionText":"How do I get started with purchasing a label?","status":"active","generatedBy":"manual","createdAt":"2026-03-17T19:23:58.178Z","updatedAt":"2026-03-17T19:23:58.178Z","__v":0}],"googleFontsInlined":true},"customCss":[{"filePath":"custom.css","content":"#navbar img{height:32px!important;width:auto!important}.dark .mdx-content img:not([class]),.dark .mdx-content img[class=\"\"],.dark article img:not([class]),.dark article img[class=\"\"]{background:rgba(255, 255, 255, 0.9);border-radius:8px;padding:12px}@font-face{font-family:\"Neue Haas Unica\";src:url(\"/fonts/NeueHaasUnica-SemiBold.woff2\") format(\"woff2\");font-weight:600 700;font-display:swap}strong,b{font-weight:600}.endpoint-table td:nth-child(2),.endpoint-table code{white-space:nowrap}.endpoint-table td:first-child{min-width:0}.workflow-table code{white-space:nowrap}.workflow-table td:nth-child(2){min-width:0}"}],"page":{"pagePath":"api-reference/batches/add-shipments-to-a-batch","slug":"/api-reference/batches/add-shipments-to-a-batch","pageMetadata":{"title":"Add shipments to a batch","description":"Adds batch shipments to an existing batch.","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /batches/{BatchId}/add_shipments","href":"/api-reference/batches/add-shipments-to-a-batch","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Adds batch shipments to an existing batch.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Add shipments to a batch","description":"Adds batch shipments to an existing batch.","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /batches/{BatchId}/add_shipments","href":"/api-reference/batches/add-shipments-to-a-batch","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Adds batch shipments to an existing batch.","operationId":"AddShipmentsToBatch","parameters":["2f8a8305-7370-475d-9591-0f48397a3e29","87f13980-9979-4271-9031-6a8401f4307e","5bb767ce-3d11-477a-b75b-d84f8b2a4a5a"],"requestBody":"16def7ff-d8ce-4718-bc31-0fe21f8ff33e","responses":{"200":"31a7abeb-e12e-4bc5-85b7-4080c0787fa9","400":"f8ed66df-8f5b-4da9-a696-a1698a46cbf7"},"summary":"Add shipments to a batch","tags":["Batches"],"x-codeSamples":[{"label":"cURL","lang":"cURL","source":"curl -X POST https://api.goshippo.com/batches/\u003cBATCH OBJECT ID>/add_shipments \\\n-H \"Authorization: ShippoToken \u003cAPI_TOKEN>\" \\\n-H \"Content-Type: application/json\" \\\n-d '[\n {\n \"shipment\": { \n \"address_from\": {\n \"name\": \"Mr Hippo\",\n \"street1\": \"965 Mission St\",\n \"street2\": \"Ste 201\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip\": \"94103\",\n \"country\": \"US\",\n \"phone\": \"4151234567\",\n },\n \"address_to\": {\n \"name\": \"Hippo Jr\",\n \"street1\": \"915 Broadway\",\n \"street2\": \"19th Floor\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip\": \"10010\",\n \"country\": \"US\",\n \"phone\": \"2129947880\",\n },\n \"parcels\": [{\n \"length\": \"12\",\n \"width\": \"12\",\n \"height\": \"12\",\n \"distance_unit\": \"in\",\n \"weight\": \"12\",\n \"mass_unit\": \"oz\"\n }]\n }\n },\n {\n \"shipment\": { \n \"address_from\": {\n \"name\": \"Ms Hippo\",\n \"street1\": \"1092 Indian Summer Ct\",\n \"city\": \"San Jose\",\n \"state\": \"CA\",\n \"zip\": \"95122\",\n \"country\": \"US\",\n \"phone\": \"4151234567\",\n },\n \"address_to\": {\n \"name\": \"Mr Hippo\",\n \"street1\": \"965 Mission St\",\n \"street2\": \"Ste 201\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip\": \"94103\",\n \"country\": \"US\",\n \"phone\": \"4151234567\",\n },\n \"parcels\": [{\n \"length\": \"5\",\n \"width\": \"5\",\n \"height\": \"5\",\n \"distance_unit\": \"in\",\n \"weight\": \"2\",\n \"mass_unit\": \"lb\"\n }]\n },\n \"carrier_account\": \"a4391cd4ab974f478f55dc08b5c8e3b3\",\n \"servicelevel_token\": \"fedex_2_day\"\n }\n ]'"},{"lang":"python","label":"Python","source":"import shippo\nfrom shippo.models import components\n\ns = shippo.Shippo(\n api_key_header='ShippoToken \u003cAPI_TOKEN>',\n shippo_api_version='2018-02-08',\n)\n\n\nres = s.batches.add_shipments(request_body=[\n components.BatchShipmentCreateRequest(\n carrier_account='a4391cd4ab974f478f55dc08b5c8e3b3',\n metadata='SHIPMENT #1',\n servicelevel_token='fedex_ground',\n shipment=components.ShipmentCreateRequest(\n extra=components.ShipmentExtra(\n accounts_receivable_customer_account=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n appropriation_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n bill_of_lading_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n cod=components.Cod(\n amount='5.5',\n currency='USD',\n payment_method=components.PaymentMethod.CASH,\n ),\n cod_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n customer_reference=components.CustomerReference(\n ref_sort=1,\n ),\n dealer_order_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n dept_number=components.DepartmentNumber(\n ref_sort=3,\n ),\n fda_product_code=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n insurance=components.Insurance(\n amount='5.5',\n currency='USD',\n ),\n invoice_number=components.InvoiceNumber(\n ref_sort=2,\n ),\n manifest_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n model_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n part_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n po_number=components.PoNumber(\n ref_sort=2,\n ),\n production_code=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n purchase_request_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n rma_number=components.RmaNumber(\n ref_sort=1,\n ),\n salesperson_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n serial_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n store_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n transaction_reference_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n ),\n metadata='Customer ID 123456',\n shipment_date='2021-03-22T12:00:00Z',\n address_from=components.AddressCreateRequest(\n name='Shwan Ippotle',\n company='Shippo',\n street1='215 Clayton St.',\n street3='',\n street_no='',\n city='San Francisco',\n state='CA',\n zip='94117',\n country='US',\n phone='+1 555 341 9393',\n email='shippotle@shippo.com',\n is_residential=True,\n metadata='Customer ID 123456',\n validate=True,\n ),\n address_return=components.AddressCreateRequest(\n name='Shwan Ippotle',\n company='Shippo',\n street1='215 Clayton St.',\n street3='',\n street_no='',\n city='San Francisco',\n state='CA',\n zip='94117',\n country='US',\n phone='+1 555 341 9393',\n email='shippotle@shippo.com',\n is_residential=True,\n metadata='Customer ID 123456',\n validate=True,\n ),\n address_to='d799c2679e644279b59fe661ac8fa489',\n customs_declaration='adcfdddf8ec64b84ad22772bce3ea37a',\n carrier_accounts=[\n '065a4a8c10d24a34ab932163a1b87f52',\n '73f706f4bdb94b54a337563840ce52b0',\n ],\n parcels=[\n '\u003cvalue>',\n '\u003cvalue>',\n components.ParcelCreateFromTemplateRequest(\n extra=components.ParcelExtra(\n cod=components.Cod(\n amount='5.5',\n currency='USD',\n payment_method=components.PaymentMethod.CASH,\n ),\n insurance=components.ParcelInsurance(\n amount='5.5',\n content='Laptop',\n currency='USD',\n provider=components.ParcelInsuranceProvider.UPS,\n ),\n ),\n metadata='Customer ID 123456',\n mass_unit=components.WeightUnitEnum.LB,\n weight='1',\n template=components.ParcelTemplateUSPSEnum.USPS_SMALL_FLAT_RATE_ENVELOPE,\n ),\n ],\n ),\n ),\n components.BatchShipmentCreateRequest(\n carrier_account='a4391cd4ab974f478f55dc08b5c8e3b3',\n metadata='SHIPMENT #1',\n servicelevel_token='fedex_ground',\n shipment=components.ShipmentCreateRequest(\n extra=components.ShipmentExtra(\n accounts_receivable_customer_account=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n appropriation_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n bill_of_lading_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n cod=components.Cod(\n amount='5.5',\n currency='USD',\n payment_method=components.PaymentMethod.CASH,\n ),\n cod_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n customer_reference=components.CustomerReference(\n ref_sort=1,\n ),\n dealer_order_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n dept_number=components.DepartmentNumber(\n ref_sort=3,\n ),\n fda_product_code=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n insurance=components.Insurance(\n amount='5.5',\n currency='USD',\n ),\n invoice_number=components.InvoiceNumber(\n ref_sort=2,\n ),\n manifest_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n model_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n part_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n po_number=components.PoNumber(\n ref_sort=2,\n ),\n production_code=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n purchase_request_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n rma_number=components.RmaNumber(\n ref_sort=1,\n ),\n salesperson_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n serial_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n store_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n transaction_reference_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n ),\n metadata='Customer ID 123456',\n shipment_date='2021-03-22T12:00:00Z',\n address_from=components.AddressCreateRequest(\n name='Shwan Ippotle',\n company='Shippo',\n street1='215 Clayton St.',\n street3='',\n street_no='',\n city='San Francisco',\n state='CA',\n zip='94117',\n country='US',\n phone='+1 555 341 9393',\n email='shippotle@shippo.com',\n is_residential=True,\n metadata='Customer ID 123456',\n validate=True,\n ),\n address_return=components.AddressCreateRequest(\n name='Shwan Ippotle',\n company='Shippo',\n street1='215 Clayton St.',\n street3='',\n street_no='',\n city='San Francisco',\n state='CA',\n zip='94117',\n country='US',\n phone='+1 555 341 9393',\n email='shippotle@shippo.com',\n is_residential=True,\n metadata='Customer ID 123456',\n validate=True,\n ),\n address_to=components.AddressCreateRequest(\n name='Shwan Ippotle',\n company='Shippo',\n street1='215 Clayton St.',\n street3='',\n street_no='',\n city='San Francisco',\n state='CA',\n zip='94117',\n country='US',\n phone='+1 555 341 9393',\n email='shippotle@shippo.com',\n is_residential=True,\n metadata='Customer ID 123456',\n validate=True,\n ),\n customs_declaration=components.CustomsDeclarationCreateRequest(\n b13a_filing_option=components.CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY,\n certify=True,\n certify_signer='Shawn Ippotle',\n contents_explanation='T-Shirt purchase',\n duties_payor=components.DutiesPayor(\n account='2323434543',\n type=components.CustomsDeclarationCreateRequestType.THIRD_PARTY,\n address=components.CustomsDeclarationCreateRequestAddress(\n name='Patrick Kavanagh',\n zip='80331',\n country='DE',\n ),\n ),\n exporter_identification=components.CustomsExporterIdentification(\n eori_number='PL123456790ABCDE',\n tax_id=components.CustomsTaxIdentification(\n number='123456789',\n type=components.CustomsTaxIdentificationType.EIN,\n ),\n ),\n invoice='#123123',\n metadata='Order ID #123123',\n address_importer=components.AddressImporter(\n name='Shwan Ippotle',\n company='Shippo',\n street1='Blumenstraße',\n street3='',\n street_no='22',\n city='München',\n state='CA',\n zip='80331',\n country='DE',\n phone='80331',\n email='shippotle@shippo.com',\n is_residential=True,\n ),\n contents_type=components.CustomsDeclarationContentsTypeEnum.MERCHANDISE,\n eel_pfc=components.CustomsDeclarationEelPfcEnum.NOEEI_30_37_A,\n incoterm=components.CustomsDeclarationIncotermEnum.DDP,\n items=[\n components.CustomsItemCreateRequest(\n description='T-Shirt',\n mass_unit=components.WeightUnitEnum.LB,\n metadata='Order ID \"123454\"',\n net_weight='5',\n origin_country='\u003cvalue>',\n quantity=20,\n sku_code='HM-123',\n hs_code='0901.21',\n value_amount='200',\n value_currency='USD',\n ),\n ],\n non_delivery_option=components.CustomsDeclarationNonDeliveryOptionEnum.RETURN,\n test=True,\n ),\n carrier_accounts=[\n '065a4a8c10d24a34ab932163a1b87f52',\n '73f706f4bdb94b54a337563840ce52b0',\n ],\n parcels=[\n components.ParcelCreateFromTemplateRequest(\n extra=components.ParcelExtra(\n cod=components.Cod(\n amount='5.5',\n currency='USD',\n payment_method=components.PaymentMethod.CASH,\n ),\n insurance=components.ParcelInsurance(\n amount='5.5',\n content='Laptop',\n currency='USD',\n provider=components.ParcelInsuranceProvider.UPS,\n ),\n ),\n metadata='Customer ID 123456',\n mass_unit=components.WeightUnitEnum.LB,\n weight='1',\n template=components.ParcelTemplateDPDUKEnum.DPD_UK_EXPRESS_PAK,\n ),\n components.ParcelCreateFromTemplateRequest(\n extra=components.ParcelExtra(\n cod=components.Cod(\n amount='5.5',\n currency='USD',\n payment_method=components.PaymentMethod.CASH,\n ),\n insurance=components.ParcelInsurance(\n amount='5.5',\n content='Laptop',\n currency='USD',\n provider=components.ParcelInsuranceProvider.UPS,\n ),\n ),\n metadata='Customer ID 123456',\n mass_unit=components.WeightUnitEnum.LB,\n weight='1',\n template=components.ParcelTemplateDHLeCommerceEnum.DH_LE_C_IRREGULAR,\n ),\n ],\n ),\n ),\n components.BatchShipmentCreateRequest(\n carrier_account='a4391cd4ab974f478f55dc08b5c8e3b3',\n metadata='SHIPMENT #1',\n servicelevel_token='fedex_ground',\n shipment=components.ShipmentCreateRequest(\n extra=components.ShipmentExtra(\n accounts_receivable_customer_account=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n appropriation_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n bill_of_lading_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n cod=components.Cod(\n amount='5.5',\n currency='USD',\n payment_method=components.PaymentMethod.CASH,\n ),\n cod_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n customer_reference=components.CustomerReference(\n ref_sort=1,\n ),\n dealer_order_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n dept_number=components.DepartmentNumber(\n ref_sort=3,\n ),\n fda_product_code=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n insurance=components.Insurance(\n amount='5.5',\n currency='USD',\n ),\n invoice_number=components.InvoiceNumber(\n ref_sort=2,\n ),\n manifest_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n model_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n part_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n po_number=components.PoNumber(\n ref_sort=2,\n ),\n production_code=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n purchase_request_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n rma_number=components.RmaNumber(\n ref_sort=1,\n ),\n salesperson_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n serial_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n store_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n transaction_reference_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n ),\n metadata='Customer ID 123456',\n shipment_date='2021-03-22T12:00:00Z',\n address_from='d799c2679e644279b59fe661ac8fa488',\n address_return='d799c2679e644279b59fe661ac8fa488',\n address_to=components.AddressCreateRequest(\n name='Shwan Ippotle',\n company='Shippo',\n street1='215 Clayton St.',\n street3='',\n street_no='',\n city='San Francisco',\n state='CA',\n zip='94117',\n country='US',\n phone='+1 555 341 9393',\n email='shippotle@shippo.com',\n is_residential=True,\n metadata='Customer ID 123456',\n validate=True,\n ),\n customs_declaration='adcfdddf8ec64b84ad22772bce3ea37a',\n carrier_accounts=[\n '065a4a8c10d24a34ab932163a1b87f52',\n '73f706f4bdb94b54a337563840ce52b0',\n ],\n parcels=[\n '\u003cvalue>',\n ],\n ),\n ),\n], batch_id='\u003cid>')\n\nif res is not None:\n # handle response\n pass"},{"lang":"typescript","label":"Typescript","source":"import { Shippo } from \"shippo\";\n\nconst shippo = new Shippo({\n apiKeyHeader: \"ShippoToken \u003cAPI_TOKEN>\",\n shippoApiVersion: \"2018-02-08\",\n});\n\nasync function run() {\n const result = await shippo.batches.addShipments([\n {\n carrierAccount: \"a4391cd4ab974f478f55dc08b5c8e3b3\",\n metadata: \"SHIPMENT #1\",\n servicelevelToken: \"fedex_ground\",\n shipment: {\n extra: {\n accountsReceivableCustomerAccount: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n appropriationNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n billOfLadingNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n cod: {\n amount: \"5.5\",\n currency: \"USD\",\n paymentMethod: \"CASH\",\n },\n codNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n customerReference: {\n refSort: 1,\n },\n dealerOrderNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n deptNumber: {\n refSort: 3,\n },\n fdaProductCode: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n insurance: {\n amount: \"5.5\",\n currency: \"USD\",\n },\n invoiceNumber: {\n refSort: 2,\n },\n manifestNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n modelNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n partNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n poNumber: {\n refSort: 2,\n },\n productionCode: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n purchaseRequestNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n rmaNumber: {\n refSort: 1,\n },\n salespersonNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n serialNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n storeNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n transactionReferenceNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n },\n metadata: \"Customer ID 123456\",\n shipmentDate: \"2021-03-22T12:00:00Z\",\n addressFrom: {\n name: \"Shwan Ippotle\",\n company: \"Shippo\",\n street1: \"215 Clayton St.\",\n street3: \"\",\n streetNo: \"\",\n city: \"San Francisco\",\n state: \"CA\",\n zip: \"94117\",\n country: \"US\",\n phone: \"+1 555 341 9393\",\n email: \"shippotle@shippo.com\",\n isResidential: true,\n metadata: \"Customer ID 123456\",\n validate: true,\n },\n addressReturn: {\n name: \"Shwan Ippotle\",\n company: \"Shippo\",\n street1: \"215 Clayton St.\",\n street3: \"\",\n streetNo: \"\",\n city: \"San Francisco\",\n state: \"CA\",\n zip: \"94117\",\n country: \"US\",\n phone: \"+1 555 341 9393\",\n email: \"shippotle@shippo.com\",\n isResidential: true,\n metadata: \"Customer ID 123456\",\n validate: true,\n },\n addressTo: \"d799c2679e644279b59fe661ac8fa489\",\n customsDeclaration: \"adcfdddf8ec64b84ad22772bce3ea37a\",\n carrierAccounts: [\n \"065a4a8c10d24a34ab932163a1b87f52\",\n \"73f706f4bdb94b54a337563840ce52b0\",\n ],\n parcels: [\n \"\u003cvalue>\",\n \"\u003cvalue>\",\n {\n extra: {\n cod: {\n amount: \"5.5\",\n currency: \"USD\",\n paymentMethod: \"CASH\",\n },\n insurance: {\n amount: \"5.5\",\n content: \"Laptop\",\n currency: \"USD\",\n provider: \"UPS\",\n },\n },\n metadata: \"Customer ID 123456\",\n massUnit: \"lb\",\n weight: \"1\",\n template: \"USPS_SmallFlatRateEnvelope\",\n },\n ],\n },\n },\n {\n carrierAccount: \"a4391cd4ab974f478f55dc08b5c8e3b3\",\n metadata: \"SHIPMENT #1\",\n servicelevelToken: \"fedex_ground\",\n shipment: {\n extra: {\n accountsReceivableCustomerAccount: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n appropriationNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n billOfLadingNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n cod: {\n amount: \"5.5\",\n currency: \"USD\",\n paymentMethod: \"CASH\",\n },\n codNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n customerReference: {\n refSort: 1,\n },\n dealerOrderNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n deptNumber: {\n refSort: 3,\n },\n fdaProductCode: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n insurance: {\n amount: \"5.5\",\n currency: \"USD\",\n },\n invoiceNumber: {\n refSort: 2,\n },\n manifestNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n modelNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n partNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n poNumber: {\n refSort: 2,\n },\n productionCode: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n purchaseRequestNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n rmaNumber: {\n refSort: 1,\n },\n salespersonNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n serialNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n storeNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n transactionReferenceNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n },\n metadata: \"Customer ID 123456\",\n shipmentDate: \"2021-03-22T12:00:00Z\",\n addressFrom: {\n name: \"Shwan Ippotle\",\n company: \"Shippo\",\n street1: \"215 Clayton St.\",\n street3: \"\",\n streetNo: \"\",\n city: \"San Francisco\",\n state: \"CA\",\n zip: \"94117\",\n country: \"US\",\n phone: \"+1 555 341 9393\",\n email: \"shippotle@shippo.com\",\n isResidential: true,\n metadata: \"Customer ID 123456\",\n validate: true,\n },\n addressReturn: {\n name: \"Shwan Ippotle\",\n company: \"Shippo\",\n street1: \"215 Clayton St.\",\n street3: \"\",\n streetNo: \"\",\n city: \"San Francisco\",\n state: \"CA\",\n zip: \"94117\",\n country: \"US\",\n phone: \"+1 555 341 9393\",\n email: \"shippotle@shippo.com\",\n isResidential: true,\n metadata: \"Customer ID 123456\",\n validate: true,\n },\n addressTo: {\n name: \"Shwan Ippotle\",\n company: \"Shippo\",\n street1: \"215 Clayton St.\",\n street3: \"\",\n streetNo: \"\",\n city: \"San Francisco\",\n state: \"CA\",\n zip: \"94117\",\n country: \"US\",\n phone: \"+1 555 341 9393\",\n email: \"shippotle@shippo.com\",\n isResidential: true,\n metadata: \"Customer ID 123456\",\n validate: true,\n },\n customsDeclaration: {\n b13aFilingOption: \"FILED_ELECTRONICALLY\",\n certify: true,\n certifySigner: \"Shawn Ippotle\",\n contentsExplanation: \"T-Shirt purchase\",\n dutiesPayor: {\n account: \"2323434543\",\n type: \"THIRD_PARTY\",\n address: {\n name: \"Patrick Kavanagh\",\n zip: \"80331\",\n country: \"DE\",\n },\n },\n exporterIdentification: {\n eoriNumber: \"PL123456790ABCDE\",\n taxId: {\n number: \"123456789\",\n type: \"EIN\",\n },\n },\n invoice: \"#123123\",\n metadata: \"Order ID #123123\",\n addressImporter: {\n name: \"Shwan Ippotle\",\n company: \"Shippo\",\n street1: \"Blumenstraße\",\n street3: \"\",\n streetNo: \"22\",\n city: \"München\",\n state: \"CA\",\n zip: \"80331\",\n country: \"DE\",\n phone: \"80331\",\n email: \"shippotle@shippo.com\",\n isResidential: true,\n },\n contentsType: \"MERCHANDISE\",\n eelPfc: \"NOEEI_30_37_a\",\n incoterm: \"DDP\",\n items: [\n {\n description: \"T-Shirt\",\n massUnit: \"lb\",\n metadata: \"Order ID \\\"123454\\\"\",\n netWeight: \"5\",\n originCountry: \"\u003cvalue>\",\n quantity: 20,\n skuCode: \"HM-123\",\n hsCode: \"0901.21\",\n valueAmount: \"200\",\n valueCurrency: \"USD\",\n },\n ],\n nonDeliveryOption: \"RETURN\",\n test: true,\n },\n carrierAccounts: [\n \"065a4a8c10d24a34ab932163a1b87f52\",\n \"73f706f4bdb94b54a337563840ce52b0\",\n ],\n parcels: [\n {\n extra: {\n cod: {\n amount: \"5.5\",\n currency: \"USD\",\n paymentMethod: \"CASH\",\n },\n insurance: {\n amount: \"5.5\",\n content: \"Laptop\",\n currency: \"USD\",\n provider: \"UPS\",\n },\n },\n metadata: \"Customer ID 123456\",\n massUnit: \"lb\",\n weight: \"1\",\n template: \"DPD_UK_Express_Pak\",\n },\n {\n extra: {\n cod: {\n amount: \"5.5\",\n currency: \"USD\",\n paymentMethod: \"CASH\",\n },\n insurance: {\n amount: \"5.5\",\n content: \"Laptop\",\n currency: \"USD\",\n provider: \"UPS\",\n },\n },\n metadata: \"Customer ID 123456\",\n massUnit: \"lb\",\n weight: \"1\",\n template: \"DHLeC_Irregular\",\n },\n ],\n },\n },\n {\n carrierAccount: \"a4391cd4ab974f478f55dc08b5c8e3b3\",\n metadata: \"SHIPMENT #1\",\n servicelevelToken: \"fedex_ground\",\n shipment: {\n extra: {\n accountsReceivableCustomerAccount: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n appropriationNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n billOfLadingNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n cod: {\n amount: \"5.5\",\n currency: \"USD\",\n paymentMethod: \"CASH\",\n },\n codNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n customerReference: {\n refSort: 1,\n },\n dealerOrderNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n deptNumber: {\n refSort: 3,\n },\n fdaProductCode: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n insurance: {\n amount: \"5.5\",\n currency: \"USD\",\n },\n invoiceNumber: {\n refSort: 2,\n },\n manifestNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n modelNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n partNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n poNumber: {\n refSort: 2,\n },\n productionCode: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n purchaseRequestNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n rmaNumber: {\n refSort: 1,\n },\n salespersonNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n serialNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n storeNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n transactionReferenceNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n },\n metadata: \"Customer ID 123456\",\n shipmentDate: \"2021-03-22T12:00:00Z\",\n addressFrom: \"d799c2679e644279b59fe661ac8fa488\",\n addressReturn: \"d799c2679e644279b59fe661ac8fa488\",\n addressTo: {\n name: \"Shwan Ippotle\",\n company: \"Shippo\",\n street1: \"215 Clayton St.\",\n street3: \"\",\n streetNo: \"\",\n city: \"San Francisco\",\n state: \"CA\",\n zip: \"94117\",\n country: \"US\",\n phone: \"+1 555 341 9393\",\n email: \"shippotle@shippo.com\",\n isResidential: true,\n metadata: \"Customer ID 123456\",\n validate: true,\n },\n customsDeclaration: \"adcfdddf8ec64b84ad22772bce3ea37a\",\n carrierAccounts: [\n \"065a4a8c10d24a34ab932163a1b87f52\",\n \"73f706f4bdb94b54a337563840ce52b0\",\n ],\n parcels: [\n \"\u003cvalue>\",\n ],\n },\n },\n ], \"\u003cid>\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();"},{"lang":"csharp","label":"C#","source":"using Shippo;\nusing Shippo.Models.Components;\nusing System.Collections.Generic;\n\nvar sdk = new ShippoSDK(\n apiKeyHeader: \"ShippoToken \u003cAPI_TOKEN>\",\n shippoApiVersion: \"2018-02-08\"\n);\n\nvar res = await sdk.Batches.AddShipmentsAsync(\n batchId: \"\u003cid>\",\n requestBody: new List\u003cBatchShipmentCreateRequest>() {\n new BatchShipmentCreateRequest() {\n CarrierAccount = \"a4391cd4ab974f478f55dc08b5c8e3b3\",\n Metadata = \"SHIPMENT #1\",\n ServicelevelToken = \"fedex_ground\",\n Shipment = new ShipmentCreateRequest() {\n Extra = new ShipmentExtra() {\n AccountsReceivableCustomerAccount = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n AppropriationNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n BillOfLadingNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n Cod = new Cod() {\n Amount = \"5.5\",\n Currency = \"USD\",\n PaymentMethod = PaymentMethod.Cash,\n },\n CodNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n CustomerReference = new CustomerReference() {\n RefSort = 1,\n },\n DealerOrderNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n DeptNumber = new DepartmentNumber() {\n RefSort = 3,\n },\n FdaProductCode = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n Insurance = new Insurance() {\n Amount = \"5.5\",\n Currency = \"USD\",\n },\n InvoiceNumber = new InvoiceNumber() {\n RefSort = 2,\n },\n ManifestNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n ModelNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n PartNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n PoNumber = new PoNumber() {\n RefSort = 2,\n },\n ProductionCode = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n PurchaseRequestNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n RmaNumber = new RmaNumber() {\n RefSort = 1,\n },\n SalespersonNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n SerialNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n StoreNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n TransactionReferenceNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n },\n Metadata = \"Customer ID 123456\",\n ShipmentDate = \"2021-03-22T12:00:00Z\",\n AddressFrom = AddressFrom.CreateStr(\n \"d799c2679e644279b59fe661ac8fa488\"\n ),\n AddressReturn = AddressReturn.CreateAddressCreateRequest(\n new AddressCreateRequest() {\n Name = \"Shwan Ippotle\",\n Company = \"Shippo\",\n Street1 = \"215 Clayton St.\",\n Street3 = \"\",\n StreetNo = \"\",\n City = \"San Francisco\",\n State = \"CA\",\n Zip = \"94117\",\n Country = \"US\",\n Phone = \"+1 555 341 9393\",\n Email = \"shippotle@shippo.com\",\n IsResidential = true,\n Metadata = \"Customer ID 123456\",\n Validate = true,\n }\n ),\n AddressTo = AddressTo.CreateAddressCreateRequest(\n new AddressCreateRequest() {\n Name = \"Shwan Ippotle\",\n Company = \"Shippo\",\n Street1 = \"215 Clayton St.\",\n Street3 = \"\",\n StreetNo = \"\",\n City = \"San Francisco\",\n State = \"CA\",\n Zip = \"94117\",\n Country = \"US\",\n Phone = \"+1 555 341 9393\",\n Email = \"shippotle@shippo.com\",\n IsResidential = true,\n Metadata = \"Customer ID 123456\",\n Validate = true,\n }\n ),\n CustomsDeclaration = ShipmentCreateRequestCustomsDeclaration.CreateStr(\n \"adcfdddf8ec64b84ad22772bce3ea37a\"\n ),\n CarrierAccounts = new List\u003cstring>() {\n \"065a4a8c10d24a34ab932163a1b87f52\",\n \"73f706f4bdb94b54a337563840ce52b0\",\n },\n Parcels = new List\u003cModels.Components.Parcels>() {\n Parcels.CreateStr(\n \"\u003cvalue>\"\n ),\n },\n },\n },\n },\n shippoApiVersion: \"2018-02-08\"\n);\n\n// handle response"},{"lang":"php","label":"PHP","source":"declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Shippo\\API;\nuse Shippo\\API\\Models\\Components;\n\n$sdk = API\\Shippo::builder()\n ->setSecurity(\n 'ShippoToken \u003cAPI_TOKEN>'\n )\n ->setShippoApiVersion('2018-02-08')\n ->build();\n\n\n\n$response = $sdk->batches->addShipments(\n batchId: '\u003cid>',\n requestBody: [\n new Components\\BatchShipmentCreateRequest(\n carrierAccount: 'a4391cd4ab974f478f55dc08b5c8e3b3',\n metadata: 'SHIPMENT #1',\n servicelevelToken: 'fedex_ground',\n shipment: new Components\\ShipmentCreateRequest(\n extra: new Components\\ShipmentExtra(\n accountsReceivableCustomerAccount: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n appropriationNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n billOfLadingNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n cod: new Components\\Cod(\n amount: '5.5',\n currency: 'USD',\n paymentMethod: Components\\PaymentMethod::Cash,\n ),\n codNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n customerReference: new Components\\CustomerReference(\n refSort: 1,\n ),\n dealerOrderNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n deptNumber: new Components\\DepartmentNumber(\n refSort: 3,\n ),\n fdaProductCode: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n insurance: new Components\\Insurance(\n amount: '5.5',\n currency: 'USD',\n ),\n invoiceNumber: new Components\\InvoiceNumber(\n refSort: 2,\n ),\n manifestNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n modelNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n partNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n poNumber: new Components\\PoNumber(\n refSort: 2,\n ),\n productionCode: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n purchaseRequestNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n rmaNumber: new Components\\RmaNumber(\n refSort: 1,\n ),\n salespersonNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n serialNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n storeNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n transactionReferenceNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n ),\n metadata: 'Customer ID 123456',\n shipmentDate: '2021-03-22T12:00:00Z',\n addressFrom: 'd799c2679e644279b59fe661ac8fa488',\n addressReturn: new Components\\AddressCreateRequest(\n name: 'Shwan Ippotle',\n company: 'Shippo',\n street1: '215 Clayton St.',\n street3: '',\n streetNo: '',\n city: 'San Francisco',\n state: 'CA',\n zip: '94117',\n country: 'US',\n phone: '+1 555 341 9393',\n email: 'shippotle@shippo.com',\n isResidential: true,\n metadata: 'Customer ID 123456',\n validate: true,\n ),\n addressTo: new Components\\AddressCreateRequest(\n name: 'Shwan Ippotle',\n company: 'Shippo',\n street1: '215 Clayton St.',\n street3: '',\n streetNo: '',\n city: 'San Francisco',\n state: 'CA',\n zip: '94117',\n country: 'US',\n phone: '+1 555 341 9393',\n email: 'shippotle@shippo.com',\n isResidential: true,\n metadata: 'Customer ID 123456',\n validate: true,\n ),\n customsDeclaration: 'adcfdddf8ec64b84ad22772bce3ea37a',\n carrierAccounts: [\n '065a4a8c10d24a34ab932163a1b87f52',\n '73f706f4bdb94b54a337563840ce52b0',\n ],\n parcels: [\n '\u003cvalue>',\n ],\n ),\n ),\n ],\n shippoApiVersion: '2018-02-08'\n\n);\n\nif ($response->batch !== null) {\n // handle response\n}"},{"lang":"java","label":"Java","source":"package hello.world;\n\nimport com.goshippo.shippo_sdk.Shippo;\nimport com.goshippo.shippo_sdk.models.components.AddressCreateRequest;\nimport com.goshippo.shippo_sdk.models.components.AddressFrom;\nimport com.goshippo.shippo_sdk.models.components.AddressImporter;\nimport com.goshippo.shippo_sdk.models.components.AddressReturn;\nimport com.goshippo.shippo_sdk.models.components.AddressTo;\nimport com.goshippo.shippo_sdk.models.components.BatchShipmentCreateRequest;\nimport com.goshippo.shippo_sdk.models.components.Cod;\nimport com.goshippo.shippo_sdk.models.components.CustomerReference;\nimport com.goshippo.shippo_sdk.models.components.CustomsDeclarationB13AFilingOptionEnum;\nimport com.goshippo.shippo_sdk.models.components.CustomsDeclarationContentsTypeEnum;\nimport com.goshippo.shippo_sdk.models.components.CustomsDeclarationCreateRequest;\nimport com.goshippo.shippo_sdk.models.components.CustomsDeclarationCreateRequestAddress;\nimport com.goshippo.shippo_sdk.models.components.CustomsDeclarationCreateRequestType;\nimport com.goshippo.shippo_sdk.models.components.CustomsDeclarationEelPfcEnum;\nimport com.goshippo.shippo_sdk.models.components.CustomsDeclarationIncotermEnum;\nimport com.goshippo.shippo_sdk.models.components.CustomsDeclarationNonDeliveryOptionEnum;\nimport com.goshippo.shippo_sdk.models.components.CustomsExporterIdentification;\nimport com.goshippo.shippo_sdk.models.components.CustomsItemCreateRequest;\nimport com.goshippo.shippo_sdk.models.components.CustomsTaxIdentification;\nimport com.goshippo.shippo_sdk.models.components.CustomsTaxIdentificationType;\nimport com.goshippo.shippo_sdk.models.components.DepartmentNumber;\nimport com.goshippo.shippo_sdk.models.components.DutiesPayor;\nimport com.goshippo.shippo_sdk.models.components.Insurance;\nimport com.goshippo.shippo_sdk.models.components.InvoiceNumber;\nimport com.goshippo.shippo_sdk.models.components.ParcelCreateFromTemplateRequest;\nimport com.goshippo.shippo_sdk.models.components.ParcelExtra;\nimport com.goshippo.shippo_sdk.models.components.ParcelInsurance;\nimport com.goshippo.shippo_sdk.models.components.ParcelInsuranceProvider;\nimport com.goshippo.shippo_sdk.models.components.ParcelTemplateDHLeCommerceEnum;\nimport com.goshippo.shippo_sdk.models.components.ParcelTemplateDPDUKEnum;\nimport com.goshippo.shippo_sdk.models.components.ParcelTemplateEnumSet;\nimport com.goshippo.shippo_sdk.models.components.ParcelTemplateUSPSEnum;\nimport com.goshippo.shippo_sdk.models.components.Parcels;\nimport com.goshippo.shippo_sdk.models.components.PaymentMethod;\nimport com.goshippo.shippo_sdk.models.components.PoNumber;\nimport com.goshippo.shippo_sdk.models.components.RmaNumber;\nimport com.goshippo.shippo_sdk.models.components.ShipmentCreateRequest;\nimport com.goshippo.shippo_sdk.models.components.ShipmentCreateRequestCustomsDeclaration;\nimport com.goshippo.shippo_sdk.models.components.ShipmentExtra;\nimport com.goshippo.shippo_sdk.models.components.UPSReferenceFields;\nimport com.goshippo.shippo_sdk.models.components.WeightUnitEnum;\nimport com.goshippo.shippo_sdk.models.operations.AddShipmentsToBatchResponse;\nimport java.lang.Exception;\nimport java.util.List;\n\npublic class Application {\n\n public static void main(String[] args) throws Exception {\n\n Shippo sdk = Shippo.builder()\n .apiKeyHeader(\"ShippoToken \u003cAPI_TOKEN>\")\n .shippoApiVersion(\"2018-02-08\")\n .build();\n\n AddShipmentsToBatchResponse res = sdk.batches().addShipments()\n .batchId(\"\u003cid>\")\n .shippoApiVersion(\"2018-02-08\")\n .requestBody(List.of(\n BatchShipmentCreateRequest.builder()\n .shipment(ShipmentCreateRequest.builder()\n .addressFrom(AddressFrom.of(AddressCreateRequest.builder()\n .country(\"US\")\n .name(\"Shwan Ippotle\")\n .company(\"Shippo\")\n .street1(\"215 Clayton St.\")\n .street3(\"\")\n .streetNo(\"\")\n .city(\"San Francisco\")\n .state(\"CA\")\n .zip(\"94117\")\n .phone(\"+1 555 341 9393\")\n .email(\"shippotle@shippo.com\")\n .isResidential(true)\n .metadata(\"Customer ID 123456\")\n .validate(true)\n .build()))\n .addressTo(AddressTo.of(\"d799c2679e644279b59fe661ac8fa489\"))\n .parcels(List.of(\n Parcels.of(\"\u003cvalue>\"),\n Parcels.of(\"\u003cvalue>\"),\n Parcels.of(ParcelCreateFromTemplateRequest.builder()\n .massUnit(WeightUnitEnum.LB)\n .weight(\"1\")\n .template(ParcelTemplateEnumSet.of(ParcelTemplateUSPSEnum.USPS_SMALL_FLAT_RATE_ENVELOPE))\n .extra(ParcelExtra.builder()\n .cod(Cod.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .paymentMethod(PaymentMethod.CASH)\n .build())\n .insurance(ParcelInsurance.builder()\n .amount(\"5.5\")\n .content(\"Laptop\")\n .currency(\"USD\")\n .provider(ParcelInsuranceProvider.UPS)\n .build())\n .build())\n .metadata(\"Customer ID 123456\")\n .build())))\n .extra(ShipmentExtra.builder()\n .accountsReceivableCustomerAccount(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .appropriationNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .billOfLadingNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .cod(Cod.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .paymentMethod(PaymentMethod.CASH)\n .build())\n .codNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .customerReference(CustomerReference.builder()\n .refSort(1L)\n .build())\n .dealerOrderNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .deptNumber(DepartmentNumber.builder()\n .refSort(3L)\n .build())\n .fdaProductCode(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .insurance(Insurance.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .build())\n .invoiceNumber(InvoiceNumber.builder()\n .refSort(2L)\n .build())\n .manifestNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .modelNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .partNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .poNumber(PoNumber.builder()\n .refSort(2L)\n .build())\n .productionCode(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .purchaseRequestNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .rmaNumber(RmaNumber.builder()\n .refSort(1L)\n .build())\n .salespersonNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .serialNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .storeNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .transactionReferenceNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .build())\n .metadata(\"Customer ID 123456\")\n .shipmentDate(\"2021-03-22T12:00:00Z\")\n .addressReturn(AddressReturn.of(AddressCreateRequest.builder()\n .country(\"US\")\n .name(\"Shwan Ippotle\")\n .company(\"Shippo\")\n .street1(\"215 Clayton St.\")\n .street3(\"\")\n .streetNo(\"\")\n .city(\"San Francisco\")\n .state(\"CA\")\n .zip(\"94117\")\n .phone(\"+1 555 341 9393\")\n .email(\"shippotle@shippo.com\")\n .isResidential(true)\n .metadata(\"Customer ID 123456\")\n .validate(true)\n .build()))\n .customsDeclaration(ShipmentCreateRequestCustomsDeclaration.of(\"adcfdddf8ec64b84ad22772bce3ea37a\"))\n .carrierAccounts(List.of(\n \"065a4a8c10d24a34ab932163a1b87f52\",\n \"73f706f4bdb94b54a337563840ce52b0\"))\n .build())\n .carrierAccount(\"a4391cd4ab974f478f55dc08b5c8e3b3\")\n .metadata(\"SHIPMENT #1\")\n .servicelevelToken(\"fedex_ground\")\n .build(),\n BatchShipmentCreateRequest.builder()\n .shipment(ShipmentCreateRequest.builder()\n .addressFrom(AddressFrom.of(AddressCreateRequest.builder()\n .country(\"US\")\n .name(\"Shwan Ippotle\")\n .company(\"Shippo\")\n .street1(\"215 Clayton St.\")\n .street3(\"\")\n .streetNo(\"\")\n .city(\"San Francisco\")\n .state(\"CA\")\n .zip(\"94117\")\n .phone(\"+1 555 341 9393\")\n .email(\"shippotle@shippo.com\")\n .isResidential(true)\n .metadata(\"Customer ID 123456\")\n .validate(true)\n .build()))\n .addressTo(AddressTo.of(AddressCreateRequest.builder()\n .country(\"US\")\n .name(\"Shwan Ippotle\")\n .company(\"Shippo\")\n .street1(\"215 Clayton St.\")\n .street3(\"\")\n .streetNo(\"\")\n .city(\"San Francisco\")\n .state(\"CA\")\n .zip(\"94117\")\n .phone(\"+1 555 341 9393\")\n .email(\"shippotle@shippo.com\")\n .isResidential(true)\n .metadata(\"Customer ID 123456\")\n .validate(true)\n .build()))\n .parcels(List.of(\n Parcels.of(ParcelCreateFromTemplateRequest.builder()\n .massUnit(WeightUnitEnum.LB)\n .weight(\"1\")\n .template(ParcelTemplateEnumSet.of(ParcelTemplateDPDUKEnum.DPDUK_EXPRESS_PAK))\n .extra(ParcelExtra.builder()\n .cod(Cod.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .paymentMethod(PaymentMethod.CASH)\n .build())\n .insurance(ParcelInsurance.builder()\n .amount(\"5.5\")\n .content(\"Laptop\")\n .currency(\"USD\")\n .provider(ParcelInsuranceProvider.UPS)\n .build())\n .build())\n .metadata(\"Customer ID 123456\")\n .build()),\n Parcels.of(ParcelCreateFromTemplateRequest.builder()\n .massUnit(WeightUnitEnum.LB)\n .weight(\"1\")\n .template(ParcelTemplateEnumSet.of(ParcelTemplateDHLeCommerceEnum.DH_LE_C_IRREGULAR))\n .extra(ParcelExtra.builder()\n .cod(Cod.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .paymentMethod(PaymentMethod.CASH)\n .build())\n .insurance(ParcelInsurance.builder()\n .amount(\"5.5\")\n .content(\"Laptop\")\n .currency(\"USD\")\n .provider(ParcelInsuranceProvider.UPS)\n .build())\n .build())\n .metadata(\"Customer ID 123456\")\n .build())))\n .extra(ShipmentExtra.builder()\n .accountsReceivableCustomerAccount(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .appropriationNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .billOfLadingNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .cod(Cod.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .paymentMethod(PaymentMethod.CASH)\n .build())\n .codNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .customerReference(CustomerReference.builder()\n .refSort(1L)\n .build())\n .dealerOrderNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .deptNumber(DepartmentNumber.builder()\n .refSort(3L)\n .build())\n .fdaProductCode(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .insurance(Insurance.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .build())\n .invoiceNumber(InvoiceNumber.builder()\n .refSort(2L)\n .build())\n .manifestNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .modelNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .partNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .poNumber(PoNumber.builder()\n .refSort(2L)\n .build())\n .productionCode(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .purchaseRequestNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .rmaNumber(RmaNumber.builder()\n .refSort(1L)\n .build())\n .salespersonNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .serialNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .storeNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .transactionReferenceNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .build())\n .metadata(\"Customer ID 123456\")\n .shipmentDate(\"2021-03-22T12:00:00Z\")\n .addressReturn(AddressReturn.of(AddressCreateRequest.builder()\n .country(\"US\")\n .name(\"Shwan Ippotle\")\n .company(\"Shippo\")\n .street1(\"215 Clayton St.\")\n .street3(\"\")\n .streetNo(\"\")\n .city(\"San Francisco\")\n .state(\"CA\")\n .zip(\"94117\")\n .phone(\"+1 555 341 9393\")\n .email(\"shippotle@shippo.com\")\n .isResidential(true)\n .metadata(\"Customer ID 123456\")\n .validate(true)\n .build()))\n .customsDeclaration(ShipmentCreateRequestCustomsDeclaration.of(CustomsDeclarationCreateRequest.builder()\n .certify(true)\n .certifySigner(\"Shawn Ippotle\")\n .contentsType(CustomsDeclarationContentsTypeEnum.MERCHANDISE)\n .items(List.of(\n CustomsItemCreateRequest.builder()\n .description(\"T-Shirt\")\n .massUnit(WeightUnitEnum.LB)\n .netWeight(\"5\")\n .originCountry(\"\u003cvalue>\")\n .quantity(20L)\n .valueAmount(\"200\")\n .valueCurrency(\"USD\")\n .metadata(\"Order ID \\\"123454\\\"\")\n .skuCode(\"HM-123\")\n .hsCode(\"0901.21\")\n .build()))\n .nonDeliveryOption(CustomsDeclarationNonDeliveryOptionEnum.RETURN)\n .b13aFilingOption(CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY)\n .contentsExplanation(\"T-Shirt purchase\")\n .dutiesPayor(DutiesPayor.builder()\n .account(\"2323434543\")\n .type(CustomsDeclarationCreateRequestType.THIRD_PARTY)\n .address(CustomsDeclarationCreateRequestAddress.builder()\n .name(\"Patrick Kavanagh\")\n .zip(\"80331\")\n .country(\"DE\")\n .build())\n .build())\n .exporterIdentification(CustomsExporterIdentification.builder()\n .eoriNumber(\"PL123456790ABCDE\")\n .taxId(CustomsTaxIdentification.builder()\n .number(\"123456789\")\n .type(CustomsTaxIdentificationType.EIN)\n .build())\n .build())\n .invoice(\"#123123\")\n .metadata(\"Order ID #123123\")\n .addressImporter(AddressImporter.builder()\n .name(\"Shwan Ippotle\")\n .company(\"Shippo\")\n .street1(\"Blumenstraße\")\n .street3(\"\")\n .streetNo(\"22\")\n .city(\"München\")\n .state(\"CA\")\n .zip(\"80331\")\n .country(\"DE\")\n .phone(\"80331\")\n .email(\"shippotle@shippo.com\")\n .isResidential(true)\n .build())\n .eelPfc(CustomsDeclarationEelPfcEnum.NOEEI3037_A)\n .incoterm(CustomsDeclarationIncotermEnum.DDP)\n .test(true)\n .build()))\n .carrierAccounts(List.of(\n \"065a4a8c10d24a34ab932163a1b87f52\",\n \"73f706f4bdb94b54a337563840ce52b0\"))\n .build())\n .carrierAccount(\"a4391cd4ab974f478f55dc08b5c8e3b3\")\n .metadata(\"SHIPMENT #1\")\n .servicelevelToken(\"fedex_ground\")\n .build(),\n BatchShipmentCreateRequest.builder()\n .shipment(ShipmentCreateRequest.builder()\n .addressFrom(AddressFrom.of(\"d799c2679e644279b59fe661ac8fa488\"))\n .addressTo(AddressTo.of(AddressCreateRequest.builder()\n .country(\"US\")\n .name(\"Shwan Ippotle\")\n .company(\"Shippo\")\n .street1(\"215 Clayton St.\")\n .street3(\"\")\n .streetNo(\"\")\n .city(\"San Francisco\")\n .state(\"CA\")\n .zip(\"94117\")\n .phone(\"+1 555 341 9393\")\n .email(\"shippotle@shippo.com\")\n .isResidential(true)\n .metadata(\"Customer ID 123456\")\n .validate(true)\n .build()))\n .parcels(List.of(\n Parcels.of(\"\u003cvalue>\")))\n .extra(ShipmentExtra.builder()\n .accountsReceivableCustomerAccount(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .appropriationNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .billOfLadingNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .cod(Cod.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .paymentMethod(PaymentMethod.CASH)\n .build())\n .codNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .customerReference(CustomerReference.builder()\n .refSort(1L)\n .build())\n .dealerOrderNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .deptNumber(DepartmentNumber.builder()\n .refSort(3L)\n .build())\n .fdaProductCode(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .insurance(Insurance.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .build())\n .invoiceNumber(InvoiceNumber.builder()\n .refSort(2L)\n .build())\n .manifestNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .modelNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .partNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .poNumber(PoNumber.builder()\n .refSort(2L)\n .build())\n .productionCode(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .purchaseRequestNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .rmaNumber(RmaNumber.builder()\n .refSort(1L)\n .build())\n .salespersonNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .serialNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .storeNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .transactionReferenceNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .build())\n .metadata(\"Customer ID 123456\")\n .shipmentDate(\"2021-03-22T12:00:00Z\")\n .addressReturn(AddressReturn.of(\"d799c2679e644279b59fe661ac8fa488\"))\n .customsDeclaration(ShipmentCreateRequestCustomsDeclaration.of(\"adcfdddf8ec64b84ad22772bce3ea37a\"))\n .carrierAccounts(List.of(\n \"065a4a8c10d24a34ab932163a1b87f52\",\n \"73f706f4bdb94b54a337563840ce52b0\"))\n .build())\n .carrierAccount(\"a4391cd4ab974f478f55dc08b5c8e3b3\")\n .metadata(\"SHIPMENT #1\")\n .servicelevelToken(\"fedex_ground\")\n .build()))\n .call();\n\n if (res.batch().isPresent()) {\n // handle response\n }\n }\n}"}],"x-speakeasy-name-override":"addShipments","method":"post","type":"path","servers":["cacc1504-0b40-4ec1-aa22-16cc7c1beba9"],"security":["dbe54bd5-03b5-44fc-a1e0-5dbfdcce4630"],"path":"/batches/{BatchId}/add_shipments","baseUrlOptions":["https://api.goshippo.com"],"title":"Add shipments to a batch","codeSamples":[{"label":"cURL","lang":"cURL","source":"curl -X POST https://api.goshippo.com/batches/\u003cBATCH OBJECT ID>/add_shipments \\\n-H \"Authorization: ShippoToken \u003cAPI_TOKEN>\" \\\n-H \"Content-Type: application/json\" \\\n-d '[\n {\n \"shipment\": { \n \"address_from\": {\n \"name\": \"Mr Hippo\",\n \"street1\": \"965 Mission St\",\n \"street2\": \"Ste 201\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip\": \"94103\",\n \"country\": \"US\",\n \"phone\": \"4151234567\",\n },\n \"address_to\": {\n \"name\": \"Hippo Jr\",\n \"street1\": \"915 Broadway\",\n \"street2\": \"19th Floor\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip\": \"10010\",\n \"country\": \"US\",\n \"phone\": \"2129947880\",\n },\n \"parcels\": [{\n \"length\": \"12\",\n \"width\": \"12\",\n \"height\": \"12\",\n \"distance_unit\": \"in\",\n \"weight\": \"12\",\n \"mass_unit\": \"oz\"\n }]\n }\n },\n {\n \"shipment\": { \n \"address_from\": {\n \"name\": \"Ms Hippo\",\n \"street1\": \"1092 Indian Summer Ct\",\n \"city\": \"San Jose\",\n \"state\": \"CA\",\n \"zip\": \"95122\",\n \"country\": \"US\",\n \"phone\": \"4151234567\",\n },\n \"address_to\": {\n \"name\": \"Mr Hippo\",\n \"street1\": \"965 Mission St\",\n \"street2\": \"Ste 201\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip\": \"94103\",\n \"country\": \"US\",\n \"phone\": \"4151234567\",\n },\n \"parcels\": [{\n \"length\": \"5\",\n \"width\": \"5\",\n \"height\": \"5\",\n \"distance_unit\": \"in\",\n \"weight\": \"2\",\n \"mass_unit\": \"lb\"\n }]\n },\n \"carrier_account\": \"a4391cd4ab974f478f55dc08b5c8e3b3\",\n \"servicelevel_token\": \"fedex_2_day\"\n }\n ]'"},{"label":"Python","lang":"python","source":"import shippo\nfrom shippo.models import components\n\ns = shippo.Shippo(\n api_key_header='ShippoToken \u003cAPI_TOKEN>',\n shippo_api_version='2018-02-08',\n)\n\n\nres = s.batches.add_shipments(request_body=[\n components.BatchShipmentCreateRequest(\n carrier_account='a4391cd4ab974f478f55dc08b5c8e3b3',\n metadata='SHIPMENT #1',\n servicelevel_token='fedex_ground',\n shipment=components.ShipmentCreateRequest(\n extra=components.ShipmentExtra(\n accounts_receivable_customer_account=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n appropriation_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n bill_of_lading_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n cod=components.Cod(\n amount='5.5',\n currency='USD',\n payment_method=components.PaymentMethod.CASH,\n ),\n cod_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n customer_reference=components.CustomerReference(\n ref_sort=1,\n ),\n dealer_order_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n dept_number=components.DepartmentNumber(\n ref_sort=3,\n ),\n fda_product_code=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n insurance=components.Insurance(\n amount='5.5',\n currency='USD',\n ),\n invoice_number=components.InvoiceNumber(\n ref_sort=2,\n ),\n manifest_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n model_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n part_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n po_number=components.PoNumber(\n ref_sort=2,\n ),\n production_code=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n purchase_request_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n rma_number=components.RmaNumber(\n ref_sort=1,\n ),\n salesperson_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n serial_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n store_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n transaction_reference_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n ),\n metadata='Customer ID 123456',\n shipment_date='2021-03-22T12:00:00Z',\n address_from=components.AddressCreateRequest(\n name='Shwan Ippotle',\n company='Shippo',\n street1='215 Clayton St.',\n street3='',\n street_no='',\n city='San Francisco',\n state='CA',\n zip='94117',\n country='US',\n phone='+1 555 341 9393',\n email='shippotle@shippo.com',\n is_residential=True,\n metadata='Customer ID 123456',\n validate=True,\n ),\n address_return=components.AddressCreateRequest(\n name='Shwan Ippotle',\n company='Shippo',\n street1='215 Clayton St.',\n street3='',\n street_no='',\n city='San Francisco',\n state='CA',\n zip='94117',\n country='US',\n phone='+1 555 341 9393',\n email='shippotle@shippo.com',\n is_residential=True,\n metadata='Customer ID 123456',\n validate=True,\n ),\n address_to='d799c2679e644279b59fe661ac8fa489',\n customs_declaration='adcfdddf8ec64b84ad22772bce3ea37a',\n carrier_accounts=[\n '065a4a8c10d24a34ab932163a1b87f52',\n '73f706f4bdb94b54a337563840ce52b0',\n ],\n parcels=[\n '\u003cvalue>',\n '\u003cvalue>',\n components.ParcelCreateFromTemplateRequest(\n extra=components.ParcelExtra(\n cod=components.Cod(\n amount='5.5',\n currency='USD',\n payment_method=components.PaymentMethod.CASH,\n ),\n insurance=components.ParcelInsurance(\n amount='5.5',\n content='Laptop',\n currency='USD',\n provider=components.ParcelInsuranceProvider.UPS,\n ),\n ),\n metadata='Customer ID 123456',\n mass_unit=components.WeightUnitEnum.LB,\n weight='1',\n template=components.ParcelTemplateUSPSEnum.USPS_SMALL_FLAT_RATE_ENVELOPE,\n ),\n ],\n ),\n ),\n components.BatchShipmentCreateRequest(\n carrier_account='a4391cd4ab974f478f55dc08b5c8e3b3',\n metadata='SHIPMENT #1',\n servicelevel_token='fedex_ground',\n shipment=components.ShipmentCreateRequest(\n extra=components.ShipmentExtra(\n accounts_receivable_customer_account=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n appropriation_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n bill_of_lading_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n cod=components.Cod(\n amount='5.5',\n currency='USD',\n payment_method=components.PaymentMethod.CASH,\n ),\n cod_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n customer_reference=components.CustomerReference(\n ref_sort=1,\n ),\n dealer_order_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n dept_number=components.DepartmentNumber(\n ref_sort=3,\n ),\n fda_product_code=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n insurance=components.Insurance(\n amount='5.5',\n currency='USD',\n ),\n invoice_number=components.InvoiceNumber(\n ref_sort=2,\n ),\n manifest_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n model_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n part_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n po_number=components.PoNumber(\n ref_sort=2,\n ),\n production_code=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n purchase_request_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n rma_number=components.RmaNumber(\n ref_sort=1,\n ),\n salesperson_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n serial_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n store_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n transaction_reference_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n ),\n metadata='Customer ID 123456',\n shipment_date='2021-03-22T12:00:00Z',\n address_from=components.AddressCreateRequest(\n name='Shwan Ippotle',\n company='Shippo',\n street1='215 Clayton St.',\n street3='',\n street_no='',\n city='San Francisco',\n state='CA',\n zip='94117',\n country='US',\n phone='+1 555 341 9393',\n email='shippotle@shippo.com',\n is_residential=True,\n metadata='Customer ID 123456',\n validate=True,\n ),\n address_return=components.AddressCreateRequest(\n name='Shwan Ippotle',\n company='Shippo',\n street1='215 Clayton St.',\n street3='',\n street_no='',\n city='San Francisco',\n state='CA',\n zip='94117',\n country='US',\n phone='+1 555 341 9393',\n email='shippotle@shippo.com',\n is_residential=True,\n metadata='Customer ID 123456',\n validate=True,\n ),\n address_to=components.AddressCreateRequest(\n name='Shwan Ippotle',\n company='Shippo',\n street1='215 Clayton St.',\n street3='',\n street_no='',\n city='San Francisco',\n state='CA',\n zip='94117',\n country='US',\n phone='+1 555 341 9393',\n email='shippotle@shippo.com',\n is_residential=True,\n metadata='Customer ID 123456',\n validate=True,\n ),\n customs_declaration=components.CustomsDeclarationCreateRequest(\n b13a_filing_option=components.CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY,\n certify=True,\n certify_signer='Shawn Ippotle',\n contents_explanation='T-Shirt purchase',\n duties_payor=components.DutiesPayor(\n account='2323434543',\n type=components.CustomsDeclarationCreateRequestType.THIRD_PARTY,\n address=components.CustomsDeclarationCreateRequestAddress(\n name='Patrick Kavanagh',\n zip='80331',\n country='DE',\n ),\n ),\n exporter_identification=components.CustomsExporterIdentification(\n eori_number='PL123456790ABCDE',\n tax_id=components.CustomsTaxIdentification(\n number='123456789',\n type=components.CustomsTaxIdentificationType.EIN,\n ),\n ),\n invoice='#123123',\n metadata='Order ID #123123',\n address_importer=components.AddressImporter(\n name='Shwan Ippotle',\n company='Shippo',\n street1='Blumenstraße',\n street3='',\n street_no='22',\n city='München',\n state='CA',\n zip='80331',\n country='DE',\n phone='80331',\n email='shippotle@shippo.com',\n is_residential=True,\n ),\n contents_type=components.CustomsDeclarationContentsTypeEnum.MERCHANDISE,\n eel_pfc=components.CustomsDeclarationEelPfcEnum.NOEEI_30_37_A,\n incoterm=components.CustomsDeclarationIncotermEnum.DDP,\n items=[\n components.CustomsItemCreateRequest(\n description='T-Shirt',\n mass_unit=components.WeightUnitEnum.LB,\n metadata='Order ID \"123454\"',\n net_weight='5',\n origin_country='\u003cvalue>',\n quantity=20,\n sku_code='HM-123',\n hs_code='0901.21',\n value_amount='200',\n value_currency='USD',\n ),\n ],\n non_delivery_option=components.CustomsDeclarationNonDeliveryOptionEnum.RETURN,\n test=True,\n ),\n carrier_accounts=[\n '065a4a8c10d24a34ab932163a1b87f52',\n '73f706f4bdb94b54a337563840ce52b0',\n ],\n parcels=[\n components.ParcelCreateFromTemplateRequest(\n extra=components.ParcelExtra(\n cod=components.Cod(\n amount='5.5',\n currency='USD',\n payment_method=components.PaymentMethod.CASH,\n ),\n insurance=components.ParcelInsurance(\n amount='5.5',\n content='Laptop',\n currency='USD',\n provider=components.ParcelInsuranceProvider.UPS,\n ),\n ),\n metadata='Customer ID 123456',\n mass_unit=components.WeightUnitEnum.LB,\n weight='1',\n template=components.ParcelTemplateDPDUKEnum.DPD_UK_EXPRESS_PAK,\n ),\n components.ParcelCreateFromTemplateRequest(\n extra=components.ParcelExtra(\n cod=components.Cod(\n amount='5.5',\n currency='USD',\n payment_method=components.PaymentMethod.CASH,\n ),\n insurance=components.ParcelInsurance(\n amount='5.5',\n content='Laptop',\n currency='USD',\n provider=components.ParcelInsuranceProvider.UPS,\n ),\n ),\n metadata='Customer ID 123456',\n mass_unit=components.WeightUnitEnum.LB,\n weight='1',\n template=components.ParcelTemplateDHLeCommerceEnum.DH_LE_C_IRREGULAR,\n ),\n ],\n ),\n ),\n components.BatchShipmentCreateRequest(\n carrier_account='a4391cd4ab974f478f55dc08b5c8e3b3',\n metadata='SHIPMENT #1',\n servicelevel_token='fedex_ground',\n shipment=components.ShipmentCreateRequest(\n extra=components.ShipmentExtra(\n accounts_receivable_customer_account=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n appropriation_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n bill_of_lading_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n cod=components.Cod(\n amount='5.5',\n currency='USD',\n payment_method=components.PaymentMethod.CASH,\n ),\n cod_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n customer_reference=components.CustomerReference(\n ref_sort=1,\n ),\n dealer_order_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n dept_number=components.DepartmentNumber(\n ref_sort=3,\n ),\n fda_product_code=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n insurance=components.Insurance(\n amount='5.5',\n currency='USD',\n ),\n invoice_number=components.InvoiceNumber(\n ref_sort=2,\n ),\n manifest_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n model_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n part_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n po_number=components.PoNumber(\n ref_sort=2,\n ),\n production_code=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n purchase_request_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n rma_number=components.RmaNumber(\n ref_sort=1,\n ),\n salesperson_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n serial_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n store_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n transaction_reference_number=components.UPSReferenceFields(\n prefix='ABC',\n value='value',\n ref_sort=1,\n ),\n ),\n metadata='Customer ID 123456',\n shipment_date='2021-03-22T12:00:00Z',\n address_from='d799c2679e644279b59fe661ac8fa488',\n address_return='d799c2679e644279b59fe661ac8fa488',\n address_to=components.AddressCreateRequest(\n name='Shwan Ippotle',\n company='Shippo',\n street1='215 Clayton St.',\n street3='',\n street_no='',\n city='San Francisco',\n state='CA',\n zip='94117',\n country='US',\n phone='+1 555 341 9393',\n email='shippotle@shippo.com',\n is_residential=True,\n metadata='Customer ID 123456',\n validate=True,\n ),\n customs_declaration='adcfdddf8ec64b84ad22772bce3ea37a',\n carrier_accounts=[\n '065a4a8c10d24a34ab932163a1b87f52',\n '73f706f4bdb94b54a337563840ce52b0',\n ],\n parcels=[\n '\u003cvalue>',\n ],\n ),\n ),\n], batch_id='\u003cid>')\n\nif res is not None:\n # handle response\n pass"},{"label":"Typescript","lang":"typescript","source":"import { Shippo } from \"shippo\";\n\nconst shippo = new Shippo({\n apiKeyHeader: \"ShippoToken \u003cAPI_TOKEN>\",\n shippoApiVersion: \"2018-02-08\",\n});\n\nasync function run() {\n const result = await shippo.batches.addShipments([\n {\n carrierAccount: \"a4391cd4ab974f478f55dc08b5c8e3b3\",\n metadata: \"SHIPMENT #1\",\n servicelevelToken: \"fedex_ground\",\n shipment: {\n extra: {\n accountsReceivableCustomerAccount: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n appropriationNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n billOfLadingNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n cod: {\n amount: \"5.5\",\n currency: \"USD\",\n paymentMethod: \"CASH\",\n },\n codNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n customerReference: {\n refSort: 1,\n },\n dealerOrderNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n deptNumber: {\n refSort: 3,\n },\n fdaProductCode: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n insurance: {\n amount: \"5.5\",\n currency: \"USD\",\n },\n invoiceNumber: {\n refSort: 2,\n },\n manifestNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n modelNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n partNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n poNumber: {\n refSort: 2,\n },\n productionCode: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n purchaseRequestNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n rmaNumber: {\n refSort: 1,\n },\n salespersonNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n serialNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n storeNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n transactionReferenceNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n },\n metadata: \"Customer ID 123456\",\n shipmentDate: \"2021-03-22T12:00:00Z\",\n addressFrom: {\n name: \"Shwan Ippotle\",\n company: \"Shippo\",\n street1: \"215 Clayton St.\",\n street3: \"\",\n streetNo: \"\",\n city: \"San Francisco\",\n state: \"CA\",\n zip: \"94117\",\n country: \"US\",\n phone: \"+1 555 341 9393\",\n email: \"shippotle@shippo.com\",\n isResidential: true,\n metadata: \"Customer ID 123456\",\n validate: true,\n },\n addressReturn: {\n name: \"Shwan Ippotle\",\n company: \"Shippo\",\n street1: \"215 Clayton St.\",\n street3: \"\",\n streetNo: \"\",\n city: \"San Francisco\",\n state: \"CA\",\n zip: \"94117\",\n country: \"US\",\n phone: \"+1 555 341 9393\",\n email: \"shippotle@shippo.com\",\n isResidential: true,\n metadata: \"Customer ID 123456\",\n validate: true,\n },\n addressTo: \"d799c2679e644279b59fe661ac8fa489\",\n customsDeclaration: \"adcfdddf8ec64b84ad22772bce3ea37a\",\n carrierAccounts: [\n \"065a4a8c10d24a34ab932163a1b87f52\",\n \"73f706f4bdb94b54a337563840ce52b0\",\n ],\n parcels: [\n \"\u003cvalue>\",\n \"\u003cvalue>\",\n {\n extra: {\n cod: {\n amount: \"5.5\",\n currency: \"USD\",\n paymentMethod: \"CASH\",\n },\n insurance: {\n amount: \"5.5\",\n content: \"Laptop\",\n currency: \"USD\",\n provider: \"UPS\",\n },\n },\n metadata: \"Customer ID 123456\",\n massUnit: \"lb\",\n weight: \"1\",\n template: \"USPS_SmallFlatRateEnvelope\",\n },\n ],\n },\n },\n {\n carrierAccount: \"a4391cd4ab974f478f55dc08b5c8e3b3\",\n metadata: \"SHIPMENT #1\",\n servicelevelToken: \"fedex_ground\",\n shipment: {\n extra: {\n accountsReceivableCustomerAccount: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n appropriationNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n billOfLadingNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n cod: {\n amount: \"5.5\",\n currency: \"USD\",\n paymentMethod: \"CASH\",\n },\n codNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n customerReference: {\n refSort: 1,\n },\n dealerOrderNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n deptNumber: {\n refSort: 3,\n },\n fdaProductCode: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n insurance: {\n amount: \"5.5\",\n currency: \"USD\",\n },\n invoiceNumber: {\n refSort: 2,\n },\n manifestNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n modelNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n partNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n poNumber: {\n refSort: 2,\n },\n productionCode: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n purchaseRequestNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n rmaNumber: {\n refSort: 1,\n },\n salespersonNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n serialNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n storeNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n transactionReferenceNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n },\n metadata: \"Customer ID 123456\",\n shipmentDate: \"2021-03-22T12:00:00Z\",\n addressFrom: {\n name: \"Shwan Ippotle\",\n company: \"Shippo\",\n street1: \"215 Clayton St.\",\n street3: \"\",\n streetNo: \"\",\n city: \"San Francisco\",\n state: \"CA\",\n zip: \"94117\",\n country: \"US\",\n phone: \"+1 555 341 9393\",\n email: \"shippotle@shippo.com\",\n isResidential: true,\n metadata: \"Customer ID 123456\",\n validate: true,\n },\n addressReturn: {\n name: \"Shwan Ippotle\",\n company: \"Shippo\",\n street1: \"215 Clayton St.\",\n street3: \"\",\n streetNo: \"\",\n city: \"San Francisco\",\n state: \"CA\",\n zip: \"94117\",\n country: \"US\",\n phone: \"+1 555 341 9393\",\n email: \"shippotle@shippo.com\",\n isResidential: true,\n metadata: \"Customer ID 123456\",\n validate: true,\n },\n addressTo: {\n name: \"Shwan Ippotle\",\n company: \"Shippo\",\n street1: \"215 Clayton St.\",\n street3: \"\",\n streetNo: \"\",\n city: \"San Francisco\",\n state: \"CA\",\n zip: \"94117\",\n country: \"US\",\n phone: \"+1 555 341 9393\",\n email: \"shippotle@shippo.com\",\n isResidential: true,\n metadata: \"Customer ID 123456\",\n validate: true,\n },\n customsDeclaration: {\n b13aFilingOption: \"FILED_ELECTRONICALLY\",\n certify: true,\n certifySigner: \"Shawn Ippotle\",\n contentsExplanation: \"T-Shirt purchase\",\n dutiesPayor: {\n account: \"2323434543\",\n type: \"THIRD_PARTY\",\n address: {\n name: \"Patrick Kavanagh\",\n zip: \"80331\",\n country: \"DE\",\n },\n },\n exporterIdentification: {\n eoriNumber: \"PL123456790ABCDE\",\n taxId: {\n number: \"123456789\",\n type: \"EIN\",\n },\n },\n invoice: \"#123123\",\n metadata: \"Order ID #123123\",\n addressImporter: {\n name: \"Shwan Ippotle\",\n company: \"Shippo\",\n street1: \"Blumenstraße\",\n street3: \"\",\n streetNo: \"22\",\n city: \"München\",\n state: \"CA\",\n zip: \"80331\",\n country: \"DE\",\n phone: \"80331\",\n email: \"shippotle@shippo.com\",\n isResidential: true,\n },\n contentsType: \"MERCHANDISE\",\n eelPfc: \"NOEEI_30_37_a\",\n incoterm: \"DDP\",\n items: [\n {\n description: \"T-Shirt\",\n massUnit: \"lb\",\n metadata: \"Order ID \\\"123454\\\"\",\n netWeight: \"5\",\n originCountry: \"\u003cvalue>\",\n quantity: 20,\n skuCode: \"HM-123\",\n hsCode: \"0901.21\",\n valueAmount: \"200\",\n valueCurrency: \"USD\",\n },\n ],\n nonDeliveryOption: \"RETURN\",\n test: true,\n },\n carrierAccounts: [\n \"065a4a8c10d24a34ab932163a1b87f52\",\n \"73f706f4bdb94b54a337563840ce52b0\",\n ],\n parcels: [\n {\n extra: {\n cod: {\n amount: \"5.5\",\n currency: \"USD\",\n paymentMethod: \"CASH\",\n },\n insurance: {\n amount: \"5.5\",\n content: \"Laptop\",\n currency: \"USD\",\n provider: \"UPS\",\n },\n },\n metadata: \"Customer ID 123456\",\n massUnit: \"lb\",\n weight: \"1\",\n template: \"DPD_UK_Express_Pak\",\n },\n {\n extra: {\n cod: {\n amount: \"5.5\",\n currency: \"USD\",\n paymentMethod: \"CASH\",\n },\n insurance: {\n amount: \"5.5\",\n content: \"Laptop\",\n currency: \"USD\",\n provider: \"UPS\",\n },\n },\n metadata: \"Customer ID 123456\",\n massUnit: \"lb\",\n weight: \"1\",\n template: \"DHLeC_Irregular\",\n },\n ],\n },\n },\n {\n carrierAccount: \"a4391cd4ab974f478f55dc08b5c8e3b3\",\n metadata: \"SHIPMENT #1\",\n servicelevelToken: \"fedex_ground\",\n shipment: {\n extra: {\n accountsReceivableCustomerAccount: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n appropriationNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n billOfLadingNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n cod: {\n amount: \"5.5\",\n currency: \"USD\",\n paymentMethod: \"CASH\",\n },\n codNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n customerReference: {\n refSort: 1,\n },\n dealerOrderNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n deptNumber: {\n refSort: 3,\n },\n fdaProductCode: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n insurance: {\n amount: \"5.5\",\n currency: \"USD\",\n },\n invoiceNumber: {\n refSort: 2,\n },\n manifestNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n modelNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n partNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n poNumber: {\n refSort: 2,\n },\n productionCode: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n purchaseRequestNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n rmaNumber: {\n refSort: 1,\n },\n salespersonNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n serialNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n storeNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n transactionReferenceNumber: {\n prefix: \"ABC\",\n value: \"value\",\n refSort: 1,\n },\n },\n metadata: \"Customer ID 123456\",\n shipmentDate: \"2021-03-22T12:00:00Z\",\n addressFrom: \"d799c2679e644279b59fe661ac8fa488\",\n addressReturn: \"d799c2679e644279b59fe661ac8fa488\",\n addressTo: {\n name: \"Shwan Ippotle\",\n company: \"Shippo\",\n street1: \"215 Clayton St.\",\n street3: \"\",\n streetNo: \"\",\n city: \"San Francisco\",\n state: \"CA\",\n zip: \"94117\",\n country: \"US\",\n phone: \"+1 555 341 9393\",\n email: \"shippotle@shippo.com\",\n isResidential: true,\n metadata: \"Customer ID 123456\",\n validate: true,\n },\n customsDeclaration: \"adcfdddf8ec64b84ad22772bce3ea37a\",\n carrierAccounts: [\n \"065a4a8c10d24a34ab932163a1b87f52\",\n \"73f706f4bdb94b54a337563840ce52b0\",\n ],\n parcels: [\n \"\u003cvalue>\",\n ],\n },\n },\n ], \"\u003cid>\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();"},{"label":"C#","lang":"csharp","source":"using Shippo;\nusing Shippo.Models.Components;\nusing System.Collections.Generic;\n\nvar sdk = new ShippoSDK(\n apiKeyHeader: \"ShippoToken \u003cAPI_TOKEN>\",\n shippoApiVersion: \"2018-02-08\"\n);\n\nvar res = await sdk.Batches.AddShipmentsAsync(\n batchId: \"\u003cid>\",\n requestBody: new List\u003cBatchShipmentCreateRequest>() {\n new BatchShipmentCreateRequest() {\n CarrierAccount = \"a4391cd4ab974f478f55dc08b5c8e3b3\",\n Metadata = \"SHIPMENT #1\",\n ServicelevelToken = \"fedex_ground\",\n Shipment = new ShipmentCreateRequest() {\n Extra = new ShipmentExtra() {\n AccountsReceivableCustomerAccount = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n AppropriationNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n BillOfLadingNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n Cod = new Cod() {\n Amount = \"5.5\",\n Currency = \"USD\",\n PaymentMethod = PaymentMethod.Cash,\n },\n CodNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n CustomerReference = new CustomerReference() {\n RefSort = 1,\n },\n DealerOrderNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n DeptNumber = new DepartmentNumber() {\n RefSort = 3,\n },\n FdaProductCode = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n Insurance = new Insurance() {\n Amount = \"5.5\",\n Currency = \"USD\",\n },\n InvoiceNumber = new InvoiceNumber() {\n RefSort = 2,\n },\n ManifestNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n ModelNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n PartNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n PoNumber = new PoNumber() {\n RefSort = 2,\n },\n ProductionCode = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n PurchaseRequestNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n RmaNumber = new RmaNumber() {\n RefSort = 1,\n },\n SalespersonNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n SerialNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n StoreNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n TransactionReferenceNumber = new UPSReferenceFields() {\n Prefix = \"ABC\",\n Value = \"value\",\n RefSort = 1,\n },\n },\n Metadata = \"Customer ID 123456\",\n ShipmentDate = \"2021-03-22T12:00:00Z\",\n AddressFrom = AddressFrom.CreateStr(\n \"d799c2679e644279b59fe661ac8fa488\"\n ),\n AddressReturn = AddressReturn.CreateAddressCreateRequest(\n new AddressCreateRequest() {\n Name = \"Shwan Ippotle\",\n Company = \"Shippo\",\n Street1 = \"215 Clayton St.\",\n Street3 = \"\",\n StreetNo = \"\",\n City = \"San Francisco\",\n State = \"CA\",\n Zip = \"94117\",\n Country = \"US\",\n Phone = \"+1 555 341 9393\",\n Email = \"shippotle@shippo.com\",\n IsResidential = true,\n Metadata = \"Customer ID 123456\",\n Validate = true,\n }\n ),\n AddressTo = AddressTo.CreateAddressCreateRequest(\n new AddressCreateRequest() {\n Name = \"Shwan Ippotle\",\n Company = \"Shippo\",\n Street1 = \"215 Clayton St.\",\n Street3 = \"\",\n StreetNo = \"\",\n City = \"San Francisco\",\n State = \"CA\",\n Zip = \"94117\",\n Country = \"US\",\n Phone = \"+1 555 341 9393\",\n Email = \"shippotle@shippo.com\",\n IsResidential = true,\n Metadata = \"Customer ID 123456\",\n Validate = true,\n }\n ),\n CustomsDeclaration = ShipmentCreateRequestCustomsDeclaration.CreateStr(\n \"adcfdddf8ec64b84ad22772bce3ea37a\"\n ),\n CarrierAccounts = new List\u003cstring>() {\n \"065a4a8c10d24a34ab932163a1b87f52\",\n \"73f706f4bdb94b54a337563840ce52b0\",\n },\n Parcels = new List\u003cModels.Components.Parcels>() {\n Parcels.CreateStr(\n \"\u003cvalue>\"\n ),\n },\n },\n },\n },\n shippoApiVersion: \"2018-02-08\"\n);\n\n// handle response"},{"label":"PHP","lang":"php","source":"declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Shippo\\API;\nuse Shippo\\API\\Models\\Components;\n\n$sdk = API\\Shippo::builder()\n ->setSecurity(\n 'ShippoToken \u003cAPI_TOKEN>'\n )\n ->setShippoApiVersion('2018-02-08')\n ->build();\n\n\n\n$response = $sdk->batches->addShipments(\n batchId: '\u003cid>',\n requestBody: [\n new Components\\BatchShipmentCreateRequest(\n carrierAccount: 'a4391cd4ab974f478f55dc08b5c8e3b3',\n metadata: 'SHIPMENT #1',\n servicelevelToken: 'fedex_ground',\n shipment: new Components\\ShipmentCreateRequest(\n extra: new Components\\ShipmentExtra(\n accountsReceivableCustomerAccount: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n appropriationNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n billOfLadingNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n cod: new Components\\Cod(\n amount: '5.5',\n currency: 'USD',\n paymentMethod: Components\\PaymentMethod::Cash,\n ),\n codNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n customerReference: new Components\\CustomerReference(\n refSort: 1,\n ),\n dealerOrderNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n deptNumber: new Components\\DepartmentNumber(\n refSort: 3,\n ),\n fdaProductCode: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n insurance: new Components\\Insurance(\n amount: '5.5',\n currency: 'USD',\n ),\n invoiceNumber: new Components\\InvoiceNumber(\n refSort: 2,\n ),\n manifestNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n modelNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n partNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n poNumber: new Components\\PoNumber(\n refSort: 2,\n ),\n productionCode: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n purchaseRequestNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n rmaNumber: new Components\\RmaNumber(\n refSort: 1,\n ),\n salespersonNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n serialNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n storeNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n transactionReferenceNumber: new Components\\UPSReferenceFields(\n prefix: 'ABC',\n value: 'value',\n refSort: 1,\n ),\n ),\n metadata: 'Customer ID 123456',\n shipmentDate: '2021-03-22T12:00:00Z',\n addressFrom: 'd799c2679e644279b59fe661ac8fa488',\n addressReturn: new Components\\AddressCreateRequest(\n name: 'Shwan Ippotle',\n company: 'Shippo',\n street1: '215 Clayton St.',\n street3: '',\n streetNo: '',\n city: 'San Francisco',\n state: 'CA',\n zip: '94117',\n country: 'US',\n phone: '+1 555 341 9393',\n email: 'shippotle@shippo.com',\n isResidential: true,\n metadata: 'Customer ID 123456',\n validate: true,\n ),\n addressTo: new Components\\AddressCreateRequest(\n name: 'Shwan Ippotle',\n company: 'Shippo',\n street1: '215 Clayton St.',\n street3: '',\n streetNo: '',\n city: 'San Francisco',\n state: 'CA',\n zip: '94117',\n country: 'US',\n phone: '+1 555 341 9393',\n email: 'shippotle@shippo.com',\n isResidential: true,\n metadata: 'Customer ID 123456',\n validate: true,\n ),\n customsDeclaration: 'adcfdddf8ec64b84ad22772bce3ea37a',\n carrierAccounts: [\n '065a4a8c10d24a34ab932163a1b87f52',\n '73f706f4bdb94b54a337563840ce52b0',\n ],\n parcels: [\n '\u003cvalue>',\n ],\n ),\n ),\n ],\n shippoApiVersion: '2018-02-08'\n\n);\n\nif ($response->batch !== null) {\n // handle response\n}"},{"label":"Java","lang":"java","source":"package hello.world;\n\nimport com.goshippo.shippo_sdk.Shippo;\nimport com.goshippo.shippo_sdk.models.components.AddressCreateRequest;\nimport com.goshippo.shippo_sdk.models.components.AddressFrom;\nimport com.goshippo.shippo_sdk.models.components.AddressImporter;\nimport com.goshippo.shippo_sdk.models.components.AddressReturn;\nimport com.goshippo.shippo_sdk.models.components.AddressTo;\nimport com.goshippo.shippo_sdk.models.components.BatchShipmentCreateRequest;\nimport com.goshippo.shippo_sdk.models.components.Cod;\nimport com.goshippo.shippo_sdk.models.components.CustomerReference;\nimport com.goshippo.shippo_sdk.models.components.CustomsDeclarationB13AFilingOptionEnum;\nimport com.goshippo.shippo_sdk.models.components.CustomsDeclarationContentsTypeEnum;\nimport com.goshippo.shippo_sdk.models.components.CustomsDeclarationCreateRequest;\nimport com.goshippo.shippo_sdk.models.components.CustomsDeclarationCreateRequestAddress;\nimport com.goshippo.shippo_sdk.models.components.CustomsDeclarationCreateRequestType;\nimport com.goshippo.shippo_sdk.models.components.CustomsDeclarationEelPfcEnum;\nimport com.goshippo.shippo_sdk.models.components.CustomsDeclarationIncotermEnum;\nimport com.goshippo.shippo_sdk.models.components.CustomsDeclarationNonDeliveryOptionEnum;\nimport com.goshippo.shippo_sdk.models.components.CustomsExporterIdentification;\nimport com.goshippo.shippo_sdk.models.components.CustomsItemCreateRequest;\nimport com.goshippo.shippo_sdk.models.components.CustomsTaxIdentification;\nimport com.goshippo.shippo_sdk.models.components.CustomsTaxIdentificationType;\nimport com.goshippo.shippo_sdk.models.components.DepartmentNumber;\nimport com.goshippo.shippo_sdk.models.components.DutiesPayor;\nimport com.goshippo.shippo_sdk.models.components.Insurance;\nimport com.goshippo.shippo_sdk.models.components.InvoiceNumber;\nimport com.goshippo.shippo_sdk.models.components.ParcelCreateFromTemplateRequest;\nimport com.goshippo.shippo_sdk.models.components.ParcelExtra;\nimport com.goshippo.shippo_sdk.models.components.ParcelInsurance;\nimport com.goshippo.shippo_sdk.models.components.ParcelInsuranceProvider;\nimport com.goshippo.shippo_sdk.models.components.ParcelTemplateDHLeCommerceEnum;\nimport com.goshippo.shippo_sdk.models.components.ParcelTemplateDPDUKEnum;\nimport com.goshippo.shippo_sdk.models.components.ParcelTemplateEnumSet;\nimport com.goshippo.shippo_sdk.models.components.ParcelTemplateUSPSEnum;\nimport com.goshippo.shippo_sdk.models.components.Parcels;\nimport com.goshippo.shippo_sdk.models.components.PaymentMethod;\nimport com.goshippo.shippo_sdk.models.components.PoNumber;\nimport com.goshippo.shippo_sdk.models.components.RmaNumber;\nimport com.goshippo.shippo_sdk.models.components.ShipmentCreateRequest;\nimport com.goshippo.shippo_sdk.models.components.ShipmentCreateRequestCustomsDeclaration;\nimport com.goshippo.shippo_sdk.models.components.ShipmentExtra;\nimport com.goshippo.shippo_sdk.models.components.UPSReferenceFields;\nimport com.goshippo.shippo_sdk.models.components.WeightUnitEnum;\nimport com.goshippo.shippo_sdk.models.operations.AddShipmentsToBatchResponse;\nimport java.lang.Exception;\nimport java.util.List;\n\npublic class Application {\n\n public static void main(String[] args) throws Exception {\n\n Shippo sdk = Shippo.builder()\n .apiKeyHeader(\"ShippoToken \u003cAPI_TOKEN>\")\n .shippoApiVersion(\"2018-02-08\")\n .build();\n\n AddShipmentsToBatchResponse res = sdk.batches().addShipments()\n .batchId(\"\u003cid>\")\n .shippoApiVersion(\"2018-02-08\")\n .requestBody(List.of(\n BatchShipmentCreateRequest.builder()\n .shipment(ShipmentCreateRequest.builder()\n .addressFrom(AddressFrom.of(AddressCreateRequest.builder()\n .country(\"US\")\n .name(\"Shwan Ippotle\")\n .company(\"Shippo\")\n .street1(\"215 Clayton St.\")\n .street3(\"\")\n .streetNo(\"\")\n .city(\"San Francisco\")\n .state(\"CA\")\n .zip(\"94117\")\n .phone(\"+1 555 341 9393\")\n .email(\"shippotle@shippo.com\")\n .isResidential(true)\n .metadata(\"Customer ID 123456\")\n .validate(true)\n .build()))\n .addressTo(AddressTo.of(\"d799c2679e644279b59fe661ac8fa489\"))\n .parcels(List.of(\n Parcels.of(\"\u003cvalue>\"),\n Parcels.of(\"\u003cvalue>\"),\n Parcels.of(ParcelCreateFromTemplateRequest.builder()\n .massUnit(WeightUnitEnum.LB)\n .weight(\"1\")\n .template(ParcelTemplateEnumSet.of(ParcelTemplateUSPSEnum.USPS_SMALL_FLAT_RATE_ENVELOPE))\n .extra(ParcelExtra.builder()\n .cod(Cod.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .paymentMethod(PaymentMethod.CASH)\n .build())\n .insurance(ParcelInsurance.builder()\n .amount(\"5.5\")\n .content(\"Laptop\")\n .currency(\"USD\")\n .provider(ParcelInsuranceProvider.UPS)\n .build())\n .build())\n .metadata(\"Customer ID 123456\")\n .build())))\n .extra(ShipmentExtra.builder()\n .accountsReceivableCustomerAccount(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .appropriationNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .billOfLadingNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .cod(Cod.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .paymentMethod(PaymentMethod.CASH)\n .build())\n .codNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .customerReference(CustomerReference.builder()\n .refSort(1L)\n .build())\n .dealerOrderNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .deptNumber(DepartmentNumber.builder()\n .refSort(3L)\n .build())\n .fdaProductCode(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .insurance(Insurance.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .build())\n .invoiceNumber(InvoiceNumber.builder()\n .refSort(2L)\n .build())\n .manifestNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .modelNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .partNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .poNumber(PoNumber.builder()\n .refSort(2L)\n .build())\n .productionCode(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .purchaseRequestNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .rmaNumber(RmaNumber.builder()\n .refSort(1L)\n .build())\n .salespersonNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .serialNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .storeNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .transactionReferenceNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .build())\n .metadata(\"Customer ID 123456\")\n .shipmentDate(\"2021-03-22T12:00:00Z\")\n .addressReturn(AddressReturn.of(AddressCreateRequest.builder()\n .country(\"US\")\n .name(\"Shwan Ippotle\")\n .company(\"Shippo\")\n .street1(\"215 Clayton St.\")\n .street3(\"\")\n .streetNo(\"\")\n .city(\"San Francisco\")\n .state(\"CA\")\n .zip(\"94117\")\n .phone(\"+1 555 341 9393\")\n .email(\"shippotle@shippo.com\")\n .isResidential(true)\n .metadata(\"Customer ID 123456\")\n .validate(true)\n .build()))\n .customsDeclaration(ShipmentCreateRequestCustomsDeclaration.of(\"adcfdddf8ec64b84ad22772bce3ea37a\"))\n .carrierAccounts(List.of(\n \"065a4a8c10d24a34ab932163a1b87f52\",\n \"73f706f4bdb94b54a337563840ce52b0\"))\n .build())\n .carrierAccount(\"a4391cd4ab974f478f55dc08b5c8e3b3\")\n .metadata(\"SHIPMENT #1\")\n .servicelevelToken(\"fedex_ground\")\n .build(),\n BatchShipmentCreateRequest.builder()\n .shipment(ShipmentCreateRequest.builder()\n .addressFrom(AddressFrom.of(AddressCreateRequest.builder()\n .country(\"US\")\n .name(\"Shwan Ippotle\")\n .company(\"Shippo\")\n .street1(\"215 Clayton St.\")\n .street3(\"\")\n .streetNo(\"\")\n .city(\"San Francisco\")\n .state(\"CA\")\n .zip(\"94117\")\n .phone(\"+1 555 341 9393\")\n .email(\"shippotle@shippo.com\")\n .isResidential(true)\n .metadata(\"Customer ID 123456\")\n .validate(true)\n .build()))\n .addressTo(AddressTo.of(AddressCreateRequest.builder()\n .country(\"US\")\n .name(\"Shwan Ippotle\")\n .company(\"Shippo\")\n .street1(\"215 Clayton St.\")\n .street3(\"\")\n .streetNo(\"\")\n .city(\"San Francisco\")\n .state(\"CA\")\n .zip(\"94117\")\n .phone(\"+1 555 341 9393\")\n .email(\"shippotle@shippo.com\")\n .isResidential(true)\n .metadata(\"Customer ID 123456\")\n .validate(true)\n .build()))\n .parcels(List.of(\n Parcels.of(ParcelCreateFromTemplateRequest.builder()\n .massUnit(WeightUnitEnum.LB)\n .weight(\"1\")\n .template(ParcelTemplateEnumSet.of(ParcelTemplateDPDUKEnum.DPDUK_EXPRESS_PAK))\n .extra(ParcelExtra.builder()\n .cod(Cod.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .paymentMethod(PaymentMethod.CASH)\n .build())\n .insurance(ParcelInsurance.builder()\n .amount(\"5.5\")\n .content(\"Laptop\")\n .currency(\"USD\")\n .provider(ParcelInsuranceProvider.UPS)\n .build())\n .build())\n .metadata(\"Customer ID 123456\")\n .build()),\n Parcels.of(ParcelCreateFromTemplateRequest.builder()\n .massUnit(WeightUnitEnum.LB)\n .weight(\"1\")\n .template(ParcelTemplateEnumSet.of(ParcelTemplateDHLeCommerceEnum.DH_LE_C_IRREGULAR))\n .extra(ParcelExtra.builder()\n .cod(Cod.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .paymentMethod(PaymentMethod.CASH)\n .build())\n .insurance(ParcelInsurance.builder()\n .amount(\"5.5\")\n .content(\"Laptop\")\n .currency(\"USD\")\n .provider(ParcelInsuranceProvider.UPS)\n .build())\n .build())\n .metadata(\"Customer ID 123456\")\n .build())))\n .extra(ShipmentExtra.builder()\n .accountsReceivableCustomerAccount(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .appropriationNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .billOfLadingNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .cod(Cod.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .paymentMethod(PaymentMethod.CASH)\n .build())\n .codNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .customerReference(CustomerReference.builder()\n .refSort(1L)\n .build())\n .dealerOrderNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .deptNumber(DepartmentNumber.builder()\n .refSort(3L)\n .build())\n .fdaProductCode(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .insurance(Insurance.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .build())\n .invoiceNumber(InvoiceNumber.builder()\n .refSort(2L)\n .build())\n .manifestNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .modelNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .partNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .poNumber(PoNumber.builder()\n .refSort(2L)\n .build())\n .productionCode(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .purchaseRequestNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .rmaNumber(RmaNumber.builder()\n .refSort(1L)\n .build())\n .salespersonNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .serialNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .storeNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .transactionReferenceNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .build())\n .metadata(\"Customer ID 123456\")\n .shipmentDate(\"2021-03-22T12:00:00Z\")\n .addressReturn(AddressReturn.of(AddressCreateRequest.builder()\n .country(\"US\")\n .name(\"Shwan Ippotle\")\n .company(\"Shippo\")\n .street1(\"215 Clayton St.\")\n .street3(\"\")\n .streetNo(\"\")\n .city(\"San Francisco\")\n .state(\"CA\")\n .zip(\"94117\")\n .phone(\"+1 555 341 9393\")\n .email(\"shippotle@shippo.com\")\n .isResidential(true)\n .metadata(\"Customer ID 123456\")\n .validate(true)\n .build()))\n .customsDeclaration(ShipmentCreateRequestCustomsDeclaration.of(CustomsDeclarationCreateRequest.builder()\n .certify(true)\n .certifySigner(\"Shawn Ippotle\")\n .contentsType(CustomsDeclarationContentsTypeEnum.MERCHANDISE)\n .items(List.of(\n CustomsItemCreateRequest.builder()\n .description(\"T-Shirt\")\n .massUnit(WeightUnitEnum.LB)\n .netWeight(\"5\")\n .originCountry(\"\u003cvalue>\")\n .quantity(20L)\n .valueAmount(\"200\")\n .valueCurrency(\"USD\")\n .metadata(\"Order ID \\\"123454\\\"\")\n .skuCode(\"HM-123\")\n .hsCode(\"0901.21\")\n .build()))\n .nonDeliveryOption(CustomsDeclarationNonDeliveryOptionEnum.RETURN)\n .b13aFilingOption(CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY)\n .contentsExplanation(\"T-Shirt purchase\")\n .dutiesPayor(DutiesPayor.builder()\n .account(\"2323434543\")\n .type(CustomsDeclarationCreateRequestType.THIRD_PARTY)\n .address(CustomsDeclarationCreateRequestAddress.builder()\n .name(\"Patrick Kavanagh\")\n .zip(\"80331\")\n .country(\"DE\")\n .build())\n .build())\n .exporterIdentification(CustomsExporterIdentification.builder()\n .eoriNumber(\"PL123456790ABCDE\")\n .taxId(CustomsTaxIdentification.builder()\n .number(\"123456789\")\n .type(CustomsTaxIdentificationType.EIN)\n .build())\n .build())\n .invoice(\"#123123\")\n .metadata(\"Order ID #123123\")\n .addressImporter(AddressImporter.builder()\n .name(\"Shwan Ippotle\")\n .company(\"Shippo\")\n .street1(\"Blumenstraße\")\n .street3(\"\")\n .streetNo(\"22\")\n .city(\"München\")\n .state(\"CA\")\n .zip(\"80331\")\n .country(\"DE\")\n .phone(\"80331\")\n .email(\"shippotle@shippo.com\")\n .isResidential(true)\n .build())\n .eelPfc(CustomsDeclarationEelPfcEnum.NOEEI3037_A)\n .incoterm(CustomsDeclarationIncotermEnum.DDP)\n .test(true)\n .build()))\n .carrierAccounts(List.of(\n \"065a4a8c10d24a34ab932163a1b87f52\",\n \"73f706f4bdb94b54a337563840ce52b0\"))\n .build())\n .carrierAccount(\"a4391cd4ab974f478f55dc08b5c8e3b3\")\n .metadata(\"SHIPMENT #1\")\n .servicelevelToken(\"fedex_ground\")\n .build(),\n BatchShipmentCreateRequest.builder()\n .shipment(ShipmentCreateRequest.builder()\n .addressFrom(AddressFrom.of(\"d799c2679e644279b59fe661ac8fa488\"))\n .addressTo(AddressTo.of(AddressCreateRequest.builder()\n .country(\"US\")\n .name(\"Shwan Ippotle\")\n .company(\"Shippo\")\n .street1(\"215 Clayton St.\")\n .street3(\"\")\n .streetNo(\"\")\n .city(\"San Francisco\")\n .state(\"CA\")\n .zip(\"94117\")\n .phone(\"+1 555 341 9393\")\n .email(\"shippotle@shippo.com\")\n .isResidential(true)\n .metadata(\"Customer ID 123456\")\n .validate(true)\n .build()))\n .parcels(List.of(\n Parcels.of(\"\u003cvalue>\")))\n .extra(ShipmentExtra.builder()\n .accountsReceivableCustomerAccount(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .appropriationNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .billOfLadingNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .cod(Cod.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .paymentMethod(PaymentMethod.CASH)\n .build())\n .codNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .customerReference(CustomerReference.builder()\n .refSort(1L)\n .build())\n .dealerOrderNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .deptNumber(DepartmentNumber.builder()\n .refSort(3L)\n .build())\n .fdaProductCode(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .insurance(Insurance.builder()\n .amount(\"5.5\")\n .currency(\"USD\")\n .build())\n .invoiceNumber(InvoiceNumber.builder()\n .refSort(2L)\n .build())\n .manifestNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .modelNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .partNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .poNumber(PoNumber.builder()\n .refSort(2L)\n .build())\n .productionCode(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .purchaseRequestNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .rmaNumber(RmaNumber.builder()\n .refSort(1L)\n .build())\n .salespersonNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .serialNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .storeNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .transactionReferenceNumber(UPSReferenceFields.builder()\n .prefix(\"ABC\")\n .value(\"value\")\n .refSort(1L)\n .build())\n .build())\n .metadata(\"Customer ID 123456\")\n .shipmentDate(\"2021-03-22T12:00:00Z\")\n .addressReturn(AddressReturn.of(\"d799c2679e644279b59fe661ac8fa488\"))\n .customsDeclaration(ShipmentCreateRequestCustomsDeclaration.of(\"adcfdddf8ec64b84ad22772bce3ea37a\"))\n .carrierAccounts(List.of(\n \"065a4a8c10d24a34ab932163a1b87f52\",\n \"73f706f4bdb94b54a337563840ce52b0\"))\n .build())\n .carrierAccount(\"a4391cd4ab974f478f55dc08b5c8e3b3\")\n .metadata(\"SHIPMENT #1\")\n .servicelevelToken(\"fedex_ground\")\n .build()))\n .call();\n\n if (res.batch().isPresent()) {\n // handle response\n }\n }\n}"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"2f8a8305-7370-475d-9591-0f48397a3e29":{"description":"Object ID of the batch","in":"path","name":"BatchId","required":true,"schema":{"type":"string","isRequired":true,"description":"Object ID of the batch","uniqueKey":"","typeLabel":"string"}},"87f13980-9979-4271-9031-6a8401f4307e":{"description":"Optional string used to pick a non-default API version to use. See our [API version](https://docs.goshippo.com/docs/api_concepts/apiversioning/) guide.","in":"header","name":"SHIPPO-API-VERSION","schema":{"type":"string","example":"2018-02-08","default":"2018-02-08","x-default":"2018-02-08","description":"Optional string used to pick a non-default API version to use. See our [API version](https://docs.goshippo.com/docs/api_concepts/apiversioning/) guide.","uniqueKey":"","typeLabel":"string"},"x-speakeasy-globals-hidden":true},"5bb767ce-3d11-477a-b75b-d84f8b2a4a5a":{"description":"Optional. The object ID of a Managed Shippo Account. Platform accounts set this to make the request on behalf of one of their managed accounts. See the [Platform accounts guide](https://docs.goshippo.com/platform-accounts/platform-using-accounts).","in":"header","name":"SHIPPO-ACCOUNT-ID","required":false,"schema":{"type":"string","isRequired":false,"description":"Optional. The object ID of a Managed Shippo Account. Platform accounts set this to make the request on behalf of one of their managed accounts. See the [Platform accounts guide](https://docs.goshippo.com/platform-accounts/platform-using-accounts).","uniqueKey":"","typeLabel":"string"},"x-speakeasy-globals-hidden":true}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"items":{"type":"object","required":["shipment"],"properties":{"shipment":{"type":"object","required":["address_to","address_from","parcels"],"properties":{"address_from":{"oneOf":[{"type":"object","description":"Address represents the address as retrieved from the database","required":["country"],"properties":{"country":{"example":"US","type":"string","description":"ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we recommend using country codes like `US` or `DE`.\nIf using country names, please ensure they are spelled correctly and in English. Country names are converted to country codes.\nRefer to this [guide](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) for a list of country codes.\nSending a country is always required.","isRequired":true,"uniqueKey":"items.[INDEX].shipment.address_from.oneOf.0.country","typeLabel":"string"},"name":{"description":"**required for purchase**\n\nFirst and Last Name of the addressee\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Either company or name required; No length validation (first 35 chars printed on label) |","example":"Shwan Ippotle","type":"string","maxLength":100,"uniqueKey":"items.[INDEX].shipment.address_from.oneOf.0.name","typeLabel":"string"},"company":{"example":"Shippo","type":"string","maxLength":100,"description":"Company Name\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 35 characters; Either company or name required |","uniqueKey":"items.[INDEX].shipment.address_from.oneOf.0.company","typeLabel":"string"},"street1":{"description":"**required for purchase**\n\nFirst street line. Usually street number and street name (except for DHL Germany, see street_no).\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | At least one street line required; Max 35 characters per line |","example":"215 Clayton St.","type":"string","maxLength":121,"uniqueKey":"items.[INDEX].shipment.address_from.oneOf.0.street1","typeLabel":"string"},"street2":{"type":"string","maxLength":100,"description":"Second street line.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | At least one street line required; Max 35 characters per line |","uniqueKey":"items.[INDEX].shipment.address_from.oneOf.0.street2","typeLabel":"string"},"street3":{"type":"string","maxLength":100,"example":"","description":"Third street line.\nOnly accepted for USPS international shipments, UPS domestic and UPS international shipments.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | At least one street line required; Max 35 characters per line |","uniqueKey":"items.[INDEX].shipment.address_from.oneOf.0.street3","typeLabel":"string"},"street_no":{"type":"string","example":"","description":"Street number of the addressed building.\nThis field can be included in street1 for all carriers except for DHL Germany.","uniqueKey":"items.[INDEX].shipment.address_from.oneOf.0.street_no","typeLabel":"string"},"city":{"description":"**required for purchase**\n\nName of a city. When creating a Quote Address, sending a city is optional but will yield more accurate Rates.\nPlease bear in mind that city names may be ambiguous (there are 34 Springfields in the US). Pass in a state\nor a ZIP code (see below), if known, it will yield more accurate results.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Required; Max 35 characters |","example":"San Francisco","type":"string","maxLength":100,"uniqueKey":"items.[INDEX].shipment.address_from.oneOf.0.city","typeLabel":"string"},"state":{"description":"**required for purchase for some countries**\n\nState/Province values are required for shipments from/to the US, AU, and CA. UPS requires province for some\ncountries (i.e Ireland). To receive more accurate quotes, passing this field is recommended. Most carriers\nonly accept two or three character state abbreviations.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Required if country requires state; Max 2 characters for US, CA, PR |","example":"CA","type":"string","maxLength":100,"uniqueKey":"items.[INDEX].shipment.address_from.oneOf.0.state","typeLabel":"string"},"zip":{"description":"**required for purchase**\n\nPostal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more\naccurate Rates.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 10 characters |","example":"94117","type":"string","maxLength":20,"uniqueKey":"items.[INDEX].shipment.address_from.oneOf.0.zip","typeLabel":"string"},"phone":{"example":"+1 555 341 9393","type":"string","maxLength":50,"description":"Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This\nincreases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Required; Min 1, max 15 characters |\n| USPS | Sender phone required for shipments during label purchase; Min 8, max 15 digits |","uniqueKey":"items.[INDEX].shipment.address_from.oneOf.0.phone","typeLabel":"string"},"email":{"example":"shippotle@shippo.com","type":"string","maxLength":254,"description":"E-mail address of the contact person, RFC3696/5321-compliant.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 80 characters |\n| USPS | Sender email required for shipments during label purchase |","uniqueKey":"items.[INDEX].shipment.address_from.oneOf.0.email","typeLabel":"string"},"is_residential":{"example":true,"type":"boolean","uniqueKey":"items.[INDEX].shipment.address_from.oneOf.0.is_residential","typeLabel":"boolean"},"metadata":{"example":"Customer ID 123456","type":"string","maxLength":100,"description":"A string of up to 100 characters that can be filled with any additional information you want to attach to the object.","uniqueKey":"items.[INDEX].shipment.address_from.oneOf.0.metadata","typeLabel":"string"},"validate":{"description":"Set to true to validate Address object.","example":true,"type":"boolean","uniqueKey":"items.[INDEX].shipment.address_from.oneOf.0.validate","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"items.[INDEX].shipment.address_from.oneOf.0","typeLabel":"object"},{"type":"string","description":"[Address](/shippoapi/public-api/addresses) `object_id` of a previously created address.","example":"d799c2679e644279b59fe661ac8fa488","isRequired":true,"uniqueKey":"items.[INDEX].shipment.address_from.oneOf.1","typeLabel":"string"}],"isRequired":true,"uniqueKey":"items.[INDEX].shipment.address_from","typeLabel":"object | string"},"address_to":{"oneOf":[{"type":"object","description":"Address represents the address as retrieved from the database","required":["country"],"properties":{"country":{"example":"US","type":"string","description":"ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we recommend using country codes like `US` or `DE`.\nIf using country names, please ensure they are spelled correctly and in English. Country names are converted to country codes.\nRefer to this [guide](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) for a list of country codes.\nSending a country is always required.","isRequired":true,"uniqueKey":"items.[INDEX].shipment.address_to.oneOf.0.country","typeLabel":"string"},"name":{"description":"**required for purchase**\n\nFirst and Last Name of the addressee\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Either company or name required; No length validation (first 35 chars printed on label) |","example":"Shwan Ippotle","type":"string","maxLength":100,"uniqueKey":"items.[INDEX].shipment.address_to.oneOf.0.name","typeLabel":"string"},"company":{"example":"Shippo","type":"string","maxLength":100,"description":"Company Name\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 35 characters; Either company or name required |","uniqueKey":"items.[INDEX].shipment.address_to.oneOf.0.company","typeLabel":"string"},"street1":{"description":"**required for purchase**\n\nFirst street line. Usually street number and street name (except for DHL Germany, see street_no).\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | At least one street line required; Max 35 characters per line |","example":"215 Clayton St.","type":"string","maxLength":121,"uniqueKey":"items.[INDEX].shipment.address_to.oneOf.0.street1","typeLabel":"string"},"street2":{"type":"string","maxLength":100,"description":"Second street line.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | At least one street line required; Max 35 characters per line |","uniqueKey":"items.[INDEX].shipment.address_to.oneOf.0.street2","typeLabel":"string"},"street3":{"type":"string","maxLength":100,"example":"","description":"Third street line.\nOnly accepted for USPS international shipments, UPS domestic and UPS international shipments.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | At least one street line required; Max 35 characters per line |","uniqueKey":"items.[INDEX].shipment.address_to.oneOf.0.street3","typeLabel":"string"},"street_no":{"type":"string","example":"","description":"Street number of the addressed building.\nThis field can be included in street1 for all carriers except for DHL Germany.","uniqueKey":"items.[INDEX].shipment.address_to.oneOf.0.street_no","typeLabel":"string"},"city":{"description":"**required for purchase**\n\nName of a city. When creating a Quote Address, sending a city is optional but will yield more accurate Rates.\nPlease bear in mind that city names may be ambiguous (there are 34 Springfields in the US). Pass in a state\nor a ZIP code (see below), if known, it will yield more accurate results.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Required; Max 35 characters |","example":"San Francisco","type":"string","maxLength":100,"uniqueKey":"items.[INDEX].shipment.address_to.oneOf.0.city","typeLabel":"string"},"state":{"description":"**required for purchase for some countries**\n\nState/Province values are required for shipments from/to the US, AU, and CA. UPS requires province for some\ncountries (i.e Ireland). To receive more accurate quotes, passing this field is recommended. Most carriers\nonly accept two or three character state abbreviations.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Required if country requires state; Max 2 characters for US, CA, PR |","example":"CA","type":"string","maxLength":100,"uniqueKey":"items.[INDEX].shipment.address_to.oneOf.0.state","typeLabel":"string"},"zip":{"description":"**required for purchase**\n\nPostal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more\naccurate Rates.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 10 characters |","example":"94117","type":"string","maxLength":20,"uniqueKey":"items.[INDEX].shipment.address_to.oneOf.0.zip","typeLabel":"string"},"phone":{"example":"+1 555 341 9393","type":"string","maxLength":50,"description":"Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This\nincreases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Required; Min 1, max 15 characters |\n| USPS | Sender phone required for shipments during label purchase; Min 8, max 15 digits |","uniqueKey":"items.[INDEX].shipment.address_to.oneOf.0.phone","typeLabel":"string"},"email":{"example":"shippotle@shippo.com","type":"string","maxLength":254,"description":"E-mail address of the contact person, RFC3696/5321-compliant.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 80 characters |\n| USPS | Sender email required for shipments during label purchase |","uniqueKey":"items.[INDEX].shipment.address_to.oneOf.0.email","typeLabel":"string"},"is_residential":{"example":true,"type":"boolean","uniqueKey":"items.[INDEX].shipment.address_to.oneOf.0.is_residential","typeLabel":"boolean"},"metadata":{"example":"Customer ID 123456","type":"string","maxLength":100,"description":"A string of up to 100 characters that can be filled with any additional information you want to attach to the object.","uniqueKey":"items.[INDEX].shipment.address_to.oneOf.0.metadata","typeLabel":"string"},"validate":{"description":"Set to true to validate Address object.","example":true,"type":"boolean","uniqueKey":"items.[INDEX].shipment.address_to.oneOf.0.validate","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"items.[INDEX].shipment.address_to.oneOf.0","typeLabel":"object"},{"type":"string","description":"[Address](/shippoapi/public-api/addresses) `object_id` of a previously created address.","example":"d799c2679e644279b59fe661ac8fa489","isRequired":true,"uniqueKey":"items.[INDEX].shipment.address_to.oneOf.1","typeLabel":"string"}],"isRequired":true,"uniqueKey":"items.[INDEX].shipment.address_to","typeLabel":"object | string"},"parcels":{"type":"array","description":"List of parcels to be shipped.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 30 items |","items":{"oneOf":[{"type":"object","required":["length","width","height","distance_unit","weight","mass_unit"],"properties":{"mass_unit":{"description":"The unit used for weight.","enum":["g","kg","lb","oz"],"example":"lb","type":"string","isRequired":true,"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.mass_unit","typeLabel":"enum\u003cstring>"},"weight":{"description":"Weight of the parcel. Up to six digits in front and four digits after the decimal separator are accepted.","example":"1","type":"string","isRequired":true,"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.weight","typeLabel":"string"},"distance_unit":{"enum":["cm","in","ft","m","mm","yd"],"example":"in","type":"string","description":"The measure unit used for length, width and height.","isRequired":true,"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.distance_unit","typeLabel":"enum\u003cstring>"},"height":{"description":"Height of the parcel. Up to six digits in front and four digits after the decimal separator are accepted.","example":"1","type":"string","isRequired":true,"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.height","typeLabel":"string"},"length":{"description":"Length of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted.","example":"1","type":"string","isRequired":true,"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.length","typeLabel":"string"},"width":{"description":"Width of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted.","example":"1","type":"string","isRequired":true,"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.width","typeLabel":"string"},"extra":{"title":"Parcel Extra","x-tags":["Parcels"],"description":"An object holding optional extra services to be requested for each parcel in a multi-piece shipment.\nThe following values are supported for the `extra` field of the parcel object.","properties":{"COD":{"description":"Specify collection on delivery details (UPS only).","properties":{"amount":{"description":"Amount to be collected.","example":"5.5","type":"string","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.extra.COD.amount","typeLabel":"string"},"currency":{"description":"Currency for the amount to be collected. Currently only USD is supported for UPS.","example":"USD","type":"string","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.extra.COD.currency","typeLabel":"string"},"payment_method":{"description":"Secured funds include money orders, certified cheques and others (see [UPS](https://www.ups.com/content/us/en/shipping/time/service/value_added/cod.html) for details).\nIf no payment_method inputted the value defaults to \"ANY\".)","enum":["SECURED_FUNDS","CASH","ANY"],"example":"CASH","type":"string","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.extra.COD.payment_method","typeLabel":"enum\u003cstring>"}},"title":"COD Specify collection on delivery details (UPS only).","type":"object","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.extra.COD","typeLabel":"COD Specify collection on delivery details (UPS only). · object"},"insurance":{"description":"To add insurance to your parcel, specify `amount`, `content` and `currency`. If you do not want to add insurance to your parcel, do not set these parameters.","properties":{"amount":{"description":"Declared value of the goods you want to insure.","example":"5.5","type":"string","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.extra.insurance.amount","typeLabel":"string"},"content":{"description":"Description of parcel content.","example":"Laptop","type":"string","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.extra.insurance.content","typeLabel":"string"},"currency":{"description":"Currency for the amount value. Currently only USD is supported for FedEx and UPS.","example":"USD","type":"string","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.extra.insurance.currency","typeLabel":"string"},"provider":{"description":"To have insurance cover provided by a carrier directly instead of Shippo's provider (XCover), set provider to `FEDEX`, `UPS`, or `ONTRAC`.","example":"UPS","type":"string","enum":["FEDEX","UPS","ONTRAC"],"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.extra.insurance.provider","typeLabel":"enum\u003cstring>"}},"type":"object","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.extra.insurance","typeLabel":"object"},"reference_1":{"type":"string","maxLength":50,"description":"Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 40 characters (Express services); Max 30 characters (Ground services) |","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.extra.reference_1","typeLabel":"string"},"reference_2":{"type":"string","maxLength":50,"description":"Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 30 characters |","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.extra.reference_2","typeLabel":"string"}},"type":"object","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.extra","typeLabel":"Parcel Extra · object"},"metadata":{"type":"string","example":"Customer ID 123456","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0.metadata","typeLabel":"string"}},"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["template","weight","mass_unit"],"properties":{"mass_unit":{"description":"The unit used for weight.","enum":["g","kg","lb","oz"],"example":"lb","type":"string","isRequired":true,"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.mass_unit","typeLabel":"enum\u003cstring>"},"weight":{"description":"Weight of the parcel. Up to six digits in front and four digits after the decimal separator are accepted.","example":"1","type":"string","isRequired":true,"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.weight","typeLabel":"string"},"template":{"oneOf":[{"type":"string","title":"FedEx Parcel Template","description":"If template is passed, `length`, `width`, `height`, and `distance_unit` are not required","enum":["FedEx_Box_10kg","FedEx_Box_25kg","FedEx_Box_Extra_Large_1","FedEx_Box_Extra_Large_2","FedEx_Box_Large_1","FedEx_Box_Large_2","FedEx_Box_Medium_1","FedEx_Box_Medium_2","FedEx_Box_Small_1","FedEx_Box_Small_2","FedEx_Envelope","FedEx_Padded_Pak","FedEx_Pak_1","FedEx_Pak_2","FedEx_Tube","FedEx_XL_Pak"],"x-speakeasy-include":true,"isRequired":true,"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.template.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"string","title":"UPS Parcel Template","description":"If template is passed, `length`, `width`, `height`, and `distance_unit` are not required","enum":["UPS_Box_10kg","UPS_Box_25kg","UPS_Express_Box","UPS_Express_Box_Large","UPS_Express_Box_Medium","UPS_Express_Box_Small","UPS_Express_Envelope","UPS_Express_Hard_Pak","UPS_Express_Legal_Envelope","UPS_Express_Pak","UPS_Express_Tube","UPS_Laboratory_Pak","UPS_MI_BPM","UPS_MI_BPM_Flat","UPS_MI_BPM_Parcel","UPS_MI_First_Class","UPS_MI_Flat","UPS_MI_Irregular","UPS_MI_Machinable","UPS_MI_MEDIA_MAIL","UPS_MI_Parcel_Post","UPS_MI_Priority","UPS_MI_Standard_Flat","UPS_Pad_Pak","UPS_Pallet"],"x-speakeasy-include":true,"isRequired":true,"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.template.oneOf.1","typeLabel":"enum\u003cstring>"},{"type":"string","title":"USPS Parcel Template","description":"If template is passed, `length`, `width`, `height`, and `distance_unit` are not required","enum":["USPS_FlatRateCardboardEnvelope","USPS_FlatRateEnvelope","USPS_FlatRateGiftCardEnvelope","USPS_FlatRateLegalEnvelope","USPS_FlatRatePaddedEnvelope","USPS_FlatRateWindowEnvelope","USPS_IrregularParcel","USPS_LargeFlatRateBoardGameBox","USPS_LargeFlatRateBox","USPS_APOFlatRateBox","USPS_LargeVideoFlatRateBox","USPS_MediumFlatRateBox1","USPS_MediumFlatRateBox2","USPS_RegionalRateBoxA1","USPS_RegionalRateBoxA2","USPS_RegionalRateBoxB1","USPS_RegionalRateBoxB2","USPS_SmallFlatRateBox","USPS_SmallFlatRateEnvelope","USPS_SoftPack"],"x-speakeasy-include":true,"isRequired":true,"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.template.oneOf.2","typeLabel":"enum\u003cstring>"},{"type":"string","title":"DHL eCommerce Parcel Template","description":"If template is passed, `length`, `width`, `height`, and `distance_unit` are not required","enum":["DHLeC_Irregular","DHLeC_SM_Flats"],"x-speakeasy-include":true,"isRequired":true,"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.template.oneOf.3","typeLabel":"enum\u003cstring>"},{"type":"string","title":"DPD UK Parcel Template","description":"If template is passed, `length`, `width`, `height`, and `distance_unit` are not required","enum":["DPD_UK_Express_Pak"],"x-speakeasy-include":true,"isRequired":true,"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.template.oneOf.4","typeLabel":"enum\u003cstring>"},{"type":"string","title":"Aramex Australia Parcel Template","description":"If template is passed, `length`, `width`, `height`, and `distance_unit` are not required","enum":["Fastway_Australia_Satchel_A2","Fastway_Australia_Satchel_A3","Fastway_Australia_Satchel_A4","Fastway_Australia_Satchel_A5"],"x-speakeasy-include":true,"isRequired":true,"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.template.oneOf.5","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.template","typeLabel":"enum\u003cstring>"},"extra":{"title":"Parcel Extra","x-tags":["Parcels"],"description":"An object holding optional extra services to be requested for each parcel in a multi-piece shipment.\nThe following values are supported for the `extra` field of the parcel object.","properties":{"COD":{"description":"Specify collection on delivery details (UPS only).","properties":{"amount":{"description":"Amount to be collected.","example":"5.5","type":"string","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.extra.COD.amount","typeLabel":"string"},"currency":{"description":"Currency for the amount to be collected. Currently only USD is supported for UPS.","example":"USD","type":"string","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.extra.COD.currency","typeLabel":"string"},"payment_method":{"description":"Secured funds include money orders, certified cheques and others (see [UPS](https://www.ups.com/content/us/en/shipping/time/service/value_added/cod.html) for details).\nIf no payment_method inputted the value defaults to \"ANY\".)","enum":["SECURED_FUNDS","CASH","ANY"],"example":"CASH","type":"string","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.extra.COD.payment_method","typeLabel":"enum\u003cstring>"}},"title":"COD Specify collection on delivery details (UPS only).","type":"object","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.extra.COD","typeLabel":"COD Specify collection on delivery details (UPS only). · object"},"insurance":{"description":"To add insurance to your parcel, specify `amount`, `content` and `currency`. If you do not want to add insurance to your parcel, do not set these parameters.","properties":{"amount":{"description":"Declared value of the goods you want to insure.","example":"5.5","type":"string","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.extra.insurance.amount","typeLabel":"string"},"content":{"description":"Description of parcel content.","example":"Laptop","type":"string","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.extra.insurance.content","typeLabel":"string"},"currency":{"description":"Currency for the amount value. Currently only USD is supported for FedEx and UPS.","example":"USD","type":"string","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.extra.insurance.currency","typeLabel":"string"},"provider":{"description":"To have insurance cover provided by a carrier directly instead of Shippo's provider (XCover), set provider to `FEDEX`, `UPS`, or `ONTRAC`.","example":"UPS","type":"string","enum":["FEDEX","UPS","ONTRAC"],"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.extra.insurance.provider","typeLabel":"enum\u003cstring>"}},"type":"object","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.extra.insurance","typeLabel":"object"},"reference_1":{"type":"string","maxLength":50,"description":"Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 40 characters (Express services); Max 30 characters (Ground services) |","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.extra.reference_1","typeLabel":"string"},"reference_2":{"type":"string","maxLength":50,"description":"Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 30 characters |","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.extra.reference_2","typeLabel":"string"}},"type":"object","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.extra","typeLabel":"Parcel Extra · object"},"metadata":{"type":"string","example":"Customer ID 123456","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1.metadata","typeLabel":"string"}},"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"string","description":"[Parcel](/shippoapi/public-api/parcels) `object_id` of a previously created parcel.","uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX].oneOf.2","typeLabel":"string"}],"uniqueKey":"items.[INDEX].shipment.parcels.items.[INDEX]","typeLabel":"object · object · string"},"isRequired":true,"uniqueKey":"items.[INDEX].shipment.parcels","typeLabel":"object · object · string[]"},"extra":{"title":"Shipment Extra","x-tags":["Shipments"],"description":"An object holding optional extra services to be requested.","properties":{"accounts_receivable_customer_account":{"properties":{"prefix":{"type":"string","description":"Custom prefix text.","example":"ABC","uniqueKey":"items.[INDEX].shipment.extra.accounts_receivable_customer_account.prefix","typeLabel":"string"},"value":{"type":"string","description":"Label reference text. 35 character limit.","example":"value","uniqueKey":"items.[INDEX].shipment.extra.accounts_receivable_customer_account.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.accounts_receivable_customer_account.ref_sort","typeLabel":"integer"}},"description":"UPS only. Adds custom accounts receivable customer account reference to UPS labels.","type":"object","uniqueKey":"items.[INDEX].shipment.extra.accounts_receivable_customer_account","typeLabel":"object"},"alcohol":{"description":"Indicates that a shipment contains Alcohol (Fedex and UPS only).","properties":{"contains_alcohol":{"type":"boolean","description":"Mandatory for Fedex and UPS. Specifies that the package contains Alcohol.","uniqueKey":"items.[INDEX].shipment.extra.alcohol.contains_alcohol","typeLabel":"boolean"},"recipient_type":{"enum":["licensee","consumer"],"description":"Mandatory for Fedex only. License type of the recipient of the Alcohol Package.","type":"string","uniqueKey":"items.[INDEX].shipment.extra.alcohol.recipient_type","typeLabel":"enum\u003cstring>"}},"type":"object","uniqueKey":"items.[INDEX].shipment.extra.alcohol","typeLabel":"object"},"ancillary_endorsement":{"enum":["FORWARDING_SERVICE_REQUESTED","RETURN_SERVICE_REQUESTED"],"description":"Specify an ancillary service endorsement to provide the USPS with instructions on how to handle undeliverable-as-addressed pieces (DHL eCommerce only).","type":"string","uniqueKey":"items.[INDEX].shipment.extra.ancillary_endorsement","typeLabel":"enum\u003cstring>"},"appropriation_number":{"properties":{"prefix":{"type":"string","description":"Custom prefix text.","example":"ABC","uniqueKey":"items.[INDEX].shipment.extra.appropriation_number.prefix","typeLabel":"string"},"value":{"type":"string","description":"Label reference text. 35 character limit.","example":"value","uniqueKey":"items.[INDEX].shipment.extra.appropriation_number.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.appropriation_number.ref_sort","typeLabel":"integer"}},"description":"UPS only. Adds custom appropriation number reference to UPS labels.","type":"object","uniqueKey":"items.[INDEX].shipment.extra.appropriation_number","typeLabel":"object"},"authority_to_leave":{"type":"boolean","description":"Request `true` to give carrier permission to leave the parcel in a safe place if no one answers the door (where supported). When set to `false`, if no one is available to receive the item, the parcel will not be left (*surcharges may be applicable).","uniqueKey":"items.[INDEX].shipment.extra.authority_to_leave","typeLabel":"boolean"},"bill_of_lading_number":{"properties":{"prefix":{"type":"string","description":"Custom prefix text.","example":"ABC","uniqueKey":"items.[INDEX].shipment.extra.bill_of_lading_number.prefix","typeLabel":"string"},"value":{"type":"string","description":"Label reference text. 35 character limit.","example":"value","uniqueKey":"items.[INDEX].shipment.extra.bill_of_lading_number.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.bill_of_lading_number.ref_sort","typeLabel":"integer"}},"description":"UPS only. Adds custom bill of lading number reference to UPS labels.","type":"object","uniqueKey":"items.[INDEX].shipment.extra.bill_of_lading_number","typeLabel":"object"},"billing":{"description":"Specify billing details (UPS, FedEx, and DHL Germany only).","properties":{"account":{"type":"string","description":"Account number to be billed. (For DHL Germany, leave this field blank.)","uniqueKey":"items.[INDEX].shipment.extra.billing.account","typeLabel":"string"},"country":{"type":"string","format":"iso-3166","description":"Country iso2 code of account number to be billed (required for UPS third party billing only).","uniqueKey":"items.[INDEX].shipment.extra.billing.country","typeLabel":"string\u003ciso-3166>"},"participation_code":{"type":"string","description":"2 digit code used to override your default participation code associated with your DHL Germany account.","uniqueKey":"items.[INDEX].shipment.extra.billing.participation_code","typeLabel":"string"},"type":{"enum":["SENDER","RECIPIENT","THIRD_PARTY","THIRD_PARTY_CONSIGNEE","COLLECT"],"description":"Party to be billed. (Leave blank for DHL Germany.)","type":"string","uniqueKey":"items.[INDEX].shipment.extra.billing.type","typeLabel":"enum\u003cstring>"},"zip":{"type":"string","description":"ZIP code of account number to be billed (required for UPS if there is a zip on the billing account).","uniqueKey":"items.[INDEX].shipment.extra.billing.zip","typeLabel":"string"}},"type":"object","uniqueKey":"items.[INDEX].shipment.extra.billing","typeLabel":"object"},"bypass_address_validation":{"type":"boolean","description":"Bypasses address validation (USPS, UPS, \u0026 LaserShip only).","uniqueKey":"items.[INDEX].shipment.extra.bypass_address_validation","typeLabel":"boolean"},"carbon_neutral":{"type":"boolean","description":"Request carbon offsets by passing true (UPS only).","uniqueKey":"items.[INDEX].shipment.extra.carbon_neutral","typeLabel":"boolean"},"carrier_hub_id":{"type":"string","description":"Identifies the carrier injection site.","uniqueKey":"items.[INDEX].shipment.extra.carrier_hub_id","typeLabel":"string"},"carrier_hub_travel_time":{"type":"integer","description":"Travel time in hours from fulfillment center to carrier injection site.","uniqueKey":"items.[INDEX].shipment.extra.carrier_hub_travel_time","typeLabel":"integer"},"COD":{"description":"Specify collection on delivery details (UPS only).","properties":{"amount":{"description":"Amount to be collected.","example":"5.5","type":"string","uniqueKey":"items.[INDEX].shipment.extra.COD.amount","typeLabel":"string"},"currency":{"description":"Currency for the amount to be collected. Currently only USD is supported for UPS.","example":"USD","type":"string","uniqueKey":"items.[INDEX].shipment.extra.COD.currency","typeLabel":"string"},"payment_method":{"description":"Secured funds include money orders, certified cheques and others (see [UPS](https://www.ups.com/content/us/en/shipping/time/service/value_added/cod.html) for details).\nIf no payment_method inputted the value defaults to \"ANY\".)","enum":["SECURED_FUNDS","CASH","ANY"],"example":"CASH","type":"string","uniqueKey":"items.[INDEX].shipment.extra.COD.payment_method","typeLabel":"enum\u003cstring>"}},"title":"COD Specify collection on delivery details (UPS only).","type":"object","uniqueKey":"items.[INDEX].shipment.extra.COD","typeLabel":"COD Specify collection on delivery details (UPS only). · object"},"cod_number":{"properties":{"prefix":{"type":"string","description":"Custom prefix text.","example":"ABC","uniqueKey":"items.[INDEX].shipment.extra.cod_number.prefix","typeLabel":"string"},"value":{"type":"string","description":"Label reference text. 35 character limit.","example":"value","uniqueKey":"items.[INDEX].shipment.extra.cod_number.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.cod_number.ref_sort","typeLabel":"integer"}},"description":"UPS only. Adds custom COD number reference to UPS labels.","type":"object","uniqueKey":"items.[INDEX].shipment.extra.cod_number","typeLabel":"object"},"container_type":{"type":"string","description":"Specify container type.","uniqueKey":"items.[INDEX].shipment.extra.container_type","typeLabel":"string"},"critical_pull_time":{"type":"string","description":"Carrier arrival time to pickup packages from the fulfillment center.\nUTC format: `%Y-%m-%dT%H:%M:%SZ`","uniqueKey":"items.[INDEX].shipment.extra.critical_pull_time","typeLabel":"string"},"customer_branch":{"type":"string","description":"Specify customer branch (Lasership only).","uniqueKey":"items.[INDEX].shipment.extra.customer_branch","typeLabel":"string"},"customer_reference":{"description":"Specify the reference field on the label (FedEx and UPS only).","properties":{"prefix":{"type":"string","description":"Custom prefix for customer reference field (ZPL labels only). Up to 11 characters, including trailing spaces. Empty string indicates removal of default prefix. To use the default prefix, do not include this property.","uniqueKey":"items.[INDEX].shipment.extra.customer_reference.prefix","typeLabel":"string"},"value":{"type":"string","maxLength":40,"description":"Optional text to be printed on the shipping label for customer reference. Up to 40 characters. If\nthis is provided, reference_1 will be ignored.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 40 characters (Express services); Max 30 characters (Ground services) |","uniqueKey":"items.[INDEX].shipment.extra.customer_reference.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.customer_reference.ref_sort","typeLabel":"integer"}},"type":"object","uniqueKey":"items.[INDEX].shipment.extra.customer_reference","typeLabel":"object"},"dangerous_goods":{"description":"Container for specifying the presence of dangerous materials. This is specific to USPS, and if any contents are provided, only certain USPS service levels will be eligible. For more information, see our [guide on hazardous or dangerous materials shipping](https://docs.goshippo.com/docs/shipments/hazmat/).","properties":{"contains":{"type":"boolean","description":"Indicates if the shipment contains dangerous goods.","uniqueKey":"items.[INDEX].shipment.extra.dangerous_goods.contains","typeLabel":"boolean"},"biological_material":{"description":"Container for specifying the presence of biological material.","properties":{"contains":{"type":"boolean","description":"Indicates if the shipment contains biological material.","uniqueKey":"items.[INDEX].shipment.extra.dangerous_goods.biological_material.contains","typeLabel":"boolean"}},"type":"object","uniqueKey":"items.[INDEX].shipment.extra.dangerous_goods.biological_material","typeLabel":"object"},"lithium_batteries":{"description":"Container for specifying the presence of lithium batteries.","properties":{"contains":{"type":"boolean","description":"Indicates if the shipment contains lithium batteries.","uniqueKey":"items.[INDEX].shipment.extra.dangerous_goods.lithium_batteries.contains","typeLabel":"boolean"}},"type":"object","uniqueKey":"items.[INDEX].shipment.extra.dangerous_goods.lithium_batteries","typeLabel":"object"}},"type":"object","uniqueKey":"items.[INDEX].shipment.extra.dangerous_goods","typeLabel":"object"},"dangerous_goods_code":{"enum":["01","02","03","04","05","06","07","08","09"],"description":"Dangerous Goods Code (DHL eCommerce only). See [Category Codes](https://api-legacy.dhlecs.com/docs/v2/appendix.html#dangerous-goods)","type":"string","uniqueKey":"items.[INDEX].shipment.extra.dangerous_goods_code","typeLabel":"enum\u003cstring>"},"dealer_order_number":{"properties":{"prefix":{"type":"string","description":"Custom prefix text.","example":"ABC","uniqueKey":"items.[INDEX].shipment.extra.dealer_order_number.prefix","typeLabel":"string"},"value":{"type":"string","description":"Label reference text. 35 character limit.","example":"value","uniqueKey":"items.[INDEX].shipment.extra.dealer_order_number.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.dealer_order_number.ref_sort","typeLabel":"integer"}},"description":"UPS only. Adds custom dealer order number reference to UPS labels.","type":"object","uniqueKey":"items.[INDEX].shipment.extra.dealer_order_number","typeLabel":"object"},"delivery_instructions":{"type":"string","description":"Specify delivery instructions. Up to 500 characters (Purolator accepts up to 30 characters). (FedEx, OnTrac and Purolator only).","uniqueKey":"items.[INDEX].shipment.extra.delivery_instructions","typeLabel":"string"},"dept_number":{"description":"Specify the department number field on the label (FedEx and UPS only).","properties":{"prefix":{"type":"string","description":"Custom prefix for department number field (ZPL labels only). Up to 11 characters, including trailing spaces. Empty string indicates removal of default prefix. To use the default prefix, do not include this property.","uniqueKey":"items.[INDEX].shipment.extra.dept_number.prefix","typeLabel":"string"},"value":{"type":"string","maxLength":40,"description":"Optional text to be printed on the shipping label for department number. Up to 40 characters.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 30 characters |","uniqueKey":"items.[INDEX].shipment.extra.dept_number.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":3,"uniqueKey":"items.[INDEX].shipment.extra.dept_number.ref_sort","typeLabel":"integer"}},"type":"object","uniqueKey":"items.[INDEX].shipment.extra.dept_number","typeLabel":"object"},"dry_ice":{"description":"Specify that the package contains Dry Ice (FedEx, Veho, and UPS only).","properties":{"contains_dry_ice":{"type":"boolean","description":"Mandatory. Specifies that the package contains Dry Ice.","uniqueKey":"items.[INDEX].shipment.extra.dry_ice.contains_dry_ice","typeLabel":"boolean"},"weight":{"type":"string","description":"Mandatory. Units must be in Kilograms. Cannot be greater than package weight.","uniqueKey":"items.[INDEX].shipment.extra.dry_ice.weight","typeLabel":"string"}},"type":"object","uniqueKey":"items.[INDEX].shipment.extra.dry_ice","typeLabel":"object"},"fda_product_code":{"properties":{"prefix":{"type":"string","description":"Custom prefix text.","example":"ABC","uniqueKey":"items.[INDEX].shipment.extra.fda_product_code.prefix","typeLabel":"string"},"value":{"type":"string","description":"Label reference text. 35 character limit.","example":"value","uniqueKey":"items.[INDEX].shipment.extra.fda_product_code.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.fda_product_code.ref_sort","typeLabel":"integer"}},"description":"UPS only. Adds custom FDA product code reference to UPS labels.","type":"object","uniqueKey":"items.[INDEX].shipment.extra.fda_product_code","typeLabel":"object"},"fulfillment_center":{"type":"string","description":"The fulfilment center where the package originates from.","uniqueKey":"items.[INDEX].shipment.extra.fulfillment_center","typeLabel":"string"},"healthcare_handling":{"description":"Requests the carrier's healthcare handling program, where the carrier offers one. The rate returned keeps the carrier's\nregular service level token.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| Purolator | Maps to Health Care+. Domestic Express services only (Express, Express 9AM, Express 10:30AM, Express Evening). Available to Purolator-approved accounts only. |","properties":{"enabled":{"type":"boolean","description":"Set to `true` to request the carrier's healthcare handling program for this shipment.","uniqueKey":"items.[INDEX].shipment.extra.healthcare_handling.enabled","typeLabel":"boolean"}},"type":"object","uniqueKey":"items.[INDEX].shipment.extra.healthcare_handling","typeLabel":"object"},"insurance":{"description":"To add 3rd party insurance powered by [XCover](https://docs.goshippo.com/docs/shipments/shippinginsurance/), specify `amount`, `content`, and `currency`. Alternatively, you can choose carrier provided insurance by additionally specifying `provider` (UPS, FedEx and OnTrac only).\n\nIf you do not want to add insurance to your shipment, do not set these parameters.","properties":{"amount":{"description":"Declared value of the goods you want to insure.","example":"5.5","type":"string","uniqueKey":"items.[INDEX].shipment.extra.insurance.amount","typeLabel":"string"},"content":{"type":"string","description":"Description of package content.","uniqueKey":"items.[INDEX].shipment.extra.insurance.content","typeLabel":"string"},"currency":{"example":"USD","type":"string","format":"iso-4217","description":"Currency for the amount value.\nCurrently only USD is supported for FedEx and UPS.","uniqueKey":"items.[INDEX].shipment.extra.insurance.currency","typeLabel":"string\u003ciso-4217>"},"provider":{"enum":["FEDEX","UPS","ONTRAC"],"description":"To have insurance cover provided by a carrier directly instead of Shippo's provider (XCover), set `provider` to `FEDEX`, `UPS`, or `ONTRAC`.","type":"string","uniqueKey":"items.[INDEX].shipment.extra.insurance.provider","typeLabel":"enum\u003cstring>"}},"type":"object","uniqueKey":"items.[INDEX].shipment.extra.insurance","typeLabel":"object"},"invoice_number":{"description":"Specify the invoice number field on the label (FedEx and UPS only).","properties":{"prefix":{"type":"string","description":"Custom prefix for invoice number field (ZPL labels only). Up to 11 characters, including trailing spaces. Empty string indicates removal of default prefix. To use the default prefix, do not include this property.","uniqueKey":"items.[INDEX].shipment.extra.invoice_number.prefix","typeLabel":"string"},"value":{"type":"string","maxLength":40,"description":"Optional text to be printed on the shipping label for invoice number. Up to 40 characters. If\nprovided, this will be used on the label instead of shipment.customs_declaration.invoice.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 30 characters |","uniqueKey":"items.[INDEX].shipment.extra.invoice_number.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":2,"uniqueKey":"items.[INDEX].shipment.extra.invoice_number.ref_sort","typeLabel":"integer"}},"type":"object","uniqueKey":"items.[INDEX].shipment.extra.invoice_number","typeLabel":"object"},"is_return":{"type":"boolean","description":"This field specifies if it is a scan-based return shipment. See the [Create a return shipment](https://docs.goshippo.com/docs/shipments/returns/) section for more details.","uniqueKey":"items.[INDEX].shipment.extra.is_return","typeLabel":"boolean"},"lasership_attrs":{"description":"Specify Lasership Attributes (Lasership only). Multiple options accepted.","items":{"type":"string","enum":["TwoPersonDelivery","Explosive","Alcohol","Hazmat","ControlledSubstance","Refrigerated","DryIce","Perishable","NoRTS"],"uniqueKey":"items.[INDEX].shipment.extra.lasership_attrs.items.[INDEX]","typeLabel":"enum\u003cstring>"},"type":"array","uniqueKey":"items.[INDEX].shipment.extra.lasership_attrs","typeLabel":"enum\u003cstring>[]"},"lasership_declared_value":{"type":"string","description":"Declared value (Lasership only). Defaults to `50.00`.","uniqueKey":"items.[INDEX].shipment.extra.lasership_declared_value","typeLabel":"string"},"manifest_number":{"properties":{"prefix":{"type":"string","description":"Custom prefix text.","example":"ABC","uniqueKey":"items.[INDEX].shipment.extra.manifest_number.prefix","typeLabel":"string"},"value":{"type":"string","description":"Label reference text. 35 character limit.","example":"value","uniqueKey":"items.[INDEX].shipment.extra.manifest_number.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.manifest_number.ref_sort","typeLabel":"integer"}},"description":"UPS only. Adds custom manifest number reference to UPS labels.","type":"object","uniqueKey":"items.[INDEX].shipment.extra.manifest_number","typeLabel":"object"},"model_number":{"properties":{"prefix":{"type":"string","description":"Custom prefix text.","example":"ABC","uniqueKey":"items.[INDEX].shipment.extra.model_number.prefix","typeLabel":"string"},"value":{"type":"string","description":"Label reference text. 35 character limit.","example":"value","uniqueKey":"items.[INDEX].shipment.extra.model_number.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.model_number.ref_sort","typeLabel":"integer"}},"description":"UPS only. Adds custom model number reference to UPS labels.","type":"object","uniqueKey":"items.[INDEX].shipment.extra.model_number","typeLabel":"object"},"part_number":{"properties":{"prefix":{"type":"string","description":"Custom prefix text.","example":"ABC","uniqueKey":"items.[INDEX].shipment.extra.part_number.prefix","typeLabel":"string"},"value":{"type":"string","description":"Label reference text. 35 character limit.","example":"value","uniqueKey":"items.[INDEX].shipment.extra.part_number.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.part_number.ref_sort","typeLabel":"integer"}},"description":"UPS only. Adds custom part number reference to UPS labels.","type":"object","uniqueKey":"items.[INDEX].shipment.extra.part_number","typeLabel":"object"},"po_number":{"description":"Specify the PO number field on the label (FedEx and UPS only).","properties":{"prefix":{"type":"string","description":"Custom prefix for PO number field (ZPL labels only). Up to 11 characters, including trailing spaces. Empty string indicates removal of default prefix. To use the default prefix, do not include this property.","uniqueKey":"items.[INDEX].shipment.extra.po_number.prefix","typeLabel":"string"},"value":{"type":"string","maxLength":40,"description":"Optional text to be printed on the shipping label for PO number. Up to 40 characters. If\nthis is provided, reference_2 will be ignored.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 30 characters |","uniqueKey":"items.[INDEX].shipment.extra.po_number.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":2,"uniqueKey":"items.[INDEX].shipment.extra.po_number.ref_sort","typeLabel":"integer"}},"type":"object","uniqueKey":"items.[INDEX].shipment.extra.po_number","typeLabel":"object"},"preferred_delivery_timeframe":{"enum":["10001200","12001400","14001600","16001800","18002000","19002100"],"description":"Required for DHL Germany Paket Sameday. Designates a desired timeframe for delivery. Format is `HHMMHHMM`","type":"string","uniqueKey":"items.[INDEX].shipment.extra.preferred_delivery_timeframe","typeLabel":"enum\u003cstring>"},"premium":{"type":"boolean","description":"Add premium service to a shipment (DHL Germany international shipments only).","uniqueKey":"items.[INDEX].shipment.extra.premium","typeLabel":"boolean"},"production_code":{"properties":{"prefix":{"type":"string","description":"Custom prefix text.","example":"ABC","uniqueKey":"items.[INDEX].shipment.extra.production_code.prefix","typeLabel":"string"},"value":{"type":"string","description":"Label reference text. 35 character limit.","example":"value","uniqueKey":"items.[INDEX].shipment.extra.production_code.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.production_code.ref_sort","typeLabel":"integer"}},"description":"UPS only. Adds custom product code reference to UPS labels.","type":"object","uniqueKey":"items.[INDEX].shipment.extra.production_code","typeLabel":"object"},"purchase_request_number":{"properties":{"prefix":{"type":"string","description":"Custom prefix text.","example":"ABC","uniqueKey":"items.[INDEX].shipment.extra.purchase_request_number.prefix","typeLabel":"string"},"value":{"type":"string","description":"Label reference text. 35 character limit.","example":"value","uniqueKey":"items.[INDEX].shipment.extra.purchase_request_number.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.purchase_request_number.ref_sort","typeLabel":"integer"}},"description":"UPS only. Adds custom purchase request number reference to UPS labels.","type":"object","uniqueKey":"items.[INDEX].shipment.extra.purchase_request_number","typeLabel":"object"},"qr_code_requested":{"type":"boolean","description":"Request a QR code for a given transaction when creating a shipping label (USPS domestic and Evri UK only).","uniqueKey":"items.[INDEX].shipment.extra.qr_code_requested","typeLabel":"boolean"},"reference_1":{"type":"string","maxLength":50,"description":"Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 40 characters (Express services); Max 30 characters (Ground services) |\n| Purolator | Max 25 characters |","uniqueKey":"items.[INDEX].shipment.extra.reference_1","typeLabel":"string"},"reference_2":{"type":"string","maxLength":50,"description":"Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters. For DHL eCommerce, this field can be used for billing reference.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 30 characters |\n| Purolator | Max 25 characters |","uniqueKey":"items.[INDEX].shipment.extra.reference_2","typeLabel":"string"},"reference_3":{"type":"string","maxLength":50,"description":"Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| Purolator | Max 25 characters |","uniqueKey":"items.[INDEX].shipment.extra.reference_3","typeLabel":"string"},"reference_4":{"type":"string","maxLength":50,"description":"Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| Purolator | Max 25 characters |","uniqueKey":"items.[INDEX].shipment.extra.reference_4","typeLabel":"string"},"request_retail_rates":{"type":"boolean","description":"Returns retail rates instead of account-based rates (UPS and FedEx only).","uniqueKey":"items.[INDEX].shipment.extra.request_retail_rates","typeLabel":"boolean"},"return_service_type":{"oneOf":[{"type":"string","description":"Request additional return option for return shipments (UPS and Lasership only).","enum":["PRINT_AND_MAIL","ATTEMPT_1","ATTEMPT_3","ELECTRONIC_LABEL"],"uniqueKey":"items.[INDEX].shipment.extra.return_service_type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"string","description":"Request additional return option for return shipments (UPS and Lasership only).","enum":["NO_RETURN"],"uniqueKey":"items.[INDEX].shipment.extra.return_service_type.oneOf.1","typeLabel":"enum\u003cstring>"}],"uniqueKey":"items.[INDEX].shipment.extra.return_service_type","typeLabel":"enum\u003cstring>"},"rma_number":{"description":"Specify the RMA number field on the label (FedEx and UPS only).","properties":{"prefix":{"type":"string","description":"Custom prefix for RMA number field (ZPL labels only). Up to 11 characters, including trailing spaces. Empty string indicates removal of default prefix. To use the default prefix, do not include this property.","uniqueKey":"items.[INDEX].shipment.extra.rma_number.prefix","typeLabel":"string"},"value":{"type":"string","maxLength":40,"description":"Optional text to be printed on the shipping label for RMA number. Up to 40 characters.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 20 characters |","uniqueKey":"items.[INDEX].shipment.extra.rma_number.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.rma_number.ref_sort","typeLabel":"integer"}},"type":"object","uniqueKey":"items.[INDEX].shipment.extra.rma_number","typeLabel":"object"},"saturday_delivery":{"type":"boolean","description":"Marks shipment as to be delivered on a Saturday.","uniqueKey":"items.[INDEX].shipment.extra.saturday_delivery","typeLabel":"boolean"},"salesperson_number":{"properties":{"prefix":{"type":"string","description":"Custom prefix text.","example":"ABC","uniqueKey":"items.[INDEX].shipment.extra.salesperson_number.prefix","typeLabel":"string"},"value":{"type":"string","description":"Label reference text. 35 character limit.","example":"value","uniqueKey":"items.[INDEX].shipment.extra.salesperson_number.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.salesperson_number.ref_sort","typeLabel":"integer"}},"description":"UPS only. Adds custom salesperson number reference to UPS labels.","type":"object","uniqueKey":"items.[INDEX].shipment.extra.salesperson_number","typeLabel":"object"},"serial_number":{"properties":{"prefix":{"type":"string","description":"Custom prefix text.","example":"ABC","uniqueKey":"items.[INDEX].shipment.extra.serial_number.prefix","typeLabel":"string"},"value":{"type":"string","description":"Label reference text. 35 character limit.","example":"value","uniqueKey":"items.[INDEX].shipment.extra.serial_number.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.serial_number.ref_sort","typeLabel":"integer"}},"description":"UPS only. Adds custom serial number reference to UPS labels.","type":"object","uniqueKey":"items.[INDEX].shipment.extra.serial_number","typeLabel":"object"},"signature_confirmation":{"enum":["STANDARD","ADULT","CERTIFIED","INDIRECT","CARRIER_CONFIRMATION"],"description":"Request standard or adult signature confirmation. You can alternatively request Certified Mail (USPS only) or Indirect signature (FedEx only) or Carrier Confirmation (Deutsche Post only).","type":"string","uniqueKey":"items.[INDEX].shipment.extra.signature_confirmation","typeLabel":"enum\u003cstring>"},"store_number":{"properties":{"prefix":{"type":"string","description":"Custom prefix text.","example":"ABC","uniqueKey":"items.[INDEX].shipment.extra.store_number.prefix","typeLabel":"string"},"value":{"type":"string","description":"Label reference text. 35 character limit.","example":"value","uniqueKey":"items.[INDEX].shipment.extra.store_number.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.store_number.ref_sort","typeLabel":"integer"}},"description":"UPS only. Adds custom store number reference to UPS labels.","type":"object","uniqueKey":"items.[INDEX].shipment.extra.store_number","typeLabel":"object"},"transaction_reference_number":{"properties":{"prefix":{"type":"string","description":"Custom prefix text.","example":"ABC","uniqueKey":"items.[INDEX].shipment.extra.transaction_reference_number.prefix","typeLabel":"string"},"value":{"type":"string","description":"Label reference text. 35 character limit.","example":"value","uniqueKey":"items.[INDEX].shipment.extra.transaction_reference_number.value","typeLabel":"string"},"ref_sort":{"type":"integer","description":"Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.","example":1,"uniqueKey":"items.[INDEX].shipment.extra.transaction_reference_number.ref_sort","typeLabel":"integer"}},"description":"UPS only. Adds custom transaction reference number to UPS labels.","type":"object","uniqueKey":"items.[INDEX].shipment.extra.transaction_reference_number","typeLabel":"object"},"usmca_eligible":{"type":"boolean","description":"UPS only. Request USMCA (United States-Mexico-Canada Agreement) preferential tariff treatment. \nWhen enabled, it includes the USMCA eligibility declaration in customs documentation.\n\nSupported routes and value limits:\n- USA/Canada → Mexico: ≤ $1,000 USD\n- Canada/Mexico → USA: ≤ $2,500 USD \n- USA/Mexico → Canada: ≤ $3,300 CAD\n\nOnly for declaration-only shipments, full USMCA - FormType 04 (Certificate of Origin) is not supported.","uniqueKey":"items.[INDEX].shipment.extra.usmca_eligible","typeLabel":"boolean"}},"type":"object","uniqueKey":"items.[INDEX].shipment.extra","typeLabel":"Shipment Extra · object"},"metadata":{"example":"Customer ID 123456","type":"string","maxLength":100,"description":"A string of up to 100 characters that can be filled with any additional information you want to attach to the object.","uniqueKey":"items.[INDEX].shipment.metadata","typeLabel":"string"},"shipment_date":{"example":"2021-03-22T12:00:00Z","type":"string","description":"Date the shipment will be tendered to the carrier. Must be in the format `2014-01-18T00:35:03.463Z`.\nDefaults to current date and time if no value is provided. Please note that some carriers require this value to be in the future, on a working day, or similar.","uniqueKey":"items.[INDEX].shipment.shipment_date","typeLabel":"string"},"address_return":{"oneOf":[{"type":"object","description":"Address represents the address as retrieved from the database","required":["country"],"properties":{"country":{"example":"US","type":"string","description":"ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we recommend using country codes like `US` or `DE`.\nIf using country names, please ensure they are spelled correctly and in English. Country names are converted to country codes.\nRefer to this [guide](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) for a list of country codes.\nSending a country is always required.","isRequired":true,"uniqueKey":"items.[INDEX].shipment.address_return.oneOf.0.country","typeLabel":"string"},"name":{"description":"**required for purchase**\n\nFirst and Last Name of the addressee\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Either company or name required; No length validation (first 35 chars printed on label) |","example":"Shwan Ippotle","type":"string","maxLength":100,"uniqueKey":"items.[INDEX].shipment.address_return.oneOf.0.name","typeLabel":"string"},"company":{"example":"Shippo","type":"string","maxLength":100,"description":"Company Name\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 35 characters; Either company or name required |","uniqueKey":"items.[INDEX].shipment.address_return.oneOf.0.company","typeLabel":"string"},"street1":{"description":"**required for purchase**\n\nFirst street line. Usually street number and street name (except for DHL Germany, see street_no).\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | At least one street line required; Max 35 characters per line |","example":"215 Clayton St.","type":"string","maxLength":121,"uniqueKey":"items.[INDEX].shipment.address_return.oneOf.0.street1","typeLabel":"string"},"street2":{"type":"string","maxLength":100,"description":"Second street line.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | At least one street line required; Max 35 characters per line |","uniqueKey":"items.[INDEX].shipment.address_return.oneOf.0.street2","typeLabel":"string"},"street3":{"type":"string","maxLength":100,"example":"","description":"Third street line.\nOnly accepted for USPS international shipments, UPS domestic and UPS international shipments.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | At least one street line required; Max 35 characters per line |","uniqueKey":"items.[INDEX].shipment.address_return.oneOf.0.street3","typeLabel":"string"},"street_no":{"type":"string","example":"","description":"Street number of the addressed building.\nThis field can be included in street1 for all carriers except for DHL Germany.","uniqueKey":"items.[INDEX].shipment.address_return.oneOf.0.street_no","typeLabel":"string"},"city":{"description":"**required for purchase**\n\nName of a city. When creating a Quote Address, sending a city is optional but will yield more accurate Rates.\nPlease bear in mind that city names may be ambiguous (there are 34 Springfields in the US). Pass in a state\nor a ZIP code (see below), if known, it will yield more accurate results.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Required; Max 35 characters |","example":"San Francisco","type":"string","maxLength":100,"uniqueKey":"items.[INDEX].shipment.address_return.oneOf.0.city","typeLabel":"string"},"state":{"description":"**required for purchase for some countries**\n\nState/Province values are required for shipments from/to the US, AU, and CA. UPS requires province for some\ncountries (i.e Ireland). To receive more accurate quotes, passing this field is recommended. Most carriers\nonly accept two or three character state abbreviations.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Required if country requires state; Max 2 characters for US, CA, PR |","example":"CA","type":"string","maxLength":100,"uniqueKey":"items.[INDEX].shipment.address_return.oneOf.0.state","typeLabel":"string"},"zip":{"description":"**required for purchase**\n\nPostal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more\naccurate Rates.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 10 characters |","example":"94117","type":"string","maxLength":20,"uniqueKey":"items.[INDEX].shipment.address_return.oneOf.0.zip","typeLabel":"string"},"phone":{"example":"+1 555 341 9393","type":"string","maxLength":50,"description":"Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This\nincreases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Required; Min 1, max 15 characters |\n| USPS | Sender phone required for shipments during label purchase; Min 8, max 15 digits |","uniqueKey":"items.[INDEX].shipment.address_return.oneOf.0.phone","typeLabel":"string"},"email":{"example":"shippotle@shippo.com","type":"string","maxLength":254,"description":"E-mail address of the contact person, RFC3696/5321-compliant.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 80 characters |\n| USPS | Sender email required for shipments during label purchase |","uniqueKey":"items.[INDEX].shipment.address_return.oneOf.0.email","typeLabel":"string"},"is_residential":{"example":true,"type":"boolean","uniqueKey":"items.[INDEX].shipment.address_return.oneOf.0.is_residential","typeLabel":"boolean"},"metadata":{"example":"Customer ID 123456","type":"string","maxLength":100,"description":"A string of up to 100 characters that can be filled with any additional information you want to attach to the object.","uniqueKey":"items.[INDEX].shipment.address_return.oneOf.0.metadata","typeLabel":"string"},"validate":{"description":"Set to true to validate Address object.","example":true,"type":"boolean","uniqueKey":"items.[INDEX].shipment.address_return.oneOf.0.validate","typeLabel":"boolean"}},"uniqueKey":"items.[INDEX].shipment.address_return.oneOf.0","typeLabel":"object"},{"type":"string","description":"[Address](/shippoapi/public-api/addresses) `object_id` of a previously created address.","example":"d799c2679e644279b59fe661ac8fa488","uniqueKey":"items.[INDEX].shipment.address_return.oneOf.1","typeLabel":"string"}],"uniqueKey":"items.[INDEX].shipment.address_return","typeLabel":"object | string"},"customs_declaration":{"oneOf":[{"type":"object","required":["items","certify_signer","certify","non_delivery_option","contents_type"],"properties":{"certify":{"example":true,"type":"boolean","description":"Expresses that the certify_signer has provided all information of this customs declaration truthfully.","isRequired":true,"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.certify","typeLabel":"boolean"},"certify_signer":{"example":"Shawn Ippotle","type":"string","description":"Name of the person who created the customs declaration and is responsible for the validity of all information provided.","isRequired":true,"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.certify_signer","typeLabel":"string"},"contents_type":{"type":"string","description":"Type of goods of the shipment. \nAllowed values available [here](/shippoapi/public-api/customs-declaration-contents-type)","enum":["DOCUMENTS","GIFT","SAMPLE","MERCHANDISE","HUMANITARIAN_DONATION","RETURN_MERCHANDISE","OTHER"],"example":"MERCHANDISE","isRequired":true,"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.contents_type","typeLabel":"enum\u003cstring>"},"items":{"items":{"type":"object","required":["description","quantity","net_weight","mass_unit","value_amount","value_currency","origin_country"],"x-speakeasy-name-override":"CustomsItemCreateRequest","x-speakeasy-include":true,"properties":{"description":{"example":"T-Shirt","type":"string","description":"Text description of your item.","isRequired":true,"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items.items.[INDEX].description","typeLabel":"string"},"mass_unit":{"description":"The unit used for weight.","enum":["g","kg","lb","oz"],"example":"lb","type":"string","isRequired":true,"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items.items.[INDEX].mass_unit","typeLabel":"enum\u003cstring>"},"net_weight":{"example":"5","type":"string","description":"Total weight of this item, i.e. quantity * weight per item.","isRequired":true,"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items.items.[INDEX].net_weight","typeLabel":"string"},"origin_country":{"type":"string","description":"Country of origin of the item. Example: `US` or `DE`.\nAll accepted values can be found on the [Official ISO Website](http://www.iso.org/).","isRequired":true,"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items.items.[INDEX].origin_country","typeLabel":"string"},"quantity":{"example":20,"format":"int64","type":"integer","description":"Quantity of this item in the shipment you send. Must be greater than 0.","isRequired":true,"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items.items.[INDEX].quantity","typeLabel":"integer\u003cint64>"},"value_amount":{"example":"200","type":"string","description":"Total value of this item, i.e. quantity * value per item.","isRequired":true,"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items.items.[INDEX].value_amount","typeLabel":"string"},"value_currency":{"example":"USD","type":"string","description":"Currency used for value_amount. The [official ISO 4217](http://www.xe.com/iso4217.php) currency codes are used, e.g. `USD` or `EUR`.","isRequired":true,"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items.items.[INDEX].value_currency","typeLabel":"string"},"eccn_ear99":{"type":"string","description":"Export Control Classification Number, required on some exports from the United States.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items.items.[INDEX].eccn_ear99","typeLabel":"string"},"eu_exempt_category":{"type":"boolean","default":false,"description":"Marks the item as belonging to an EU-exempt product category. Exempt items do not need product identifiers on shipments that meet the EU product identifier conditions (EU destination, non-EU origin, MERCHANDISE contents, recipient not a business).","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items.items.[INDEX].eu_exempt_category","typeLabel":"boolean"},"manufacturer_code":{"example":"ACME-TS-001","type":"string","description":"Product identifier assigned by the manufacturer. Up to 100 characters; some carriers accept fewer and reject longer values at label purchase. Required together with `sku_code` on every non-exempt item when the shipment meets the EU product identifier conditions.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items.items.[INDEX].manufacturer_code","typeLabel":"string"},"manufacturer_standard_code":{"example":"00012345678905","type":"string","description":"Standardized product identifier such as a GTIN. Up to 100 characters. Never required, but recommended for EU-bound shipments when one exists.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items.items.[INDEX].manufacturer_standard_code","typeLabel":"string"},"metadata":{"example":"Order ID \"123454\"","type":"string","description":"A string of up to 100 characters that can be filled with any additional information you want to attach to the object.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items.items.[INDEX].metadata","typeLabel":"string"},"sku_code":{"description":"SKU or merchant-assigned product code of the item. Up to 100 characters; some carriers accept fewer and reject longer values at label purchase. Required together with `manufacturer_code` on every non-exempt item when the shipment meets the EU product identifier conditions; some carriers also use it outside the EU.","example":"HM-123","type":"string","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items.items.[INDEX].sku_code","typeLabel":"string"},"hs_code":{"description":"HS code of the item, which is required by some carriers. If `tariff_number` is not provided, `hs_code` will be used. If both `hs_code` and `tariff_number` are provided, `tariff_number` will be used. 50 character limit.","example":"0901.21","type":"string","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items.items.[INDEX].hs_code","typeLabel":"string"},"tariff_number":{"type":"string","description":"The tariff number of the item. If `tariff_number` is not provided, `hs_code` will be used. If both `hs_code` and `tariff_number` are provided, `tariff_number` will be used. 12 character limit.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items.items.[INDEX].tariff_number","typeLabel":"string"}},"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items.items.[INDEX]","typeLabel":"object"},"type":"array","isRequired":true,"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.\\items","typeLabel":"object[]"},"non_delivery_option":{"type":"string","description":"Indicates how the carrier should proceed in case the shipment can't be delivered.\nAllowed values available [here](/shippoapi/public-api/customs-declaration-non-delivery-option)","enum":["ABANDON","RETURN"],"example":"RETURN","isRequired":true,"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.non_delivery_option","typeLabel":"enum\u003cstring>"},"aes_itn":{"description":"**required if eel_pfc is `AES_ITN`**\n\nAES / ITN reference of the shipment.","type":"string","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.aes_itn","typeLabel":"string"},"b13a_filing_option":{"type":"string","description":"B13A Option details are obtained by filing a B13A Canada Export Declaration via the Canadian Export Reporting System (CERS).\n[More information on reporting commercial exports from Canada.](https://www.cbsa-asfc.gc.ca/services/export/guide-eng.html)\nAllowed values available [here](/shippoapi/public-api/customs-declaration-b13a-filing-option)","enum":["FILED_ELECTRONICALLY","SUMMARY_REPORTING","NOT_REQUIRED"],"example":"FILED_ELECTRONICALLY","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.b13a_filing_option","typeLabel":"enum\u003cstring>"},"b13a_number":{"description":"**must be provided if and only if b13a_filing_option is provided**\n\nRepresents the Proof of Report (POR) Number when b13a_filing_option is `FILED_ELECTRONICALLY`; the Summary ID Number when b13a_filing_option is `SUMMARY_REPORTING`; or the Exemption Number when b13a_filing_option is `NOT_REQUIRED`.","type":"string","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.b13a_number","typeLabel":"string"},"certificate":{"type":"string","description":"Certificate reference of the shipment.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.certificate","typeLabel":"string"},"commercial_invoice":{"type":"boolean","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.commercial_invoice","typeLabel":"boolean"},"contents_explanation":{"description":"**required if contents_type is `OTHER`**\n\nExplanation of the type of goods of the shipment.","example":"T-Shirt purchase","type":"string","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.contents_explanation","typeLabel":"string"},"disclaimer":{"type":"string","maxLength":1000,"description":"Disclaimer for the shipment and customs information that have been provided.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Max 554 characters |","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.disclaimer","typeLabel":"string"},"duties_payor":{"description":"Specifies who will pay the duties for the shipment. Only accepted for FedEx shipments.","type":"object","properties":{"account":{"type":"string","description":"Account number to be billed for duties.","example":"2323434543","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.duties_payor.account","typeLabel":"string"},"type":{"enum":["SENDER","RECIPIENT","THIRD_PARTY"],"description":"Party to be billed for duties.","example":"THIRD_PARTY","type":"string","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.duties_payor.type","typeLabel":"enum\u003cstring>"},"address":{"type":"object","properties":{"name":{"type":"string","description":"Name of the party to be billed for duties.","example":"Patrick Kavanagh","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.duties_payor.address.name","typeLabel":"string"},"zip":{"type":"string","description":"Postal code of the party to be billed for duties.","example":"80331","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.duties_payor.address.zip","typeLabel":"string"},"country":{"type":"string","description":"Country ISO code of account number to be billed.","example":"DE","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.duties_payor.address.country","typeLabel":"string"}},"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.duties_payor.address","typeLabel":"object"}},"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.duties_payor","typeLabel":"object"},"exporter_identification":{"description":"Additional exporter identification that may be required to ship in certain countries","properties":{"eori_number":{"example":"PL123456790ABCDE","type":"string","description":"Economic Operators' Registration and Identification (EORI) number. Must start with a 2 character country code followed by a 6-17 character alphanumeric identifier (e.g. PL1234567890ABCDE).\n[More information on EORI.](https://ec.europa.eu/taxation_customs/business/customs-procedures/general-overview/economic-operators-registration-identification-number-eori_en)","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.exporter_identification.eori_number","typeLabel":"string"},"tax_id":{"description":"Tax identification that may be required to ship in certain countries. Typically used to assess duties on goods that are crossing a border.","properties":{"number":{"example":"123456789","type":"string","maxLength":15,"description":"Tax identification number.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.exporter_identification.tax_id.number","typeLabel":"string"},"type":{"example":"EIN","enum":["EIN","VAT","IOSS","ARN"],"description":"Type of tax identification.\n* `EIN` - Employer Identification Number, also known as a Federal Tax Identification Number.\n* `VAT` - Value Added Tax identification number.\n* `IOSS` - Import One-Stop Shop\n* `ARN` - Australian Taxation Office Reference Number","type":"string","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.exporter_identification.tax_id.type","typeLabel":"enum\u003cstring>"}},"type":"object","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.exporter_identification.tax_id","typeLabel":"object"}},"type":"object","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.exporter_identification","typeLabel":"object"},"exporter_reference":{"type":"string","description":"Exporter reference of an export shipment.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.exporter_reference","typeLabel":"string"},"importer_reference":{"type":"string","description":"Importer reference of an import shipment.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.importer_reference","typeLabel":"string"},"is_vat_collected":{"type":"boolean","description":"Indicates whether the shipment's destination VAT has been collected. May be required for some destinations.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.is_vat_collected","typeLabel":"boolean"},"invoice":{"example":"#123123","type":"string","maxLength":15,"description":"Invoice reference of the shipment.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.invoice","typeLabel":"string"},"license":{"type":"string","description":"License reference of the shipment.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.license","typeLabel":"string"},"metadata":{"example":"Order ID #123123","type":"string","description":"A string of up to 100 characters that can be filled with any additional information you want to attach to the object.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.metadata","typeLabel":"string"},"notes":{"type":"string","description":"Additional notes to be included in the customs declaration.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.notes","typeLabel":"string"},"recipient_is_business":{"type":"boolean","default":false,"description":"Indicates the shipment goes to a business (B2B) rather than a consumer. Newly created declarations default to false when the field is not provided; declarations created before the field existed return null, which is treated as false. When true, EU product identifiers are not required on the customs items.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.recipient_is_business","typeLabel":"boolean"},"address_importer":{"description":"Object that represents the address of the importer","type":"object","properties":{"name":{"description":"First and Last Name of the addressee","example":"Shwan Ippotle","type":"string","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.address_importer.name","typeLabel":"string"},"company":{"example":"Shippo","type":"string","description":"Company Name","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.address_importer.company","typeLabel":"string"},"street1":{"description":"First street line, 35 character limit. Usually street number and street name (except for DHL Germany, see street_no).","example":"Blumenstraße","type":"string","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.address_importer.street1","typeLabel":"string"},"street2":{"type":"string","description":"Second street line, 35 character limit.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.address_importer.street2","typeLabel":"string"},"street3":{"type":"string","example":"","description":"Third street line, 35 character limit.\nOnly accepted for USPS international shipments, UPS domestic and UPS international shipments.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.address_importer.street3","typeLabel":"string"},"street_no":{"type":"string","example":"22","description":"Street number of the addressed building.\nThis field can be included in street1 for all carriers except for DHL Germany.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.address_importer.street_no","typeLabel":"string"},"city":{"description":"Name of a city","example":"München","type":"string","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.address_importer.city","typeLabel":"string"},"state":{"description":"**required for purchase for some countries**\n\nState/Province values are required for shipments from/to the US, AU, and CA. UPS requires province for some countries (i.e Ireland). To receive more accurate quotes, passing this field is recommended. Most carriers only accept two or three character state abbreviations.","example":"CA","type":"string","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.address_importer.state","typeLabel":"string"},"zip":{"description":"Postal code of an Address.","example":"80331","type":"string","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.address_importer.zip","typeLabel":"string"},"country":{"example":"DE","type":"string","description":"Example: `US` or `DE`. All accepted values can be found on the [Official ISO Website](http://www.iso.org/).\nSending a country is always required.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.address_importer.country","typeLabel":"string"},"phone":{"example":"80331","type":"string","description":"Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This increases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.address_importer.phone","typeLabel":"string"},"email":{"example":"shippotle@shippo.com","type":"string","description":"E-mail address of the contact person, RFC3696/5321-compliant.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.address_importer.email","typeLabel":"string"},"is_residential":{"example":true,"type":"boolean","description":"Indicates whether the address provided is a residential address or not.","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.address_importer.is_residential","typeLabel":"boolean"}},"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.address_importer","typeLabel":"object"},"eel_pfc":{"type":"string","description":"EEL / PFC type of the shipment. For most shipments from the US to CA, `NOEEI_30_36` is applicable; for most other shipments from the US, `NOEEI_30_37_a` is applicable.\nAllowed values available [here](/shippoapi/public-api/customs-declaration-eelpfc)","enum":["NOEEI_30_37_a","NOEEI_30_37_h","NOEEI_30_37_f","NOEEI_30_36","AES_ITN"],"example":"NOEEI_30_37_a","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.eel_pfc","typeLabel":"enum\u003cstring>"},"incoterm":{"type":"string","description":"The incoterm reference of the shipment. FCA is available for DHL Express and FedEx only.\neDAP is available for DPD UK only. DAP is available for DHL Express, FedEx, and DPD UK.\nIf expecting DAP for other carriers, please use DDU.\nAllowed values available [here](/shippoapi/public-api/customs-declaration-incoterm)\nCarrier-specific restrictions are in the table below.\n\n**Carrier-Specific Constraints:**\n| Carrier | Constraints |\n|:---|:---|\n| FedEx | Must be one of DDP, DDU, FCA, DAP |","enum":["DDP","DDU","FCA","DAP","eDAP"],"example":"DDP","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.incoterm","typeLabel":"enum\u003cstring>"},"test":{"example":true,"type":"boolean","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0.test","typeLabel":"boolean"}},"uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.0","typeLabel":"object"},{"type":"string","description":"[Customs Declaration](/shippoapi/public-api/customs-declarations) `object_id` of a previously created customs declaration.","example":"adcfdddf8ec64b84ad22772bce3ea37a","uniqueKey":"items.[INDEX].shipment.customs_declaration.oneOf.1","typeLabel":"string"}],"uniqueKey":"items.[INDEX].shipment.customs_declaration","typeLabel":"object | string"},"async":{"type":"boolean","uniqueKey":"items.[INDEX].shipment.async","typeLabel":"boolean"},"carrier_accounts":{"items":{"type":"string","uniqueKey":"items.[INDEX].shipment.carrier_accounts.items.[INDEX]","typeLabel":"string"},"type":"array","description":"List of [Carrier Accounts](/shippoapi/public-api/carrier-accounts) `object_id`s used to filter the returned rates. If set, only rates from these carriers will be returned.","example":["065a4a8c10d24a34ab932163a1b87f52","73f706f4bdb94b54a337563840ce52b0"],"uniqueKey":"items.[INDEX].shipment.carrier_accounts","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"items.[INDEX].shipment","typeLabel":"object"},"carrier_account":{"description":"Object ID of the carrier account to be used for this shipment (will override batch default)","example":"a4391cd4ab974f478f55dc08b5c8e3b3","type":"string","uniqueKey":"items.[INDEX].carrier_account","typeLabel":"string"},"metadata":{"description":"A string of up to 100 characters that can be filled with any additional information you want to attach to the object.","example":"SHIPMENT #1","maxLength":100,"type":"string","uniqueKey":"items.[INDEX].metadata","typeLabel":"string"},"servicelevel_token":{"description":"A token that sets the shipping method for the batch, overriding the batch default.\nServicelevel tokens can be found [in this list](/shippoapi/public-api/service-levels) or [at this endpoint](/shippoapi/public-api/carrier-accounts/listcarrieraccounts).","example":"fedex_ground","type":"string","uniqueKey":"items.[INDEX].servicelevel_token","typeLabel":"string"}},"uniqueKey":"items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"","typeLabel":"object[]"},"examples":{"Example":{"title":"Example","value":[{"shipment":{"address_from":{"country":"US","name":"Shwan Ippotle","company":"Shippo","street1":"215 Clayton St.","street2":"\u003cstring>","street3":"","street_no":"","city":"San Francisco","state":"CA","zip":"94117","phone":"+1 555 341 9393","email":"shippotle@shippo.com","is_residential":true,"metadata":"Customer ID 123456","validate":true},"address_to":{"country":"US","name":"Shwan Ippotle","company":"Shippo","street1":"215 Clayton St.","street2":"\u003cstring>","street3":"","street_no":"","city":"San Francisco","state":"CA","zip":"94117","phone":"+1 555 341 9393","email":"shippotle@shippo.com","is_residential":true,"metadata":"Customer ID 123456","validate":true},"parcels":[{"mass_unit":"lb","weight":"1","distance_unit":"in","height":"1","length":"1","width":"1","extra":{"COD":{"amount":"5.5","currency":"USD","payment_method":"CASH"},"insurance":{"amount":"5.5","content":"Laptop","currency":"USD","provider":"UPS"},"reference_1":"\u003cstring>","reference_2":"\u003cstring>"},"metadata":"Customer ID 123456"}],"extra":{"accounts_receivable_customer_account":{"prefix":"ABC","value":"value","ref_sort":1},"alcohol":{"contains_alcohol":true},"appropriation_number":{"prefix":"ABC","value":"value","ref_sort":1},"authority_to_leave":true,"bill_of_lading_number":{"prefix":"ABC","value":"value","ref_sort":1},"billing":{"account":"\u003cstring>","country":"\u003cstring>","participation_code":"\u003cstring>","zip":"\u003cstring>"},"bypass_address_validation":true,"carbon_neutral":true,"carrier_hub_id":"\u003cstring>","carrier_hub_travel_time":123,"COD":{"amount":"5.5","currency":"USD","payment_method":"CASH"},"cod_number":{"prefix":"ABC","value":"value","ref_sort":1},"container_type":"\u003cstring>","critical_pull_time":"\u003cstring>","customer_branch":"\u003cstring>","customer_reference":{"prefix":"\u003cstring>","value":"\u003cstring>","ref_sort":1},"dangerous_goods":{"contains":true,"biological_material":{"contains":true},"lithium_batteries":{"contains":true}},"dealer_order_number":{"prefix":"ABC","value":"value","ref_sort":1},"delivery_instructions":"\u003cstring>","dept_number":{"prefix":"\u003cstring>","value":"\u003cstring>","ref_sort":3},"dry_ice":{"contains_dry_ice":true,"weight":"\u003cstring>"},"fda_product_code":{"prefix":"ABC","value":"value","ref_sort":1},"fulfillment_center":"\u003cstring>","healthcare_handling":{"enabled":true},"insurance":{"amount":"5.5","content":"\u003cstring>","currency":"USD"},"invoice_number":{"prefix":"\u003cstring>","value":"\u003cstring>","ref_sort":2},"is_return":true,"lasership_attrs":[],"lasership_declared_value":"\u003cstring>","manifest_number":{"prefix":"ABC","value":"value","ref_sort":1},"model_number":{"prefix":"ABC","value":"value","ref_sort":1},"part_number":{"prefix":"ABC","value":"value","ref_sort":1},"po_number":{"prefix":"\u003cstring>","value":"\u003cstring>","ref_sort":2},"premium":true,"production_code":{"prefix":"ABC","value":"value","ref_sort":1},"purchase_request_number":{"prefix":"ABC","value":"value","ref_sort":1},"qr_code_requested":true,"reference_1":"\u003cstring>","reference_2":"\u003cstring>","reference_3":"\u003cstring>","reference_4":"\u003cstring>","request_retail_rates":true,"rma_number":{"prefix":"\u003cstring>","value":"\u003cstring>","ref_sort":1},"saturday_delivery":true,"salesperson_number":{"prefix":"ABC","value":"value","ref_sort":1},"serial_number":{"prefix":"ABC","value":"value","ref_sort":1},"store_number":{"prefix":"ABC","value":"value","ref_sort":1},"transaction_reference_number":{"prefix":"ABC","value":"value","ref_sort":1},"usmca_eligible":true},"metadata":"Customer ID 123456","shipment_date":"2021-03-22T12:00:00Z","address_return":{"country":"US","name":"Shwan Ippotle","company":"Shippo","street1":"215 Clayton St.","street2":"\u003cstring>","street3":"","street_no":"","city":"San Francisco","state":"CA","zip":"94117","phone":"+1 555 341 9393","email":"shippotle@shippo.com","is_residential":true,"metadata":"Customer ID 123456","validate":true},"customs_declaration":{"certify":true,"certify_signer":"Shawn Ippotle","contents_type":"MERCHANDISE","items":[{"description":"T-Shirt","mass_unit":"lb","net_weight":"5","origin_country":"\u003cstring>","quantity":20,"value_amount":"200","value_currency":"USD","eccn_ear99":"\u003cstring>","eu_exempt_category":false,"manufacturer_code":"ACME-TS-001","manufacturer_standard_code":"00012345678905","metadata":"Order ID \"123454\"","sku_code":"HM-123","hs_code":"0901.21","tariff_number":"\u003cstring>"}],"non_delivery_option":"RETURN","aes_itn":"\u003cstring>","b13a_filing_option":"FILED_ELECTRONICALLY","b13a_number":"\u003cstring>","certificate":"\u003cstring>","commercial_invoice":true,"contents_explanation":"T-Shirt purchase","disclaimer":"\u003cstring>","duties_payor":{"account":"2323434543","type":"THIRD_PARTY","address":{"name":"Patrick Kavanagh","zip":"80331","country":"DE"}},"exporter_identification":{"eori_number":"PL123456790ABCDE","tax_id":{"number":"123456789","type":"EIN"}},"exporter_reference":"\u003cstring>","importer_reference":"\u003cstring>","is_vat_collected":true,"invoice":"#123123","license":"\u003cstring>","metadata":"Order ID #123123","notes":"\u003cstring>","recipient_is_business":false,"address_importer":{"name":"Shwan Ippotle","company":"Shippo","street1":"Blumenstraße","street2":"\u003cstring>","street3":"","street_no":"22","city":"München","state":"CA","zip":"80331","country":"DE","phone":"80331","email":"shippotle@shippo.com","is_residential":true},"eel_pfc":"NOEEI_30_37_a","incoterm":"DDP","test":true},"async":true,"carrier_accounts":["065a4a8c10d24a34ab932163a1b87f52","73f706f4bdb94b54a337563840ce52b0"]},"carrier_account":"a4391cd4ab974f478f55dc08b5c8e3b3","metadata":"SHIPMENT #1","servicelevel_token":"fedex_ground"}]}},"exampleType":"generated"}},"description":"Array of shipments to add to the batch","exampleType":"generated"},"responses":{"31a7abeb-e12e-4bc5-85b7-4080c0787fa9":{"description":"Batch","content":{"application/json":{"schema":{"type":"object","required":["object_id","object_owner","status","object_created","object_updated","batch_shipments","object_results","label_url","default_carrier_account","default_servicelevel_token"],"x-tags":["Batches"],"properties":{"default_carrier_account":{"description":"ID of the Carrier Account object to use as the default for all shipments in this Batch.\nThe carrier account can be changed on a per-shipment basis by changing the carrier_account in the corresponding BatchShipment object.","example":"078870331023437cb917f5187429b093","type":"string","isRequired":true,"uniqueKey":"default_carrier_account","typeLabel":"string"},"default_servicelevel_token":{"description":"Token of the service level to use as the default for all shipments in this Batch.\nThe servicelevel can be changed on a per-shipment basis by changing the servicelevel_token in the corresponding BatchShipment object. [Servicelevel tokens can be found here.](/shippoapi/public-api/service-levels)","example":"usps_priority","type":"string","isRequired":true,"uniqueKey":"default_servicelevel_token","typeLabel":"string"},"batch_shipments":{"type":"object","description":"Array of [BatchShipment](/shippoapi/public-api/batches/batchshipment) objects. \nThe response keeps the same order as in the request array.","properties":{"next":{"example":"baseurl?page=3\u0026results=10","type":"string","uniqueKey":"batch_shipments.next","typeLabel":"string"},"previous":{"example":"baseurl?page=1\u0026results=10","type":"string","uniqueKey":"batch_shipments.previous","typeLabel":"string"},"results":{"items":{"type":"object","title":"Batch Shipment","description":"The batch shipment object is a wrapper around a shipment object, which include shipment-specific information for batch processing.\n\nNote: batch shipments can only be created on the batch endpoint, either when creating a batch object or by through the `/batches/{BATCH_OBJECT_ID}/add_shipments` endpoint","required":["shipment","object_id","status"],"x-tags":["Batches"],"properties":{"object_id":{"description":"Object ID of this batch shipment. Can be used in the remove_shipments endpoint.","example":"e11c95a6788d4ddcaa22f03175838740","type":"string","isRequired":true,"uniqueKey":"batch_shipments.results.items.[INDEX].object_id","typeLabel":"string"},"shipment":{"description":"Object ID of the shipment object created for this batch shipment.","example":"adcfdddf8ec64b84ad22772bce3ea37a","type":"string","isRequired":true,"uniqueKey":"batch_shipments.results.items.[INDEX].shipment","typeLabel":"string"},"status":{"description":"- `INVALID`: the batch shipment cannot be purchased and will have to be removed, fixed, and added to the batch again\n- `VALID`: the batch shipment can be purchased\n- `TRANSACTION_FAILED`: the batch shipment was not able to be purchased and the error will be displayed on the message field\n- `INCOMPLETE`: the batch shipment has an issue with the Address and will need to be removed, fixed, and added to the batch again","enum":["INVALID","VALID","INCOMPLETE","TRANSACTION_FAILED"],"example":"INVALID","type":"string","isRequired":true,"uniqueKey":"batch_shipments.results.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"carrier_account":{"description":"Object ID of the carrier account to be used for this shipment (will override batch default)","example":"a4391cd4ab974f478f55dc08b5c8e3b3","type":"string","uniqueKey":"batch_shipments.results.items.[INDEX].carrier_account","typeLabel":"string"},"metadata":{"description":"A string of up to 100 characters that can be filled with any additional information you want to attach to the object.","example":"SHIPMENT #1","maxLength":100,"type":"string","uniqueKey":"batch_shipments.results.items.[INDEX].metadata","typeLabel":"string"},"servicelevel_token":{"description":"A token that sets the shipping method for the batch, overriding the batch default.\nServicelevel tokens can be found [in this list](/shippoapi/public-api/service-levels) or [at this endpoint](/shippoapi/public-api/carrier-accounts/listcarrieraccounts).","example":"fedex_ground","type":"string","uniqueKey":"batch_shipments.results.items.[INDEX].servicelevel_token","typeLabel":"string"},"messages":{"description":"List of Shipment and Transaction error messages.","type":"array","items":{"oneOf":[{}],"uniqueKey":"batch_shipments.results.items.[INDEX].messages.items.[INDEX]","typeLabel":"any"},"uniqueKey":"batch_shipments.results.items.[INDEX].messages","typeLabel":"any[]"},"transaction":{"description":"Object ID of the transaction object created for this batch shipment.","example":"4c33736a67e2450da88b38c42deef6b7","type":"string","uniqueKey":"batch_shipments.results.items.[INDEX].transaction","typeLabel":"string"}},"uniqueKey":"batch_shipments.results.items.[INDEX]","typeLabel":"Batch Shipment · object"},"type":"array","uniqueKey":"batch_shipments.results","typeLabel":"Batch Shipment · object[]"}},"isRequired":true,"uniqueKey":"batch_shipments","typeLabel":"object"},"label_url":{"description":"An array of URLs each pointing to a merged file of 100 labels each","items":{"type":"string","uniqueKey":"label_url.items.[INDEX]","typeLabel":"string"},"type":"array","isRequired":true,"uniqueKey":"label_url","typeLabel":"string[]"},"object_created":{"description":"Date and time of Batch creation","example":"2016-01-04T00:15:44.394Z","type":"string","isRequired":true,"uniqueKey":"object_created","typeLabel":"string"},"object_id":{"description":"Unique identifier of the given Batch object","example":"5ef63c54f5bf45d3b1f8fb37dcb1c5f4","type":"string","isRequired":true,"uniqueKey":"object_id","typeLabel":"string"},"object_owner":{"description":"Username of the user who created the Batch object.","example":"shippo@shippo.com","type":"string","isRequired":true,"uniqueKey":"object_owner","typeLabel":"string"},"object_results":{"description":"An object containing the following counts: `creation_succeeded`, `creation_failed`, `purchase_succeeded`, `purchase_failed`","properties":{"creation_failed":{"example":3,"format":"int64","type":"integer","isRequired":true,"uniqueKey":"object_results.creation_failed","typeLabel":"integer\u003cint64>"},"creation_succeeded":{"example":5,"format":"int64","type":"integer","isRequired":true,"uniqueKey":"object_results.creation_succeeded","typeLabel":"integer\u003cint64>"},"purchase_failed":{"example":0,"format":"int64","type":"integer","isRequired":true,"uniqueKey":"object_results.purchase_failed","typeLabel":"integer\u003cint64>"},"purchase_succeeded":{"example":0,"format":"int64","type":"integer","isRequired":true,"uniqueKey":"object_results.purchase_succeeded","typeLabel":"integer\u003cint64>"}},"required":["purchase_failed","purchase_succeeded","creation_failed","creation_succeeded"],"type":"object","isRequired":true,"uniqueKey":"object_results","typeLabel":"object"},"object_updated":{"description":"Date and time of last update to the Batch","example":"2016-01-04T00:48:13.841Z","type":"string","isRequired":true,"uniqueKey":"object_updated","typeLabel":"string"},"status":{"description":"- `VALIDATING`: the batch is being created and validated\n- `VALID`: the batch can be purchased\n- `INVALID`: the batch cannot be purchased; `INVALID` BatchShipments must be removed\n- `PURCHASING`: the batch is being purchased\n- `PURCHASED`: the batch is finished purchasing","enum":["VALIDATING","VALID","INVALID","PURCHASING","PURCHASED"],"example":"VALID","type":"string","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"label_filetype":{"description":"Print format of the [label](https://docs.goshippo.com/docs/shipments/shippinglabelsizes/). If empty, will use the default format set from [the Shippo dashboard.](https://apps.goshippo.com/settings/labels)","enum":["PNG","PNG_2.3x7.5","PDF","PDF_2.3x7.5","PDF_4x6","PDF_4x8","PDF_A4","PDF_A5","PDF_A6","ZPLII"],"example":"PDF_4x6","type":"string","uniqueKey":"label_filetype","typeLabel":"enum\u003cstring>"},"metadata":{"description":"A string of up to 100 characters that can be filled with any additional information you want to attach to the object.","example":"BATCH #1","maxLength":100,"type":"string","uniqueKey":"metadata","typeLabel":"string"},"test":{"example":false,"type":"boolean","uniqueKey":"test","typeLabel":"boolean"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"default_carrier_account":"078870331023437cb917f5187429b093","default_servicelevel_token":"usps_priority","batch_shipments":{"next":"baseurl?page=3\u0026results=10","previous":"baseurl?page=1\u0026results=10","results":[{"object_id":"e11c95a6788d4ddcaa22f03175838740","shipment":"adcfdddf8ec64b84ad22772bce3ea37a","status":"INVALID","carrier_account":"a4391cd4ab974f478f55dc08b5c8e3b3","metadata":"SHIPMENT #1","servicelevel_token":"fedex_ground","messages":["\u003cunknown>"],"transaction":"4c33736a67e2450da88b38c42deef6b7"}]},"label_url":["\u003cstring>"],"object_created":"2016-01-04T00:15:44.394Z","object_id":"5ef63c54f5bf45d3b1f8fb37dcb1c5f4","object_owner":"shippo@shippo.com","object_results":{"creation_failed":3,"creation_succeeded":5,"purchase_failed":0,"purchase_succeeded":0},"object_updated":"2016-01-04T00:48:13.841Z","status":"VALID","label_filetype":"PDF_4x6","metadata":"BATCH #1","test":false}}},"exampleType":"generated"}},"exampleType":"generated"},"f8ed66df-8f5b-4da9-a696-a1698a46cbf7":{"description":"Bad request","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"dbe54bd5-03b5-44fc-a1e0-5dbfdcce4630":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"Authorization","x-token-prefix":"ShippoToken","x-token-format":"ShippoToken {token}","x-default":"ShippoToken ","description":"API key authentication using the ShippoToken scheme.\nFormat: Authorization: ShippoToken \u003cAPI_TOKEN>\nExample: Authorization: ShippoToken shippo_live_abc123\n","scopes":[],"schemeName":"APIKeyHeader"}}},"servers":{"cacc1504-0b40-4ec1-aa22-16cc7c1beba9":{"url":"https://api.goshippo.com"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"Authorization","x-token-prefix":"ShippoToken","x-token-format":"ShippoToken {token}","x-default":"ShippoToken ","description":"API key authentication using the ShippoToken scheme.\nFormat: Authorization: ShippoToken \u003cAPI_TOKEN>\nExample: Authorization: ShippoToken shippo_live_abc123\n","scopes":[],"schemeName":"APIKeyHeader"},"schema":{"title":"Authorization","type":"string","description":"API key authentication using the ShippoToken scheme.\nFormat: Authorization: ShippoToken \u003cAPI_TOKEN>\nExample: Authorization: ShippoToken shippo_live_abc123\n","isRequired":true,"default":"ShippoToken ","typeLabel":"string","deprecated":false},"schemeName":"APIKeyHeader","name":"Authorization"}],"title":"APIKeyHeader"}]},"originalFileLocation":"spec/shippoapi/public-api.yaml"},"subdomain":"shippo-f4b7b609","siteName":"Shippo API Documentation","title":"Add shipments to a batch - Shippo API Documentation","relatedPagesConfig":{"enabled":true,"limit":3,"mode":"automatic"},"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"originalFileLocation":"api-reference/batches/add-shipments-to-a-batch.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Adds batch shipments to an existing batch.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Shippo API Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/shippo-f4b7b609/gcyqE9-1OT8BeY1o/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/shippo-f4b7b609/gcyqE9-1OT8BeY1o/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/shippo-f4b7b609/gcyqE9-1OT8BeY1o/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/shippo-f4b7b609/gcyqE9-1OT8BeY1o/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/shippo-f4b7b609/gcyqE9-1OT8BeY1o/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/shippo-f4b7b609/gcyqE9-1OT8BeY1o/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/shippo-f4b7b609/gcyqE9-1OT8BeY1o/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/shippo-f4b7b609/gcyqE9-1OT8BeY1o/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/shippo-f4b7b609/gcyqE9-1OT8BeY1o/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Add shipments to a batch - Shippo API Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Adds batch shipments to an existing batch.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Shippo API Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.goshippo.com/api-reference/batches/add-shipments-to-a-batch\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://shippo-f4b7b609.mintlify.app/_mintlify/api/og/v2?division=Batches\u0026amp;title=Add+shipments+to+a+batch\u0026amp;description=Adds+batch+shipments+to+an+existing+batch.\u0026amp;theme=376b22903894b16c95b28a54\u0026amp;signature=8d579ab0f3f95a6e2f4be271a7afbf7d2fa9a803244433d24c13ca47925121d4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Add shipments to a batch - Shippo API Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Adds batch shipments to an existing batch.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://shippo-f4b7b609.mintlify.app/_mintlify/api/og/v2?division=Batches\u0026amp;title=Add+shipments+to+a+batch\u0026amp;description=Adds+batch+shipments+to+an+existing+batch.\u0026amp;theme=376b22903894b16c95b28a54\u0026amp;signature=8d579ab0f3f95a6e2f4be271a7afbf7d2fa9a803244433d24c13ca47925121d4\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/shippo-f4b7b609/gcyqE9-1OT8BeY1o/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Shippo API Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0D9373\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.goshippo.com/api-reference/batches/add-shipments-to-a-batch\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/batches/add-shipments-to-a-batch.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://goshippo.com/#organization\",\"name\":\"Shippo\",\"legalName\":\"Shippo, Inc.\",\"url\":\"https://goshippo.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://docs.goshippo.com/logo/light.svg\"},\"sameAs\":[\"https://www.linkedin.com/company/shippo\",\"https://x.com/goshippo\",\"https://github.com/goshippo\"]},{\"@type\":\"WebSite\",\"@id\":\"https://docs.goshippo.com#website\",\"name\":\"Shippo API Documentation\",\"url\":\"https://docs.goshippo.com\",\"publisher\":{\"@id\":\"https://goshippo.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.goshippo.com/api-reference/batches/add-shipments-to-a-batch#webpage\",\"url\":\"https://docs.goshippo.com/api-reference/batches/add-shipments-to-a-batch\",\"name\":\"Add shipments to a batch\",\"description\":\"Adds batch shipments to an existing batch.\",\"isPartOf\":{\"@id\":\"https://docs.goshippo.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.goshippo.com/api-reference/batches/add-shipments-to-a-batch#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.goshippo.com/api-reference/batches/add-shipments-to-a-batch#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Shippo API\",\"item\":\"https://docs.goshippo.com/api-reference/addresses/list-all-addresses\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Batches\",\"item\":\"https://docs.goshippo.com/api-reference/batches/create-a-batch\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Add shipments to a batch\",\"item\":\"https://docs.goshippo.com/api-reference/batches/add-shipments-to-a-batch\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.goshippo.com/api-reference/batches/add-shipments-to-a-batch#apireference\",\"headline\":\"Add shipments to a batch\",\"name\":\"Add shipments to a batch\",\"description\":\"Adds batch shipments to an existing batch.\",\"url\":\"https://docs.goshippo.com/api-reference/batches/add-shipments-to-a-batch\",\"mainEntityOfPage\":{\"@id\":\"https://docs.goshippo.com/api-reference/batches/add-shipments-to-a-batch#webpage\"},\"publisher\":{\"@id\":\"https://goshippo.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.goshippo.com#website\"}}]}\u003c/script>","siteName":"Shippo API Documentation","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Reference Overview","href":"/api-reference/overview"}]},{"group":"Shippo API","pages":[{"group":"Addresses","pages":[{"title":"List all addresses","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /addresses","href":"/api-reference/addresses/list-all-addresses"},{"title":"Create a new address","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /addresses","href":"/api-reference/addresses/create-a-new-address"},{"title":"Retrieve an address","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /addresses/{AddressId}","href":"/api-reference/addresses/retrieve-an-address"},{"title":"Validate an address","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /addresses/{AddressId}/validate","href":"/api-reference/addresses/validate-an-address"}]},{"group":"Batches","pages":[{"title":"Create a batch","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /batches","href":"/api-reference/batches/create-a-batch"},{"title":"Retrieve a batch","description":"Returns a batch using an object ID.\n\nBatch shipments are displayed 100 at a time. You can iterate through each page using the `?page=` query parameter. You can also filter based on batch shipment status, for example, by passing a query param like `?object_results=creation_failed`.\n\nFor more details on filtering results, see our guide on [filtering](https://docs.goshippo.com/docs/api_concepts/filtering/).","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /batches/{BatchId}","href":"/api-reference/batches/retrieve-a-batch"},{"title":"Add shipments to a batch","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /batches/{BatchId}/add_shipments","href":"/api-reference/batches/add-shipments-to-a-batch"},{"title":"Purchase a batch","description":"Purchases an existing batch with a status of `VALID`.\nOnce you send a POST request to the purchase endpoint the batch status will change to `PURCHASING`.\nWhen all the shipments are purchased, the status will change to `PURCHASED` and you will receive a `batch_purchased` webhook indicating that the batch has been purchased","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /batches/{BatchId}/purchase","href":"/api-reference/batches/purchase-a-batch"},{"title":"Remove shipments from a batch","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /batches/{BatchId}/remove_shipments","href":"/api-reference/batches/remove-shipments-from-a-batch"}]},{"group":"Carrier Accounts","pages":[{"title":"List all carrier accounts","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /carrier_accounts","href":"/api-reference/carrier-accounts/list-all-carrier-accounts"},{"title":"Create a new carrier account","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /carrier_accounts","href":"/api-reference/carrier-accounts/create-a-new-carrier-account"},{"title":"Retrieve a carrier account","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /carrier_accounts/{CarrierAccountId}","href":"/api-reference/carrier-accounts/retrieve-a-carrier-account"},{"title":"Update a carrier account","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml put /carrier_accounts/{CarrierAccountId}","href":"/api-reference/carrier-accounts/update-a-carrier-account"},{"title":"Connect an existing carrier account using OAuth 2.0","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /carrier_accounts/{CarrierAccountObjectId}/signin/initiate","href":"/api-reference/carrier-accounts/connect-an-existing-carrier-account-using-oauth-20"},{"title":"Add a Shippo carrier account","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /carrier_accounts/register/new","href":"/api-reference/carrier-accounts/add-a-shippo-carrier-account"},{"title":"Get Carrier Registration status","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /carrier_accounts/reg-status","href":"/api-reference/carrier-accounts/get-carrier-registration-status"}]},{"group":"Customs Declarations","pages":[{"title":"List all customs declarations","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /customs/declarations","href":"/api-reference/customs-declarations/list-all-customs-declarations"},{"title":"Create a new customs declaration","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /customs/declarations","href":"/api-reference/customs-declarations/create-a-new-customs-declaration"},{"title":"Retrieve a customs declaration","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /customs/declarations/{CustomsDeclarationId}","href":"/api-reference/customs-declarations/retrieve-a-customs-declaration"}]},{"group":"Customs Items","pages":[{"title":"List all customs items","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /customs/items","href":"/api-reference/customs-items/list-all-customs-items"},{"title":"Create a new customs item","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /customs/items","href":"/api-reference/customs-items/create-a-new-customs-item"},{"title":"Retrieve a customs item","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /customs/items/{CustomsItemId}","href":"/api-reference/customs-items/retrieve-a-customs-item"}]},{"group":"Embedded Authorization","pages":[{"title":"Create a JWT","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /embedded/authz","href":"/api-reference/embedded-authorization/create-a-jwt"}]},{"group":"Rates at Checkout","pages":[{"title":"Generate a live rates request","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /live-rates","href":"/api-reference/rates-at-checkout/generate-a-live-rates-request"},{"title":"Show current default parcel template","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /live-rates/settings/parcel-template","href":"/api-reference/rates-at-checkout/show-current-default-parcel-template"},{"title":"Update default parcel template","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml put /live-rates/settings/parcel-template","href":"/api-reference/rates-at-checkout/update-default-parcel-template"},{"title":"Clear current default parcel template","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml delete /live-rates/settings/parcel-template","href":"/api-reference/rates-at-checkout/clear-current-default-parcel-template"}]},{"group":"Manifests","pages":[{"title":"List all manifests","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /manifests","href":"/api-reference/manifests/list-all-manifests"},{"title":"Create a new manifest","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /manifests","href":"/api-reference/manifests/create-a-new-manifest"},{"title":"Retrieve a manifest","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /manifests/{ManifestId}","href":"/api-reference/manifests/retrieve-a-manifest"}]},{"group":"Orders","pages":[{"title":"List all orders","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /orders","href":"/api-reference/orders/list-all-orders"},{"title":"Create a new order","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /orders","href":"/api-reference/orders/create-a-new-order"},{"title":"Retrieve an order","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /orders/{OrderId}","href":"/api-reference/orders/retrieve-an-order"}]},{"group":"Carrier Parcel Templates","pages":[{"title":"List all carrier parcel templates","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /parcel-templates","href":"/api-reference/carrier-parcel-templates/list-all-carrier-parcel-templates"},{"title":"Retrieve a carrier parcel templates","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /parcel-templates/{CarrierParcelTemplateToken}","href":"/api-reference/carrier-parcel-templates/retrieve-a-carrier-parcel-templates"}]},{"group":"Parcels","pages":[{"title":"List all parcels","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /parcels","href":"/api-reference/parcels/list-all-parcels"},{"title":"Create a new parcel","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /parcels","href":"/api-reference/parcels/create-a-new-parcel"},{"title":"Retrieve an existing parcel","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /parcels/{ParcelId}","href":"/api-reference/parcels/retrieve-an-existing-parcel"}]},{"group":"Pickups","pages":[{"title":"Create a pickup","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /pickups","href":"/api-reference/pickups/create-a-pickup"}]},{"group":"Rates","pages":[{"title":"Retrieve a rate","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /rates/{RateId}","href":"/api-reference/rates/retrieve-a-rate"},{"title":"Retrieve shipment rates","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /shipments/{ShipmentId}/rates","href":"/api-reference/rates/retrieve-shipment-rates"},{"title":"Retrieve shipment rates in currency","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /shipments/{ShipmentId}/rates/{CurrencyCode}","href":"/api-reference/rates/retrieve-shipment-rates-in-currency"}]},{"group":"Refunds","pages":[{"title":"Create a refund","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /refunds","href":"/api-reference/refunds/create-a-refund"},{"title":"List all refunds","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /refunds/","href":"/api-reference/refunds/list-all-refunds"},{"title":"Retrieve a refund","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /refunds/{RefundId}","href":"/api-reference/refunds/retrieve-a-refund"}]},{"group":"Service Groups","pages":[{"title":"List all service groups","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /service-groups","href":"/api-reference/service-groups/list-all-service-groups"},{"title":"Update an existing service group","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml put /service-groups","href":"/api-reference/service-groups/update-an-existing-service-group"},{"title":"Create a new service group","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /service-groups","href":"/api-reference/service-groups/create-a-new-service-group"},{"title":"Delete a service group","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml delete /service-groups/{ServiceGroupId}","href":"/api-reference/service-groups/delete-a-service-group"}]},{"group":"Shipments","pages":[{"title":"List all shipments","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /shipments","href":"/api-reference/shipments/list-all-shipments"},{"title":"Create a new shipment","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /shipments","href":"/api-reference/shipments/create-a-new-shipment"},{"title":"Retrieve a shipment","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /shipments/{ShipmentId}","href":"/api-reference/shipments/retrieve-a-shipment"}]},{"group":"Tracking Status","pages":[{"title":"Register a tracking webhook","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /tracks","href":"/api-reference/tracking-status/register-a-tracking-webhook"},{"title":"Get a tracking status","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /tracks/{Carrier}/{TrackingNumber}","href":"/api-reference/tracking-status/get-a-tracking-status"}]},{"group":"Transactions","pages":[{"title":"List all shipping labels","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /transactions","href":"/api-reference/transactions/list-all-shipping-labels"},{"title":"Create a shipping label","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /transactions","href":"/api-reference/transactions/create-a-shipping-label"},{"title":"Retrieve a shipping label","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /transactions/{TransactionId}","href":"/api-reference/transactions/retrieve-a-shipping-label"}]},{"group":"User Parcel Templates","pages":[{"title":"List all user parcel templates","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /user-parcel-templates","href":"/api-reference/user-parcel-templates/list-all-user-parcel-templates"},{"title":"Create a new user parcel template","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /user-parcel-templates","href":"/api-reference/user-parcel-templates/create-a-new-user-parcel-template"},{"title":"Retrieves a user parcel template","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /user-parcel-templates/{UserParcelTemplateObjectId}","href":"/api-reference/user-parcel-templates/retrieves-a-user-parcel-template"},{"title":"Update an existing user parcel template","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml put /user-parcel-templates/{UserParcelTemplateObjectId}","href":"/api-reference/user-parcel-templates/update-an-existing-user-parcel-template"},{"title":"Delete a user parcel template","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml delete /user-parcel-templates/{UserParcelTemplateObjectId}","href":"/api-reference/user-parcel-templates/delete-a-user-parcel-template"}]},{"group":"Shippo Accounts","pages":[{"title":"List all Shippo Accounts","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /shippo-accounts","href":"/api-reference/shippo-accounts/list-all-shippo-accounts"},{"title":"Create a Shippo Account","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /shippo-accounts","href":"/api-reference/shippo-accounts/create-a-shippo-account"},{"title":"Retrieve a Shippo Account","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /shippo-accounts/{ShippoAccountId}","href":"/api-reference/shippo-accounts/retrieve-a-shippo-account"},{"title":"Update a Shippo Account","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml put /shippo-accounts/{ShippoAccountId}","href":"/api-reference/shippo-accounts/update-a-shippo-account"}]},{"group":"Webhooks","pages":[{"title":"List all webhooks","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /webhooks","href":"/api-reference/webhooks/list-all-webhooks"},{"title":"Create a new webhook","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml post /webhooks","href":"/api-reference/webhooks/create-a-new-webhook"},{"title":"Retrieve a specific webhook","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml get /webhooks/{webhookId}","href":"/api-reference/webhooks/retrieve-a-specific-webhook"},{"title":"Update an existing webhook","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml put /webhooks/{webhookId}","href":"/api-reference/webhooks/update-an-existing-webhook"},{"title":"Delete a specific webhook","deprecated":null,"version":null,"openapi":"/spec/shippoapi/public-api.yaml delete /webhooks/{webhookId}","href":"/api-reference/webhooks/delete-a-specific-webhook"}]},{"group":"API Reference","pages":[{"title":"Batch","version":null,"deprecated":null,"openapi":"/spec/shippoapi/public-api.yaml webhook batch","href":"/api-reference/batch"},{"title":"Track","version":null,"deprecated":null,"openapi":"/spec/shippoapi/public-api.yaml webhook track","href":"/api-reference/track"},{"title":"Transaction","version":null,"deprecated":null,"openapi":"/spec/shippoapi/public-api.yaml webhook transaction","href":"/api-reference/transaction"}]}]},{"group":"Enums","pages":[{"title":"Service Levels","href":"/api-reference/service-levels/index"},{"title":"Parcel Templates","href":"/api-reference/parcel-templates/index"}]},{"group":"Service Levels","hidden":true,"pages":[{"title":"Airterra Service Levels","href":"/api-reference/service-levels/airterra"},{"title":"APC Postal Service Levels","href":"/api-reference/service-levels/apc-postal"},{"title":"APG Service Levels","href":"/api-reference/service-levels/apg"},{"title":"Asendia US Service Levels","href":"/api-reference/service-levels/asendia-us"},{"title":"Australia Post Service Levels","href":"/api-reference/service-levels/australia-post"},{"title":"Jitsu Service Levels","href":"/api-reference/service-levels/axlehire"},{"title":"BetterTrucks Service Levels","href":"/api-reference/service-levels/better-trucks"},{"title":"Canada Post Service Levels","href":"/api-reference/service-levels/canada-post"},{"title":"Chronopost Service Levels","href":"/api-reference/service-levels/chronopost"},{"title":"Colissimo Service Levels","href":"/api-reference/service-levels/colissimo"},{"title":"Correos España Service Levels","href":"/api-reference/service-levels/correos-espana"},{"title":"Deutsche Post Service Levels","href":"/api-reference/service-levels/deutsche-post"},{"title":"DHL eCommerce Service Levels","href":"/api-reference/service-levels/dhl-ecommerce"},{"title":"DHL Express Service Levels","href":"/api-reference/service-levels/dhl-express"},{"title":"DHL Germany Service Levels","href":"/api-reference/service-levels/dhl-germany"},{"title":"DPD GERMANY Service Levels","href":"/api-reference/service-levels/dpd-de"},{"title":"DPD UK Service Levels","href":"/api-reference/service-levels/dpd-uk"},{"title":"Aramex Service Levels","href":"/api-reference/service-levels/fastway-australia"},{"title":"FedEx Service Levels","href":"/api-reference/service-levels/fedex"},{"title":"Globegistics Service Levels","href":"/api-reference/service-levels/globegistics"},{"title":"GLS US Service Levels","href":"/api-reference/service-levels/gls-us"},{"title":"Evri UK Service Levels","href":"/api-reference/service-levels/hermes-uk"},{"title":"LaserShip Service Levels","href":"/api-reference/service-levels/lasership"},{"title":"LSO Service Levels","href":"/api-reference/service-levels/lso"},{"title":"Mondial Relay Service Levels","href":"/api-reference/service-levels/mondial-relay"},{"title":"OnTrac Service Levels","href":"/api-reference/service-levels/ontrac"},{"title":"Parcelforce Service Levels","href":"/api-reference/service-levels/parcelforce"},{"title":"Poste Italiane Service Levels","href":"/api-reference/service-levels/poste-italiane"},{"title":"Purolator Service Levels","href":"/api-reference/service-levels/purolator"},{"title":"Royal Mail Service Levels","href":"/api-reference/service-levels/royal-mail"},{"title":"Royal Mail Storefeeder Service Levels","href":"/api-reference/service-levels/royal-mail-sf"},{"title":"ePost Global Service Levels","href":"/api-reference/service-levels/rr-donnelley"},{"title":"Swyft Service Levels","href":"/api-reference/service-levels/swyft"},{"title":"UDS Service Levels","href":"/api-reference/service-levels/uds"},{"title":"UPS Service Levels","href":"/api-reference/service-levels/ups"},{"title":"USPS Service Levels","href":"/api-reference/service-levels/usps"},{"title":"Veho Service Levels","href":"/api-reference/service-levels/veho"}]},{"group":"Addresses API v2","pages":[{"group":"Validation","pages":[{"title":"Validate address","deprecated":null,"version":null,"openapi":"/api-reference/addressesapi/address_v2.yaml get /v2/addresses/validate","href":"/api-reference/validation/validate-address"}]},{"group":"Parser","pages":[{"title":"Parse Address","deprecated":null,"version":null,"openapi":"/api-reference/addressesapi/address_v2.yaml get /v2/addresses/parse","href":"/api-reference/parser/parse-address"}]},{"group":"Address Book","pages":[{"title":"Retrieve a single address","deprecated":null,"version":null,"openapi":"/api-reference/addressesapi/address_v2.yaml get /v2/addresses/{address_id}","href":"/api-reference/address-book/retrieve-a-single-address"},{"title":"Update an address","deprecated":null,"version":null,"openapi":"/api-reference/addressesapi/address_v2.yaml put /v2/addresses/{address_id}","href":"/api-reference/address-book/update-an-address"},{"title":"Delete an address","deprecated":null,"version":null,"openapi":"/api-reference/addressesapi/address_v2.yaml delete /v2/addresses/{address_id}","href":"/api-reference/address-book/delete-an-address"},{"title":"Retrieve addresses","deprecated":null,"version":null,"openapi":"/api-reference/addressesapi/address_v2.yaml get /v2/addresses","href":"/api-reference/address-book/retrieve-addresses"},{"title":"Create a new address","deprecated":null,"version":null,"openapi":"/api-reference/addressesapi/address_v2.yaml post /v2/addresses","href":"/api-reference/address-book/create-a-new-address"}]}]},{"group":"Surcharges API","hidden":true,"pages":[{"group":"Surcharges","pages":[{"title":"List surcharge files","deprecated":null,"version":null,"openapi":"/api-reference/surchargesapi/openapi.yaml get /v2/reports/surcharges","href":"/api-reference/surcharges/list-surcharge-files"},{"title":"Retrieve surcharge file","deprecated":null,"version":null,"openapi":"/api-reference/surchargesapi/openapi.yaml get /v2/reports/surcharges/{file_id}","href":"/api-reference/surcharges/retrieve-surcharge-file"}]}]},{"group":"Reports API","hidden":true,"pages":[{"group":"Reports","pages":[{"title":"Return list of reports","deprecated":null,"version":null,"openapi":"/api-reference/shipporeports/openapi.yaml get /v2/reports/{report_type_uuid}/runs","href":"/api-reference/reports/return-list-of-reports"},{"title":"Download report","deprecated":null,"version":null,"openapi":"/api-reference/shipporeports/openapi.yaml get /v2/reports/{report_type_uuid}/runs/{report_run_uuid}/download","href":"/api-reference/reports/download-report"}]}]},{"group":"Reporting API","hidden":false,"pages":[{"group":"Report Runs","pages":[{"title":"List Report Runs","deprecated":null,"version":null,"openapi":"/api-reference/reporting-api/openapi.yaml get /v2/reporting/runs","href":"/api-reference/report-runs/list-report-runs"},{"title":"Create Report Run","deprecated":null,"version":null,"openapi":"/api-reference/reporting-api/openapi.yaml post /v2/reporting/runs","href":"/api-reference/report-runs/create-report-run"},{"title":"Get Report Run","deprecated":null,"version":null,"openapi":"/api-reference/reporting-api/openapi.yaml get /v2/reporting/runs/{run_id}","href":"/api-reference/report-runs/get-report-run"}]},{"group":"Reports","pages":[{"title":"List Report Types","deprecated":null,"version":null,"openapi":"/api-reference/reporting-api/openapi.yaml get /v2/reporting/reports","href":"/api-reference/reports/list-report-types"},{"title":"Get Report Type","deprecated":null,"version":null,"openapi":"/api-reference/reporting-api/openapi.yaml get /v2/reporting/reports/{report_type}","href":"/api-reference/reports/get-report-type"}]}]},{"group":"Invoices API","hidden":true,"pages":[{"group":"Invoices","pages":[{"title":"List invoice files","deprecated":null,"version":null,"openapi":"/api-reference/shipporeportinvoices/invoices-api.yaml get /v2/reports/invoices","href":"/api-reference/invoices/list-invoice-files"},{"title":"Retrieve invoice file","deprecated":null,"version":null,"openapi":"/api-reference/shipporeportinvoices/invoices-api.yaml get /v2/reports/invoices/{file_id}","href":"/api-reference/invoices/retrieve-invoice-file"}]}]},{"group":"Estimate API","pages":[{"group":"Estimates","pages":[{"title":"Create Estimates","deprecated":null,"version":null,"openapi":"/api-reference/estimateapi/openapi.yaml post /v2/estimates","href":"/api-reference/estimates/create-estimates"}]}]},{"group":"Automations API","hidden":false,"tag":"Beta","pages":[{"group":"Automations","pages":[{"title":"List label-purchase requests","deprecated":null,"version":null,"openapi":"/api-reference/automationsapi/openapi.yaml get /automations/labels","href":"/api-reference/automations/list-label-purchase-requests"},{"title":"Buy a label using your automation rules","deprecated":null,"version":null,"openapi":"/api-reference/automationsapi/openapi.yaml post /automations/labels","href":"/api-reference/automations/buy-a-label-using-your-automation-rules"},{"title":"Get request status","deprecated":null,"version":null,"openapi":"/api-reference/automationsapi/openapi.yaml get /automations/labels/{request_id}","href":"/api-reference/automations/get-request-status"},{"title":"Get the decision behind a selected rate","deprecated":null,"version":null,"openapi":"/api-reference/automationsapi/openapi.yaml get /automations/labels/{request_id}/decision","href":"/api-reference/automations/get-the-decision-behind-a-selected-rate"}]}]},{"group":"Parcel Templates","hidden":true,"pages":[{"title":"Aramex Australia Parcel Templates","href":"/api-reference/parcel-templates/aramex-australia"},{"title":"DHL eCommerce Parcel Templates","href":"/api-reference/parcel-templates/dhl-ecommerce"},{"title":"DPD UK Parcel Templates","href":"/api-reference/parcel-templates/dpd-uk"},{"title":"FedEx Parcel Templates","href":"/api-reference/parcel-templates/fedex"},{"title":"UPS Parcel Templates","href":"/api-reference/parcel-templates/ups"},{"title":"USPS Parcel Templates","href":"/api-reference/parcel-templates/usps"}]}]},{"tab":"Shipping Elements","pages":[{"title":"Shipping Elements","href":"/shipping-elements"}]}]},"basePath":"","title":"Add shipments to a batch - Shippo API Documentation","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DX1Meug0.js","utils-B_OMIQVC.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-ChxhRPMa.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CuKvD8Iv.js","snippetPresets-C5d7p2hp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CfHcE8m4.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C1zZV314.js","shallow-CmQhqCJn.js","getApiPlaygroundDisplay-YRo9s1O7.js","CodeSnippet-RN1MTdfk.js","CodeSnippets-DKLPHxJA.js","Page-BAvA99GL.js","getPastedJson-bz0M41mU.js","icon-CsmhpPrv.js","MethodPill-CNGsVE77.js","DuplicateIcon-DilfU_Z2.js","createIcon-BdsYzQck.js","DynamicMarkdown-CbqEDjbV.js","SectionHeading-O6hXpFCN.js","axios-vUo_bRtp.js","Markdown-nKm-uidQ.js","clsx-ClVdStUn.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CIQkMg3R.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-ImrFS4Fy.js"]}