PT EN

Pedidos de serviço

URL base: $BUSINESS_API

O objecto

idstring · obrigatório
tenant_idstring · obrigatório
phonestring · obrigatório
full_namestring · opcional
addressstring · obrigatório
plus_codestring · opcional
localitystring · opcional
landmarkstring · opcional
service_typestring · obrigatório

um de new_connection

categorystring · obrigatório

um de residential, commercial, industrial, institutional, government

statusstring · obrigatório

um de submitted, accepted, visit_scheduled, quoted, payment_pending, scheduled, completed, declined, withdrawn

pricedboolean · obrigatório
estimate_min_centsinteger (int64) · opcional
estimate_max_centsinteger (int64) · opcional
currencystring · opcional
decline_reasonstring · opcional

Code from the tenant's configured decline reasons

decline_reason_labelstring · opcional

The tenant's wording of the reason when it was chosen

decline_notestring · opcional
account_idstring · opcional

Account the connection was installed on; the requester is linked to it

account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

customer_idstring · opcional
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

property_idstring · opcional
property_addressstring · opcional

Address line of the referenced property. Omitted when unknown.

property_holder_namestring · opcional

Display name of the customer who holds the referenced property. Omitted when unknown.

connection_idstring · opcional
connection_holder_namestring · opcional

Display name of the customer who holds the referenced connection. Omitted when unknown.

connection_statusstring · opcional
quote_idstring · opcional

The current quote

site_visit_idstring · opcional

The current site visit

invoice_idstring · opcional

Invoice the accepted quote is paid through

payment_idstring · opcional
receipt_numberstring · opcional
work_order_idstring · opcional

Installation work order booked once paid

installation_datestring (date) · opcional
quoteobject · opcional
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
request_idstring · obrigatório
versioninteger · obrigatório
statusstring · obrigatório

um de issued, accepted, declined, superseded, expired, paid, cancelled

automaticboolean · obrigatório

Priced at once from the tariff without staff

site_visit_idstring · opcional
tariff_version_idstring · opcional
linesarray of ServiceQuoteLine · obrigatório
Mostrar atributos filhos
idstring · obrigatório
positioninteger · obrigatório
kindstring · obrigatório

um de connection_fee, material, labour, other

charge_codestring · opcional
descriptionstring · obrigatório
quantitynumber · obrigatório
list_price_centsinteger (int64) · opcional

The tariff's unit price when the line came from it

unit_price_centsinteger (int64) · obrigatório
taxableboolean · obrigatório
total_centsinteger (int64) · obrigatório

Quantity times unit price

tax_centsinteger (int64) · obrigatório
adjustment_reasonstring · opcional
subtotal_centsinteger (int64) · obrigatório
tax_centsinteger (int64) · obrigatório
total_centsinteger (int64) · obrigatório
currencystring · obrigatório
valid_untilstring (date-time) · obrigatório

Last day the quote can be accepted

notesstring · opcional
issued_bystring · opcional
issued_atstring (date-time) · obrigatório
accepted_atstring (date-time) · opcional
declined_atstring (date-time) · opcional
decline_notestring · opcional
invoice_idstring · opcional
invoice_numberstring · opcional
payment_idstring · opcional
receipt_numberstring · opcional
paid_atstring (date-time) · opcional
created_atstring (date-time) · opcional
updated_atstring (date-time) · opcional
site_visitobject · opcional
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
request_idstring · obrigatório
statusstring · obrigatório

um de scheduled, completed, cancelled

visit_datestring (date) · obrigatório
booked_bystring · obrigatório

um de consumer, staff

notesstring · opcional
outcomestring · opcional
quote_idstring · opcional
completed_atstring (date-time) · opcional
cancelled_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório
can_book_visitboolean · opcional

The requester may book a site visit from the offered days

