up-banking/api

Receiving 'Invalid Parameter' for a valid rfc-3339 date using filter[since]

robase opened this issue · 3 comments

Hitting issues when attempting to filter transactions from the /transactions endpoint by date using filter[since] with a timestamp that has a positive timezone offset.

running:

curl https://api.up.com.au/api/v1/transactions \
  -G \
  -H 'Authorization: Bearer <token>' \
  -d 'filter[since]=2022-09-14T10:23:50+10:00'

returns:

{
  "errors": [
    {
      "status": "400",
      "title": "Invalid Parameter",
      "detail": "invalid date-time value (must be rfc-3339)",
      "source": {
        "parameter": "filter[since]"
      }
    }
  ]
}

This example uses a date value from an example provided in the docs

The param works fine if using Z or a negative offset e.g -10:00 does work but +10:00 doesn't

I'm also running into this issue. Seems to be an issue with the encoding of the '+' character - seems to be incorrectly url encoded as %2 instead of %2B.
If a already encoded url is shot through with %2B, this works fine, but if a raw + is sent it is being incorrectly interpreted.

This can be surprising but query params do need to be correctly URL Encoded. We've tried to call this out in the docs at the end of the Query Parameters section.

Screenshot 2024-03-20 at 5 09 45 PM