How do I add a path variable in my external api request?

Options

Hi! I'd like to know how to set a path variable for my url in my external api request.

For example I have this URL:

https://www.pdfotter.com/api/v1/pdf_templates/:templateId/fill?

and for the templateId it has a value of tem_1234567 for example.
I can't set it as a param since it will turn the response url into:

https://www.pdfotter.com/api/v1/pdf_templates/:templateId/fill?[templateId]=tem_1234567

which gives me a 404 error. Setting it as a header doesn't work as well.

The correct response url should just be:
https://www.pdfotter.com/api/v1/pdf_templates/:templateId/fill?

Thank you so much!

Best Answer

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Answer ✓
    Options

    I'd leave the “colon” version of the url in as a template, and apply the “replace” filter (not regex-replace) to substitute “tem_1234567" for “:templateId”

Answers