decided_bystring · opcional
decided_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório
O objecto
{
  "id": "ser_2DBQqPj0WzZs0v5cORdA4r1imPJ",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "phone": "+258841234567",
  "full_name": "Ana Matsinhe",
  "address": "Av. Julius Nyerere 1420, Maputo",
  "plus_code": "PLU-2026-000142",
  "locality": "locality",
  "landmark": "landmark",
  "service_type": "new_connection",
  "category": "residential",
  "status": "submitted",
  "priced": true,
  "estimate_min_cents": 1,
  "estimate_max_cents": 1,
  "currency": "MZN",
  "decline_reason": "decline reason",
  "decline_reason_label": "decline reason label",
  "decline_note": "decline note",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "customer_name": "Ana Matsinhe",
  "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
  "property_address": "Av. Julius Nyerere 1420, Maputo",
  "property_holder_name": "Ana Matsinhe",
  "connection_id": "con_2wuJTWy9FOCTPGA3noGbHegbLaU",
  "connection_holder_name": "Ana Matsinhe",
  "connection_status": "connection status",
  "quote_id": "quo_26mh1wUlhIGz1c4BTWQl9M2dDyI",
  "site_visit_id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
  "invoice_id": "inv_2jnourvAGxXMMd5IyFbwc1LqUX1",
  "payment_id": "pay_2eUBfC8BJA6JLIoHrQwtN0GL1mW",
  "receipt_number": "REC-2026-000142",
  "work_order_id": "wko_2ecrvKOzr4kPhwgtrQAD7gM53yk",
  "installation_date": "2026-11-19",
  "quote": {
    "id": "ser_2cAPViWrBMoJHYSb9GajpwyHJEy",
    "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
    "request_id": "req_2JrY4JziCp1C0bFCSLb4M37qGNH",
    "version": 1,
    "status": "issued",
    "automatic": true,
    "site_visit_id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
    "tariff_version_id": "tar_2TzCwDDsMdpa2HfkINTSsLvKunb",
    "lines": [
      {
        "id": "ser_2bBeKTRWGj1a0TJoARlcel7MIL7",
        "position": 1,
        "kind": "connection_fee",
        "charge_code": "CHA-2026-000142",
        "description": "Leitura confirmada no local.",
        "quantity": 1,
        "list_price_cents": 125000,
        "unit_price_cents": 125000,
        "taxable": true,
        "total_cents": 125000,
        "tax_cents": 1,
        "adjustment_reason": "adjustment reason"
      }
    ],
    "subtotal_cents": 125000,
    "tax_cents": 1,
    "total_cents": 125000,
    "currency": "MZN",
    "valid_until": "2026-11-19T09:30:00Z",
    "notes": "Leitura confirmada no local.",
    "issued_by": "issued by",
    "issued_at": "2026-11-19T09:30:00Z",
    "accepted_at": "2026-11-19T09:30:00Z",
    "declined_at": "2026-11-19T09:30:00Z",
    "decline_note": "decline note",
    "invoice_id": "inv_2jnourvAGxXMMd5IyFbwc1LqUX1",
    "invoice_number": "INV-2026-000142",
    "payment_id": "pay_2eUBfC8BJA6JLIoHrQwtN0GL1mW",
    "receipt_number": "REC-2026-000142",
    "paid_at": "2026-11-19T09:30:00Z",
    "created_at": "2026-11-19T09:30:00Z",
    "updated_at": "2026-11-19T09:30:00Z"
  },
  "site_visit": {
    "id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
    "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
    "request_id": "req_2JrY4JziCp1C0bFCSLb4M37qGNH",
    "status": "scheduled",
    "visit_date": "2026-11-19",
    "booked_by": "consumer",
    "notes": "Leitura confirmada no local.",
    "outcome": "outcome",
    "quote_id": "quo_26mh1wUlhIGz1c4BTWQl9M2dDyI",
    "completed_at": "2026-11-19T09:30:00Z",
    "cancelled_at": "2026-11-19T09:30:00Z",
    "created_at": "2026-11-19T09:30:00Z",
    "updated_at": "2026-11-19T09:30:00Z"
  },
  "can_book_visit": true,
  "decided_by": "decided by",
  "decided_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

Listar pedidos de serviço

Registos

GET /service-requests

Returns the service requests submitted to the caller's tenant, newest-first pages of at most 100 items (20 by default) driven by limit and the after cursor. Before each item is returned its quote state is brought up to date, so a quote whose validity has passed shows as expired and a paid quote moves the request forward. Requires the connections:read permission.

Parâmetros

statusstring · consulta · opcional

Returns only requests in this exact status (submitted, accepted, declined, withdrawn, visit_scheduled, quoted, payment_pending, scheduled or completed); omit it to list requests in every status.

um de submitted, accepted, declined, withdrawn

limitinteger · consulta · opcional

Maximum resources to return (default 20, maximum 100).

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

Devolve

200 Service requests of the authenticated utility tenant

Mostrar atributos
dataarray of ServiceRequest · obrigatório
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
phonestring · obrigatório
full_namestring · opcional
addressstring · obrigatório
plus_codestring · opcional
localitystring · opcional
landmarkstring · opcional
service_typestring · obrigatório

um de new_connection

categorystring · obrigatório

um de residential, commercial, industrial, institutional, government

statusstring · obrigatório

um de submitted, accepted, visit_scheduled, quoted, payment_pending, scheduled, completed, declined, withdrawn

pricedboolean · obrigatório
estimate_min_centsinteger (int64) · opcional
estimate_max_centsinteger (int64) · opcional
currencystring · opcional
decline_reasonstring · opcional

Code from the tenant's configured decline reasons

decline_reason_labelstring · opcional

The tenant's wording of the reason when it was chosen

decline_notestring · opcional
account_idstring · opcional

Account the connection was installed on; the requester is linked to it

account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

customer_idstring · opcional
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

property_idstring · opcional
property_addressstring · opcional

Address line of the referenced property. Omitted when unknown.

property_holder_namestring · opcional

Display name of the customer who holds the referenced property. Omitted when unknown.

connection_idstring · opcional
connection_holder_namestring · opcional

Display name of the customer who holds the referenced connection. Omitted when unknown.

connection_statusstring · opcional
quote_idstring · opcional

The current quote

site_visit_idstring · opcional

The current site visit

invoice_idstring · opcional

Invoice the accepted quote is paid through

payment_idstring · opcional
receipt_numberstring · opcional
work_order_idstring · opcional

Installation work order booked once paid

installation_datestring (date) · opcional
quoteobject · opcional
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
request_idstring · obrigatório
versioninteger · obrigatório
statusstring · obrigatório

um de issued, accepted, declined, superseded, expired, paid, cancelled

automaticboolean · obrigatório

Priced at once from the tariff without staff

site_visit_idstring · opcional
tariff_version_idstring · opcional
linesarray of ServiceQuoteLine · obrigatório
Mostrar atributos filhos
idstring · obrigatório
positioninteger · obrigatório
kindstring · obrigatório

um de connection_fee, material, labour, other

charge_codestring · opcional
descriptionstring · obrigatório
quantitynumber · obrigatório
list_price_centsinteger (int64) · opcional

The tariff's unit price when the line came from it

unit_price_centsinteger (int64) · obrigatório
taxableboolean · obrigatório
total_centsinteger (int64) · obrigatório

Quantity times unit price

tax_centsinteger (int64) · obrigatório
adjustment_reasonstring · opcional
subtotal_centsinteger (int64) · obrigatório
tax_centsinteger (int64) · obrigatório
total_centsinteger (int64) · obrigatório
currencystring · obrigatório
valid_untilstring (date-time) · obrigatório

Last day the quote can be accepted

notesstring · opcional
issued_bystring · opcional
issued_atstring (date-time) · obrigatório
accepted_atstring (date-time) · opcional
declined_atstring (date-time) · opcional
decline_notestring · opcional
invoice_idstring · opcional
invoice_numberstring · opcional
payment_idstring · opcional
receipt_numberstring · opcional
paid_atstring (date-time) · opcional
created_atstring (date-time) · opcional
updated_atstring (date-time) · opcional
site_visitobject · opcional
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
request_idstring · obrigatório
statusstring · obrigatório

um de scheduled, completed, cancelled

visit_datestring (date) · obrigatório
booked_bystring · obrigatório

um de consumer, staff

notesstring · opcional
outcomestring · opcional
quote_idstring · opcional
completed_atstring (date-time) · opcional
cancelled_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório
can_book_visitboolean · opcional

The requester may book a site visit from the offered days

decided_bystring · opcional
decided_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório
has_moreboolean · obrigatório
next_cursorstring · opcional

Erros 403

Permissões connections:read · Funções: admin, analyst, customer_service, operations, owner, viewer

curl -X GET "$BUSINESS_API/service-requests" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "data": [
    {
      "id": "ser_2DBQqPj0WzZs0v5cORdA4r1imPJ",
      "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
      "phone": "+258841234567",
      "full_name": "Ana Matsinhe",
      "address": "Av. Julius Nyerere 1420, Maputo",
      "plus_code": "PLU-2026-000142",
      "locality": "locality",
      "landmark": "landmark",
      "service_type": "new_connection",
      "category": "residential",
      "status": "submitted",
      "priced": true,
      "estimate_min_cents": 1,
      "estimate_max_cents": 1,
      "currency": "MZN",
      "decline_reason": "decline reason",
      "decline_reason_label": "decline reason label",
      "decline_note": "decline note",
      "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
      "account_number": "ACC-2026-000142",
      "account_holder_name": "Ana Matsinhe",
      "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
      "customer_name": "Ana Matsinhe",
      "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
      "property_address": "Av. Julius Nyerere 1420, Maputo",
      "property_holder_name": "Ana Matsinhe",
      "connection_id": "con_2wuJTWy9FOCTPGA3noGbHegbLaU",
      "connection_holder_name": "Ana Matsinhe",
      "connection_status": "connection status",
      "quote_id": "quo_26mh1wUlhIGz1c4BTWQl9M2dDyI",
      "site_visit_id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
      "invoice_id": "inv_2jnourvAGxXMMd5IyFbwc1LqUX1",
      "payment_id": "pay_2eUBfC8BJA6JLIoHrQwtN0GL1mW",
      "receipt_number": "REC-2026-000142",
      "work_order_id": "wko_2ecrvKOzr4kPhwgtrQAD7gM53yk",
      "installation_date": "2026-11-19",
      "quote": {
        "id": "ser_2cAPViWrBMoJHYSb9GajpwyHJEy",
        "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
        "request_id": "req_2JrY4JziCp1C0bFCSLb4M37qGNH",
        "version": 1,
        "status": "issued",
        "automatic": true,
        "site_visit_id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
        "tariff_version_id": "tar_2TzCwDDsMdpa2HfkINTSsLvKunb",
        "lines": [
          {
            "id": "ser_2bBeKTRWGj1a0TJoARlcel7MIL7",
            "position": 1,
            "kind": "connection_fee",
            "charge_code": "CHA-2026-000142",
            "description": "Leitura confirmada no local.",
            "quantity": 1,
            "list_price_cents": 125000,
            "unit_price_cents": 125000,
            "taxable": true,
            "total_cents": 125000,
            "tax_cents": 1,
            "adjustment_reason": "adjustment reason"
          }
        ],
        "subtotal_cents": 125000,
        "tax_cents": 1,
        "total_cents": 125000,
        "currency": "MZN",
        "valid_until": "2026-11-19T09:30:00Z",
        "notes": "Leitura confirmada no local.",
        "issued_by": "issued by",
        "issued_at": "2026-11-19T09:30:00Z",
        "accepted_at": "2026-11-19T09:30:00Z",
        "declined_at": "2026-11-19T09:30:00Z",
        "decline_note": "decline note",
        "invoice_id": "inv_2jnourvAGxXMMd5IyFbwc1LqUX1",
        "invoice_number": "INV-2026-000142",
        "payment_id": "pay_2eUBfC8BJA6JLIoHrQwtN0GL1mW",
        "receipt_number": "REC-2026-000142",
        "paid_at": "2026-11-19T09:30:00Z",
        "created_at": "2026-11-19T09:30:00Z",
        "updated_at": "2026-11-19T09:30:00Z"
      },
      "site_visit": {
        "id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
        "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
        "request_id": "req_2JrY4JziCp1C0bFCSLb4M37qGNH",
        "status": "scheduled",
        "visit_date": "2026-11-19",
        "booked_by": "consumer",
        "notes": "Leitura confirmada no local.",
        "outcome": "outcome",
        "quote_id": "quo_26mh1wUlhIGz1c4BTWQl9M2dDyI",
        "completed_at": "2026-11-19T09:30:00Z",
        "cancelled_at": "2026-11-19T09:30:00Z",
        "created_at": "2026-11-19T09:30:00Z",
        "updated_at": "2026-11-19T09:30:00Z"
      },
      "can_book_visit": true,
      "decided_by": "decided by",
      "decided_at": "2026-11-19T09:30:00Z",
      "created_at": "2026-11-19T09:30:00Z",
      "updated_at": "2026-11-19T09:30:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "next cursor"
}

Obter um pedido de serviço

Registos

GET /service-requests/{id}

Returns one request from the tenant's queue together with its current quote, its site visit and, once accepted, the connection created for it. The quote state is refreshed on read, so an overdue quote is marked expired and a settled one advances the request. Returns 404 when the ID does not belong to the caller's tenant; requires connections:read.

Parâmetros

idstring · caminho · obrigatório

ID of the service request in the caller's tenant.

Devolve

200 Service request

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
phonestring · obrigatório
full_namestring · opcional
addressstring · obrigatório
plus_codestring · opcional
localitystring · opcional
landmarkstring · opcional
service_typestring · obrigatório

um de new_connection

categorystring · obrigatório

um de residential, commercial, industrial, institutional, government

statusstring · obrigatório

um de submitted, accepted, visit_scheduled, quoted, payment_pending, scheduled, completed, declined, withdrawn

pricedboolean · obrigatório
estimate_min_centsinteger (int64) · opcional
estimate_max_centsinteger (int64) · opcional
currencystring · opcional
decline_reasonstring · opcional

Code from the tenant's configured decline reasons

decline_reason_labelstring · opcional

The tenant's wording of the reason when it was chosen

decline_notestring · opcional
account_idstring · opcional

Account the connection was installed on; the requester is linked to it

account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

customer_idstring · opcional
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

property_idstring · opcional
property_addressstring · opcional

Address line of the referenced property. Omitted when unknown.

property_holder_namestring · opcional

Display name of the customer who holds the referenced property. Omitted when unknown.

connection_idstring · opcional
connection_holder_namestring · opcional

Display name of the customer who holds the referenced connection. Omitted when unknown.

connection_statusstring · opcional
quote_idstring · opcional

The current quote

site_visit_idstring · opcional

The current site visit

invoice_idstring · opcional

Invoice the accepted quote is paid through

payment_idstring · opcional
receipt_numberstring · opcional
work_order_idstring · opcional

Installation work order booked once paid

installation_datestring (date) · opcional
quoteobject · opcional
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
request_idstring · obrigatório
versioninteger · obrigatório
statusstring · obrigatório

um de issued, accepted, declined, superseded, expired, paid, cancelled

automaticboolean · obrigatório

Priced at once from the tariff without staff

site_visit_idstring · opcional
tariff_version_idstring · opcional
linesarray of ServiceQuoteLine · obrigatório
Mostrar atributos filhos
idstring · obrigatório
positioninteger · obrigatório
kindstring · obrigatório

um de connection_fee, material, labour, other

charge_codestring · opcional
descriptionstring · obrigatório
quantitynumber · obrigatório
list_price_centsinteger (int64) · opcional

The tariff's unit price when the line came from it

unit_price_centsinteger (int64) · obrigatório
taxableboolean · obrigatório
total_centsinteger (int64) · obrigatório

Quantity times unit price

tax_centsinteger (int64) · obrigatório
adjustment_reasonstring · opcional
subtotal_centsinteger (int64) · obrigatório
tax_centsinteger (int64) · obrigatório
total_centsinteger (int64) · obrigatório
currencystring · obrigatório
valid_untilstring (date-time) · obrigatório

Last day the quote can be accepted

notesstring · opcional
issued_bystring · opcional
issued_atstring (date-time) · obrigatório
accepted_atstring (date-time) · opcional
declined_atstring (date-time) · opcional
decline_notestring · opcional
invoice_idstring · opcional
invoice_numberstring · opcional
payment_idstring · opcional
receipt_numberstring · opcional
paid_atstring (date-time) · opcional
created_atstring (date-time) · opcional
updated_atstring (date-time) · opcional
site_visitobject · opcional
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
request_idstring · obrigatório
statusstring · obrigatório

um de scheduled, completed, cancelled

visit_datestring (date) · obrigatório
booked_bystring · obrigatório

um de consumer, staff

notesstring · opcional
outcomestring · opcional
quote_idstring · opcional
completed_atstring (date-time) · opcional
cancelled_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório
can_book_visitboolean · opcional

The requester may book a site visit from the offered days

decided_bystring · opcional
decided_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Erros 403 · 404

Permissões connections:read · Funções: admin, analyst, customer_service, operations, owner, viewer

curl -X GET "$BUSINESS_API/service-requests/{id}" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "id": "ser_2DBQqPj0WzZs0v5cORdA4r1imPJ",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "phone": "+258841234567",
  "full_name": "Ana Matsinhe",
  "address": "Av. Julius Nyerere 1420, Maputo",
  "plus_code": "PLU-2026-000142",
  "locality": "locality",
  "landmark": "landmark",
  "service_type": "new_connection",
  "category": "residential",
  "status": "submitted",
  "priced": true,
  "estimate_min_cents": 1,
  "estimate_max_cents": 1,
  "currency": "MZN",
  "decline_reason": "decline reason",
  "decline_reason_label": "decline reason label",
  "decline_note": "decline note",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "customer_name": "Ana Matsinhe",
  "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
  "property_address": "Av. Julius Nyerere 1420, Maputo",
  "property_holder_name": "Ana Matsinhe",
  "connection_id": "con_2wuJTWy9FOCTPGA3noGbHegbLaU",
  "connection_holder_name": "Ana Matsinhe",
  "connection_status": "connection status",
  "quote_id": "quo_26mh1wUlhIGz1c4BTWQl9M2dDyI",
  "site_visit_id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
  "invoice_id": "inv_2jnourvAGxXMMd5IyFbwc1LqUX1",
  "payment_id": "pay_2eUBfC8BJA6JLIoHrQwtN0GL1mW",
  "receipt_number": "REC-2026-000142",
  "work_order_id": "wko_2ecrvKOzr4kPhwgtrQAD7gM53yk",
  "installation_date": "2026-11-19",
  "quote": {
    "id": "ser_2cAPViWrBMoJHYSb9GajpwyHJEy",
    "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
    "request_id": "req_2JrY4JziCp1C0bFCSLb4M37qGNH",
    "version": 1,
    "status": "issued",
    "automatic": true,
    "site_visit_id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
    "tariff_version_id": "tar_2TzCwDDsMdpa2HfkINTSsLvKunb",
    "lines": [
      {
        "id": "ser_2bBeKTRWGj1a0TJoARlcel7MIL7",
        "position": 1,
        "kind": "connection_fee",
        "charge_code": "CHA-2026-000142",
        "description": "Leitura confirmada no local.",
        "quantity": 1,
        "list_price_cents": 125000,
        "unit_price_cents": 125000,
        "taxable": true,
        "total_cents": 125000,
        "tax_cents": 1,
        "adjustment_reason": "adjustment reason"
      }
    ],
    "subtotal_cents": 125000,
    "tax_cents": 1,
    "total_cents": 125000,
    "currency": "MZN",
    "valid_until": "2026-11-19T09:30:00Z",
    "notes": "Leitura confirmada no local.",
    "issued_by": "issued by",
    "issued_at": "2026-11-19T09:30:00Z",
    "accepted_at": "2026-11-19T09:30:00Z",
    "declined_at": "2026-11-19T09:30:00Z",
    "decline_note": "decline note",
    "invoice_id": "inv_2jnourvAGxXMMd5IyFbwc1LqUX1",
    "invoice_number": "INV-2026-000142",
    "payment_id": "pay_2eUBfC8BJA6JLIoHrQwtN0GL1mW",
    "receipt_number": "REC-2026-000142",
    "paid_at": "2026-11-19T09:30:00Z",
    "created_at": "2026-11-19T09:30:00Z",
    "updated_at": "2026-11-19T09:30:00Z"
  },
  "site_visit": {
    "id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
    "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
    "request_id": "req_2JrY4JziCp1C0bFCSLb4M37qGNH",
    "status": "scheduled",
    "visit_date": "2026-11-19",
    "booked_by": "consumer",
    "notes": "Leitura confirmada no local.",
    "outcome": "outcome",
    "quote_id": "quo_26mh1wUlhIGz1c4BTWQl9M2dDyI",
    "completed_at": "2026-11-19T09:30:00Z",
    "cancelled_at": "2026-11-19T09:30:00Z",
    "created_at": "2026-11-19T09:30:00Z",
    "updated_at": "2026-11-19T09:30:00Z"
  },
  "can_book_visit": true,
  "decided_by": "decided by",
  "decided_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

Aceitar um pedido de serviço

Registos

POST /service-requests/{id}/accept

Creates the customer and premise from the request under the caller's own permissions (business:customers:create, business:properties:create) and files a connection application (connections:write). A retry reuses a customer already created.

Parâmetros

idstring · caminho · obrigatório

ID of the open service request in the caller's tenant to accept.

Corpo application/json

categorystring · opcional

um de residential, commercial, industrial, institutional, government

diameter_mminteger · opcional
notesstring · opcional

Devolve

200 Accepted request with customer_id, property_id and connection_id

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
phonestring · obrigatório
full_namestring · opcional
addressstring · obrigatório
plus_codestring · opcional
localitystring · opcional
landmarkstring · opcional
service_typestring · obrigatório

um de new_connection

categorystring · obrigatório

um de residential, commercial, industrial, institutional, government

statusstring · obrigatório

um de submitted, accepted, visit_scheduled, quoted, payment_pending, scheduled, completed, declined, withdrawn

pricedboolean · obrigatório
estimate_min_centsinteger (int64) · opcional
estimate_max_centsinteger (int64) · opcional
currencystring · opcional
decline_reasonstring · opcional

Code from the tenant's configured decline reasons

decline_reason_labelstring · opcional

The tenant's wording of the reason when it was chosen

decline_notestring · opcional
account_idstring · opcional

Account the connection was installed on; the requester is linked to it

account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

customer_idstring · opcional
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

property_idstring · opcional
property_addressstring · opcional

Address line of the referenced property. Omitted when unknown.

property_holder_namestring · opcional

Display name of the customer who holds the referenced property. Omitted when unknown.

connection_idstring · opcional
connection_holder_namestring · opcional

Display name of the customer who holds the referenced connection. Omitted when unknown.

connection_statusstring · opcional
quote_idstring · opcional

The current quote

site_visit_idstring · opcional

The current site visit

invoice_idstring · opcional

Invoice the accepted quote is paid through

payment_idstring · opcional
receipt_numberstring · opcional
work_order_idstring · opcional

Installation work order booked once paid

installation_datestring (date) · opcional
quoteobject · opcional
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
request_idstring · obrigatório
versioninteger · obrigatório
statusstring · obrigatório

um de issued, accepted, declined, superseded, expired, paid, cancelled

automaticboolean · obrigatório

Priced at once from the tariff without staff

site_visit_idstring · opcional
tariff_version_idstring · opcional
linesarray of ServiceQuoteLine · obrigatório
Mostrar atributos filhos
idstring · obrigatório
positioninteger · obrigatório
kindstring · obrigatório

um de connection_fee, material, labour, other

charge_codestring · opcional
descriptionstring · obrigatório
quantitynumber · obrigatório
list_price_centsinteger (int64) · opcional

The tariff's unit price when the line came from it

unit_price_centsinteger (int64) · obrigatório
taxableboolean · obrigatório
total_centsinteger (int64) · obrigatório

Quantity times unit price

tax_centsinteger (int64) · obrigatório
adjustment_reasonstring · opcional
subtotal_centsinteger (int64) · obrigatório
tax_centsinteger (int64) · obrigatório
total_centsinteger (int64) · obrigatório
currencystring · obrigatório
valid_untilstring (date-time) · obrigatório

Last day the quote can be accepted

notesstring · opcional
issued_bystring · opcional
issued_atstring (date-time) · obrigatório
accepted_atstring (date-time) · opcional
declined_atstring (date-time) · opcional
decline_notestring · opcional
invoice_idstring · opcional
invoice_numberstring · opcional
payment_idstring · opcional
receipt_numberstring · opcional
paid_atstring (date-time) · opcional
created_atstring (date-time) · opcional
updated_atstring (date-time) · opcional
site_visitobject · opcional
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
request_idstring · obrigatório
statusstring · obrigatório

um de scheduled, completed, cancelled

visit_datestring (date) · obrigatório
booked_bystring · obrigatório

um de consumer, staff

notesstring · opcional
outcomestring · opcional
quote_idstring · opcional
completed_atstring (date-time) · opcional
cancelled_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório
can_book_visitboolean · opcional

The requester may book a site visit from the offered days

decided_bystring · opcional
decided_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Erros 400 · 403 · 404

Permissões connections:write · Funções: admin, operations, owner

curl -X POST "$BUSINESS_API/service-requests/{id}/accept" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "category": "residential",
  "diameter_mm": 1,
  "notes": "Leitura confirmada no local."
}'
Resposta 200
{
  "id": "ser_2DBQqPj0WzZs0v5cORdA4r1imPJ",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "phone": "+258841234567",
  "full_name": "Ana Matsinhe",
  "address": "Av. Julius Nyerere 1420, Maputo",
  "plus_code": "PLU-2026-000142",
  "locality": "locality",
  "landmark": "landmark",
  "service_type": "new_connection",
  "category": "residential",
  "status": "submitted",
  "priced": true,
  "estimate_min_cents": 1,
  "estimate_max_cents": 1,
  "currency": "MZN",
  "decline_reason": "decline reason",
  "decline_reason_label": "decline reason label",
  "decline_note": "decline note",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "customer_name": "Ana Matsinhe",
  "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
  "property_address": "Av. Julius Nyerere 1420, Maputo",
  "property_holder_name": "Ana Matsinhe",
  "connection_id": "con_2wuJTWy9FOCTPGA3noGbHegbLaU",
  "connection_holder_name": "Ana Matsinhe",
  "connection_status": "connection status",
  "quote_id": "quo_26mh1wUlhIGz1c4BTWQl9M2dDyI",
  "site_visit_id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
  "invoice_id": "inv_2jnourvAGxXMMd5IyFbwc1LqUX1",
  "payment_id": "pay_2eUBfC8BJA6JLIoHrQwtN0GL1mW",
  "receipt_number": "REC-2026-000142",
  "work_order_id": "wko_2ecrvKOzr4kPhwgtrQAD7gM53yk",
  "installation_date": "2026-11-19",
  "quote": {
    "id": "ser_2cAPViWrBMoJHYSb9GajpwyHJEy",
    "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
    "request_id": "req_2JrY4JziCp1C0bFCSLb4M37qGNH",
    "version": 1,
    "status": "issued",
    "automatic": true,
    "site_visit_id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
    "tariff_version_id": "tar_2TzCwDDsMdpa2HfkINTSsLvKunb",
    "lines": [
      {
        "id": "ser_2bBeKTRWGj1a0TJoARlcel7MIL7",
        "position": 1,
        "kind": "connection_fee",
        "charge_code": "CHA-2026-000142",
        "description": "Leitura confirmada no local.",
        "quantity": 1,
        "list_price_cents": 125000,
        "unit_price_cents": 125000,
        "taxable": true,
        "total_cents": 125000,
        "tax_cents": 1,
        "adjustment_reason": "adjustment reason"
      }
    ],
    "subtotal_cents": 125000,
    "tax_cents": 1,
    "total_cents": 125000,
    "currency": "MZN",
    "valid_until": "2026-11-19T09:30:00Z",
    "notes": "Leitura confirmada no local.",
    "issued_by": "issued by",
    "issued_at": "2026-11-19T09:30:00Z",
    "accepted_at": "2026-11-19T09:30:00Z",
    "declined_at": "2026-11-19T09:30:00Z",
    "decline_note": "decline note",
    "invoice_id": "inv_2jnourvAGxXMMd5IyFbwc1LqUX1",
    "invoice_number": "INV-2026-000142",
    "payment_id": "pay_2eUBfC8BJA6JLIoHrQwtN0GL1mW",
    "receipt_number": "REC-2026-000142",
    "paid_at": "2026-11-19T09:30:00Z",
    "created_at": "2026-11-19T09:30:00Z",
    "updated_at": "2026-11-19T09:30:00Z"
  },
  "site_visit": {
    "id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
    "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
    "request_id": "req_2JrY4JziCp1C0bFCSLb4M37qGNH",
    "status": "scheduled",
    "visit_date": "2026-11-19",
    "booked_by": "consumer",
    "notes": "Leitura confirmada no local.",
    "outcome": "outcome",
    "quote_id": "quo_26mh1wUlhIGz1c4BTWQl9M2dDyI",
    "completed_at": "2026-11-19T09:30:00Z",
    "cancelled_at": "2026-11-19T09:30:00Z",
    "created_at": "2026-11-19T09:30:00Z",
    "updated_at": "2026-11-19T09:30:00Z"
  },
  "can_book_visit": true,
  "decided_by": "decided by",
  "decided_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

Recusar um pedido de serviço

Registos

POST /service-requests/{id}/decline

The reason and note are shown to the requester only, never on the public status lookup.

Parâmetros

idstring · caminho · obrigatório

ID of the open service request in the caller's tenant to decline.

Corpo application/json

reasonstring · obrigatório

An active code from GET $BUSINESS_API/service-request-decline-reasons

notestring · opcional

Devolve

200 Declined request

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
phonestring · obrigatório
full_namestring · opcional
addressstring · obrigatório
plus_codestring · opcional
localitystring · opcional
landmarkstring · opcional
service_typestring · obrigatório

um de new_connection

categorystring · obrigatório

um de residential, commercial, industrial, institutional, government

statusstring · obrigatório

um de submitted, accepted, visit_scheduled, quoted, payment_pending, scheduled, completed, declined, withdrawn

pricedboolean · obrigatório
estimate_min_centsinteger (int64) · opcional
estimate_max_centsinteger (int64) · opcional
currencystring · opcional
decline_reasonstring · opcional

Code from the tenant's configured decline reasons

decline_reason_labelstring · opcional

The tenant's wording of the reason when it was chosen

decline_notestring · opcional
account_idstring · opcional

Account the connection was installed on; the requester is linked to it

account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

customer_idstring · opcional
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

property_idstring · opcional
property_addressstring · opcional

Address line of the referenced property. Omitted when unknown.

property_holder_namestring · opcional

Display name of the customer who holds the referenced property. Omitted when unknown.

connection_idstring · opcional
connection_holder_namestring · opcional

Display name of the customer who holds the referenced connection. Omitted when unknown.

connection_statusstring · opcional
quote_idstring · opcional

The current quote

site_visit_idstring · opcional

The current site visit

invoice_idstring · opcional

Invoice the accepted quote is paid through

payment_idstring · opcional
receipt_numberstring · opcional
work_order_idstring · opcional

Installation work order booked once paid

installation_datestring (date) · opcional
quoteobject · opcional
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
request_idstring · obrigatório
versioninteger · obrigatório
statusstring · obrigatório

um de issued, accepted, declined, superseded, expired, paid, cancelled

automaticboolean · obrigatório

Priced at once from the tariff without staff

site_visit_idstring · opcional
tariff_version_idstring · opcional
linesarray of ServiceQuoteLine · obrigatório
Mostrar atributos filhos
idstring · obrigatório
positioninteger · obrigatório
kindstring · obrigatório

um de connection_fee, material, labour, other

charge_codestring · opcional
descriptionstring · obrigatório
quantitynumber · obrigatório
list_price_centsinteger (int64) · opcional

The tariff's unit price when the line came from it

unit_price_centsinteger (int64) · obrigatório
taxableboolean · obrigatório
total_centsinteger (int64) · obrigatório

Quantity times unit price

tax_centsinteger (int64) · obrigatório
adjustment_reasonstring · opcional
subtotal_centsinteger (int64) · obrigatório
tax_centsinteger (int64) · obrigatório
total_centsinteger (int64) · obrigatório
currencystring · obrigatório
valid_untilstring (date-time) · obrigatório

Last day the quote can be accepted

notesstring · opcional
issued_bystring · opcional
issued_atstring (date-time) · obrigatório
accepted_atstring (date-time) · opcional
declined_atstring (date-time) · opcional
decline_notestring · opcional
invoice_idstring · opcional
invoice_numberstring · opcional
payment_idstring · opcional
receipt_numberstring · opcional
paid_atstring (date-time) · opcional
created_atstring (date-time) · opcional
updated_atstring (date-time) · opcional
site_visitobject · opcional
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
request_idstring · obrigatório
statusstring · obrigatório

um de scheduled, completed, cancelled

visit_datestring (date) · obrigatório
booked_bystring · obrigatório

um de consumer, staff

notesstring · opcional
outcomestring · opcional
quote_idstring · opcional
completed_atstring (date-time) · opcional
cancelled_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório
can_book_visitboolean · opcional

The requester may book a site visit from the offered days

decided_bystring · opcional
decided_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Erros 400 · 403 · 404

Permissões connections:write · Funções: admin, operations, owner

curl -X POST "$BUSINESS_API/service-requests/{id}/decline" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Leitura confirmada no local.",
  "note": "Leitura confirmada no local."
}'
Resposta 200
{
  "id": "ser_2DBQqPj0WzZs0v5cORdA4r1imPJ",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "phone": "+258841234567",
  "full_name": "Ana Matsinhe",
  "address": "Av. Julius Nyerere 1420, Maputo",
  "plus_code": "PLU-2026-000142",
  "locality": "locality",
  "landmark": "landmark",
  "service_type": "new_connection",
  "category": "residential",
  "status": "submitted",
  "priced": true,
  "estimate_min_cents": 1,
  "estimate_max_cents": 1,
  "currency": "MZN",
  "decline_reason": "decline reason",
  "decline_reason_label": "decline reason label",
  "decline_note": "decline note",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "customer_name": "Ana Matsinhe",
  "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
  "property_address": "Av. Julius Nyerere 1420, Maputo",
  "property_holder_name": "Ana Matsinhe",
  "connection_id": "con_2wuJTWy9FOCTPGA3noGbHegbLaU",
  "connection_holder_name": "Ana Matsinhe",
  "connection_status": "connection status",
  "quote_id": "quo_26mh1wUlhIGz1c4BTWQl9M2dDyI",
  "site_visit_id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
  "invoice_id": "inv_2jnourvAGxXMMd5IyFbwc1LqUX1",
  "payment_id": "pay_2eUBfC8BJA6JLIoHrQwtN0GL1mW",
  "receipt_number": "REC-2026-000142",
  "work_order_id": "wko_2ecrvKOzr4kPhwgtrQAD7gM53yk",
  "installation_date": "2026-11-19",
  "quote": {
    "id": "ser_2cAPViWrBMoJHYSb9GajpwyHJEy",
    "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
    "request_id": "req_2JrY4JziCp1C0bFCSLb4M37qGNH",
    "version": 1,
    "status": "issued",
    "automatic": true,
    "site_visit_id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
    "tariff_version_id": "tar_2TzCwDDsMdpa2HfkINTSsLvKunb",
    "lines": [
      {
        "id": "ser_2bBeKTRWGj1a0TJoARlcel7MIL7",
        "position": 1,
        "kind": "connection_fee",
        "charge_code": "CHA-2026-000142",
        "description": "Leitura confirmada no local.",
        "quantity": 1,
        "list_price_cents": 125000,
        "unit_price_cents": 125000,
        "taxable": true,
        "total_cents": 125000,
        "tax_cents": 1,
        "adjustment_reason": "adjustment reason"
      }
    ],
    "subtotal_cents": 125000,
    "tax_cents": 1,
    "total_cents": 125000,
    "currency": "MZN",
    "valid_until": "2026-11-19T09:30:00Z",
    "notes": "Leitura confirmada no local.",
    "issued_by": "issued by",
    "issued_at": "2026-11-19T09:30:00Z",
    "accepted_at": "2026-11-19T09:30:00Z",
    "declined_at": "2026-11-19T09:30:00Z",
    "decline_note": "decline note",
    "invoice_id": "inv_2jnourvAGxXMMd5IyFbwc1LqUX1",
    "invoice_number": "INV-2026-000142",
    "payment_id": "pay_2eUBfC8BJA6JLIoHrQwtN0GL1mW",
    "receipt_number": "REC-2026-000142",
    "paid_at": "2026-11-19T09:30:00Z",
    "created_at": "2026-11-19T09:30:00Z",
    "updated_at": "2026-11-19T09:30:00Z"
  },
  "site_visit": {
    "id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
    "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
    "request_id": "req_2JrY4JziCp1C0bFCSLb4M37qGNH",
    "status": "scheduled",
    "visit_date": "2026-11-19",
    "booked_by": "consumer",
    "notes": "Leitura confirmada no local.",
    "outcome": "outcome",
    "quote_id": "quo_26mh1wUlhIGz1c4BTWQl9M2dDyI",
    "completed_at": "2026-11-19T09:30:00Z",
    "cancelled_at": "2026-11-19T09:30:00Z",
    "created_at": "2026-11-19T09:30:00Z",
    "updated_at": "2026-11-19T09:30:00Z"
  },
  "can_book_visit": true,
  "decided_by": "decided by",
  "decided_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

Listar preços para o orçamento

Registos

GET /service-requests/{id}/quote-prices

Fixed components of the active tariff for the request's category whose accounting role is connection_fee, connection_material or connection_labour (RFC 0104 §7.1). Empty when the tenant has priced none; staff can still write free lines with a reason.

Parâmetros

idstring · caminho · obrigatório

ID of the service request whose category selects the tariff prices.

Devolve

200 Price catalogue

Mostrar atributos
tariff_version_idstring · opcional
currencystring · opcional
tax_percentnumber · obrigatório
pricesarray of object · obrigatório
Mostrar atributos filhos
keystring · obrigatório

Names the price on a quote line; code

codestring · obrigatório
namestring · obrigatório
kindstring · obrigatório

um de connection_fee, material, labour

amount_centsinteger (int64) · obrigatório
taxableboolean · obrigatório
diameter_mminteger · opcional
one_timeboolean · obrigatório

Erros 403 · 404

Permissões connections:read · Funções: admin, analyst, customer_service, operations, owner, viewer

curl -X GET "$BUSINESS_API/service-requests/{id}/quote-prices" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "tariff_version_id": "tar_2TzCwDDsMdpa2HfkINTSsLvKunb",
  "currency": "MZN",
  "tax_percent": 1,
  "prices": [
    {
      "key": "key",
      "code": "COD-2026-000142",
      "name": "Ana Matsinhe",
      "kind": "connection_fee",
      "amount_cents": 125000,
      "taxable": true,
      "diameter_mm": 1,
      "one_time": true
    }
  ]
}

Listar versões do orçamento

Registos

GET /service-requests/{id}/quotes

Returns every quote issued on the request, including superseded, expired and cancelled versions, in a data array without pagination. The request's quote state is refreshed first, so an overdue quote appears as expired. Returns 404 when the request is not in the caller's tenant; requires connections:read.

Parâmetros

idstring · caminho · obrigatório

ID of the service request whose quote versions are listed.

Devolve

200 Quote versions, newest first

Mostrar atributos
dataarray of ServiceQuote · obrigatório
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
request_idstring · obrigatório
versioninteger · obrigatório
statusstring · obrigatório

um de issued, accepted, declined, superseded, expired, paid, cancelled

automaticboolean · obrigatório

Priced at once from the tariff without staff

site_visit_idstring · opcional
tariff_version_idstring · opcional
linesarray of ServiceQuoteLine · obrigatório
Mostrar atributos filhos
idstring · obrigatório
positioninteger · obrigatório
kindstring · obrigatório

um de connection_fee, material, labour, other

charge_codestring · opcional
descriptionstring · obrigatório
quantitynumber · obrigatório
list_price_centsinteger (int64) · opcional

The tariff's unit price when the line came from it

unit_price_centsinteger (int64) · obrigatório
taxableboolean · obrigatório
total_centsinteger (int64) · obrigatório

Quantity times unit price

tax_centsinteger (int64) · obrigatório
adjustment_reasonstring · opcional
subtotal_centsinteger (int64) · obrigatório
tax_centsinteger (int64) · obrigatório
total_centsinteger (int64) · obrigatório
currencystring · obrigatório
valid_untilstring (date-time) · obrigatório

Last day the quote can be accepted

notesstring · opcional
issued_bystring · opcional
issued_atstring (date-time) · obrigatório
accepted_atstring (date-time) · opcional
declined_atstring (date-time) · opcional
decline_notestring · opcional
invoice_idstring · opcional
invoice_numberstring · opcional
payment_idstring · opcional
receipt_numberstring · opcional
paid_atstring (date-time) · opcional
created_atstring (date-time) · opcional
updated_atstring (date-time) · opcional

Erros 403 · 404

Permissões connections:read · Funções: admin, analyst, customer_service, operations, owner, viewer

curl -X GET "$BUSINESS_API/service-requests/{id}/quotes" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "data": [
    {
      "id": "ser_2cAPViWrBMoJHYSb9GajpwyHJEy",
      "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
      "request_id": "req_2JrY4JziCp1C0bFCSLb4M37qGNH",
      "version": 1,
      "status": "issued",
      "automatic": true,
      "site_visit_id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
      "tariff_version_id": "tar_2TzCwDDsMdpa2HfkINTSsLvKunb",
      "lines": [
        {
          "id": "ser_2bBeKTRWGj1a0TJoARlcel7MIL7",
          "position": 1,
          "kind": "connection_fee",
          "charge_code": "CHA-2026-000142",
          "description": "Leitura confirmada no local.",
          "quantity": 1,
          "list_price_cents": 125000,
          "unit_price_cents": 125000,
          "taxable": true,
          "total_cents": 125000,
          "tax_cents": 1,
          "adjustment_reason": "adjustment reason"
        }
      ],
      "subtotal_cents": 125000,
      "tax_cents": 1,
      "total_cents": 125000,
      "currency": "MZN",
      "valid_until": "2026-11-19T09:30:00Z",
      "notes": "Leitura confirmada no local.",
      "issued_by": "issued by",
      "issued_at": "2026-11-19T09:30:00Z",
      "accepted_at": "2026-11-19T09:30:00Z",
      "declined_at": "2026-11-19T09:30:00Z",
      "decline_note": "decline note",
      "invoice_id": "inv_2jnourvAGxXMMd5IyFbwc1LqUX1",
      "invoice_number": "INV-2026-000142",
      "payment_id": "pay_2eUBfC8BJA6JLIoHrQwtN0GL1mW",
      "receipt_number": "REC-2026-000142",
      "paid_at": "2026-11-19T09:30:00Z",
      "created_at": "2026-11-19T09:30:00Z",
      "updated_at": "2026-11-19T09:30:00Z"
    }
  ]
}

