printdotio / printio-api

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

Webhook and Order Status #32

Closed djeet closed 9 years ago

djeet commented 9 years ago

1) Webhook Not Working : Configured the webhook.But its not hitting the URL on change or order status https://screencloud.net/v/4hN5

2) Order Status Clarity: In documentation it is mentioned that" "each order item has a status attribute that tracks it through the status lifecycle from ‘new’ to ‘delivered' "

2.1) Can we get Order status per shipment? ( As cart at my end splits orders based on how printio will ship the products and status in my cart is handled per order and NOT per item)

2.2) Apart for Hold , Cancelled and New are In production , Shipped also order statuses?

2.3) Is status "Issues" a separate order state?

2.2) Need to know what will be overall order statuses to expect

micahasmith commented 9 years ago

@den1k can you work directly with @djeet to help him solve please?

den1k commented 9 years ago

Hi @djeet, sure let's go through this:

1) You seem to have found a bug in our staging admin panel, that would update the webhook url incorrectly. We're working on a fix. In the meantime I set your webhook-url value to: http://grads.myyearstream.com/new_site/order_status_change.php?orderid= It tried posting to you before but used an invalid address. Now it should work.

2) Please see 3

3) Yes you can, in the JSON payload that we post to your webhook. Since one order can have many items, that each can have varying statuses. Our webhook fires each time one of these items' status changes.

example payload:
{
 "Id"    123
 "Items" [
          {"OrderItemId" 6789
           "Status"      "Shipped"}
          {"OrderItemId" 7891
           "Status"      "InProduction"}
          ]
 }

Re: 2.2. Yes, an order becomes Shipped when some or all of its items are shipped. Re: 2.3. Yes. Re: 2.4. All statuses you can filter on in the admin panel: http://take.ms/l1GFH

Please let me know if we could resolve the POSTing issue to your url.

Thanks for reaching out @djeet!

djeet commented 9 years ago

Thanks @den1k for reply.

Continuing discussion on above Payload.

1) If OrderItemId 6789 is "Shipped" will it have a separate shipment tracking number from OrderItemId 7891 which is still "InProduction".

2) Can there be a case that two products shipped at same time may have separate shipment tracking number?

3) I am yet to configure webhook.But in above Payload i don't see a shipment tracking number.Am i missing something?

den1k commented 9 years ago
  1. Correct. Actually the inProduction item will not yet have a tracking number, but once it gets shipped, it will get a new tracking number, different from the previously shipped item.
  2. Yes that's possible. Some items can get shipped in different packages due to their size, weight or other factors. Every package has it's own tracking number, and can have one or more items.
  3. No, that's just pseudocode. You will find much, much more information in a real payload.

@djeet hope this helps! Feel free to reach out with more questions!