Register a warranty (structured error objects)
Submits a new warranty registration. Identical request and pipeline to v1.0/register; the only difference is the response shape. Where v1.0 returns errors as flat strings, v2.0 returns errors as an array of { code, message } objects so callers can branch on a machine-readable code instead of parsing the message. Success responses serialize errors as an empty array. The 409 reason discriminator that the v1 design briefly carried is gone — its values (CONFLICT, HIERARCHY_BLOCKED) are now per-error code values.
Headers
Authorizationstring · requiredThe
Authorizationheader is used to authenticate with the API using your API key. Value is of the formatBearer YOUR_KEY_HERE.
Request Body
typestring · enum · requiredWho is registering the warranty. Drives which contractor field is required: Homeowner → contractor.name; Contractor → contractor.salesforceId.
Enum values:HomeownerContractorinstallDatestring · date-time · requiredInstallation date as an RFC3339 timestamp.
customerobject · requiredcontractorobject · requiredRequired field depends on type. When type=Contractor, salesforceId is required (name is ignored). When type=Homeowner, name is required (salesforceId is ignored).
unitsobject[] · minItems: 1 · requiredAt least one unit is required.
registrationCommentsstringOptional comments for the registration.
sourcestringOptional originating system or channel identifier; forwarded to Salesforce.
warrantyTermsobjectOptional warranty term overrides (years).
propertyTypestringOptional property type classification.
Responses
Registration accepted by the upstream registration service, OR the upstream responded but rejected the submission at the application layer (e.g. Tavant returned a non-Success status such as "Already registered under MP00…123"). On acceptance: success is true and errors is an empty array. On application-layer rejection: success is false and errors carries a single object with code REGISTRATION_REJECTED and the upstream message. In both cases data carries the generated warrantyNumber and per-unit details. Transport-level failures surface as 502 with no data block.
statusintegersuccessbooleanTrue when the registration was accepted by the upstream registration service.
messagestringdataobjecterrorsobject[]Empty on a clean success. On an application-layer rejection it carries a single REGISTRATION_REJECTED object.
versionstring