Able to create two cases with same caseId

Using the API, I was able to create two cases with the same caseId. I suspect the new case was posted twice inside a very small time frame due to a bug in my system I'm going to need to fix, but I thought the system verifies the caseId for uniqueness?

Best Answer

  • Hi @ivan,

    You can post an example of your code, if you wish, however the WC1 API documentation describes the caseIdentifiers. The documentation instructs developers to this method to determine if your case-id is unique before creating a duplicate case.

    Hope this helps,

    Brian

    Check if a given caseId is available for use

    HEAD /caseIdentifiers

    Description

    caseIds must be unique within each Client. If any Group under a Client has a Case with a particular caseId, that caseId cannot be reused on another Case within the same Client. This endpoint allows the user to check if a given caseId is available to use when creating or updating a Case.

    Parameter

    {{protocol}}{{gateway-host}}{{gateway-url}}caseIdentifiers?caseId={{case-id}}

    Return Request 200 OK:

    The given caseId is in use within the current user’s Client, therefore is not available to use on a different Case.

    Return Request 404 Not Found:

    The given caseId is not found within the current user’s Client, therefore is available to use as a caseId on any Case.