Skip to main content
Operations in Invoices
POST /api/v1/invoices/{invoiceId}/line-items

Answers with the whole invoice, its totals worked out again.

The integration client needs INVOICES:UPDATE. A practice owner grants it under Permissions on the client.

Request

Language
curl -X POST 'https://dashboard.practor.app/api/v1/invoices/i2q6w8e0r4t7y1u3o5p9a6sd/line-items' \
  -H "Authorization: Bearer $PRACTOR_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "0190",
  "serviceDate": "2026-10-01",
  "quantity": 1,
  "unitPrice": 40000,
  "pricingSource": "medical_aid",
  "diagnoses": [
    {
      "system": "http://hl7.org/fhir/sid/icd-10-za",
      "code": "J06.9",
      "primary": true
    }
  ]
}'
const response = await fetch("https://dashboard.practor.app/api/v1/invoices/i2q6w8e0r4t7y1u3o5p9a6sd/line-items", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.PRACTOR_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "code": "0190",
    "serviceDate": "2026-10-01",
    "quantity": 1,
    "unitPrice": 40000,
    "pricingSource": "medical_aid",
    "diagnoses": [
      {
        "system": "http://hl7.org/fhir/sid/icd-10-za",
        "code": "J06.9",
        "primary": true
      }
    ]
  }),
});
const resource = await response.json();
import os, uuid
import requests

response = requests.post(
    "https://dashboard.practor.app/api/v1/invoices/i2q6w8e0r4t7y1u3o5p9a6sd/line-items",
    headers={
        "Authorization": f"Bearer {os.environ['PRACTOR_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
        "Content-Type": "application/json",
    },
    data="""{
  "code": "0190",
  "serviceDate": "2026-10-01",
  "quantity": 1,
  "unitPrice": 40000,
  "pricingSource": "medical_aid",
  "diagnoses": [
    {
      "system": "http://hl7.org/fhir/sid/icd-10-za",
      "code": "J06.9",
      "primary": true
    }
  ]
}""",
)
resource = response.json()
Response 201
{
  "object": "invoice",
  "id": "i2q6w8e0r4t7y1u3o5p9a6sd",
  "number": "INV-000123",
  "status": "issued",
  "claimStatus": "submitting",
  "patientId": "k3v9x2m8q1w7e4r6t0y5u2ia",
  "coverageId": "c9d1f4g7h2j5k8l0z3x6v1bn",
  "encounterIds": [
    "e7j3p5s9d1f4g6h8k2l0m3nb"
  ],
  "recipientName": "Thandi Mokoena",
  "date": "2026-10-01",
  "dueDate": "2026-10-31",
  "currency": "ZAR",
  "totalNet": 45000,
  "totalGross": 45000,
  "amountPaid": 0,
  "balanceDue": 45000,
  "lineItems": [
    {
      "id": "l8k5j2h9g6f3d0s7a4q1w8ez",
      "serviceDate": "2026-10-01",
      "serviceDateEnd": null,
      "system": null,
      "code": "0190",
      "description": "Consultation",
      "modifiers": [],
      "quantity": 1,
      "unitPrice": 45000,
      "subtotal": 45000,
      "total": 45000,
      "pricingSource": "medical_aid",
      "diagnoses": [
        {
          "system": "http://hl7.org/fhir/sid/icd-10-za",
          "code": "J06.9",
          "display": "Acute upper respiratory infection, unspecified",
          "primary": true
        }
      ]
    }
  ],
  "updatedAt": "2026-10-01T07:45:12.000Z"
}

Parameters

Path

invoiceId string Required

The invoice's id.

Headers

Idempotency-Key string Required

A value you make up, new for each record you create, such as a UUID. If a create times out and you send it again with the same key and body, Practor doesn't create a second record: it answers with the one the first request made, and adds the header Idempotent-Replayed: true so you can tell the answer is a repeat. Keys are remembered for 24 hours.

At most 255 characters.

