Skip to the page

Search the titles, headings and text of every guide and API reference page.

    Chapters

    Offices

    Move an office's unsent claims to another office

    POST/api/v1/offices/{id}/move_claims

    Moves the unsent claims and predeterminations of the office to another office of the same organization and mode (to_office_id): its drafts, the ones that need attention, the validated and the queued ones, and the rejected ones the payer never gave a number. A claim that was sent, or that the payer has (a claim with a payer claim number, a correction, a void transaction), stays with the office that sent it, with its files, payments and ERAs. Each moved claim gets a timeline entry (moved) and is validated for its new office, as after an edit: one that was queued is queued again when it still has no error, one that no longer validates needs attention, a draft and a rejected claim stay as they are. Attachments stay on their claims and keep the office they were made for. A request moves at most 100 claims, the queued ones first, all of them or none: while more is true, send it again with a new Idempotency-Key. A key with submit and no read moves the claims it made. The office in the path that is another organization's or the other mode's is not found; such a to_office_id, or the office itself, is a 422 on to_office_id. Needs an Idempotency-Key header and a key with the submit permission.

    Needs a key with submit permission.

    Request

    Headers

    Headers
    NameTypeRequiredDescription
    Idempotency-KeystringrequiredMakes the request safe to repeat: a request with the same key and body returns the first answer (the reply has an idempotent-replayed header), and the same key with a different request is refused. 1 to 255 printable characters; a UUID is a good choice.At least 1 character.At most 255 characters.Matches `^[\x21-\x7e]{1,255}$`.

    Path parameters

    Path parameters
    NameTypeRequiredDescription
    idstringrequiredAn office ID (off_...).

    Body

    Body
    NameTypeRequiredDescription
    to_office_idstringrequiredThe office the claims move to (off_...): another office of the same organization and mode.

    Response

    How many claims moved, by the state each was in. Status 200.

    Response fields
    NameTypeDescription
    objectstringAlways `office_claims_move`.
    from_office_idstringAn ID that starts with off_.
    to_office_idstringAn ID that starts with off_.
    movedobjectHow many claims moved, by the state each was in when it moved. Each was then validated for its new office; the queued ones were queued again when they still had no error.
    moved.draftintegerAt least -9007199254740991.
    moved.needs_attentionintegerAt least -9007199254740991.
    moved.validatedintegerAt least -9007199254740991.
    moved.rejectedintegerAt least -9007199254740991.
    moved.queuedintegerAt least -9007199254740991.
    totalintegerHow many claims this request moved.At least -9007199254740991.
    morebooleanTrue when the office still has unsent claims: a request moves at most 100. Send it again, with a new Idempotency-Key, until this is false.

    Errors

    Errors
    HTTP statusCodeWhat it means
    401UNAUTHORIZEDA valid API key is required. Send it as "Authorization: Bearer <key>".
    403PERMISSION_DENIEDThis API key is not allowed to do that.
    404NOT_FOUNDNot found.
    422INVALID_REQUESTThe request is not valid.
    400IDEMPOTENCY_KEY_REQUIREDThis request needs an Idempotency-Key header: a value you make up (a UUID is good), new for each new request.
    400IDEMPOTENCY_KEY_INVALIDThe Idempotency-Key header must be 1 to 255 printable characters.
    422IDEMPOTENCY_KEY_REUSEDThat Idempotency-Key was already used with a different request.
    409IDEMPOTENCY_KEY_IN_USEA request with that Idempotency-Key is still running. Send it again with the same key after Retry-After seconds.
    429TOO_MANY_REQUESTSToo many requests of this kind lately. Wait, then try again.
    413PAYLOAD_TOO_LARGEThe request body is larger than 1 MB.
    504TIMEOUTThe request took too long. Send it again with the same Idempotency-Key and body after Retry-After seconds: a 409 means it is still finishing (wait and send again), and any other answer is final. If this 504 comes back, find what the request made by listing with ?idempotency_key=<the key>.
    503CLAIMS_UNAVAILABLEClaims are not available in live mode yet. Use a test key.
    500INTERNALSomething went wrong on our side. Quote the request ID if you contact us.

    Example

    Example request

    Shell
    curl -X POST "https://sandbox.myclaimhouse.com/api/v1/offices/off_01JM000000E008000000000003/move_claims" \
      -H "Authorization: Bearer $CLAIMHOUSE_KEY" \
      -H "Idempotency-Key: $(uuidgen)" \
      -H "Content-Type: application/json" \
      -d '{
      "to_office_id": "off_01JM000000E008000000000091"
    }'

    Example response: 200

    JSON
    {
      "object": "office_claims_move",
      "from_office_id": "off_01JM000000E008000000000003",
      "to_office_id": "off_01JM000000E008000000000091",
      "moved": {
        "draft": 2,
        "needs_attention": 1,
        "validated": 0,
        "rejected": 1,
        "queued": 3
      },
      "total": 7,
      "more": false
    }