Field Glossary
All fields across middag-account domains as returned by the REST API. Fields map to entity properties via toArray() serialization. Amounts are stored in cents (integer) unless noted.
Organization
| Field | Type | Description |
|---|---|---|
id | int | Post ID |
name | string | Display name |
legal_name | string? | Legal entity name |
cnpj | string? | Brazilian CNPJ |
state_registration | string? | State tax registration |
email | string? | Primary contact email |
phone | string? | Phone number |
address | string? | Street address |
city | string? | City |
state | string? | State/province |
country | string? | ISO country code |
zipcode | string? | Postal code |
type | string? | company or individual |
status | string | publish, draft |
verification_status | string? | pending, verified |
owner_id | int | WordPress user ID of owner |
requires_invoice_for_payment | bool | Requires NFSe before payment |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
Collaborator
| Field | Type | Description |
|---|---|---|
id | int | Collaborator record ID |
organization_id | int | Parent organization |
user_id | int? | WordPress user ID (null if pending) |
email | string | Collaborator email |
role | string | owner, admin, member, guest, pending |
status | string | active |
can_manage_org | bool | Organization scope |
can_manage_finances | bool | Finances scope |
can_manage_orders | bool | Orders scope |
can_manage_licenses | bool | Licenses scope |
can_manage_tickets | bool | Tickets scope |
can_manage_quotes | bool | Quotes scope |
can_manage_contracts | bool | Contracts scope |
can_manage_documents | bool | Documents scope |
can_manage_downloads | bool | Downloads scope |
invite_status | string? | pending, accepted, rejected, expired |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
Entitlement
| Field | Type | Description |
|---|---|---|
id | int | Post ID |
code | string | Unique code (e.g., PLG-2026040001) |
class | string | PLG, ENV, SVC, ORD, AFL, EDU |
product_name | string | Linked product name |
product_description | string? | Product description |
status | string | active, suspended, expired, cancelled |
organization_id | int | Owning organization |
company | string | middag_br or middag_global |
expires_at | string? | Expiration date (ISO 8601) |
quote_id | int? | Originating quote |
auto_created | bool | Auto-provisioned from quote |
metadata | string? | JSON metadata blob |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
Quote
| Field | Type | Description |
|---|---|---|
id | int | Post ID |
quote_number | string | Unique quote number |
status | string | See Status Labels |
organization_id | int | Owning organization |
company | string | Legal entity |
line_items | string? | JSON array of line items |
subtotal | int? | Amount in cents |
discount | int? | Discount in cents |
total | int? | Total in cents |
currency | string? | ISO currency code |
valid_until | string? | Expiry date (ISO 8601) |
contact_name | string? | Client contact name |
contact_email | string? | Client contact email |
order_id | int? | Linked WooCommerce order |
entitlement_id | int? | Provisioned entitlement |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
Invoice
| Field | Type | Description |
|---|---|---|
id | int | Post ID |
number | string | Invoice number |
status | string | See Status Labels |
total | int | Amount in cents |
currency | string | ISO currency code |
issue_date | string | Issue date (YYYY-MM-DD) |
due_date | string | Due date (YYYY-MM-DD) |
payment_method | string? | Payment method used |
payment_date | string? | Date paid (YYYY-MM-DD) |
link | string? | External invoice URL |
order_id | int? | Linked WooCommerce order |
organization_id | int? | Owning organization |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
Environment
| Field | Type | Description |
|---|---|---|
id | int | Post ID |
environment_name | string | Display name |
environment_type | string | production, staging, development, sandbox |
platform | string | moodle, wordpress, custom |
status | string | See Status Labels |
entitlement_id | int | Linked entitlement |
organization_id | int | Owning organization |
url_primary | string? | Primary URL |
url_admin | string? | Admin panel URL |
server_provider | string? | Hosting provider |
server_region | string? | Server region |
backup_schedule | string? | Backup schedule description |
backup_retention_days | int? | Days to retain backups |
ssl_expires_at | string? | SSL expiry (ISO 8601) |
contract_id | int? | Linked contract |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
Service
| Field | Type | Description |
|---|---|---|
id | int | Post ID |
service_type | string | Type (e.g., consulting, development) |
title | string | Service title |
status | string | See Status Labels |
priority | string | low, normal, high, urgent |
entitlement_id | int | Linked entitlement |
organization_id | int | Owning organization |
start_date | string? | Start date (ISO 8601) |
estimated_end_date | string? | Estimated completion |
actual_end_date | string? | Actual completion |
contract_id | int? | Linked contract |
assigned_team | string? | Assigned team name |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
Ticket
| Field | Type | Description |
|---|---|---|
id | int | Post ID |
ticket_number | string | SR-{YEAR}{SEQ:4d} |
title | string | Request title |
status | string | See Status Labels |
priority | string | low, normal, high, urgent |
entitlement_id | int | Linked entitlement |
organization_id | int | Owning organization |
requested_by | int? | WordPress user ID |
assigned_to | string? | Assigned staff |
estimated_hours | string? | Estimated effort |
actual_hours | string? | Actual effort |
due_date | string? | Due date (ISO 8601) |
completed_at | string? | Completion timestamp |
service_id | int? | Parent service (if any) |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
License
| Field | Type | Description |
|---|---|---|
id | int | License ID |
license_key | string? | License key string |
status | string? | active, expired, revoked |
product_id | int? | WooCommerce product ID |
product_name | string? | Product display name |
order_id | int? | Linked order |
activations_limit | int? | Max activations allowed |
activations_current | int? | Current activation count |
activated_domains | string[] | Domains where activated |
expiration_date | string? | Expiry date (ISO 8601) |
organization_id | int? | Owning organization |
Contract
| Field | Type | Description |
|---|---|---|
id | int | Post ID |
number | string | Contract number |
year | string | Contract year |
status | string | See Status Labels |
organization_id | int? | Owning organization |
order_id | int? | Linked order |
object | string? | Contract object/scope |
duration | string? | Duration description |
amount_monthly | int? | Monthly amount (cents) |
amount_total | int? | Total amount (cents) |
currency | string? | ISO currency code |
issue_date | string? | Issue date |
acceptance_date | string? | Signature date |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
Related
- Data Model -- CPT structure and meta keys
- Status Labels -- All status values