Request body

Required. Send it as application/json, as a LineItemRequest.

  • system string or null

    The code system's URL. Left out, the practitioner's default for this kind of code.

  • code string Required

    The procedure or tariff code.

    At most 64 characters.

  • description string or null

    What the patient sees on the line. Left out, the code's own description.

  • serviceDate string Required

    When the service was given.

    Matches ^\d{4}-\d{2}-\d{2}$.

  • serviceDateEnd string or null
  • quantity number Required

    At most 10000.

  • unitPrice integer Required

    The price of one, in the currency's minor unit. Read the line's rates for the prices Practor knows.

    At least 0. At most 1000000000.

  • pricingSource string or null

    Where unitPrice came from. Send the pricingSource of the rate you chose; left out, the price counts as set by hand.

  • modifiers array of string or null

    Tariff modifiers, which can change what the line is billed at.

  • diagnoses array of object or null

    What the line treats. Mark one primary; left unmarked, the first is. A claim needs at least one.

Example body
{
  "code": "0190",
  "serviceDate": "2026-10-01",
  "quantity": 1,
  "unitPrice": 40000,
  "pricingSource": "medical_aid",
  "diagnoses": [
    {
      "system": "http://hl7.org/fhir/sid/icd-10-za",
      "code": "J06.9",
      "primary": true
    }
  ]
}

Responses

201 Created. The body is what was created; its address is in the Location header. An invoice, with its lines and what has been paid.

Headers

X-Request-Id string Required

Quote it if you contact support about this request.

X-RateLimit-Limit string Required

Requests allowed in the current window.

X-RateLimit-Remaining string Required

Requests left in the current window.

X-RateLimit-Reset string Required

When the window resets, in seconds since the Unix epoch.

Location string Required

Where to read what was created.

Body

Invoice

  • object "invoice" Required
  • id string Required
  • number string Required

    The invoice number the patient sees.

  • status string Required

    One of draft, issued, amending, balanced, cancelled, entered_in_error, partially_paid, overdue, written_off.

  • claimStatus string or null Required

    Where the claim to the insurer stands. Null when none was sent.

  • patientId string Required
  • coverageId string or null Required

    The coverage the claim was sent under. Null on an invoice whose claim has not been sent.

  • encounterIds array of string Required

    The visits billed on it.

  • recipientName string or null Required
  • date string Required

    YYYY-MM-DD.

  • dueDate string or null Required
  • currency string Required

    ISO 4217 currency code. Every amount on the resource is in it.

  • totalNet integer Required

    Before tax, in the currency's minor unit (cents for ZAR).

    At least -9007199254740991. At most 9007199254740991.

  • totalGross integer Required

    What the invoice is for, in the currency's minor unit (cents for ZAR).

    At least -9007199254740991. At most 9007199254740991.

  • amountPaid integer Required

    Paid so far, in the currency's minor unit (cents for ZAR).

    At least -9007199254740991. At most 9007199254740991.

  • balanceDue integer Required

    Still owed, in the currency's minor unit (cents for ZAR).

    At least -9007199254740991. At most 9007199254740991.

  • lineItems array of object Required
    • id string Required
    • serviceDate string Required

      YYYY-MM-DD.

    • serviceDateEnd string or null Required
    • system string or null Required

      The code system, by its URL.

    • code string Required
    • description string Required
    • modifiers array of string Required

      Tariff modifiers applied to the line.

    • quantity number Required
    • unitPrice integer Required

      The price of one, in the currency's minor unit (cents for ZAR).

      At least -9007199254740991. At most 9007199254740991.

    • subtotal integer Required

      Quantity times the unit price, in the currency's minor unit (cents for ZAR).

      At least -9007199254740991. At most 9007199254740991.

    • total integer Required

      The line after any discount or surcharge, in the currency's minor unit (cents for ZAR).

      At least -9007199254740991. At most 9007199254740991.

    • pricingSource string or null Required

      Where the unit price came from: a professional body, a medical insurance rate, the practice, or set by hand.

    • diagnoses array of object Required

      What the line treats. A claim needs a primary one.

      • system string or null Required

        The code system, by its URL.

      • code string Required
      • display string Required
      • primary boolean Required

        The diagnosis the line is claimed under. One per line.

  • updatedAt string Required

    An ISO 8601 date-time in UTC.

Example 201 body
{
  "object": "invoice",
  "id": "i2q6w8e0r4t7y1u3o5p9a6sd",
  "number": "INV-000123",
  "status": "issued",
  "claimStatus": "submitting",
  "patientId": "k3v9x2m8q1w7e4r6t0y5u2ia",
  "coverageId": "c9d1f4g7h2j5k8l0z3x6v1bn",
  "encounterIds": [
    "e7j3p5s9d1f4g6h8k2l0m3nb"
  ],
  "recipientName": "Thandi Mokoena",
  "date": "2026-10-01",
  "dueDate": "2026-10-31",
  "currency": "ZAR",
  "totalNet": 45000,
  "totalGross": 45000,
  "amountPaid": 0,
  "balanceDue": 45000,
  "lineItems": [
    {
      "id": "l8k5j2h9g6f3d0s7a4q1w8ez",
      "serviceDate": "2026-10-01",
      "serviceDateEnd": null,
      "system": null,
      "code": "0190",
      "description": "Consultation",
      "modifiers": [],
      "quantity": 1,
      "unitPrice": 45000,
      "subtotal": 45000,
      "total": 45000,
      "pricingSource": "medical_aid",
      "diagnoses": [
        {
          "system": "http://hl7.org/fhir/sid/icd-10-za",
          "code": "J06.9",
          "display": "Acute upper respiratory infection, unspecified",
          "primary": true
        }
      ]
    }
  ],
  "updatedAt": "2026-10-01T07:45:12.000Z"
}
400 A query parameter or header is missing or malformed, or the body isn't JSON. errors names the parameter.

Body

Problem

  • type string Required

    Where the error is explained: https://developers.practor.app/guides/errors# and the code, with hyphens for underscores.

  • title string Required

    A short summary of the kind of problem.

  • status integer Required

    The HTTP status, repeated.

    At least -9007199254740991. At most 9007199254740991.

  • detail string Required

    What went wrong with this request, in a sentence you can show a person.

  • code string Required

    The kind of problem. It stays the same across releases, so branch on it.

    One of invalid_request, invalid_cursor, validation_failed, unauthenticated, forbidden, addon_inactive, not_found, method_not_allowed, conflict, duplicate, business_rule, unprocessable, idempotency_key_reused, payload_too_large, unsupported_media_type, rate_limited, internal_error, service_unavailable.

  • requestId string Required

    The same as the X-Request-Id header. Quote it if you contact support.

  • errors array of FieldError

    One entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.

    • field string Required

      The field, query parameter or header the problem is in. A field in the body is a dotted path, such as givenNames.0 or procedures.1.code.

    • code string Required

      required when it was left out, invalid when its value is wrong.

      One of required, invalid.

    • message string Required

      What was wrong, in a sentence you can show a person.

Example 400 body
{
  "type": "https://developers.practor.app/guides/errors#validation-failed",
  "title": "Some fields are missing or wrong",
  "status": 422,
  "detail": "Fix the fields listed in errors and send it again.",
  "code": "validation_failed",
  "requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
  "errors": [
    {
      "field": "lastName",
      "code": "required",
      "message": "Send lastName."
    },
    {
      "field": "birthDate",
      "code": "invalid",
      "message": "birthDate must be a real date, written YYYY-MM-DD"
    }
  ]
}
401 No key was sent, or the key cannot be used: unknown, revoked or expired, its client suspended, or the call made from outside its allowed addresses. All of these answer the same way; the practice audit log names which it was.

Body

Problem

  • type string Required

    Where the error is explained: https://developers.practor.app/guides/errors# and the code, with hyphens for underscores.

  • title string Required

    A short summary of the kind of problem.

  • status integer Required

    The HTTP status, repeated.

    At least -9007199254740991. At most 9007199254740991.

  • detail string Required

    What went wrong with this request, in a sentence you can show a person.

  • code string Required

    The kind of problem. It stays the same across releases, so branch on it.

    One of invalid_request, invalid_cursor, validation_failed, unauthenticated, forbidden, addon_inactive, not_found, method_not_allowed, conflict, duplicate, business_rule, unprocessable, idempotency_key_reused, payload_too_large, unsupported_media_type, rate_limited, internal_error, service_unavailable.

  • requestId string Required

    The same as the X-Request-Id header. Quote it if you contact support.

  • errors array of FieldError

    One entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.

    • field string Required

      The field, query parameter or header the problem is in. A field in the body is a dotted path, such as givenNames.0 or procedures.1.code.

    • code string Required

      required when it was left out, invalid when its value is wrong.

      One of required, invalid.

    • message string Required

      What was wrong, in a sentence you can show a person.

Example 401 body
{
  "type": "https://developers.practor.app/guides/errors#validation-failed",
  "title": "Some fields are missing or wrong",
  "status": 422,
  "detail": "Fix the fields listed in errors and send it again.",
  "code": "validation_failed",
  "requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
  "errors": [
    {
      "field": "lastName",
      "code": "required",
      "message": "Send lastName."
    },
    {
      "field": "birthDate",
      "code": "invalid",
      "message": "birthDate must be a real date, written YYYY-MM-DD"
    }
  ]
}
403 The client lacks the permission this endpoint needs, or the practice's Integrations add-on is off.

Body

Problem

  • type string Required

    Where the error is explained: https://developers.practor.app/guides/errors# and the code, with hyphens for underscores.

  • title string Required

    A short summary of the kind of problem.

  • status integer Required

    The HTTP status, repeated.

    At least -9007199254740991. At most 9007199254740991.

  • detail string Required

    What went wrong with this request, in a sentence you can show a person.

  • code string Required

    The kind of problem. It stays the same across releases, so branch on it.

    One of invalid_request, invalid_cursor, validation_failed, unauthenticated, forbidden, addon_inactive, not_found, method_not_allowed, conflict, duplicate, business_rule, unprocessable, idempotency_key_reused, payload_too_large, unsupported_media_type, rate_limited, internal_error, service_unavailable.

  • requestId string Required

    The same as the X-Request-Id header. Quote it if you contact support.

  • errors array of FieldError

    One entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.

    • field string Required

      The field, query parameter or header the problem is in. A field in the body is a dotted path, such as givenNames.0 or procedures.1.code.

    • code string Required

      required when it was left out, invalid when its value is wrong.

      One of required, invalid.

    • message string Required

      What was wrong, in a sentence you can show a person.

Example 403 body
{
  "type": "https://developers.practor.app/guides/errors#validation-failed",
  "title": "Some fields are missing or wrong",
  "status": 422,
  "detail": "Fix the fields listed in errors and send it again.",
  "code": "validation_failed",
  "requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
  "errors": [
    {
      "field": "lastName",
      "code": "required",
      "message": "Send lastName."
    },
    {
      "field": "birthDate",
      "code": "invalid",
      "message": "birthDate must be a real date, written YYYY-MM-DD"
    }
  ]
}
404 The record doesn't exist in this practice. A record in another practice answers the same way.

Body

