For the complete documentation index, see llms.txt. This page is also available as Markdown.

Model Notes

List Model Notes

get

Retrieves a paginated list of notes associated with a model. Note: Model variables, filter values, and notes can all be attached to different entity types via model_type and model_id.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Query parameters
filter[user_id]stringOptional

Filter results by user_id.

filter[my_notes]stringOptional

Filter results by my_notes.

filter[model_type]stringOptional

Filter results by model_type.

filter[model_id]stringOptional

Filter results by model_id.

includestringOptional

Comma-separated list of relationships to include. Available: flowStep, user

sortstringOptional

Sort field. Prefix with - for descending. Available: id, created_at

pageinteger · min: 1Optional

Page number for pagination.

Default: 1
per_pageinteger · min: 1 · max: 100Optional

Number of results per page.

Responses
200

Successful response

application/json
get/api/v1/model-notes
GET /api/v1/model-notes HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "id": 1,
      "note": "example_note",
      "private": "example_private",
      "patchworks_only": "example_patchworks_only",
      "model_type": "example_model_type",
      "model_id": 1,
      "colour": "blue",
      "created_at": "2025-01-15T10:30:00.000000Z",
      "updated_at": "2025-01-15T10:30:00.000000Z",
      "user_id": 1,
      "flow_step": {},
      "user": {}
    }
  ],
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "https://api.example.com/api/v1/model-notes",
    "per_page": 25,
    "to": 1,
    "total": 1
  },
  "links": {
    "first": "https://api.example.com/api/v1/model-notes?page=1",
    "last": "https://api.example.com/api/v1/model-notes?page=1",
    "prev": null,
    "next": null
  }
}

Create Model Note

post

Creates a new note for a model. Note: Model variables, filter values, and notes can all be attached to different entity types via model_type and model_id.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Body
notestring · min: 1 · max: 65535Required
privatestringOptional
patchworks_onlystringOptional
model_typestringRequired
model_idintegerRequired
colourstring · enumRequiredPossible values:
Responses
200

Successful response

application/json
post/api/v1/model-notes
POST /api/v1/model-notes HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 158

{
  "note": "example_note",
  "private": "example_private",
  "patchworks_only": "example_patchworks_only",
  "model_type": "example_model_type",
  "model_id": 1,
  "colour": "blue"
}
{
  "data": {
    "id": 1,
    "note": "example_note",
    "private": "example_private",
    "patchworks_only": "example_patchworks_only",
    "model_type": "example_model_type",
    "model_id": 1,
    "colour": "blue",
    "created_at": "2025-01-15T10:30:00.000000Z",
    "updated_at": "2025-01-15T10:30:00.000000Z",
    "user_id": 1,
    "flow_step": {},
    "user": {}
  }
}

Get Model Note

get

Retrieves the details of a specific model note. Note: Model variables, filter values, and notes can all be attached to different entity types via model_type and model_id.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
model_notestringRequired

The model note identifier.

Query parameters
filter[user_id]stringOptional

Filter results by user_id.

filter[my_notes]stringOptional

Filter results by my_notes.

filter[model_type]stringOptional

Filter results by model_type.

filter[model_id]stringOptional

Filter results by model_id.

includestringOptional

Comma-separated list of relationships to include. Available: flowStep, user

sortstringOptional

Sort field. Prefix with - for descending. Available: id, created_at

pageinteger · min: 1Optional

Page number for pagination.

Default: 1
per_pageinteger · min: 1 · max: 100Optional

Number of results per page.

Responses
200

Successful response

application/json
get/api/v1/model-notes/{model_note}
GET /api/v1/model-notes/{model_note} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": {
    "id": 1,
    "note": "example_note",
    "private": "example_private",
    "patchworks_only": "example_patchworks_only",
    "model_type": "example_model_type",
    "model_id": 1,
    "colour": "blue",
    "created_at": "2025-01-15T10:30:00.000000Z",
    "updated_at": "2025-01-15T10:30:00.000000Z",
    "user_id": 1,
    "flow_step": {},
    "user": {}
  }
}

Update Model Note

put

Updates an existing model note. Note: Model variables, filter values, and notes can all be attached to different entity types via model_type and model_id.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
model_notestringRequired

The model note identifier.

Body
notestring · min: 1 · max: 65535Optional
privatestringOptional
patchworks_onlystringOptional
colourstring · enumOptionalPossible values:
Responses
200

Successful response

application/json
put/api/v1/model-notes/{model_note}
PUT /api/v1/model-notes/{model_note} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 111

{
  "note": "example_note",
  "private": "example_private",
  "patchworks_only": "example_patchworks_only",
  "colour": "blue"
}
{
  "data": {
    "id": 1,
    "note": "example_note",
    "private": "example_private",
    "patchworks_only": "example_patchworks_only",
    "model_type": "example_model_type",
    "model_id": 1,
    "colour": "blue",
    "created_at": "2025-01-15T10:30:00.000000Z",
    "updated_at": "2025-01-15T10:30:00.000000Z",
    "user_id": 1,
    "flow_step": {},
    "user": {}
  }
}

Delete Model Note

delete

Permanently deletes a specific model note. Note: Model variables, filter values, and notes can all be attached to different entity types via model_type and model_id.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
model_notestringRequired

The model note identifier.

Responses
200

Successful response

application/json
messagestringOptional
delete/api/v1/model-notes/{model_note}
DELETE /api/v1/model-notes/{model_note} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "message": "Action completed successfully."
}

Last updated

Was this helpful?