Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Rates retrieve method does not return individual rates #78

Open
@mersedsv

Description

@mersedsv

Rates retrieve does not work. Method does not return individual shipping rates, nor it expects individual shipment object id.

Documentation: https://goshippo.com/docs/reference/js#rates-retrieve

Expectations:
Providing object id (which was created using shippo.shipment.create) and getting single rate as referenced in the doc.
Request will be send to https://api.goshippo.com/rates/ as per documentation.

Actual behaviour:
const shippingRate = await shippo.shipment.retrieve(shippingRateId);

{
    type: 'ShippoNotFoundError',
    code: undefined,
    detail: { detail: 'Not found' },
    path: '/shipments/a58a355b5eb94522ac89d357be2b916d',
    statusCode: 404
}

It seems that shippo.shipment.retrieve method actually does not expects shippingRateId ... instead it expects shipping id. If I provide shipping id, it simply returns all shipping rates, which is different behaviour then explained within documentation.

Request is sent to the https://api.goshippo.com/shipments/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions