# Update a license (/api/licenses/update-license)

`POST https://api.comecero.com/api/v1/licenses/{license_id}`

Secret and trusted tokens need licenses update permission. Limited tokens are refused. Generated keys accept only over_limit. Imported keys also accept status, revoked_reason, activation_limit and expires_at. Requires Idempotency-Key and expected_version. Stale versions return 409 license_version_conflict. An actual change raises version and queues sync and normal lifecycle events; no change keeps the version. This route does not change purchased generated terms, payments, refunds or subscriptions.

## Request parameters

### license_id (path, required)

The resource id.

```json
{
  "type": "string"
}
```

### Idempotency-Key (header, required)

Exactly one header with 1-128 printable ASCII characters. Retain it after a timeout and across retries. Identity is scoped to account, mode, method, path and actor. Completed responses replay their original status, JSON, Location and Retry-After permanently. A different body, query or If-Match returns 409 credit_request_conflict. An unknown in-progress outcome stays 409 credit_request_pending and is never executed again. Use a new key only for a deliberate new change.

```json
{
  "type": "string",
  "minLength": 1,
  "maxLength": 128,
  "pattern": "^[ -~]{1,128}$"
}
```

Example:

```json
"guide_5501"
```

## Request body (required)

### application/json

Fields and constraints (JSON Schema):

```json
{
  "type": "object",
  "title": "license_update_request",
  "additionalProperties": false,
  "required": [
    "expected_version"
  ],
  "properties": {
    "expected_version": {
      "type": "integer",
      "minimum": 1,
      "description": "The version you reviewed. A stale version returns license_version_conflict.",
      "maximum": 9007199254740991
    },
    "over_limit": {
      "type": "string",
      "description": "Changes this issued generated or imported key.",
      "enum": [
        "block",
        "rotate"
      ]
    },
    "status": {
      "type": "string",
      "description": "Imported keys only.",
      "enum": [
        "active",
        "revoked"
      ]
    },
    "revoked_reason": {
      "type": "string",
      "description": "Imported keys only. To reactivate, send status: active and omit revoked_reason; this clears revocation state.",
      "enum": [
        "merchant",
        "refund",
        "chargeback",
        "subscription_cancelled"
      ]
    },
    "activation_limit": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Imported keys only. Null is unlimited.",
      "minimum": 1,
      "maximum": 2147483647
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "The exact expiry, or null for no expiry. Send seconds and a timezone (Z or ±HH:mm), with up to seven fractional digits.",
      "format": "date-time",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,7})?(Z|[+-]\\d{2}:\\d{2})$"
    }
  }
}
```

Example:

```json
{
  "expected_version": 1,
  "over_limit": "rotate"
}
```

## Response 200

The license after the update.

### application/json

Fields and constraints (JSON Schema):