Problem

  • type string Required

    Where the error is explained: https://developers.practor.app/guides/errors# and the code, with hyphens for underscores.

  • title string Required

    A short summary of the kind of problem.

  • status integer Required

    The HTTP status, repeated.

    At least -9007199254740991. At most 9007199254740991.

  • detail string Required

    What went wrong with this request, in a sentence you can show a person.

  • code string Required

    The kind of problem. It stays the same across releases, so branch on it.

    One of invalid_request, invalid_cursor, validation_failed, unauthenticated, forbidden, addon_inactive, not_found, method_not_allowed, conflict, duplicate, business_rule, unprocessable, idempotency_key_reused, payload_too_large, unsupported_media_type, rate_limited, internal_error, service_unavailable.

  • requestId string Required

    The same as the X-Request-Id header. Quote it if you contact support.

  • errors array of FieldError

    One entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.

    • field string Required

      The field, query parameter or header the problem is in. A field in the body is a dotted path, such as givenNames.0 or procedures.1.code.

    • code string Required

      required when it was left out, invalid when its value is wrong.

      One of required, invalid.

    • message string Required

      What was wrong, in a sentence you can show a person.

Example 404 body
{
  "type": "https://developers.practor.app/guides/errors#validation-failed",
  "title": "Some fields are missing or wrong",
  "status": 422,
  "detail": "Fix the fields listed in errors and send it again.",
  "code": "validation_failed",
  "requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
  "errors": [
    {
      "field": "lastName",
      "code": "required",
      "message": "Send lastName."
    },
    {
      "field": "birthDate",
      "code": "invalid",
      "message": "birthDate must be a real date, written YYYY-MM-DD"
    }
  ]
}
405 This endpoint doesn't take that method. The Allow header names the one it does.

Body

Problem

  • type string Required

    Where the error is explained: https://developers.practor.app/guides/errors# and the code, with hyphens for underscores.

  • title string Required

    A short summary of the kind of problem.

  • status integer Required

    The HTTP status, repeated.

    At least -9007199254740991. At most 9007199254740991.

  • detail string Required

    What went wrong with this request, in a sentence you can show a person.

  • code string Required

    The kind of problem. It stays the same across releases, so branch on it.

    One of invalid_request, invalid_cursor, validation_failed, unauthenticated, forbidden, addon_inactive, not_found, method_not_allowed, conflict, duplicate, business_rule, unprocessable, idempotency_key_reused, payload_too_large, unsupported_media_type, rate_limited, internal_error, service_unavailable.

  • requestId string Required

    The same as the X-Request-Id header. Quote it if you contact support.

  • errors array of FieldError

    One entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.

    • field string Required

      The field, query parameter or header the problem is in. A field in the body is a dotted path, such as givenNames.0 or procedures.1.code.

    • code string Required

      required when it was left out, invalid when its value is wrong.

      One of required, invalid.

    • message string Required

      What was wrong, in a sentence you can show a person.

Example 405 body
{
  "type": "https://developers.practor.app/guides/errors#validation-failed",
  "title": "Some fields are missing or wrong",
  "status": 422,
  "detail": "Fix the fields listed in errors and send it again.",
  "code": "validation_failed",
  "requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
  "errors": [
    {
      "field": "lastName",
      "code": "required",
      "message": "Send lastName."
    },
    {
      "field": "birthDate",
      "code": "invalid",
      "message": "birthDate must be a real date, written YYYY-MM-DD"
    }
  ]
}
409 The record conflicts with one that exists (detail names it), or a request with the same Idempotency-Key is still running. Wait a moment and retry.

Body

Problem

  • type string Required

    Where the error is explained: https://developers.practor.app/guides/errors# and the code, with hyphens for underscores.

  • title string Required

    A short summary of the kind of problem.

  • status integer Required

    The HTTP status, repeated.

    At least -9007199254740991. At most 9007199254740991.

  • detail string Required

    What went wrong with this request, in a sentence you can show a person.

  • code string Required

    The kind of problem. It stays the same across releases, so branch on it.

    One of invalid_request, invalid_cursor, validation_failed, unauthenticated, forbidden, addon_inactive, not_found, method_not_allowed, conflict, duplicate, business_rule, unprocessable, idempotency_key_reused, payload_too_large, unsupported_media_type, rate_limited, internal_error, service_unavailable.

  • requestId string Required

    The same as the X-Request-Id header. Quote it if you contact support.

  • errors array of FieldError

    One entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.

    • field string Required

      The field, query parameter or header the problem is in. A field in the body is a dotted path, such as givenNames.0 or procedures.1.code.

    • code string Required

      required when it was left out, invalid when its value is wrong.

      One of required, invalid.

    • message string Required

      What was wrong, in a sentence you can show a person.

