Contracts
Manage legal contracts such as Data Processing Agreements (DPA) and subcontractor agreements. Contracts go through a lifecycle of preview, signing, and optional revocation.
The Contract Object
- Name
id- Type
- string (UUID)
- Description
Unique identifier for the contract.
- Name
created_at- Type
- string (ISO 8601)
- Description
Timestamp when the contract was created.
- Name
signed_at- Type
- string (ISO 8601) or null
- Description
Timestamp when the contract was signed.
- Name
revoked_at- Type
- string (ISO 8601) or null
- Description
Timestamp when the contract was revoked.
- Name
state- Type
- string
- Description
Current state:
preview,signed, orrevoked.
- Name
type- Type
- string
- Description
Contract type:
subcontractorsordpa.
List all Contracts
Retrieve a list of contracts.
Query Parameters
- Name
states- Type
- string
- Description
Filter by state:
preview,signed, orrevoked.
- Name
types- Type
- string
- Description
Filter by type:
subcontractorsordpa.
Request
curl -X GET "https://api.zeitstrom.com/api/v2/contracts/contracts/?states=signed" \
-H "Authorization: Token <YOUR_API_TOKEN>"
Response
{
"count": 1,
"results": [
{
"id": "k1k1k1k1-k2k2-k3k3-k4k4-k5k5k5k5k5k5",
"created_at": "2024-01-10T10:00:00Z",
"signed_at": "2024-01-15T14:30:00Z",
"revoked_at": null,
"state": "signed",
"type": "dpa"
}
]
}
Retrieve a Contract
Get details of a specific contract.
Request
curl -X GET "https://api.zeitstrom.com/api/v2/contracts/contracts/k1k1k1k1-k2k2-k3k3-k4k4-k5k5k5k5k5k5/" \
-H "Authorization: Token <YOUR_API_TOKEN>"
Preview a Contract
Get an HTML preview of the contract document.
Request
curl -X GET "https://api.zeitstrom.com/api/v2/contracts/contracts/k1k1k1k1-k2k2-k3k3-k4k4-k5k5k5k5k5k5/preview/" \
-H "Authorization: Token <YOUR_API_TOKEN>"
Download as PDF
Download the contract as a PDF document.
Request
curl -X GET "https://api.zeitstrom.com/api/v2/contracts/contracts/k1k1k1k1-k2k2-k3k3-k4k4-k5k5k5k5k5k5/pdf/" \
-H "Authorization: Token <YOUR_API_TOKEN>" \
-o contract.pdf
Sign a Contract
Digitally sign a contract. This changes its state from preview to signed.
Request
curl -X POST "https://api.zeitstrom.com/api/v2/contracts/contracts/k1k1k1k1-k2k2-k3k3-k4k4-k5k5k5k5k5k5/sign/" \
-H "Authorization: Token <YOUR_API_TOKEN>"
Generate a DPA
Generate a new Data Processing Agreement with your organization's details.
- Name
representative- Type
- string
- Description
Name of the legal representative. Required.
- Name
company- Type
- string
- Description
Company name. Required.
- Name
street- Type
- string
- Description
Street address. Required.
- Name
postal_code- Type
- string
- Description
Postal code. Required.
- Name
city- Type
- string
- Description
City. Required.
- Name
country- Type
- string
- Description
Country. Required.
Request
curl -X POST "https://api.zeitstrom.com/api/v2/contracts/contracts/data-processing-agreement/" \
-H "Authorization: Token <YOUR_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"representative": "Max Mustermann",
"company": "Acme GmbH",
"street": "Musterstraße 1",
"postal_code": "10115",
"city": "Berlin",
"country": "Germany"
}'