The GraphQL operations of SI E-Sign Contracts & Waivers. They use the same address, keys and rules as all our apps: see GraphQL API reference: Rentals & Bookings for how to send a request, and the API overview for keys, limits and errors. The same operations are in REST: REST API reference: E-Sign Contracts & Waivers.
Needs the E-Sign Contracts & Waivers app. It works on a store without Rentals & Bookings. Make the key in the app under Settings › API access; a key made in any of our apps works too, because keys belong to the store. On a store without the app, its operations are refused before anything runs, with errors[].extensions.code: "app_not_installed" and data.app: "contracts". Every operation needs a secret key; mutations need Allow changes (write).
Ids are gid://sirentals/Contract/… or the agreement’s own id (as in the order’s _contract attribute). The PDF link in pdf works for 10 minutes without a key, and downloads are recorded in the audit trail. When the stored PDF no longer matches its hash, pdf is null with an altered error in errors, and the rest of the agreement still comes back.
Operations #
| Operation | Arguments | What it does |
|---|---|---|
rentalContractsquery · secret key returns RentalContractConnection! | filter: RentalContractFilterInputfirst: Intafter: Stringlast: Intbefore: String | Signed agreements, newest first, by status, order, or a search on the order name, signer name or email. |
rentalContractquery · secret key returns RentalContract | id: ID! | One agreement with its signing details, evidence, items, audit trail and a 10-minute PDF link; null when there is none. |
rentalOrderContractquery · secret key returns RentalContract | orderId: ID! | An order’s agreement and its signing status; null when the order has none. |
verifyRentalContractmutation · secret key returns RentalContractVerifyPayload! | id: ID! | Check the stored PDF’s hash, the terms’ hash and the audit chain again. The check is recorded in the trail. |
resendRentalContractmutation · secret key returns RentalContractResendPayload! | id: ID! | Email the signed copy to the signer again. |
query Signed {
rentalOrderContract(orderId: "gid://shopify/Order/5550001") {
publicId status signerName signedAt method storedCopy
pdf { kind url expiresAt } # kind "signed", or "preview" before a copy is stored
auditTrail { event at }
}
}
verifyRentalContract(id: "…") { verification { ok fileHashOk chainOk termsHashOk } } checks the evidence again; resendRentalContract emails the signed copy to the signer again.
RentalContractFilterInput
| Field | Type | Notes |
|---|---|---|
status | RentalContractStatus | |
search | String | Order name, signer name or email. |
orderId | ID |
| Enum | Values |
|---|---|
RentalContractStatus | SIGNED – Signed; the order isn’t placed (or linked) yet.LINKED – Linked to its order.REDACTED – Personal data removed (a customer’s redaction request or the retention period). |
| Type | Fields |
|---|---|
RentalContractA signed agreement: who signed, when, how, what, and the evidence. | id: ID!, publicId: String!, status: RentalContractStatus!, method: String, methodLabel: String, signerName: String, signerEmail: String, signedAt: String, signedAtLabel: String, orderId: ID, orderName: String, customerId: ID, hasPdf: Boolean!, redacted: Boolean!, signatureId: String, ip: String, userAgent: String, typedName: String, hasDrawing: Boolean, consentText: String, termsSha256: String, pdfSha256: String, pdfSha256Unsigned: String, pdfGeneratedAt: String, pdfError: String, emailedAt: String, emailError: String, linkedAt: String, storedCopy: String, items: JSON, auditTrail: [RentalContractAuditEntry!]!, pdf: RentalContractFile |
RentalContractAuditEntry | event: String!, label: String, at: String, detail: String, hash: String |
RentalContractFile | kind: String!, url: String!, expiresAt: String! |
RentalContractVerifyPayload | verification: RentalContractVerification, contract: RentalContract, userErrors: [RentalUserError!]! |
RentalContractVerificationThe result of a verification. | ok: Boolean!, redacted: Boolean!, file: Boolean!, fileHashOk: Boolean, termsHashOk: Boolean, chainOk: Boolean!, storedHash: String, computedHash: String, checkedAt: String, chain: JSON |
RentalContractResendPayload | sent: Boolean, contract: RentalContract, userErrors: [RentalUserError!]! |