Example 409 body
{
  "type": "https://developers.practor.app/guides/errors#validation-failed",
  "title": "Some fields are missing or wrong",
  "status": 422,
  "detail": "Fix the fields listed in errors and send it again.",
  "code": "validation_failed",
  "requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
  "errors": [
    {
      "field": "lastName",
      "code": "required",
      "message": "Send lastName."
    },
    {
      "field": "birthDate",
      "code": "invalid",
      "message": "birthDate must be a real date, written YYYY-MM-DD"
    }
  ]
}
413 The body is larger than 256 KB.

Body

Problem

  • type string Required

    Where the error is explained: https://developers.practor.app/guides/errors# and the code, with hyphens for underscores.

  • title string Required

    A short summary of the kind of problem.

  • status integer Required

    The HTTP status, repeated.

    At least -9007199254740991. At most 9007199254740991.

  • detail string Required

    What went wrong with this request, in a sentence you can show a person.

  • code string Required

    The kind of problem. It stays the same across releases, so branch on it.

    One of invalid_request, invalid_cursor, validation_failed, unauthenticated, forbidden, addon_inactive, not_found, method_not_allowed, conflict, duplicate, business_rule, unprocessable, idempotency_key_reused, payload_too_large, unsupported_media_type, rate_limited, internal_error, service_unavailable.

  • requestId string Required

    The same as the X-Request-Id header. Quote it if you contact support.

  • errors array of FieldError

    One entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.

    • field string Required

      The field, query parameter or header the problem is in. A field in the body is a dotted path, such as givenNames.0 or procedures.1.code.

    • code string Required

      required when it was left out, invalid when its value is wrong.

      One of required, invalid.

    • message string Required

      What was wrong, in a sentence you can show a person.

Example 413 body
{
  "type": "https://developers.practor.app/guides/errors#validation-failed",
  "title": "Some fields are missing or wrong",
  "status": 422,
  "detail": "Fix the fields listed in errors and send it again.",
  "code": "validation_failed",
  "requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
  "errors": [
    {
      "field": "lastName",
      "code": "required",
      "message": "Send lastName."
    },
    {
      "field": "birthDate",
      "code": "invalid",
      "message": "birthDate must be a real date, written YYYY-MM-DD"
    }
  ]
}
415 The body wasn't sent as application/json. Set the Content-Type header.

Body

Problem

  • type string Required

    Where the error is explained: https://developers.practor.app/guides/errors# and the code, with hyphens for underscores.

  • title string Required

    A short summary of the kind of problem.

  • status integer Required

    The HTTP status, repeated.

    At least -9007199254740991. At most 9007199254740991.

  • detail string Required

    What went wrong with this request, in a sentence you can show a person.

  • code string Required

    The kind of problem. It stays the same across releases, so branch on it.

    One of invalid_request, invalid_cursor, validation_failed, unauthenticated, forbidden, addon_inactive, not_found, method_not_allowed, conflict, duplicate, business_rule, unprocessable, idempotency_key_reused, payload_too_large, unsupported_media_type, rate_limited, internal_error, service_unavailable.

  • requestId string Required

    The same as the X-Request-Id header. Quote it if you contact support.

  • errors array of FieldError

    One entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.

    • field string Required

      The field, query parameter or header the problem is in. A field in the body is a dotted path, such as givenNames.0 or procedures.1.code.

    • code string Required

      required when it was left out, invalid when its value is wrong.

      One of required, invalid.

    • message string Required

      What was wrong, in a sentence you can show a person.

