-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amazon MWS is depracated and calls are failing[BUG] #113
Comments
@bohdan-vorona can you take the lead on this one? The original way this functionality worked was like this:
Here is what will be needed for integrating with Amazon SP API:
|
@cgsmith ok |
@cgsmith I'm asking just in case. 1) You started adding and using classes from
So, if I'm correct, as the result, we must have a new class which uses this 2) I saw you extended the plugins from 3) In the test data I have only one order with "Shipping=Amazon FedEx" but without any needed data (it's empty). I can try to change existing test data but maybe, if it's possible, you can send real data related to Amazon shipping? With items, packages, etc. |
Yes all amazon carriers and services will use the SP API functionality. I think we can use the directPurchase wrapper as I think that just selects the best rate and provides a label. We can add rate request in later. I'll get some production data today and post here. |
1 similar comment
Yes all amazon carriers and services will use the SP API functionality. I think we can use the directPurchase wrapper as I think that just selects the best rate and provides a label. We can add rate request in later. I'll get some production data today and post here. |
@cgsmith thanks |
@bohdan-vorona here is an open order for Tia Lupita that you can test with a label. If a label is generated please send it to me so the warehouse can fulfill it: INSERT INTO shipwise.orders (id, customer_id, order_reference, customer_reference, status_id, tracking, created_date, updated_date, address_id, notes, uuid, requested_ship_date, carrier_id, service_id, origin, po_number, label_data, label_type, ship_from_name, ship_from_address1, ship_from_address2, ship_from_city, ship_from_state_id, ship_from_zip, ship_from_country_code, ship_from_phone, ship_from_email, transit, packagingNotes, must_arrive_by_date) VALUES (2688656, 49, '2732379', '113-2709605-8262607', 8, null, '2023-02-09 13:10:10', '2023-02-09 13:15:09', 2464822, 'STL', '113-2709605-8262607', '2023-02-10 00:00:00', 3, 29, 'AmazonSPAPI', null, null, null, 'Tia Lupita', '', '', '', 0, '', null, '', '', 2, '', null);
INSERT INTO shipwise.items (id, order_id, quantity, sku, name, uuid, alias_quantity, alias_sku, notes, type) VALUES (62253903, 2688656, 1, 'U-HS-HOT', 'Tia Lupita Hot Sauce | 8 oz x 1 Bottle | Flavorful Heat, Medium ', '73410353121921', null, null, null, '');
INSERT INTO shipwise.items (id, order_id, quantity, sku, name, uuid, alias_quantity, alias_sku, notes, type) VALUES (62253904, 2688656, 1, 'PKG6X6X6', 'Liner', null, null, null, null, '');
INSERT INTO shipwise.items (id, order_id, quantity, sku, name, uuid, alias_quantity, alias_sku, notes, type) VALUES (62253905, 2688656, 1, 'RNBW-INS', 'Insert', null, null, null, null, '');
INSERT INTO shipwise.items (id, order_id, quantity, sku, name, uuid, alias_quantity, alias_sku, notes, type) VALUES (62253906, 2688656, 1, 'BBLE-BAG-4X7', 'Bubble bag', null, null, null, null, ''); |
@cgsmith thanks |
Here I pushed some of my work - https://github.com/CGSmith-LLC/shipwise-api/tree/hotfix/113-amazon-mws-deprecated What I did:
In |
Thanks @bohdan-vorona - I will try to look at today. I don't think the packages are required if we are using the use I will test though. |
I was running tests with the direct purchase shipment method. I receive this error which I think is from Amazon... @bohdan-vorona I am wondering if you can get started on adding a call to their rating API? Not sure if this would help with the issue or if it is just and error on Amazon's side. I'll open a request with Amazon. I did have to add some logic for the packages loop. Ideally the weight, height, width will come from Amazon when I pull orders in (working on that in my integration script). Here is the updated INSERT INTO cgsmpoim_shipwise.orders (id, customer_id, order_reference, customer_reference, status_id, tracking, created_date, updated_date, address_id, notes, uuid, requested_ship_date, carrier_id, service_id, origin, po_number, label_data, label_type, ship_from_name, ship_from_address1, ship_from_address2, ship_from_city, ship_from_state_id, ship_from_zip, ship_from_country_code, ship_from_phone, ship_from_email, transit, packagingNotes, must_arrive_by_date) VALUES (2574455, 49, null, '114-6493630-9001822', 9, null, '2023-02-13 12:42:15', '2023-02-13 13:16:09', 2350564, 'PRIME', '114-6493630-9001822', '2023-02-13 00:00:00', 1, 27, 'AmazonSPAPI', null, null, null, 'Tia', '34 Fairmont City Blvd', null, 'Fairmont City', 14, '62071', null, '618-227-2700', null, null, null, null); |
Attaching the debug log from jlevers library. |
@cgsmith Thanks. Yes, it seems that the issue on Amazon's side and related to |
Ok. Let me know if you need anything from me. I looked at that call and it looks like a couple requests need to be sent first. |
@cgsmith 👌 |
@bohdan-vorona added my code changes |
@cgsmith Implementing the new approach with requesting rates first, now I get:
I played with different request data formats, and, for example, if omit
It's "a bit better"... The lib we use has its own validation. Actually, I recognized it at the beginning when I started working with it and I used the validation rules for classes of the lib. The data I send to Amazon passes the validation rules of the lib. Also, I tried to send raw data without any library using Talend API (an analogue of Postman). In all cases, Amazon returns errors but without any explanations... The worst API ever)) Just take a look:
It sends some useful headers that can be used to contact them ( For
For
How critical this task is? There is their contact email on the page https://developer-docs.amazon.com/amazon-shipping/docs/shipping-api-v2-reference - probably it's worth contacting them by providing the |
It is a priority to fix and switch to. I did open a ticket but did not send them the Request ID. I'll add that on the ticket. I have |
Ok, I understand.
Thanks. Please let me know if there is any response from them)
Yes, please. Maybe it would be helpful. |
Describe the bug
When the user is trying to print for Amazon shipping labels the MWS calls are failing. SP API needs to be used instead.
Error
The text was updated successfully, but these errors were encountered: