printdotio / printio-api

Issues + wiki for the api. See http://print.io/api
0 stars 0 forks source link

Problems with Shipping Prices #21

Closed dafinley closed 9 years ago

dafinley commented 9 years ago

I created a jsfiddle trying to get shipping prices for the canvas wrap. But it is not returning a price for the items...It works for other items, but we definitely would not want to have a zero shipping being added for an order like 5 canvas wraps. Any clues - http://jsfiddle.net/starlineventures/dxn3w3e8/

AustenB commented 9 years ago

It works just fine for your recipe. The response is below.

For testing the API use:

api.print.io/docs

It will always give you the correct API results.

Input:

{ "ShipToPostalCode": "70130", "ShipToCountry": "US", "ShipToState": "LA", "CurrencyCode": "USD", "LanguageCode": "en", "Items": [ { "SKU": "CanvsWrp-WhtWrp-32x48", "Quantity": "5" } ] }

Output:

{ "Result": [ { "SKUs": [ "CanvsWrp-WhtWrp-32x48" ], "ShipOptions": [ { " CarrierName": "Standard", "MethodType": "Standard", "Name": "Standard", " Price": { "Price": 90, "CurrencyCode": "USD", "FormattedPrice": "$90.00", " CurrencyFormat": "${1}", "CurrencyDigits": 2 }, "Id": 1, " EstBusinessDaysTilDelivery": 12, "MethodId": 3 }, { "CarrierName": "Expedited", "MethodType": "Expedited", "Name": "Expedited", "Price": { " Price": 215, "CurrencyCode": "USD", "FormattedPrice": "$215.00", " CurrencyFormat": "${1}", "CurrencyDigits": 2 }, "Id": 2, " EstBusinessDaysTilDelivery": 4, "MethodId": 5 }, { "CarrierName": "Overnight", "MethodType": "Overnight", "Name": "Overnight", "Price": { " Price": 319.75, "CurrencyCode": "USD", "FormattedPrice": "$319.75", " CurrencyFormat": "${1}", "CurrencyDigits": 2 }, "Id": 3, " EstBusinessDaysTilDelivery": 2, "MethodId": 7 } ] } ] }

On Wed, Apr 8, 2015 at 11:15 PM, Starline Ventures <notifications@github.com

wrote:

I created a jsfiddle trying to get shipping prices for the canvas wrap. But it is not returning a price for the items...It works for other items, but we definitely would not want to have a zero shipping being added for an order like 5 canvas wraps. Any clues - http://jsfiddle.net/starlineventures/dxn3w3e8/

— Reply to this email directly or view it on GitHub https://github.com/printdotio/printio-api/issues/21.

Austen Bernstein Founder & CEO printio

dafinley commented 9 years ago

Strange man...my object is empty? screenshot 2015-04-09 at 4 54 28 am

dafinley commented 9 years ago

You'll see the ShipOptions: Array[0] is an empty array. The __proto stuff is just helper functions and variables

vsergi23 commented 9 years ago

all is there @dafinley https://api.print.io/docs/#!/shippingprices/Get_post_0 screenshot 2015-04-09 12 05 25 screenshot 2015-04-09 12 05 32 screenshot 2015-04-09 12 05 49 screenshot 2015-04-09 12 05 56 screenshot 2015-04-09 12 10 18

dafinley commented 9 years ago

Strange man...I do not see what you see?? screenshot 2015-04-09 at 5 17 33 am screenshot 2015-04-09 at 5 17 21 am

vsergi23 commented 9 years ago

@dafinley country code should be 2 symbols -- US instead of _USA_

dafinley commented 9 years ago

Whenever I swap out a new SKU...it works as expected but the Canvas wrap sku is giving me blank objects in return screenshot 2015-04-09 at 5 21 01 am screenshot 2015-04-09 at 5 20 29 am

dafinley commented 9 years ago

Changing the Country Code Worked!!...It threw me off because it always returned a good response up until then.

