Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update carrier settings - inconsistent carrier_name #1

Open
jsakas opened this issue Jul 12, 2020 · 6 comments
Open

Update carrier settings - inconsistent carrier_name #1

jsakas opened this issue Jul 12, 2020 · 6 comments

Comments

@jsakas
Copy link

jsakas commented Jul 12, 2020

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).

@JamesMessinger
Copy link
Contributor

JamesMessinger commented Jul 13, 2020

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:

put:
summary: Update carrier settings
description: Update carrier settings
tags:
- carrier_accounts
operationId: update_carrier_settings
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/update_carrier_settings_request_body'
responses:
'204':
description: The request was successful.
content:
text/plain:
schema:
$ref: '#/components/schemas/empty_response_body'
application/json:
schema:
$ref: '#/components/schemas/empty_response_body'
'404':
$ref: '#/components/responses/404_error_response'
'500':
$ref: '#/components/responses/500_error_response'

@jsakas
Copy link
Author

jsakas commented Jul 13, 2020

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."
        }
    ]
}

@JamesMessinger
Copy link
Contributor

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

@jsakas
Copy link
Author

jsakas commented Jul 22, 2020

@JamesMessinger any update?

@JamesMessinger
Copy link
Contributor

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

@sushithegreat
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants