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.

Getting "The data you sent was not accepted as valid" on valid Rate ID #66

Description

@jousi592

I am trying to test your transactions endpoint to purchase a label, however it keeps returning that my data was not valid.
Which is strange, because when I fetch the shipment by ID, I can clearly see that it contains the rate that I am trying to purchase.
Is there something I am missing?

This is what I am sending:
{ rate: 'a56493b1f836482e94b89fb9d6261267', label_file_type: 'PDF', async: false }
This is my implementation:

shippo_instance.transaction.create({
    rate: rate_id,
    label_file_type: "PDF",
    async: false
  }, async (error, transaction) => {
    if (error) return res.send(create_api_message("danger", error.message))

    try {
      const label = await shippo_instance.transaction.retrieve(transaction.object_id);
  
      res.send(label)
    } catch ({ message }) {
      res.send(create_api_message("danger", message))
    }
  });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions