allegro / allegro-api

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

Internal system error response recived #7584

Closed Harpreet-StreamMarket closed 12 months ago

Harpreet-StreamMarket commented 1 year ago

Hello Team,

We have tried to implement your Allegro rest API but I am facing an issue. I have successfully created the parcel and called the next request Get parcel creation status it returns me an Internal system error. Can you please look into this?

Let me know if you need more brief from my side.

2023-09-05T08:16:52+00:00 INFO (6): Array ( [id] => UUID [parcelId] => [status] => ERROR [errors] => Array ( [0] => Array ( [code] => ERROR [message] => Internal system error [details] => [path] => [userMessage] => error.common.internal )

    )

)

MartaNowaczyk commented 1 year ago

Hello! The reason may be temporary unavailability of the service. We had such a situation yesterday. There may be other reasons as well. If after another attempt to create a parcel this error appears again, come back with trace-id and/or full path of request with commandId for verification.

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

Thanks for your reply I have created parcels with different service IDs as well but all have returned the same error.

Yesterday it was working fine same request, parameters but from morning all requests returned an internal system error.

CommandId - c5deaa3e-3e30-4a1b-ba00-2736e85cadeb 6cc0fe79-02d8-4d52-8349-c0ab9ee088bb

Can I directly paste the full path of the request there because, in the request path, we have some confidential data?

MartaNowaczyk commented 1 year ago

OK, thank you. We will check it. I'll be back with information when we determine the cause of the problem.

Harpreet-StreamMarket commented 1 year ago

Ok thanks, I am waiting for your reply.

Meanwhile, I have posted 1 more issue when we have to try to cancel labels via API it returns the below error msg.

Feature unavailable. Contact the application author

MartaNowaczyk commented 1 year ago

For the "Feature unavailable. Contact the application author" error, check that the path is correct https://api.{environment}/parcel-management/parcel-cancel-commands/{commandId}. If you still have a problem I would need to see what you are sending in the request.

Harpreet-StreamMarket commented 1 year ago

Hi,

Please see below the request.

curl -X PUT \ 'https://api.allegro.pl/parcel-management/parcel-cancel-commands/8adf4252-f39c-4acb-b20d-105f495453b9' \ -H 'Authorization: Bearer {token}' \ -H 'Accept: application/vnd.allegro.public.v1+json' \ -H 'Content-Type: application/vnd.allegro.public.v1+json' \ -d '{ "parcelId": "bf547306-9a0d-479a-869f-bf4c1a432538" - Parcel ID }'

Response

2023-09-05T11:45:51+00:00 INFO (6): Array ( [errors] => Array ( [0] => Array ( [code] => VALIDATION_ERROR [message] => Command UUID should be unique [details] => [path] => [userMessage] => ID komendy musi być unikalne )

    )

)

MartaNowaczyk commented 1 year ago

As far as I can see the package is already canceled. For GET /parcel-management/parcel-create-commands/8adf4252-f39c-4acb-b20d-105f495453b9 you got "status": "SUCCESS".

For a different/new request you should use a unique commandId, and you do another PUT with the same commandId.

Harpreet-StreamMarket commented 1 year ago

Hi,

As far as I can see the package is already canceled Comment - Due to the above error I have manually canceled this parcel. Once the above 1st parcel creates an issue fixed I will test more canceled call requests and let you know but for the time below one is very critical for us

image

MartaNowaczyk commented 1 year ago

I am still waiting for verification from the team responsible for this functionality. I will definitely let you know.

Harpreet-StreamMarket commented 1 year ago

OK, meanwhile can you also confirm yesterday I successfully generated one label but it displays separation lines Is there any way we can remove these separation lines Basically I am talking about the yellow area?

image

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

Any update above its very urgent?

image

MartaNowaczyk commented 1 year ago

Verification is still in progress, so I will let you know as soon as we can determine the cause of the problem.

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

Any update please It is very urgent for us we have to hold our labels due to this issue.

MartaNowaczyk commented 1 year ago

Hi, yesterday we had technical problems with this service that required urgent work on our side, so your request is still under review. I apologize for the extended waiting time. We will try to find a solution to your problem as soon as possible.

Harpreet-StreamMarket commented 1 year ago

Ok, thanks i am waiting for your next update.

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

Can you also confirm one more thing when we have to successfully generate allegro labels like DHL, and One Box you have only the return labels not sending any tracking details If yes then why have you not returned the tracking details (numbers) after successfully generating the label?

Is there any specific API available for this which returns tracking data?

