# API call based on date?

**URL:** <https://community.parabola.io/t/api-call-based-on-date/96>\
**Category:** Ask a question\
**Created:** [March 12, 2020, 8:49pm UTC](https://community.parabola.io/t/api-call-based-on-date/96 "2020-03-12T20:49:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bross13199](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/bross13199/32/29_2.png) [@bross13199](https://community.parabola.io/u/bross13199)\
**Post date:** [March 12, 2020, 8:49pm UTC](https://community.parabola.io/t/api-call-based-on-date/96/1 "2020-03-12T20:49:53Z")

</div>

I need to create an initial API call (not enrichment), in which a date parameter is dynamic based on the current date. For example, if I was running it today, I might want it to pass a query with date parameters for the next seven days - obviously “next seven days” is relative to the date today. How can I do this?

---

<div class="post-metadata">

**Author:** ![andrew](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/andrew/32/36_2.png) [@andrew](https://community.parabola.io/u/andrew)\
**Post date:** [March 12, 2020, 9:18pm UTC](https://community.parabola.io/t/api-call-based-on-date/96/2 "2020-03-12T21:18:46Z")

</div>

Yep, have definitely run into this myself too. We recently added a step, “Date & Time Import,” which you can use as your first step and then use the API Enrichment step after. In your API enrichment step, you can pull pull in the column value by wrapping the column name in { }, which will refer to the date value you have there. So, the API enrichment endpoint could look like something `api_endpoint.xyz/endpoint1?date={date_value}`.

---

<div class="post-metadata">

**Author:** ![Richard\_Foxworthy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/richard_foxworthy/32/151_2.png) [@Richard\_Foxworthy](https://community.parabola.io/u/Richard_Foxworthy)\
**Post date:** [January 3, 2021, 5:20am UTC](https://community.parabola.io/t/api-call-based-on-date/96/3 "2021-01-03T05:20:23Z")

</div>

This doesn’t work if I need a timestamp variable delivered to endpoint as a header as opposed to inserting it into the URL.

How can I achieve a timestamp variable as a header?

THanks

---

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/daniel/32/732_2.png) [@daniel](https://community.parabola.io/u/daniel)\
**Post date:** [January 4, 2021, 8:08pm UTC](https://community.parabola.io/t/api-call-based-on-date/96/4 "2021-01-04T20:08:30Z")

</div>

Hey @Richard_Foxworthy,

We don’t support adding dynamic variables into headers just yet, though I’m sure many users would find it useful.

If you’d like, feel free to make a post in the #Feature Requests section on our community forum. Another user requested a similar feature here:

> [@Merge Data into Header or Auth Field](https://community.parabola.io/t/merge-data-into-header-or-auth-field/117):
>
> Hi, I’d love the ability to merge data (primarily bearer tokens) into a header or an auth field, it would be great to start a flow with generating a token and then being able to pass that value directly into an API call slight_smile

---

<div class="post-metadata">

**Author:** ![Mike\_Doyle](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@Mike\_Doyle](https://community.parabola.io/u/Mike_Doyle)\
**Post date:** [February 21, 2022, 10:52pm UTC](https://community.parabola.io/t/api-call-based-on-date/96/5 "2022-02-21T22:52:00Z")

</div>

I second that!! My token is changing every hour and so I obviously can’t handle that manually???
