Comments (7)
In Postman, you could use a raw JSON body like the following which works as intended:
curl -X POST https://api.easypost.com/v2/trackers/create_list \
-u "API_KEY:" \
-H "Content-Type: application/json" \
-d '{"trackers":{
"0":{"tracking_code":"EZ1000000001", "carrier":"USPS"},
"1":{"tracking_code":"EZ1000000001", "carrier":"USPS"},
"2":{"tracking_code":"EZ1000000001", "carrier":"USPS"},
"3":{"tracking_code":"EZ1000000001", "carrier":"USPS"}
}}'
There is a bug here where the API key is getting the tracking code as a value so the request fails because the tracking code getting passed isn't a valid API key. We'll need to patch this.
from easypost-python.
Hey @jmnmv12 thanks for reporting this! Are you able to provide a little snippet of code and/or a couple tracking numbers so we could try recreating this on our end? Most likely this isn't an API key issue but something wrong in the code either in the client library or API.
from easypost-python.
Hey, yeah of course you can recreate it by running this snippet:
easypost.api_key = "MY_API_KEY"
tracker_list = [
{
"tracking_code": "EZ1000000001",
"carrier": "USPS"
}
]
easypost.Tracker.create_list(tracker_list)
I used one of your test tracking codes in this case.
from easypost-python.
I tried to do the same request through Postman and there I don't receive this error, but because I don't know what is the expected request body, I end up receiving a 500 Internal Server Error
. Do you know where I should look to understand what type of request you are expecting on this endpoint? I took a look at your documentation but I couldn't find anything about this.
from easypost-python.
Okay thank you for the help 👌
from easypost-python.
@jmnmv12 I would highly recommend most of our users stick to using our publicly documented endpoint for creating individual trackers https://www.easypost.com/docs/api#create-a-tracker.
Even if you have a high volume of trackers to create, this endpoint should be able to handle high request volume. Feel free to hit up [email protected] if you have any problems.
from easypost-python.
This should have been corrected and will be included in v7.0.0; however, I'd also recommend what @LoganSimonsen suggested and use our normal trackers endpoint as it's more stable than creating trackers in bulk.
from easypost-python.
Related Issues (20)
- Transliteration of non-roman text HOT 1
- Shipment.create error message with no details HOT 2
- Error Handling Around Customs Items Not Exposing Proper Message HOT 4
- Encode Bodies as JSON Instead of urlencoding
- Adapter max_retries initialization won't work for older requests library that might be installed HOT 8
- Testing in local appengine environment causes non-test-failure errors
- VCR playback appears to mask errors HOT 4
- Investigate if this error occurs for other objects/fields or is only for this one field `customs_item['description']`
- Adding Insurance Throwing A Circular Import Error HOT 4
- [Bug]: Looking for easypost.beta HOT 3
- Swap Update Brand, Carrier, User, and Webhook Endpoints to use PATCH HTTP Method HOT 1
- Update Partner White Label Tests to Account for New `has_more` and `referral_customers` keys HOT 1
- Disable SSL Verification HOT 4
- [Bug]: trouble using tax_identifiers on each shipment of an order. HOT 1
- [Bug]: Problem Getting a report that was previously created. HOT 1
- [Bug]: easypost.Event.retrieve_all_payloads results in AttributeError: type object 'Payload' has no attribute 'construct_from' HOT 3
- [Bug]: AttributeError: EndShipper object has no attribute _unsaved_values HOT 10
- [Feat]: Upgrade Guide HOT 1
- [Bug]: `ShipmentService.regenerate_rates` has incorrect return value type HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easypost-python.