RMA_labels "updated_at"

I am running this query:
{returns(date_from:“2000-10-01”){complexity data(first:500 ){pageInfo{hasNextPage endCursor} edges{node{id legacy_id order{ order_number rma_labels{created_at id tracking_number legacy_id status delivered picked_up updated_at}} reason status reason created_at exchanges{exchange_items{id sku quantity}} line_items{ id return_id type reason quantity line_item{sku price} condition}}}}}}

Here is a sample node from the results.

“node”: {
“id”: “UmV0dXJuOjE0Mzc1NTI=”,
“legacy_id”: 1437552,
“order”: {
“order_number”: “WK6127”,
“rma_labels”: [
“created_at”: “2020-08-28T15:54:01+00:00”,
“id”: “Uk1BTGFiZWw6MTY5MjkxNQ==”,
“tracking_number”: “1Z8A063A9095972668”,
“legacy_id”: null,
“status”: “valid”,
“delivered”: false,
“picked_up”: false,
“updated_at”: “2020-08-28T15:54:01+00:00”
“reason”: "Please exchange for a large. Thank you ",
“status”: “complete”,
“created_at”: “2020-08-28T15:53:57+00:00”,
“exchanges”: [],
“line_items”: [
“id”: “UmV0dXJuSXRlbToyMzE0MTk0”,
“return_id”: “UmV0dXJuOjE0Mzc1NTI=”,
“type”: null,
“reason”: null,
“quantity”: 1,
“line_item”: {
“sku”: “52307 HONE M”,
“price”: “698.00”
“condition”: “Too Small”

Why is the RMA Label “created_at” the same as the “updated_at”. I am trying to use the updated date to determine when the Return is completed. Maybe there is a better way?

Hello @bbarrett it seems the status field “status”: “complete”, would be the right approach, but let me confirm.

Yes. I would agree. All I need is a way to get the “updated_at” date. In my tests its always the same as the “created_at”. This is what I am trying to figure out.

Any chance someone in support can respond to this?

Why is the RMA Label “created_at” the same as the “updated_at”. I am trying to use the updated date to determine when the Return is completed. Maybe there is a better way?

hello @bbarrett I asked with engineering team as soon they reply me I let you know.

Hi @bbarrett!
Would looking at

  • status
  • total_items_expected
  • total_items_received
  • total_items_restocked

Work for that purpose?
That way if the status is completed you can say it’s complete and that there are no items pending to receive back.
You could also complement this with the return update webhook: https://developer.shiphero.com/webhooks#return-update-webhook

Just to confirm. Your queries have no way to return the actual DateTime for when a return is completed. The only solution is to handle webhooks. Correct?

If this accurate, id like to make a request that you add a “completed_at” field in the return record.

Correct @bbarrett, webhooks will work for any kind of update on the return.
I will make that request then and let you know as soon as I get a response back.

The request would be to include the updated_at field on a return, something like this:

query {
  returns(date_from: "2000-10-01") {
    data(first: 500) {
      pageInfo {
      edges {
        node {

That way you will have the status and update at fields.
Would that work for you?
Thanks again!

Ideally there would be both the “completed_at” date specifically and an “updated_at”. But I’ll take what I can get.

If you think through using webhooks to facilitate generating a reports of returns with the completed at date…

I would need to trap webhook events and save all the return completed dates into some local database. Then join my report data to the local database for getting the completed date. Moreover, you state in your documentation that you do not guarantee the web hooks will always fire! And that developers should always run some kind of “reconciliation” to fill in the data that failed in webhooks. Obviously, this would not work for the return completed_at because it can ONLY be gotten from the webhook.

Anyway… Yes. This might be possible but would be a horrible design. I hope your development staff recognize this. The completed date for a return is a basic element of a return and it should be saved on the return record and easily returned in the Return queries.

Thanks for confirming that @bbarrett!

For that purpose, you could compare the status of the order you have with the one you get from our API and check if there is any difference for the returns not completed yet for example.

Perfect then! I logged the request to expose the updated_at. That way between updated_at and status you can see when it was completed.

I will let you know as soon as I get a response about it.
Thanks again!