MartaNowaczyk commented 1 year ago

You should use GET /order/carriers/{carrierId}/tracking?waybill={waybill} to retrieve parcels statuses history. Read more in our guide.

MartaNowaczyk commented 1 year ago

The error "error.common.internal" should no longer occur. Of course, if you still ask about the shipping status of this shipment you will get the same error (old commandId). With the new one it should no longer appear.

Harpreet-StreamMarket commented 1 year ago

Ok let me check

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

I have tried to create a new request but it still gives me the same error can you please check?

[userMessage] => error.common.internal

UUID - 4b3f7b3d-d9e3-4ba0-a266-354885652656

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

I have tried to create a new request today but it gives the same error please see below.

2023-09-11T05:22:47+00:00 INFO (6): Array ( [id] => 7e4e7f29-0530-4022-84d9-9a7933979768 [parcelId] => [status] => ERROR [errors] => Array ( [0] => Array ( [code] => ERROR [message] => Internal system error [details] => [path] => [userMessage] => error.common.internal )

    )

)

MartaNowaczyk commented 1 year ago

Thank you for the verification and new data. I have forwarded this case to the relevant team, so I will come back with a response after verification.

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

Any update above?

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

it's very urgent for us to hold a lot of labels to release only for this issue Can you please look into this as a high priority?

MartaNowaczyk commented 1 year ago

Yes I understand, I will try to raise the priority.

MartaNowaczyk commented 1 year ago

It looks like we have inappropriate error messages - we will correct this. The error is due to the fact that you do not specify the dimensions of the parcel. Sorry for the long wait for a response.

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

So parcel dimension is required for this call because in your API doc, it's not required Please confirm?

If parcel dimension is required what are the dimensions we need to send for services any doc available?

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

I have passed the parcel dimension that you mentioned it returns the following error.

2023-09-13T05:10:48+00:00 INFO (6): Array ( [id] => 993e4ac8-ab28-4726-9193-90056db56cba [parcelId] => [status] => ERROR [errors] => Array ( [errors] => Array ( [0] => Array ( [code] => ERROR [message] => Internal system error [details] => [path] => [userMessage] => error.common.internal )

    )
        [1] => Array
            (
                [code] => DELIVERY_METHOD_NOT_AVAILABLE
                [message] => Delivery Method is not available for this order
                [details] => Delivery Method is not available for this order
                [path] => /serviceId
                [userMessage] => Wybrana metoda dostawy nie obsługuje tego zamówienia
            )

    )

)

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

All new API requests return the same error can you please look into this on an urgent basis?

2023-09-13T05:41:19+00:00 INFO (6): Array ( [id] => 4619e300-4a75-48ea-bcd7-0600d233626c [parcelId] => [status] => ERROR [errors] => Array ( [0] => Array ( [code] => DELIVERY_METHOD_NOT_AVAILABLE [message] => Delivery Method is not available for this order [details] => Delivery Method is not available for this order [path] => /serviceId [userMessage] => Wybrana metoda dostawy nie obsługuje tego zamówienia )

    )

)

MartaNowaczyk commented 1 year ago
  1. We do not have it marked as required, because not all carriers require it.

  2. Here we have a different error message. 

 I checked the case: 993e4ac8-ab28-4726-9193-90056db56cba This error occurs because the customer selected the delivery method "0e4c7d59-64b6-4b06-89c3-c1d941506dd0", and you provided "a3b4db98-4a70-4542-84ee-c642604d9d8a" when you created the parcel. Customer's chosen method must match the serviceId.

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

Please check the new request and let me know where I am wrong?

UUID => 7b5c6b8d-61bd-4559-82a5-6a77b8b3cc6c serviceId => a3b4db98-4a70-4542-84ee-c642604d9d8a

Response 2023-09-13T09:49:10+00:00 INFO (6): Array ( [id] => 7b5c6b8d-61bd-4559-82a5-6a77b8b3cc6c [parcelId] => [status] => ERROR [errors] => Array ( [0] => Array ( [code] => DELIVERY_METHOD_NOT_AVAILABLE [message] => Delivery Method is not available for this order [details] => Delivery Method is not available for this order [path] => /serviceId [userMessage] => Wybrana metoda dostawy nie obsługuje tego zamówienia )

    )

)

MartaNowaczyk commented 1 year ago

This is the same case as I described above. You should use as serviceId - "0e4c7d59-64b6-4b06-89c3-c1d941506dd0". As a "serviceId" you should use a value from the "delivery.method.id" field from GET /order/checkout-forms/{id} resource.

