{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/qualpay/json-schema/qualpay-invoice-bounced-response-schema.json",
  "title": "InvoiceBouncedResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/qualpay-invoicing-api-openapi.yml#/components/schemas/InvoiceBouncedResponse",
  "type": "object",
  "properties": {
    "code": {
      "type": "integer",
      "description": "<strong>Format: </strong>Fixed length, 1 N<br><strong>Description: </strong>Response code from the API. `0` indicates success. Refer to <a href=\"/docs/api-conventions#platform-api-response-codes\" target=\"_blank\">Platform API Response Codes</a> for the entire list of return codes.",
      "format": "int32",
      "readOnly": true
    },
    "message": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length AN<br><strong>Description: </strong>A short description of the API response code.",
      "readOnly": true
    },
    "totalPages": {
      "type": "integer",
      "description": "<strong>Format: </strong>Variable length N<br><strong>Description: </strong>Total number of pages. ",
      "format": "int32",
      "readOnly": true
    },
    "totalRecords": {
      "type": "integer",
      "description": "<strong>Format: </strong>Variable length, up to 3 N<br><strong>Description: </strong>Total number of records up to a maximum of 100.",
      "format": "int32",
      "readOnly": true
    },
    "data": {
      "type": "array",
      "description": "An array of the resource object.",
      "readOnly": true,
      "items": {
        "$ref": "#/$defs/BouncedInvoice"
      }
    }
  },
  "$defs": {
    "BouncedInvoice": {
      "type": "object",
      "properties": {
        "invoice_id": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 10 N<br><strong>Description: </strong>A unique number generated to identify an invoice. Save this ID to manage the invoice.",
          "format": "int64"
        },
        "merchant_id": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 16 N<br><strong>Description: </strong>The unique ID assigned to a merchant.",
          "format": "int64"
        },
        "invoice_number": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 25 AN<br><strong>Description: </strong>The invoice number (also referred to as the purchase identifier) generated by the merchant. "
        },
        "customer_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>The customer ID associated with this invoice. "
        },
        "status": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 11 A<br><strong>Description: </strong>Status of the invoice. Possible values: <br><ul><li>`SAVED` -  The invoice is in draft state. An invoice in draft state can be updated. </li><li>`OUTSTANDING` - The invoice has been sent to the customer. Once an invoice is sent, only `billing_contact` and `from_contact` can be updated. </li><li>`PAID` - The invoice has been paid completely. A paid invoice cannot be updated. </li><li>`CANCELED` - The invoice has been canceled. A canceled invoice cannot be updated. </li></ul>",
          "enum": [
            "SAVED",
            "OUTSTANDING",
            "PAID",
            "CANCELED"
          ]
        },
        "send_code": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 1 A<br><strong>Description: </strong>The email client response code. Possible values: <ul><li>`O` - Email not sent. The email address may be invalid. </li><li>`A` - Email not sent. The email address has been disabled. </li><li>`B` - Email bounced.</li></ul>",
          "enum": [
            "O",
            "A",
            "B"
          ]
        },
        "db_timestamp": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length AN<br><strong>Description: </strong>The time when the invoice was sent."
        },
        "recipient": {
          "type": "array",
          "description": "An array of the invoice recipient's email addresses.",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}