Emitir um orçamento

Registos

POST /service-requests/{id}/quotes

Lines come from the tariff catalogue (price key) or are free lines with their own price. A catalogue price changed, or a free line, needs adjustment_reason. The open version is superseded and stays visible; the request becomes quoted.

Parâmetros

idstring · caminho · obrigatório

ID of the service request to quote; it must be in a status that still accepts a quote.

Corpo application/json

linesarray of object · obrigatório
Mostrar atributos filhos
charge_codestring · opcional

A price key from quote-prices; omit for a free line

descriptionstring · opcional
quantitynumber · opcional

Defaults to 1

unit_price_centsinteger (int64) · opcional

Overrides the tariff price (with a reason) or prices a free line

taxableboolean · opcional

Free lines only; defaults to true

adjustment_reasonstring · opcional
valid_untilstring (date) · opcional

Defaults to 30 days from today

notesstring · opcional
site_visit_idstring · opcional

The visit this quote follows

Devolve

201 Issued quote

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
request_idstring · obrigatório
versioninteger · obrigatório
statusstring · obrigatório

um de issued, accepted, declined, superseded, expired, paid, cancelled

automaticboolean · obrigatório

Priced at once from the tariff without staff

site_visit_idstring · opcional
tariff_version_idstring · opcional
linesarray of ServiceQuoteLine · obrigatório
Mostrar atributos filhos
idstring · obrigatório
positioninteger · obrigatório
kindstring · obrigatório