```json
{
  "type": "object",
  "title": "license",
  "description": "A license key issued for an order item or imported without an order, from the product's license service. A limited token may read a license only when it is bound to it, such as the customer's own order. Every field is returned unless `show` or `hide` (on the request, or on the event subscription for a webhook) leaves it out, except the fields from `key_last4` to `version`, which generated and imported keys have.",
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "license"
      ],
      "description": "The object type. Always `license`."
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "The URL of this license in the API."
    },
    "license_id": {
      "type": "string",
      "description": "The id of the license."
    },
    "date_created": {
      "type": "string",
      "format": "date-time",
      "description": "When the license was issued."
    },
    "date_modified": {
      "type": "string",
      "format": "date-time",
      "description": "When the license was last changed."
    },
    "test": {
      "type": "boolean",
      "description": "True for a test-mode license."
    },
    "item_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The order item, or null for an orderless import."
    },
    "account_id": {
      "type": "string",
      "description": "The account the license belongs to."
    },
    "label": {
      "type": "string",
      "description": "What the key is called, copied from the license service, for example `License Code`."
    },
    "license_service": {
      "description": "The license service that issued the key, as a link, or the full object when you send `expand=license_service`. Not returned to limited tokens.",
      "anyOf": [
        {
          "type": "string",
          "format": "uri"
        },
        {
          "$ref": "#/components/schemas/license_service"
        }
      ]
    },
    "order": {
      "description": "The order, as a link, or the full object when you send `expand=order`.",
      "anyOf": [
        {
          "type": "string",
          "format": "uri"
        },
        {
          "type": "object",
          "description": "The order object."
        },
        {
          "type": "null"
        }
      ]
    },
    "product": {
      "description": "The product, as a link, or the full object when you send `expand=product`.",
      "anyOf": [
        {
          "type": "string",
          "format": "uri"
        },
        {
          "$ref": "#/components/schemas/product"
        }
      ]
    },
    "text": {
      "type": [
        "string",
        "null"
      ],
      "description": "The key as plain text, with any HTML removed. For a `generated` key, the key itself. Always null for a `generated` key in a webhook (any event, at any `expand` depth), which never carries the key."
    },
    "html": {
      "type": [
        "string",
        "null"
      ],
      "description": "The key as HTML, with line breaks turned into `<br>`. For a `generated` key, the key itself, HTML-encoded. Always null for a `generated` key in a webhook."
    },
    "instructions": {
      "type": [
        "string",
        "null"
      ],
      "description": "How to use the key, from the license service or your license server."
    },
    "key_last4": {
      "type": "string",
      "description": "The last 4 characters of the key, without dashes, to tell keys apart without showing them. Only on generated and imported keys."
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "revoked"
      ],
      "description": "Whether the key can still be used. A key past its `expires_at` stays `active` here; the license key routes answer `EXPIRED` for it. Only on generated and imported keys."
    },
    "revoked_reason": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "refund",
        "chargeback",
        "subscription_cancelled",
        "merchant",
        null
      ],
      "description": "Why the key was revoked: `refund` (the order item was fully refunded) or `chargeback` (a payment of the order was charged back). Null while the key is active. `merchant` is used for imported-key revocation. `subscription_cancelled` is reserved. Only on generated and imported keys."
    },
    "date_revoked": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the key was revoked, or null. Only on generated and imported keys."
    },
    "activation_limit": {
      "type": [
        "integer",
        "null"
      ],
      "description": "How many devices the key can be active on at once: the service's `activation_limit` times the quantity bought, lowered by a partial refund. Null is unlimited. Only on generated and imported keys."
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the key stops working, or null if it never expires. For a subscription, the end of the last paid period plus the service's `subscription_grace_days`; each renewal moves it later. Only on generated and imported keys."
    },
    "customer_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The native customer who owns the key. Only on generated and imported keys."
    },
    "subscription_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The subscription the key was sold with, or null for a one-off sale. One key serves the whole subscription. Only on generated and imported keys."
    },
    "source": {
      "type": "string",
      "enum": [
        "generated",
        "imported"
      ],
      "description": "Where the key came from. `generated` when Comecero made it. Present only on keys of a `generated` service; keys from `list` and `remote_url` services have none of the fields from `key_last4` to `source`."
    },
    "version": {
      "type": "integer",
      "minimum": 1,
      "description": "Goes up by one with every change to the key. Webhooks can arrive out of order, so keep the license with the highest `version` you have seen and ignore an event with a lower one. Changes made close together can be sent as one event with the latest state, and a change to none of `status`, `activation_limit` and `expires_at` (such as `revoked_reason` moving from `refund` to `chargeback`) sends no event, so the `version` in events can skip numbers. `license:expired` does not raise `version`, so it can carry the same one as an earlier event (such as `license:issued` or `license:reinstated`): treat an equal `version` as current, and skip repeats by `event_id`, not by `version`. Only on generated and imported keys."
    },
    "formatted": {
      "type": "object",
      "description": "Present only when you send `formatted=true`.",
      "properties": {
        "date_created": {
          "type": "string"
        },
        "date_modified": {
          "type": "string"
        }
      }
    },
    "over_limit": {
      "type": "string",
      "description": "Block refuses new devices at capacity. Rotate replaces the oldest device, imported devices first, then activated_at and instance_id.",
      "enum": [
        "block",
        "rotate"
      ]
    },
    "active_in_apollo": {
      "type": "boolean",
      "description": "True when devices are ready for the current license version. Wait for true before using device support."
    }
  },
  "example": {
    "object": "license",
    "url": "https://api.comecero.com/api/v1/licenses/0142130710581LiRr8sT2c",
    "license_id": "0142130710581LiRr8sT2c",
    "date_created": "2026-11-02T00:45:11Z",
    "date_modified": "2026-11-02T00:45:11Z",
    "test": true,
    "item_id": "widget-pro.test",
    "account_id": "AB1234",
    "label": "License Code",
    "license_service": "https://api.comecero.com/api/v1/license_services/0095012789659LsuOeAWLC",
    "order": "https://api.comecero.com/api/v1/orders/6622-NXKHE-858",
    "product": "https://api.comecero.com/api/v1/products/widget-pro.test",
    "text": "AAAA-BBBB-CCCC-0001",
    "html": "AAAA-BBBB-CCCC-0001",
    "instructions": "Open Widget Pro, choose Help, then Enter License, and paste the code."
  }
}
```

