printdotio / printio-api

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

Webhook not returning Shipment or Tracking details in JSON #36

Open djeet opened 9 years ago

djeet commented 9 years ago

Can i change order status in staging environment & what JSON data is returning in change of each order status?

How does the API behave ? Does each order statuses throw different JSON data?

The scenario i want to test is to get the Tracking Number along with the URL.

Here is the JSON data i have received for cancelling an order:

{"Id":"8403-f5a661f0-616e-4711-af45-a882d716364e","NiceId":"trive8403-","SourceId":"1","Items":[{"Sku":"ProPrint-Gloss-5x7","ProductId":37,"Product":"Professional Prints","Quantity":1,"Status":"Cancelled","Price":{"Price":0.66,"CurrencyCode":"USD","FormattedPrice":"$0.66","CurrencyFormat":"${1}","CurrencyDigits":2},"DiscountAmount":{"Price":0.00,"CurrencyCode":"USD","FormattedPrice":"$0.00","CurrencyFormat":"${1}","CurrencyDigits":2},"Meta":{},"Shipments":[]}],"ShippingTotal":{"Price":4.11,"CurrencyCode":"USD","FormattedPrice":"$4.11","CurrencyFormat":"${1}","CurrencyDigits":2},"ShippingAddress":{"FirstName":"amritansh","LastName":"trivedi","Line1":"mahavir nagar","Line2":"Bangara","City":"new delhi","State":"CA","CountryCode":"US","PostalCode":"99503","Phone":"+918881730658","Email":"amrtansh.1990@gmail.com"},"BillingAddress":{"FirstName":" ","LastName":" ","Line1":" ","City":" ","State":" ","CountryCode":"US","PostalCode":" "}}

If i cannot change order status on my own , can you change the status of couple of orders to be Shipped so i can fetch and store tracking information?

djeet commented 9 years ago

Please update on this .Site is live and need to set up syncing mechanism for WooCommerce orders with Printio orders. Thanks

djeet commented 9 years ago

Hi I did manage to set up webhook in live environment and get shipping data.Below is JSON received. Even though tracking number was received but ShipCarrierName was returned blank.Also Tracking URL is missing from response.

Please advise.

{"Id":"372-e9527b89-f43f-4e68-9961-d17c69ba5bd3","NiceId":"Evaxxx372-e","SourceId":"1","Items":[{"Sku":"ProPrint-Lstr-5x7","ProductId":37,"Product":"Professional Prints","Quantity":1,"Status":"Shipped","TrackingNumber":"9400115901660443272756","ShipCarrierName":"","Price":{"Price":0.67,"CurrencyCode":"USD","FormattedPrice":"$0.67","CurrencyFormat":"${1}","CurrencyDigits":2},"DiscountAmount":{"Price":0.00,"CurrencyCode":"USD","FormattedPrice":"$0.00","CurrencyFormat":"${1}","CurrencyDigits":2},"Meta":{},"Shipments":[{"TrackingNumber":"9400115901660443272756"}]},{"Sku":"ProPrint-Lstr-8x10","ProductId":37,"Product":"Professional Prints","Quantity":1,"Status":"Shipped","TrackingNumber":"9400115901660443272848","ShipCarrierName":"","Price":{"Price":1.40,"CurrencyCode":"USD","FormattedPrice":"$1.40","CurrencyFormat":"${1}","CurrencyDigits":2},"DiscountAmount":{"Price":0.00,"CurrencyCode":"USD","FormattedPrice":"$0.00","CurrencyFormat":"${1}","CurrencyDigits":2},"Meta":{},"Shipments":[{"TrackingNumber":"9400115901660443272848"}]}],"ShippingTotal":{"Price":8.99,"CurrencyCode":"USD","FormattedPrice":"$8.99","CurrencyFormat":"${1}","CurrencyDigits":2},"ShippingAddress":{"FirstName":"Veroxxx","LastName":"Evxxxx","Line1":"xxxxxxx Drive","Line2":"","City":"xxxxxx","State":"CA","CountryCode":"US","PostalCode":"926xxxx","Phone":"(yyy)474-zzzz","Email":"veronxxxx@yahooxxx.com"},"BillingAddress":{"FirstName":" ","LastName":" ","Line1":" ","City":" ","State":" ","CountryCode":"US","PostalCode":" "}}

micahasmith commented 9 years ago

looking into it...