Example 415 body
{
  "type": "https://developers.practor.app/guides/errors#validation-failed",
  "title": "Some fields are missing or wrong",
  "status": 422,
  "detail": "Fix the fields listed in errors and send it again.",
  "code": "validation_failed",
  "requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
  "errors": [
    {
      "field": "lastName",
      "code": "required",
      "message": "Send lastName."
    },
    {
      "field": "birthDate",
      "code": "invalid",
      "message": "birthDate must be a real date, written YYYY-MM-DD"
    }
  ]
}
422 The body is valid JSON but breaks a rule, or the Idempotency-Key was used with a different body. errors lists every field that is missing or wrong, all at once.

Body

Problem

  • type string Required

    Where the error is explained: https://developers.practor.app/guides/errors# and the code, with hyphens for underscores.

  • title string Required

    A short summary of the kind of problem.

  • status integer Required

    The HTTP status, repeated.

    At least -9007199254740991. At most 9007199254740991.

  • detail string Required

    What went wrong with this request, in a sentence you can show a person.

  • code string Required

    The kind of problem. It stays the same across releases, so branch on it.

    One of invalid_request, invalid_cursor, validation_failed, unauthenticated, forbidden, addon_inactive, not_found, method_not_allowed, conflict, duplicate, business_rule, unprocessable, idempotency_key_reused, payload_too_large, unsupported_media_type, rate_limited, internal_error, service_unavailable.

  • requestId string Required

    The same as the X-Request-Id header. Quote it if you contact support.

  • errors array of FieldError

    One entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.

    • field string Required

      The field, query parameter or header the problem is in. A field in the body is a dotted path, such as givenNames.0 or procedures.1.code.

    • code string Required

      required when it was left out, invalid when its value is wrong.

      One of required, invalid.

    • message string Required

      What was wrong, in a sentence you can show a person.

Example 422 body
{
  "type": "https://developers.practor.app/guides/errors#validation-failed",
  "title": "Some fields are missing or wrong",
  "status": 422,
  "detail": "Fix the fields listed in errors and send it again.",
  "code": "validation_failed",
  "requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
  "errors": [
    {
      "field": "lastName",
      "code": "required",
      "message": "Send lastName."
    },
    {
      "field": "birthDate",
      "code": "invalid",
      "message": "birthDate must be a real date, written YYYY-MM-DD"
    }
  ]
}
429 Too many requests. Wait the number of seconds in the Retry-After header, then send it again.

Body

Problem

  • type string Required

    Where the error is explained: https://developers.practor.app/guides/errors# and the code, with hyphens for underscores.

  • title string Required

    A short summary of the kind of problem.

  • status integer Required

    The HTTP status, repeated.

    At least -9007199254740991. At most 9007199254740991.

  • detail string Required

    What went wrong with this request, in a sentence you can show a person.

  • code string Required

    The kind of problem. It stays the same across releases, so branch on it.

    One of invalid_request, invalid_cursor, validation_failed, unauthenticated, forbidden, addon_inactive, not_found, method_not_allowed, conflict, duplicate, business_rule, unprocessable, idempotency_key_reused, payload_too_large, unsupported_media_type, rate_limited, internal_error, service_unavailable.

  • requestId string Required

    The same as the X-Request-Id header. Quote it if you contact support.

  • errors array of FieldError

    One entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.

    • field string Required

      The field, query parameter or header the problem is in. A field in the body is a dotted path, such as givenNames.0 or procedures.1.code.

    • code string Required

      required when it was left out, invalid when its value is wrong.

      One of required, invalid.

    • message string Required

      What was wrong, in a sentence you can show a person.