Example:

```json
{
  "object": "license",
  "url": "https://api.comecero.com/api/v1/licenses/0142130710581LiRr8sT2c",
  "license_id": "0142130710581LiRr8sT2c",
  "date_created": "2026-11-02T00:45:11Z",
  "date_modified": "2026-11-02T00:45:11Z",
  "test": true,
  "item_id": null,
  "account_id": "AB1234",
  "label": "License Code",
  "license_service": "https://api.comecero.com/api/v1/license_services/0095012789659LsuOeAWLC",
  "order": null,
  "product": "https://api.comecero.com/api/v1/products/widget-pro.test",
  "text": null,
  "html": null,
  "instructions": "Open Widget Pro, choose Help, then Enter License, and paste the code.",
  "key_last4": "8ABE",
  "status": "active",
  "activation_limit": 3,
  "expires_at": null,
  "source": "imported",
  "version": 2,
  "over_limit": "rotate",
  "active_in_apollo": false
}
```

## Response 400

Invalid input (type `bad_request`, usually code `invalid_input`). The message names the field or query parameter and why it was refused.

### application/json

Fields and constraints (JSON Schema):

```json
{
  "type": "object",
  "title": "error",
  "description": "Every error response has this body, whatever the status code. Use `status` and `type` for the broad case, `code` for the exact one, and show `message` to a person.",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "title": "error_details",
      "description": "The details of an error: `error` in every error response, and a failed row in a license import receipt.",
      "required": [
        "type",
        "code",
        "message",
        "reference",
        "status",
        "meta"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "The broad category. It matches `status`.",
          "enum": [
            "bad_request",
            "invalid_request",
            "unauthorized",
            "transaction_error",
            "forbidden",
            "not_found",
            "conflict",
            "unprocessable",
            "too_many_requests",
            "internal_server_error",
            "external_server_error",
            "service_unavailable",
            "external_server_timeout"
          ]
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "The exact error within its type, for example `invalid_input`, `invalid_token`, `payment_declined`, `insufficient_permissions`, `resource_not_found`, `in_use` or `invalid_state`. New codes may be added, so keep a fallback for each status.",
          "examples": [
            "invalid_input"
          ]
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "What went wrong and, often, how to fix it. Written for people, in the shopper's language where a translation exists. Do not parse it."
        },
        "reference": {
          "type": [
            "string",
            "null"
          ],
          "description": "A 7-character code (some newer ones are longer) that names the exact check in Comecero that refused the request. The same check always gives the same reference, so it is not unique to your request. Quote it when you contact support.",
          "examples": [
            "qh81SPw"
          ]
        },
        "status": {
          "type": "integer",
          "description": "The HTTP status code of the response.",
          "enum": [
            400,
            401,
            402,
            403,
            404,
            409,
            413,
            422,
            429,
            500,
            502,
            503,
            504
          ]
        },
        "meta": {
          "description": "More detail about the error when there is any, such as the payment that was declined. Usually `null`.",
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": true
        }
      }
    }
  },
  "example": {
    "error": {
      "type": "not_found",
      "code": "resource_not_found",
      "message": "Event not found: 0059847953278fQmIZHpIYdE does not exist.",
      "reference": "qh81SPw",
      "status": 404,
      "meta": null
    }
  }
}
```

Example:

```json
{
  "error": {
    "type": "bad_request",
    "code": "invalid_input",
    "message": "The value supplied for the url query string parameter 'limit' is invalid. The value must be between 1 and 100 or remove the parameter to use the default.",
    "reference": "2mJgF4F",
    "status": 400,
    "meta": null
  }
}
```

## Response 401

The token is missing, expired or not valid (type `unauthorized`, code `invalid_token`).

### application/json

Fields and constraints (JSON Schema):