um de connection_fee, material, labour, other

charge_codestring · opcional
descriptionstring · obrigatório
quantitynumber · obrigatório
list_price_centsinteger (int64) · opcional

The tariff's unit price when the line came from it

unit_price_centsinteger (int64) · obrigatório
taxableboolean · obrigatório
total_centsinteger (int64) · obrigatório

Quantity times unit price

tax_centsinteger (int64) · obrigatório
adjustment_reasonstring · opcional
subtotal_centsinteger (int64) · obrigatório
tax_centsinteger (int64) · obrigatório
total_centsinteger (int64) · obrigatório
currencystring · obrigatório
valid_untilstring (date-time) · obrigatório

Last day the quote can be accepted

notesstring · opcional
issued_bystring · opcional
issued_atstring (date-time) · obrigatório
accepted_atstring (date-time) · opcional
declined_atstring (date-time) · opcional
decline_notestring · opcional
invoice_idstring · opcional
invoice_numberstring · opcional
payment_idstring · opcional
receipt_numberstring · opcional
paid_atstring (date-time) · opcional
created_atstring (date-time) · opcional
updated_atstring (date-time) · opcional

Erros 400 · 403 · 404

Permissões connections:write · Funções: admin, operations, owner

curl -X POST "$BUSINESS_API/service-requests/{id}/quotes" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "lines": [
    {
      "charge_code": "CHA-2026-000142",
      "description": "Leitura confirmada no local.",
      "quantity": 1,
      "unit_price_cents": 125000,
      "taxable": true,
      "adjustment_reason": "adjustment reason"
    }
  ],
  "valid_until": "2026-11-19",
  "notes": "Leitura confirmada no local.",
  "site_visit_id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL"
}'
Resposta 201
{
  "id": "ser_2cAPViWrBMoJHYSb9GajpwyHJEy",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "request_id": "req_2JrY4JziCp1C0bFCSLb4M37qGNH",
  "version": 1,
  "status": "issued",
  "automatic": true,
  "site_visit_id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
  "tariff_version_id": "tar_2TzCwDDsMdpa2HfkINTSsLvKunb",
  "lines": [
    {
      "id": "ser_2bBeKTRWGj1a0TJoARlcel7MIL7",
      "position": 1,
      "kind": "connection_fee",
      "charge_code": "CHA-2026-000142",
      "description": "Leitura confirmada no local.",
      "quantity": 1,
      "list_price_cents": 125000,
      "unit_price_cents": 125000,
      "taxable": true,
      "total_cents": 125000,
      "tax_cents": 1,
      "adjustment_reason": "adjustment reason"
    }
  ],
  "subtotal_cents": 125000,
  "tax_cents": 1,
  "total_cents": 125000,
  "currency": "MZN",
  "valid_until": "2026-11-19T09:30:00Z",
  "notes": "Leitura confirmada no local.",
  "issued_by": "issued by",
  "issued_at": "2026-11-19T09:30:00Z",
  "accepted_at": "2026-11-19T09:30:00Z",
  "declined_at": "2026-11-19T09:30:00Z",
  "decline_note": "decline note",
  "invoice_id": "inv_2jnourvAGxXMMd5IyFbwc1LqUX1",
  "invoice_number": "INV-2026-000142",
  "payment_id": "pay_2eUBfC8BJA6JLIoHrQwtN0GL1mW",
  "receipt_number": "REC-2026-000142",
  "paid_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

Listar dias disponíveis para visita

Registos

GET /service-requests/{id}/visit-slots

The next working days from tomorrow in the tenant calendar; weekends and holidays are skipped.

Parâmetros

idstring · caminho · obrigatório

ID of the service request a visit slot is being chosen for.

Devolve

200 Offered days

Mostrar atributos
datesarray of string · obrigatório

Erros 403 · 404

Permissões connections:read · Funções: admin, analyst, customer_service, operations, owner, viewer

curl -X GET "$BUSINESS_API/service-requests/{id}/visit-slots" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "dates": [
    "2026-11-19"
  ]
}

Marcar uma visita ao local

Registos

POST /service-requests/{id}/site-visits

A visit still to happen is cancelled and an unanswered quote superseded; the request becomes visit_scheduled.

Parâmetros

idstring · caminho · obrigatório

ID of the service request the site visit is booked for.

Corpo application/json

datestring (date) · obrigatório

One of the offered days

notesstring · opcional

Devolve

201 Booked visit

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
request_idstring · obrigatório
statusstring · obrigatório

um de scheduled, completed, cancelled

visit_datestring (date) · obrigatório
booked_bystring · obrigatório

um de consumer, staff

notesstring · opcional
outcomestring · opcional
quote_idstring · opcional
completed_atstring (date-time) · opcional
cancelled_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Erros 400 · 403 · 404

Permissões connections:write · Funções: admin, operations, owner

curl -X POST "$BUSINESS_API/service-requests/{id}/site-visits" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "date": "2026-11-19",
  "notes": "Leitura confirmada no local."
}'
Resposta 201
{
  "id": "sit_2ljUKXviQDVcG3dOWH1ysvVGYfL",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "request_id": "req_2JrY4JziCp1C0bFCSLb4M37qGNH",
  "status": "scheduled",
  "visit_date": "2026-11-19",
  "booked_by": "consumer",
  "notes": "Leitura confirmada no local.",
  "outcome": "outcome",
  "quote_id": "quo_26mh1wUlhIGz1c4BTWQl9M2dDyI",
  "completed_at": "2026-11-19T09:30:00Z",
  "cancelled_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}