Getting different record counts when using Postman vs. custom Python script

Hi there,

This may be difficult to troubleshoot on a forum, but I’m when running a batch job to get all orders from ShipHero, I’m getting inconsistent record counts.

When I use Postman, I get the correct, expected result; however, when using a custom script, records are inconsistently dropped. Both the script and Postman requests are using the same exact query and variables, so I would expect the same result from both tools.

Are there any recommended next steps for troubleshooting?

All the best,
Colin

Hey @cschouten,

Thanks for reaching out.

Would you mind providing the timestamps or request id’s for both queries?

I’ve seen before that sometimes results are inconsistent between our website and the API, because the API operates in UTC. I’m not sure if this is the case here but I’ll be sure to take a look.

Please let me know if you have any questions or concerns!}

Best,
RayanP

Hey @Rayanp,

Here are those request_ids:

  • Postman: “63c006741648bb601984c7fc”
  • Airflow (MWAA): “63c007fe4140ea3050a2d26f”

There were made within a few minutes of each other, but as you’ll see, each returns a different number of records (Postman returns the correct number).

Thanks for your help!

All the best,
Colin

1 Like

Any updates, @Rayanp?

Hey @cschouten,

Thanks for hanging in there.

Apologize for the delay here, I’m working on trying to replicate the issue. From what I can see the request body’s are pretty much the same outside of the variables. The after variable in postman is empty while the variable in Airflow is “YXJyYXljb25uZWN0aW9uOjA=”.

Postman:

"variables":{   
    "first": 100,
    "after": "",
    "order_date_from": "2019-05-01 00:00:00",
    "order_date_to": "2019-06-01 00:00:00"

Airflow:

"variables": {"first": 100, "after": "YXJyYXljb25uZWN0aW9uOjA=", "order_date_from": "2019-05-01 00:00:00", "order_date_to": "2019-06-01 00:00:00"}}

Best,
RayanP

@Rayanp Thanks for your diligence! To clarify, would setting an after variable in this case cause the issue we’re seeing?

Yup. That was it. I just tested myself, and that was the issue. I’ll correct for this in my code. Thanks @Rayanp !

Hey @cschouten,

Thanks for the heads up.
Glad to have been able to assist!

Best,
RayanP