```json
{
  "type": "object",
  "title": "error",
  "description": "Every error response has this body, whatever the status code. Use `status` and `type` for the broad case, `code` for the exact one, and show `message` to a person.",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "title": "error_details",
      "description": "The details of an error: `error` in every error response, and a failed row in a license import receipt.",
      "required": [
        "type",
        "code",
        "message",
        "reference",
        "status",
        "meta"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "The broad category. It matches `status`.",
          "enum": [
            "bad_request",
            "invalid_request",
            "unauthorized",
            "transaction_error",
            "forbidden",
            "not_found",
            "conflict",
            "unprocessable",
            "too_many_requests",
            "internal_server_error",
            "external_server_error",
            "service_unavailable",
            "external_server_timeout"
          ]
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "The exact error within its type, for example `invalid_input`, `invalid_token`, `payment_declined`, `insufficient_permissions`, `resource_not_found`, `in_use` or `invalid_state`. New codes may be added, so keep a fallback for each status.",
          "examples": [
            "invalid_input"
          ]
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "What went wrong and, often, how to fix it. Written for people, in the shopper's language where a translation exists. Do not parse it."
        },
        "reference": {
          "type": [
            "string",
            "null"
          ],
          "description": "A 7-character code (some newer ones are longer) that names the exact check in Comecero that refused the request. The same check always gives the same reference, so it is not unique to your request. Quote it when you contact support.",
          "examples": [
            "qh81SPw"
          ]
        },
        "status": {
          "type": "integer",
          "description": "The HTTP status code of the response.",
          "enum": [
            400,
            401,
            402,
            403,
            404,
            409,
            413,
            422,
            429,
            500,
            502,
            503,
            504
          ]
        },
        "meta": {
          "description": "More detail about the error when there is any, such as the payment that was declined. Usually `null`.",
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": true
        }
      }
    }
  },
  "example": {
    "error": {
      "type": "not_found",
      "code": "resource_not_found",
      "message": "Event not found: 0059847953278fQmIZHpIYdE does not exist.",
      "reference": "qh81SPw",
      "status": 404,
      "meta": null
    }
  }
}
```

Example:

```json
{
  "error": {
    "type": "unauthorized",
    "code": "invalid_token",
    "message": "Authentication failed.",
    "reference": "pre3XcJ",
    "status": 401,
    "meta": null
  }
}
```

## Response 403

The token is valid but may not do this (type `forbidden`, code `insufficient_permissions`). For example a limited token on a route only secret and trusted tokens may call, or a token whose role lacks the permission.

### application/json

Fields and constraints (JSON Schema):

```json
{
  "type": "object",
  "title": "error",
  "description": "Every error response has this body, whatever the status code. Use `status` and `type` for the broad case, `code` for the exact one, and show `message` to a person.",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "title": "error_details",
      "description": "The details of an error: `error` in every error response, and a failed row in a license import receipt.",
      "required": [
        "type",
        "code",
        "message",
        "reference",
        "status",
        "meta"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "The broad category. It matches `status`.",
          "enum": [
            "bad_request",
            "invalid_request",
            "unauthorized",
            "transaction_error",
            "forbidden",
            "not_found",
            "conflict",
            "unprocessable",
            "too_many_requests",
            "internal_server_error",
            "external_server_error",
            "service_unavailable",
            "external_server_timeout"
          ]
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "The exact error within its type, for example `invalid_input`, `invalid_token`, `payment_declined`, `insufficient_permissions`, `resource_not_found`, `in_use` or `invalid_state`. New codes may be added, so keep a fallback for each status.",
          "examples": [
            "invalid_input"
          ]
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "What went wrong and, often, how to fix it. Written for people, in the shopper's language where a translation exists. Do not parse it."
        },
        "reference": {
          "type": [
            "string",
            "null"
          ],
          "description": "A 7-character code (some newer ones are longer) that names the exact check in Comecero that refused the request. The same check always gives the same reference, so it is not unique to your request. Quote it when you contact support.",
          "examples": [
            "qh81SPw"
          ]
        },
        "status": {
          "type": "integer",
          "description": "The HTTP status code of the response.",
          "enum": [
            400,
            401,
            402,
            403,
            404,
            409,
            413,
            422,
            429,
            500,
            502,
            503,
            504
          ]
        },
        "meta": {
          "description": "More detail about the error when there is any, such as the payment that was declined. Usually `null`.",
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": true
        }
      }
    }
  },
  "example": {
    "error": {
      "type": "not_found",
      "code": "resource_not_found",
      "message": "Event not found: 0059847953278fQmIZHpIYdE does not exist.",
      "reference": "qh81SPw",
      "status": 404,
      "meta": null
    }
  }
}
```

