allegro / allegro-api

Issue tracker and wiki for Allegro REST API
https://developer.allegro.pl/
213 stars 39 forks source link

https://api.{environment}/billing/billing-entries #9082

Open zhangxiang33 opened 4 months ago

zhangxiang33 commented 4 months ago

Hello, could you please clarify whether the generation logic of the billing entries endpoint "https://api/.{environment}/billing/billing-entries" in Allegro is synchronous with the orders or if there is a delay in receiving the billing information? When we make a request to fetch orders, we also call this endpoint to retrieve commission and VAT-related amounts, but sometimes we receive an empty response. Could you please provide more information on this matter?

PrzemyslawLukanowski commented 4 months ago

Hello, the billing entry should be returned almost immediately. You can send me a sample order id and trace id where we returned an empty response, so I will check it out.

zhangxiang33 commented 4 months ago

8205c600-13cb-11ef-8204-edfbd9f59bc9 This is the order ID. I noticed that the request to the billing entries endpoint does not return a tracking ID. We made requests for this order between May 17th and May 19th, but there was no information returned. However, when I retried it today, I received a response. Could you please investigate why the response was empty during those days?

PrzemyslawLukanowski commented 4 months ago

Thank you, I've checked our logs and I can't confirm that the response was empty. For example, trace-id c860aa06631304e2, 2024-05-17 13:48:27.812, application *fc0aca7ca, user 27850. Maybe you have been authenticated as another user with no entries? Please let me know when this issue occurs once again.

zhangxiang33 commented 4 months ago

The response appears in the following format: "{"billingEntries":[]}", where the "billingEntries" array is empty. It is not returning null as a whole.

PrzemyslawLukanowski commented 4 months ago

Yes, I understand, but our logs indicate that there wasn't an empty response for this user, that's why I have the assumption that you were using a token for a different seller. Without a sample trace-id from your side, I can't verify this issue.

stale[bot] commented 4 months ago

W tym wątku nie pojawiła się żadna nowa odpowiedź w ciągu 7 dni, dlatego automatycznie oznaczamy go jako przeterminowany. Jeśli w ciągu kolejnych 7 dni nie pojawi się żadna odpowiedź, wątek zostanie zamknięty. Dziękujemy za zaangażowanie w dyskusję i zachęcamy Cię do wypełnienia ankiety dotyczącej naszego wsparcia na forum.


There was no new reply in this thread within 7 days, therefore, we automatically marked it as expired. If no response is received within the next 7 days, this thread will be closed. Thank you for engaging in the discussion. We encourage you to complete our forum support survey.

zhangxiang33 commented 3 months ago

Hello, I observed that it still returns "{"billingEntries":[]}" today. This is trace-id: f84affcea31e0214. Could you please help me investigate the cause of this issue?

PrzemyslawLukanowski commented 3 months ago

Hello, this operation was performed by a different user than before - xxx458, so I assume on this account ('razxxx70') you don't have any billing entries on this page . Could you please log in and confirm it?

zhangxiang33 commented 3 months ago

I apologize for the confusion. I misunderstood your statement. If there is no response at this time, it means that the endpoint is not returning any data. This could be because we normally fetch this API after retrieving the orders.

zhangxiang33 commented 3 months ago

I tested again and after approximately 2 minutes, I fetched the data again and received a response.

zhangxiang33 commented 3 months ago

c5052af4f270351f The request was successful this time, as there were two requests made in close proximity. However, I would like to inquire about the specific situation when a null response was received. Can you provide more details about what happened during that particular instance?

PrzemyslawLukanowski commented 3 months ago

We shouldn't return null, but if received it, please send us trace-id. In this topic you mentioned that you didn't receive null:

The response appears in the following format: "{"billingEntries":[]}", where the "billingEntries" array is empty. It is not returning null as a whole.

PrzemyslawLukanowski commented 3 months ago

No worries :)

zhangxiang33 commented 3 months ago

Could you please provide an explanation

zhangxiang33 commented 3 months ago

Regarding the question I asked above

zhangxiang33 commented 3 months ago

我们不应该返回 null,但如果收到它,请向我们发送 trace-id。在本主题中,你提到你没有收到 null:

响应按以下格式显示:“{”billingEntries“:[]}”,其中“billingEntries”数组为空。它不会作为一个整体返回 null。

What I meant was not to return null, but to return {"billing Entries": []}. I have already explained this and provided trace id. Could you please help me take a look, I observed that it still returns "{"billingEntries":[]}" today. This is trace-id: f84affcea31e0214.

PrzemyslawLukanowski commented 3 months ago

The trace f84affcea31e0214 is from 05.06.24, 08:54 (not from today), where there were no billing entries for the order in the query. They were generated a moment after and that's why we returned them for the trace-id c5052af4f270351f, which is also from 05.06.24, but from 9:55.

zhangxiang33 commented 3 months ago

Sorry, there may be some issues with my description. I found the log today and the request was on 05.06.24. There was no problem because we returned {"billing Entries": []} during our first request, which is why we attempted to retry the request for trace id c5052af4f270351f for the second time. I just want to know why we returned {"billing Entries": []} during our first request

PrzemyslawLukanowski commented 3 months ago

Because during this time there were no billing entries for the order provided in the query parameter.

zhangxiang33 commented 3 months ago

Isn't the billing entry for the order generated together with the order? According to customer feedback, there is a billing entry in the backend when the order is generated. If, as you mentioned, there is no billing entry during this period, could you please ask approximately when the billing entry was generated

PrzemyslawLukanowski commented 3 months ago

Yes, billing entry is generated a moment after the order, it should be returned approximately within one minute, but mostly in a shorter period of time. If the first request had been sent a few seconds later, you would have received a billing entry.

zhangxiang33 commented 3 months ago

Okay, I roughly understand. Thank you

stale[bot] commented 3 months ago

W tym wątku nie pojawiła się żadna nowa odpowiedź w ciągu 7 dni, dlatego automatycznie oznaczamy go jako przeterminowany. Jeśli w ciągu kolejnych 7 dni nie pojawi się żadna odpowiedź, wątek zostanie zamknięty. Dziękujemy za zaangażowanie w dyskusję i zachęcamy Cię do wypełnienia ankiety dotyczącej naszego wsparcia na forum.


There was no new reply in this thread within 7 days, therefore, we automatically marked it as expired. If no response is received within the next 7 days, this thread will be closed. Thank you for engaging in the discussion. We encourage you to complete our forum support survey.