shipengine-openapi icon indicating copy to clipboard operation
shipengine-openapi copied to clipboard

Update carrier settings - inconsistent carrier_name

Open jsakas opened this issue 5 years ago • 6 comments

Hello, I found an inconsistency with the API / Documentation.

https://github.com/ShipEngine/shipengine-openapi/blob/master/openapi.yaml#L1101

Documentation says settings endpoint supports stamps_com which I believe is correct, however, requesting this endpoint I receive the following error:

{
    "request_id": "1ca82945-e86f-47f1-b585-1f849a68ea62",
    "errors": [
        {
            "error_source": "shipengine",
            "error_type": "security",
            "error_code": "not_found",
            "message": "POST",
            "method": "/v1/connections/carriers/stamps_com/se-284845/settings",
            "path": "POST /v1/connections/carriers/stamps_com/se-284845/settings is not a valid API endpoint.",
        }
    ]
}

So it looks like its more of an API issue than a documentation issue, I'm just not sure where to post the API issue.

Changing it to stamps-com allows the request to continue further (although still receiving a 500 server error).

jsakas avatar Jul 12 '20 21:07 jsakas

Hi @jsakas - It looks like you're sending a POST instead of a PUT. Can you try a PUT and let me know if that works for you?

The PUT endpoint is defined in the OpenAPI here:

https://github.com/ShipEngine/shipengine-openapi/blob/03ea4b9f153852b6e322a28d4d829f6f9dee8048/openapi.yaml#L1127-L1152

JamesMessinger avatar Jul 13 '20 14:07 JamesMessinger

Hey @JamesMessinger thanks for the reply! You are correct I was using a POST. However changing to a PUT yields the same results.

PUT /v1/connections/carriers/stamps_com/se-288338/settings

{"nickname":"Free"}

{
    "request_id": "0f5bb6bc-0c7c-4a5d-a705-b48145f07aac",
    "errors": [
        {
            "error_source": "shipengine",
            "error_type": "security",
            "error_code": "not_found",
            "message": "PUT",
            "method": "/v1/connections/carriers/stamps_com/se-288338/settings",
            "path": "PUT /v1/connections/carriers/stamps_com/se-288338/settings is not a valid API endpoint.",
        }
    ]
}

Also, when I try the same request using ups or stamps-com - I receive an internal server error. For example with UPS.

PUT /v1/connections/carriers/ups/se-288447/settings

{"nickname":"My UPS Account"}

{
    "request_id": "3c4057df-6f2b-4412-958a-72fc164fb23d",
    "errors": [
        {
            "error_source": "shipengine",
            "error_type": "system",
            "error_code": "unspecified",
            "message": "An unexpected error occurred."
        }
    ]
}

jsakas avatar Jul 13 '20 14:07 jsakas

Thanks for the update @jsakas. Our team is investigating. This may be related to a recent update. I'll keep you informed.

JamesMessinger avatar Jul 13 '20 16:07 JamesMessinger

@JamesMessinger any update?

jsakas avatar Jul 22 '20 17:07 jsakas

No update yet. The bug has been filed in our internal Jira, but work hasn't started on it yet.

@jpill - Just FYI, this is Jira issue ENGINE-3887

JamesMessinger avatar Jul 22 '20 19:07 JamesMessinger

HI there! We don't currently support changing Stamps account settings through the API, I'm in the process of updating our docs now. You can however use this endpoint if you just want to update your username/password.

sushithegreat avatar Nov 28 '22 22:11 sushithegreat