Zum Inhalt springen
Leadtime
Deutsch
Esc
navigateopen⌘Jpreview

Get current project configuration state

Returns the current state of the project configuration, including version information and change tracking.

What is returned:

  • lastConfigurationSnapshot: Information about the last saved version (id, version, createdAt, title)
  • configurationChanged: Whether the project configuration has changed since the last version was saved
  • configurationChangedAt: ISO 8601 timestamp when configuration last changed (null if unchanged)
  • productCount: Number of products in the project
  • componentCount: Number of components in the project
  • manualPositionCount: Number of manual positions in the project
  • discountCount: Number of discounts applied
  • snapshotCount: Total number of versions saved for the project
  • documentCount: Number of documents associated with the project

Use cases:

  • Check if there are unsaved changes (configurationChanged flag)
  • Get overview of project contents
  • Determine if a new version should be created
  • View version history count
GET/projects/{id}/configuration-state
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:read
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
idstringrequired
Responses
200Project configuration state
componentCountnumberrequired
Number of components currently in the project
configurationChangedbooleanrequired
Whether the project configuration has changed since the last version was saved. True means there are unsaved changes that should be versioned before proceeding with offers or documents.
configurationChangedAtobject | nullrequired
ISO 8601 timestamp when the configuration last changed. Null if configuration has not changed since the last version was saved.
discountCountnumberrequired
Number of discounts currently applied to the project
documentCountnumberrequired
Number of documents associated with the project
lastConfigurationSnapshotobject | nullrequired
Information about the last saved version (snapshot). Null if no versions have been created yet. Contains the version ID, semantic version string, creation timestamp, and title.
Show properties
createdAtstring<date-time>
ISO 8601 timestamp when version was created
idstring
Version ID (UUID)
titlestring
Version title
versionstring
Semantic version string
manualPositionCountnumberrequired
Number of manual positions currently in the project
productCountnumberrequired
Number of products currently in the project
projectIdstringrequired
Project UUID
snapshotCountnumberrequired
Total number of versions (snapshots) saved for the project
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Project not found
Request
curl -X GET "https://leadtime.app/api/public/projects/string/configuration-state" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
  "componentCount": 10,
  "configurationChanged": false,
  "configurationChangedAt": null,
  "discountCount": 1,
  "documentCount": 0,
  "lastConfigurationSnapshot": {
    "createdAt": "2024-01-15T10:30:00.000Z",
    "id": "660e8400-e29b-41d4-a716-446655440001",
    "title": "Version 1.2.3",
    "version": "1.2.3"
  },
  "manualPositionCount": 2,
  "productCount": 5,
  "projectId": "550e8400-e29b-41d4-a716-446655440000",
  "snapshotCount": 3
}