Mono Colombia

Delete a collection

Deletes a collection by marking it as deleted and scheduling key cancellation.

Restrictions:

  • A collection can only be deleted if it has no successful payments (paid_amount = 0)
  • Cannot delete collections in discarded or failed states

Behavior:

  • If paid_amount > 0, the deletion is rejected with has_payments error
  • If paid_amount = 0, the collection is marked as deleted and the associated Bre-B key will be canceled asynchronously
  • A collection.discarded webhook will be sent when the key cancellation completes
DELETE
/api/v1/collections/{id}

Authorization

oauth collections
AuthorizationBearer <token>

In: header

Scope: collections

Path Parameters

idstring

The collection ID

Match^[A-Za-z]{2,7}_[\w-]{22}$
Example"bbcol_5tgliBmzjZ6mpQPRbQjfKj"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://breb-participant.sandbox.mono.la/api/v1/collections/bbcol_5tgliBmzjZ6mpQPRbQjfKj"
Empty
{
  "code": "401 Unauthorized",
  "errors": [
    {
      "error_code": "missing_authorization_header",
      "message": "`Authorization` header is missing.",
      "path": null,
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Authorization header is missing or invalid."
}
{
  "code": "403 Forbidden",
  "errors": [
    {
      "error_code": "not_authorized",
      "message": "Not authorized to have access to this resource.",
      "path": null,
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Not authorized to have access to this resource"
}
{
  "code": "404 Not Found",
  "errors": [
    {
      "error_code": "collection_not_found",
      "message": "The collection doesn't exist",
      "path": null,
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Resource not defined"
}
{
  "code": "409 Conflict",
  "errors": [
    {
      "error_code": "collection_invalid_state",
      "message": "The collection is in an invalid state for this operation",
      "path": null,
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Conflict"
}
{
  "code": "500 Internal Server Error",
  "errors": [
    {
      "error_code": "internal_error",
      "message": "An unexpected error occurred",
      "path": null,
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Something went wrong on the Server"
}