Harpreet-StreamMarket commented 1 year ago

Hi,

Thanks for sharing the above information Please check the new request customer selected delivery method and service ID same but API returned the below response.

2023-09-13T11:00:29+00:00 INFO (6): Array ( [id] => 5d784170-bd34-497e-ad54-f2099da5a868 [parcelId] => [status] => ERROR [errors] => Array ( [0] => Array ( [code] => ANOTHER_SERVICE_NOT_AVAILABLE [message] => One of required services is unavailable. Try again later. [details] => One of required services is unavailable. Try again later. [path] => [userMessage] => Jeden z wymaganych serwisów, do poprawnego działania, jest niedostępny. Spróbuj ponownie za moment. )

    )

)

Delivery method => Allegro - Kurier DHL

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

I have tried 1 more request it gives me the same error.

2023-09-13T12:47:33+00:00 INFO (6): Array ( [id] => d365a788-5229-4e89-8284-9f4e4c7b23b4 [parcelId] => [status] => ERROR [errors] => Array ( [0] => Array ( [code] => ANOTHER_SERVICE_NOT_AVAILABLE [message] => One of required services is unavailable. Try again later. [details] => One of required services is unavailable. Try again later. [path] => [userMessage] => Jeden z wymaganych serwisów, do poprawnego działania, jest niedostępny. Spróbuj ponownie za moment. )

    )

)

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

Any update above?

MartaNowaczyk commented 1 year ago

If you have in the response to try again, then use the request again to create a package. Querying the same commandId will return the same error. Try creating the package again from the beginning.

Harpreet-StreamMarket commented 1 year ago

OK, let me try.

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

I successfully generated one label but it displays separation lines Is there any way we can remove these separation lines Basically I am talking about the yellow area?

image

MartaNowaczyk commented 1 year ago

There are no settings in the API that modify these lines.

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

When I generated one box label and tried to cancel it it gave me the below error can you please check it?

Array ( [id] => fb3d8f2e-34b5-4197-88c7-a6431d6bcda0 [status] => ERROR [errors] => Array ( [0] => Array ( [code] => BAD_REQUEST [message] => You cannot cancel a parcel with the Allegro carrier [details] => [path] => parcelIds[%s] [userMessage] => You cannot cancel a shipment with the Allegro carrier )

    )

)

MartaNowaczyk commented 1 year ago

The message clearly indicates that the shipment cannot be canceled with the Allegro carrier, hence the error.

Harpreet-StreamMarket commented 1 year ago

So how do I cancel that shipment? Manually in the Allegro panel?

MartaNowaczyk commented 1 year ago

You cannot cancel a package picked up by a courier or sent in a parcel machine. The package you want to cancel has a status of "to be picked up".

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

Can you please provide any dimensions doc that I can review and send dimensions according to the courier It is very urgent?

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

I am unable to generate a label with text/plain format every time it returns the below error.

Can you please check?

1 Question If I want to create a parcel in text/plain what value i pass on there or pass blank?

image

Below parcel id is now canceled but you can check my request.

https://api.allegro.pl/parcel-management/parcels/label?parcelId=8e59b3b9-236d-4275-a86c-49e1f60cb7e4

"Accept: text/plain", "Content-Type: text/plain", "Authorization: Bearer jkhsfhsdkfhkdjshftertrererereretretretretrtr

{"errors":[{"code":"NotAcceptableException","message":"Not acceptable representation requested. Please check 'Accept' request header","details":null,"path":null,"userMessage":"Żądanie zawiera błędne dane. Skontaktuj się z autorem aplikacji"}]}

MartaNowaczyk commented 1 year ago

Can you please provide any dimensions doc that I can review and send dimensions according to the courier It is very urgent?

We don't have such a list, but I'll see if I can get that data.

If I want to create a parcel in text/plain what value i pass on there or pass blank?

ZPL, EPL PUT /parcel-management/parcel-create-commands/{commandId} image

"Not acceptable representation requested. Please check 'Accept' request header",

This situation can happen when you declared a PDF label when creating a package, and later expect text.

Harpreet-StreamMarket commented 1 year ago

Hi MartaNowaczyk,

Can you please confirm which courier required dimensions so we have passed only those couriers, for example, dimensions as are necessary for one box?

MartaNowaczyk commented 1 year ago

I did not receive such a list, because we are validated every request for dimensions, so we practically always expect them.

Harpreet-StreamMarket commented 1 year ago

ok, thanks let me check.