Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion official/guides/carriers/amazon/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"unit": "USD",
"value": 20.0
},
"serial_numbers": ["000123", "000456"]
"serial_numbers": ["000123", "000456"],
"description": "Cotton T-Shirt",
"hs_tariff_number": "610910"
}
]
}
Expand Down
6 changes: 5 additions & 1 deletion official/guides/create-carrier-curls/amazonshipping.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ curl -X POST https://api.easypost.com/v2/carrier_accounts/register_oauth \
"type": "AmazonShippingAccount",
"description": "My Shipping Account (optional)",
"reference": "Internal reference id (optional)",
"return_to_url": "https://example.com (optional)"
"return_to_url": "https://example.com (optional)",
"credentials": {
"account_type": "shipper",
"account_country": "US"
}
}
}'
23 changes: 23 additions & 0 deletions official/guides/create-carrier-curls/logissimo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
curl -X POST https://api.easypost.com/v2/carrier_accounts \
-u "$EASYPOST_API_KEY": \
-H 'Content-Type: application/json' \
-d '{
"carrier_account": {
"type": "LogissimoAccount",
"description": "LogissimoAccount",
"credentials": {
"api_key": "VALUE",
"api_username": "VALUE",
"client_id": "VALUE",
"password": "VALUE",
"shipper_account_number": "VALUE"
},
"test_credentials": {
"api_key": "VALUE",
"api_username": "VALUE",
"client_id": "VALUE",
"password": "VALUE",
"shipper_account_number": "VALUE"
}
}
}'
9 changes: 6 additions & 3 deletions tools/build_create_carrier_curl_requests/build_curls.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,16 @@ def add_credential_structure(carrier_output: str, carrier: dict[str, str]) -> st
elif carrier["type"] in OAUTH_CUSTOM_WORKFLOW_CARRIERS:
carrier_account_json = {
"carrier_account_oauth_registrations": {
"type": carrier["type"],
"type": "AmazonShippingAccount",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just confirming that we wont this hard coded?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is intentional. We hardcode the type for the OAuth workflow examples so the generated cURL shows the correct payload for the specific carrier.

"description": "My Shipping Account (optional)",
"reference": "Internal reference id (optional)",
"return_to_url": "https://example.com (optional)"
"return_to_url": "https://example.com (optional)",
"credentials": {
"account_type": "shipper",
"account_country": "US"
}
}
}

carrier_output += f" -d '{json.dumps(carrier_account_json, indent=2)}'"
carrier_output += END_CHARS
# DoorDash
Expand Down
Loading