Example:

```json
{
  "error": {
    "type": "forbidden",
    "code": "insufficient_permissions",
    "message": "The supplied bearer token does not have permission to execute the provided HTTP method on the given resource.",
    "reference": "AxkklBY",
    "status": 403,
    "meta": null
  }
}
```

## Response 404

No such object (type `not_found`, code `resource_not_found`). It may belong to another account, or to the other mode: a test token cannot see live objects and a live token cannot see test ones. The message says so when the object exists in the other mode.

### application/json

Fields and constraints (JSON Schema):

```json
{
  "type": "object",
  "title": "error",
  "description": "Every error response has this body, whatever the status code. Use `status` and `type` for the broad case, `code` for the exact one, and show `message` to a person.",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "title": "error_details",
      "description": "The details of an error: `error` in every error response, and a failed row in a license import receipt.",
      "required": [
        "type",
        "code",
        "message",
        "reference",
        "status",
        "meta"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "The broad category. It matches `status`.",
          "enum": [
            "bad_request",
            "invalid_request",
            "unauthorized",
            "transaction_error",
            "forbidden",
            "not_found",
            "conflict",
            "unprocessable",
            "too_many_requests",
            "internal_server_error",
            "external_server_error",
            "service_unavailable",
            "external_server_timeout"
          ]
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "The exact error within its type, for example `invalid_input`, `invalid_token`, `payment_declined`, `insufficient_permissions`, `resource_not_found`, `in_use` or `invalid_state`. New codes may be added, so keep a fallback for each status.",
          "examples": [
            "invalid_input"
          ]
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "What went wrong and, often, how to fix it. Written for people, in the shopper's language where a translation exists. Do not parse it."
        },
        "reference": {
          "type": [
            "string",
            "null"
          ],
          "description": "A 7-character code (some newer ones are longer) that names the exact check in Comecero that refused the request. The same check always gives the same reference, so it is not unique to your request. Quote it when you contact support.",
          "examples": [
            "qh81SPw"
          ]
        },
        "status": {
          "type": "integer",
          "description": "The HTTP status code of the response.",
          "enum": [
            400,
            401,
            402,
            403,
            404,
            409,
            413,
            422,
            429,
            500,
            502,
            503,
            504
          ]
        },
        "meta": {
          "description": "More detail about the error when there is any, such as the payment that was declined. Usually `null`.",
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": true
        }
      }
    }
  },
  "example": {
    "error": {
      "type": "not_found",
      "code": "resource_not_found",
      "message": "Event not found: 0059847953278fQmIZHpIYdE does not exist.",
      "reference": "qh81SPw",
      "status": 404,
      "meta": null
    }
  }
}
```

Example:

```json
{
  "error": {
    "type": "not_found",
    "code": "resource_not_found",
    "message": "Event not found: 0059847953278fQmIZHpIYdE does not exist.",
    "reference": "qh81SPw",
    "status": 404,
    "meta": null
  }
}
```

## Response 409

credit_request_conflict means the same key was used with different data. credit_request_pending means the update is still running: wait, then explicitly resend the same body and key. license_version_conflict means the license changed: read its current version and review a new update.

### application/json

Fields and constraints (JSON Schema):