dafinley commented 9 years ago

I updated the JSFiddle to point to address in Rio de Janeiro, but I am unable to get a shipping price. All the relevant data is contained in the JS Fiddle including the link to the google maps address...it is the address of a hotel. Can you guys help? http://jsfiddle.net/starlineventures/dxn3w3e8/

AustenB commented 9 years ago

What product -> some products don't ship to Brazil due to customs, inport taxes and fees. Etc.

We will be adding more manufacturers in Brazil to avoid this issue.

On Mon, Apr 13, 2015 at 7:45 PM, Starline Ventures <notifications@github.com

wrote:

I updated the JSFiddle to point to address in Rio de Janeiro, but I am unable to get a shipping price. All the relevant data is contained in the JS Fiddle including the link to the google maps address...it is the address of a hotel. Can you guys help? http://jsfiddle.net/starlineventures/dxn3w3e8/

— Reply to this email directly or view it on GitHub https://github.com/printdotio/printio-api/issues/21#issuecomment-92537876 .

Austen Bernstein Founder & CEO printio

dafinley commented 9 years ago

Ahhh...these are canvas wraps. Do you think Europe has more coverage?

AustenB commented 9 years ago

Yes it definitely does. What size are you using.

For Canvas (use the 12x12 inch ones) to test where they are available.

so the same sku - just use 12x12 (since the 32x48 might not be a normal size ordered internationally.)

On Mon, Apr 13, 2015 at 7:49 PM, Starline Ventures <notifications@github.com

wrote:

Ahhh...these are canvas wraps. Do you think Europe has more coverage?

— Reply to this email directly or view it on GitHub https://github.com/printdotio/printio-api/issues/21#issuecomment-92538746 .

Austen Bernstein Founder & CEO printio

dafinley commented 9 years ago

Much appreciated....It does not look like the state code matters outside of the US...it seems like as long as the Postal Code matches the Country Code...we will get a result that comes back in a price based off the currency code sent. screenshot 2015-04-13 at 8 05 21 pm

dafinley commented 9 years ago

For some reason, I'm still having more issues with the Shipping Price API. The price to ship a single throw pillow is coming back as $26.31??? When it should be more like $11 screenshot 2015-04-22 at 12 24 16 am

screenshot 2015-04-22 at 12 20 14 am

dafinley commented 9 years ago

Should be one...the price that is coming back for $26 is using a single pillow as an example...not 4. { "ShipToPostalCode": "70458", "ShipToCountry": "USA", "ShipToState": "LA", "CurrencyCode": "USD", "LanguageCode": "EN", "Items": [ { "SKU": "ThrowPillow_Sewn_16x16", "Quantity": "1" } ] };

micahasmith commented 9 years ago

weird. going to forward to our data team

dafinley commented 9 years ago

Thanks!!

AustenB commented 9 years ago

You must use country code US - not USA.

I apologize for our documentation. It should state this specifically

On Wed, Apr 22, 2015 at 1:26 AM, Starline Ventures <notifications@github.com

wrote:

Should be one...the price that is coming back for $26 is using a single pillow as an example...not 4. { "ShipToPostalCode": "70458", "ShipToCountry": "USA", "ShipToState": "LA", "CurrencyCode": "USD", "LanguageCode": "EN", "Items": [ { "SKU": "ThrowPillow_Sewn_16x16", "Quantity": "1" } ] };

— Reply to this email directly or view it on GitHub https://github.com/printdotio/printio-api/issues/21#issuecomment-95039080 .

Austen Bernstein Founder & CEO printio

dafinley commented 9 years ago

Nope that was my fault. You guys told me that ALREADY!! I think I was using old code. Thanks for clearing this up so quick.

AustenB commented 9 years ago

@dafinley no problem. Closing issue.

We will update the docs for the Shipping Section specifically to make sure people dont use 3 digit country codes and will update error references for such.