Example 429 body
{
  "type": "https://developers.practor.app/guides/errors#validation-failed",
  "title": "Some fields are missing or wrong",
  "status": 422,
  "detail": "Fix the fields listed in errors and send it again.",
  "code": "validation_failed",
  "requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
  "errors": [
    {
      "field": "lastName",
      "code": "required",
      "message": "Send lastName."
    },
    {
      "field": "birthDate",
      "code": "invalid",
      "message": "birthDate must be a real date, written YYYY-MM-DD"
    }
  ]
}
500 Something went wrong on our side. Quote the X-Request-Id if you contact support.

Body

Problem

  • type string Required

    Where the error is explained: https://developers.practor.app/guides/errors# and the code, with hyphens for underscores.

  • title string Required

    A short summary of the kind of problem.

  • status integer Required

    The HTTP status, repeated.

    At least -9007199254740991. At most 9007199254740991.

  • detail string Required

    What went wrong with this request, in a sentence you can show a person.

  • code string Required

    The kind of problem. It stays the same across releases, so branch on it.

    One of invalid_request, invalid_cursor, validation_failed, unauthenticated, forbidden, addon_inactive, not_found, method_not_allowed, conflict, duplicate, business_rule, unprocessable, idempotency_key_reused, payload_too_large, unsupported_media_type, rate_limited, internal_error, service_unavailable.

  • requestId string Required

    The same as the X-Request-Id header. Quote it if you contact support.

  • errors array of FieldError

    One entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.

    • field string Required

      The field, query parameter or header the problem is in. A field in the body is a dotted path, such as givenNames.0 or procedures.1.code.

    • code string Required

      required when it was left out, invalid when its value is wrong.

      One of required, invalid.

    • message string Required

      What was wrong, in a sentence you can show a person.

Example 500 body
{
  "type": "https://developers.practor.app/guides/errors#validation-failed",
  "title": "Some fields are missing or wrong",
  "status": 422,
  "detail": "Fix the fields listed in errors and send it again.",
  "code": "validation_failed",
  "requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
  "errors": [
    {
      "field": "lastName",
      "code": "required",
      "message": "Send lastName."
    },
    {
      "field": "birthDate",
      "code": "invalid",
      "message": "birthDate must be a real date, written YYYY-MM-DD"
    }
  ]
}
503 The request couldn't be written to the practice audit log, so its result is withheld. Wait the number of seconds in the Retry-After header, then send it again.

Body

Problem

  • type string Required

    Where the error is explained: https://developers.practor.app/guides/errors# and the code, with hyphens for underscores.

  • title string Required

    A short summary of the kind of problem.

  • status integer Required

    The HTTP status, repeated.

    At least -9007199254740991. At most 9007199254740991.

  • detail string Required

    What went wrong with this request, in a sentence you can show a person.

  • code string Required

    The kind of problem. It stays the same across releases, so branch on it.

    One of invalid_request, invalid_cursor, validation_failed, unauthenticated, forbidden, addon_inactive, not_found, method_not_allowed, conflict, duplicate, business_rule, unprocessable, idempotency_key_reused, payload_too_large, unsupported_media_type, rate_limited, internal_error, service_unavailable.

  • requestId string Required

    The same as the X-Request-Id header. Quote it if you contact support.

  • errors array of FieldError

    One entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.

    • field string Required

      The field, query parameter or header the problem is in. A field in the body is a dotted path, such as givenNames.0 or procedures.1.code.

    • code string Required

      required when it was left out, invalid when its value is wrong.

      One of required, invalid.

    • message string Required

      What was wrong, in a sentence you can show a person.

Example 503 body
{
  "type": "https://developers.practor.app/guides/errors#validation-failed",
  "title": "Some fields are missing or wrong",
  "status": 422,
  "detail": "Fix the fields listed in errors and send it again.",
  "code": "validation_failed",
  "requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
  "errors": [
    {
      "field": "lastName",
      "code": "required",
      "message": "Send lastName."
    },
    {
      "field": "birthDate",
      "code": "invalid",
      "message": "birthDate must be a real date, written YYYY-MM-DD"
    }
  ]
}