```json
{
  "type": "object",
  "title": "error",
  "description": "Every error response has this body, whatever the status code. Use `status` and `type` for the broad case, `code` for the exact one, and show `message` to a person.",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "title": "error_details",
      "description": "The details of an error: `error` in every error response, and a failed row in a license import receipt.",
      "required": [
        "type",
        "code",
        "message",
        "reference",
        "status",
        "meta"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "The broad category. It matches `status`.",
          "enum": [
            "bad_request",
            "invalid_request",
            "unauthorized",
            "transaction_error",
            "forbidden",
            "not_found",
            "conflict",
            "unprocessable",
            "too_many_requests",
            "internal_server_error",
            "external_server_error",
            "service_unavailable",
            "external_server_timeout"
          ]
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "The exact error within its type, for example `invalid_input`, `invalid_token`, `payment_declined`, `insufficient_permissions`, `resource_not_found`, `in_use` or `invalid_state`. New codes may be added, so keep a fallback for each status.",
          "examples": [
            "invalid_input"
          ]
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "What went wrong and, often, how to fix it. Written for people, in the shopper's language where a translation exists. Do not parse it."
        },
        "reference": {
          "type": [
            "string",
            "null"
          ],
          "description": "A 7-character code (some newer ones are longer) that names the exact check in Comecero that refused the request. The same check always gives the same reference, so it is not unique to your request. Quote it when you contact support.",
          "examples": [
            "qh81SPw"
          ]
        },
        "status": {
          "type": "integer",
          "description": "The HTTP status code of the response.",
          "enum": [
            400,
            401,
            402,
            403,
            404,
            409,
            413,
            422,
            429,
            500,
            502,
            503,
            504
          ]
        },
        "meta": {
          "description": "More detail about the error when there is any, such as the payment that was declined. Usually `null`.",
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": true
        }
      }
    }
  },
  "example": {
    "error": {
      "type": "not_found",
      "code": "resource_not_found",
      "message": "Event not found: 0059847953278fQmIZHpIYdE does not exist.",
      "reference": "qh81SPw",
      "status": 404,
      "meta": null
    }
  }
}
```

Example:

```json
{
  "error": {
    "type": "not_found",
    "code": "resource_not_found",
    "message": "Event not found: 0059847953278fQmIZHpIYdE does not exist.",
    "reference": "qh81SPw",
    "status": 404,
    "meta": null
  }
}
```

## Response 413

The decoded body exceeds 1 MiB.

## Response 503

Temporary failure. Follow Retry-After, read the license to check its current version, then explicitly resend the original body and Idempotency-Key to recover the saved result. A replay returns the original response. Review a new update only after resolving the first one.

### application/json

Fields and constraints (JSON Schema):

```json
{
  "type": "object",
  "title": "error",
  "description": "Every error response has this body, whatever the status code. Use `status` and `type` for the broad case, `code` for the exact one, and show `message` to a person.",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "title": "error_details",
      "description": "The details of an error: `error` in every error response, and a failed row in a license import receipt.",
      "required": [
        "type",
        "code",
        "message",
        "reference",
        "status",
        "meta"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "The broad category. It matches `status`.",
          "enum": [
            "bad_request",
            "invalid_request",
            "unauthorized",
            "transaction_error",
            "forbidden",
            "not_found",
            "conflict",
            "unprocessable",
            "too_many_requests",
            "internal_server_error",
            "external_server_error",
            "service_unavailable",
            "external_server_timeout"
          ]
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "The exact error within its type, for example `invalid_input`, `invalid_token`, `payment_declined`, `insufficient_permissions`, `resource_not_found`, `in_use` or `invalid_state`. New codes may be added, so keep a fallback for each status.",
          "examples": [
            "invalid_input"
          ]
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "What went wrong and, often, how to fix it. Written for people, in the shopper's language where a translation exists. Do not parse it."
        },
        "reference": {
          "type": [
            "string",
            "null"
          ],
          "description": "A 7-character code (some newer ones are longer) that names the exact check in Comecero that refused the request. The same check always gives the same reference, so it is not unique to your request. Quote it when you contact support.",
          "examples": [
            "qh81SPw"
          ]
        },
        "status": {
          "type": "integer",
          "description": "The HTTP status code of the response.",
          "enum": [
            400,
            401,
            402,
            403,
            404,
            409,
            413,
            422,
            429,
            500,
            502,
            503,
            504
          ]
        },
        "meta": {
          "description": "More detail about the error when there is any, such as the payment that was declined. Usually `null`.",
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": true
        }
      }
    }
  },
  "example": {
    "error": {
      "type": "not_found",
      "code": "resource_not_found",
      "message": "Event not found: 0059847953278fQmIZHpIYdE does not exist.",
      "reference": "qh81SPw",
      "status": 404,
      "meta": null
    }
  }
}
```

Example:

```json
{
  "error": {
    "type": "not_found",
    "code": "resource_not_found",
    "message": "Event not found: 0059847953278fQmIZHpIYdE does not exist.",
    "reference": "qh81SPw",
    "status": 404,
    "meta": null
  }
}
```

Resolve remaining `$ref` pointers in /openapi.json.