Skip to content

[Bug]effective_at Time Restriction Issue When Using PATCH Update a card API #6

Description

@Unmeiwa

Description

When using the PATCH /v1/cards/{card_id} API to update a card, it was discovered that the new effective_at time is subject to an undocumented restriction. Specifically, the new effective_at time cannot be later than the currently set invalid_at time for the card.

Steps to Reproduce

Steps to reproduce the behavior:
1.Create or Edit a Card:
Use the POST /v1/cards or PATCH /v1/cards/{card_id} API to create or edit a card, setting the initial effective_at and invalid_at times. For example:
{
"display_name": "qwe",
"devices": ["uacxc"],
"effective_at": "2026-08-25T15:00:00Z",
"invalid_at": "2027-08-25T16:00:00Z",
"barcode_type": "qrcode",
"barcode_format": "png"
}
2.Attempt to Update the effective_at Time:
Use the PATCH /v1/cards/{card_id} API to update the card's effective_at time to be later than the current invalid_at time. For example:
{
"effective_at": "2030-08-25T15:00:00Z",
"invalid_at": "2031-08-25T16:00:00Z"
}
3.Submit the Update Request:
Send the update request and observe the response.

Actual Behavior

The update request is rejected with a message indicating that the effective_at time cannot be later than the invalid_at time.

Expected Behavior

It is expected to be able to set the effective_at time freely, even if it is later than the current invalid_at time.

Environment (if applicable)

  • OS:Windows11
  • Browser / Tool:Postman
  • SDK / Client:
  • Other relevant details:

Additional Context

If this is a protective rule of the system, it is recommended to clearly state it in the documentation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions