API v1 Reference
Welcome to the SeamScape API v1 documentation. This API provides programmatic access to your patterns and associated data, enabling integration with external systems and custom workflows.
Authentication
All API requests require authentication via an API key. Include your key in the Authorization
header using the Bearer scheme:
Authorization: Bearer YOUR_API_KEY
API keys can be generated and managed within your account settings: Manage API Keys.
Endpoints
POST /api/v1/patterns/
Retrieves data for a specified pattern, with options for versioning, format, and dynamic variable overrides.
- Method: POST
- Authentication: Required (Bearer Token)
- URL Parameters:
patternId
(string, required): The UUID of the target pattern.
- Request Body (JSON, optional):
{ "versionId": "OPTIONAL_VERSION_UUID", "format": "OPTIONAL_FORMAT ('json' | 'dxf', default: 'json')", "variables": { "VARIABLE_KEY": "VALUE", ... } }
- Success Response (200 OK):
Returns the pattern data in the specified format (JSON object or DXF string).
// Example (JSON format) { "name": "Pattern Name", "description": "Detailed description...", "pieces": [...] }
// Example (DXF format) "0\nSECTION\n2\nHEADER\n... (DXF content as a string) ...\n0\nEOF"
- Error Responses:
401 Unauthorized
: API key missing, invalid, or expired.404 Not Found
: Pattern ID does not exist or API key lacks access permissions.422 Unprocessable Entity
: Invalid request body (e.g., incorrect format, invalid variables).500 Internal Server Error
: Unexpected server-side error.
API Test Console
Utilize the form below to send a test request to the POST /api/v1/patterns/
endpoint.
Provide your API key and a valid Pattern ID. Optional parameters include Version ID (defaults to the latest version), output format, and custom variables.
Example Curl Request:
curl -X POST 'https://seamscape.com/api/v1/patterns/YOUR_PATTERN_ID' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"versionId": "OPTIONAL_VERSION_ID",
"format": "json",
"variables": {
"height": "175",
"chestCircumference": "98"
}
}'