View Categories

Launching soon on the Shopify App StoreAbout E-Sign Contracts & WaiversJoin the waitlist

GraphQL API reference: E-Sign Contracts & Waivers

3 min read

Table of Contents

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 #

OperationArgumentsWhat it does
rentalContracts
query · secret key
returns RentalContractConnection!
filter: RentalContractFilterInput
first: Int
after: String
last: Int
before: String
Signed agreements, newest first, by status, order, or a search on the order name, signer name or email.
rentalContract
query · 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.
rentalOrderContract
query · secret key
returns RentalContract
orderId: ID!An order’s agreement and its signing status; null when the order has none.
verifyRentalContract
mutation · 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.
resendRentalContract
mutation · 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

FieldTypeNotes
statusRentalContractStatus
searchStringOrder name, signer name or email.
orderIdID
EnumValues
RentalContractStatusSIGNED – 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).
TypeFields
RentalContract
A 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
RentalContractAuditEntryevent: String!, label: String, at: String, detail: String, hash: String
RentalContractFilekind: String!, url: String!, expiresAt: String!
RentalContractVerifyPayloadverification: RentalContractVerification, contract: RentalContract, userErrors: [RentalUserError!]!
RentalContractVerification
The result of a verification.
ok: Boolean!, redacted: Boolean!, file: Boolean!, fileHashOk: Boolean, termsHashOk: Boolean, chainOk: Boolean!, storedHash: String, computedHash: String, checkedAt: String, chain: JSON
RentalContractResendPayloadsent: Boolean, contract: RentalContract, userErrors: [RentalUserError!]!