Skip to content

erp-dashboard

← All modules

29 endpoints.

GET /api/v1/erp/sites

List Erp Sites

The ERP tabs across the top of the dashboard, in display order — the requesting site's own erp_dashboard_sites override if it has one, else the global default (today's Frappe/ERPNext tenants).

200 — Successful Response

json
{}

GET /api/v1/erp/categories

List Categories

The category sub-tabs shown beneath the dashboard title.

200 — Successful Response

json
{}

GET /api/v1/erp/sites/{site}/stats

Erp Site Stats

Live cards + recent items for one ERP site and category over days.

Each card carries a link to the matching records in the source system's own UI (the ERP desk list view, or the portal) — Frappe tabs only; a local tab has nothing external to link to. A site that is down/misconfigured still returns 200 with empty cards and an errors map, so the tab degrades gracefully instead of failing the page.

"operations" is superuser-only (unlike every other category, which "any logged-in user" per the module docstring covers) — it carries the same wholesale PBX margin figures as /pbx/billing, which must never reach a non-superuser login.

Parameters

NameInRequiredTypeDescription
sitepathyesstring
categoryquerynostring
daysquerynointeger

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

GET /api/v1/erp/public/sites

Public Sites

Configured ERP sites available on the public dashboard (id + label only). Doubles as the password-check endpoint for the unlock screen.

Parameters

NameInRequiredTypeDescription
x-public-passwordheaderno

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

GET /api/v1/erp/public/categories

Public Categories

Category sub-tabs for the public dashboard — the internal set minus Voice (PBX platform internals stay off the shareable view).

Parameters

NameInRequiredTypeDescription
x-public-passwordheaderno

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

GET /api/v1/erp/public/sites/{site}/stats

Public Site Stats

Stats (cards + items + charts) for one site and category — password-gated. Cards/charts deep-link to the source system's UI just like the internal dashboard (opening them still requires the viewer's own ERP/portal login). Unknown/unconfigured sites 404; unknown category 400.

Parameters

NameInRequiredTypeDescription
sitepathyesstring
categoryquerynostring
daysquerynointeger
x-public-passwordheaderno

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

GET /api/v1/erp/tab-groups

Get Tab Groups

This site's per-person dashboard tab groups (empty = feature off). Readable by any logged-in user — the dashboard needs it to render. Dashboard visibility is per-person: a non-superuser only receives their OWN tab; only superusers (Ahmed) get everyone's. enabled says the feature is on tenant-wide even when the caller's filtered list came back empty, so the dashboard can show just the Tasks tab instead of falling back to the flat all-apps row. tasks_enabled gates the whole Tasks feature (Tasks tab + Timesheet + card timers) for this site.

200 — Successful Response

json
{}

PUT /api/v1/erp/tab-groups

Put Tab Groups

Replace the tab-group list. An empty list turns per-person tabs off. Superuser-only: GET is filtered per person for everyone else, so a non-superuser saving the whole list would silently wipe the tabs they can't see.

Request body

json
{
  "properties": {
    "groups": {
      "items": {
        "properties": {
          "user_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "label": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "title": "Label"
          },
          "slugs": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Slugs"
          }
        },
        "type": "object",
        "required": [
          "label"
        ],
        "title": "TabGroupIn"
      },
      "type": "array",
      "title": "Groups"
    }
  },
  "type": "object",
  "required": [
    "groups"
  ],
  "title": "TabGroupsIn"
}

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

PUT /api/v1/erp/tasks-enabled

Put Tasks Enabled

Turn this site's dashboard Tasks feature on/off (Tasks tab, Timesheet button, card timers). Superuser-only, like the rest of Dashboard settings; stored per site so disabling it on eldo never touches tc.

Request body

json
{
  "properties": {
    "enabled": {
      "type": "boolean",
      "title": "Enabled"
    }
  },
  "type": "object",
  "required": [
    "enabled"
  ],
  "title": "TasksEnabledIn"
}

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

GET /api/v1/erp/tab-groups/users

Tab Group Users

Active users assignable to a tab group (the settings dialog's picker). Superuser-only, like the PUT it feeds.

200 — Successful Response

json
{}

GET /api/v1/erp/card-order

Get Card Order

This user's saved stat-card order for one layout key, or [] if none.

Parameters

NameInRequiredTypeDescription
keyqueryyesstring

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

PUT /api/v1/erp/card-order

Put Card Order

Upsert this user's stat-card order for one layout key.

Request body

json
{
  "properties": {
    "key": {
      "type": "string",
      "maxLength": 128,
      "minLength": 1,
      "title": "Key"
    },
    "order": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Order"
    }
  },
  "type": "object",
  "required": [
    "key",
    "order"
  ],
  "title": "CardOrderIn"
}

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

GET /api/v1/erp/card-target

Get Card Target

Company-wide saved targets for one layout key, or {} if none.

Parameters

NameInRequiredTypeDescription
keyqueryyesstring

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

PUT /api/v1/erp/card-target

Put Card Target

Merge the company-wide targets for one layout key (null values remove a key), visible to every user on the tenant rather than just the setter.

Request body

json
{
  "properties": {
    "key": {
      "type": "string",
      "maxLength": 160,
      "minLength": 1,
      "title": "Key"
    },
    "targets": {
      "additionalProperties": {
        "anyOf": [
          {
            "type": "number"
          },
          {
            "type": "null"
          }
        ]
      },
      "type": "object",
      "title": "Targets"
    }
  },
  "type": "object",
  "required": [
    "key",
    "targets"
  ],
  "title": "CardTargetIn"
}

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

GET /api/v1/erp/card-color

Get Card Color

This user's saved color rules for one layout key, or {} if none.

Parameters

NameInRequiredTypeDescription
keyqueryyesstring

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

PUT /api/v1/erp/card-color

Put Card Color

Merge this user's color rules for one layout key (null values remove a key).

Request body

json
{
  "properties": {
    "key": {
      "type": "string",
      "maxLength": 160,
      "minLength": 1,
      "title": "Key"
    },
    "colors": {
      "additionalProperties": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ColorRuleSet"
          },
          {
            "type": "null"
          }
        ]
      },
      "type": "object",
      "title": "Colors"
    }
  },
  "type": "object",
  "required": [
    "key",
    "colors"
  ],
  "title": "CardColorIn"
}

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

GET /api/v1/erp/card-group

Get Card Group

This user's saved card->group overrides for one layout key, or {} if none.

Parameters

NameInRequiredTypeDescription
keyqueryyesstring

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

PUT /api/v1/erp/card-group

Put Card Group

Merge this user's card->group overrides for one layout key (null values remove a key).

Request body

json
{
  "properties": {
    "key": {
      "type": "string",
      "maxLength": 160,
      "minLength": 1,
      "title": "Key"
    },
    "groups": {
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "type": "object",
      "title": "Groups"
    }
  },
  "type": "object",
  "required": [
    "key",
    "groups"
  ],
  "title": "CardGroupIn"
}

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

GET /api/v1/erp/card-hidden

Get Card Hidden

This user's hidden card keys for one layout key, or [] if none.

Parameters

NameInRequiredTypeDescription
keyqueryyesstring

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

PUT /api/v1/erp/card-hidden

Put Card Hidden

Replace this user's hidden-card list for one layout key.

Request body

json
{
  "properties": {
    "key": {
      "type": "string",
      "maxLength": 160,
      "minLength": 1,
      "title": "Key"
    },
    "hidden": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Hidden"
    }
  },
  "type": "object",
  "required": [
    "key",
    "hidden"
  ],
  "title": "CardHiddenIn"
}

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

GET /api/v1/erp/card-admin-hidden

Get Card Admin Hidden

The site-wide admin-hidden card keys for one layout key, or [] if none.

Parameters

NameInRequiredTypeDescription
keyqueryyesstring

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

PUT /api/v1/erp/card-admin-hidden

Put Card Admin Hidden

Replace the site-wide admin-hidden card list for one layout key. Admin+ only — this hides the card for every user on the tab, not just the caller. Restorable (unlike card-deleted below).

Request body

json
{
  "properties": {
    "key": {
      "type": "string",
      "maxLength": 128,
      "minLength": 1,
      "title": "Key"
    },
    "hidden": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Hidden"
    }
  },
  "type": "object",
  "required": [
    "key",
    "hidden"
  ],
  "title": "CardAdminHiddenIn"
}

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

GET /api/v1/erp/card-deleted

Get Card Deleted

The site-wide deleted card keys for one layout key, or [] if none.

Parameters

NameInRequiredTypeDescription
keyqueryyesstring

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

PUT /api/v1/erp/card-deleted

Put Card Deleted

Replace the site-wide deleted-card list for one layout key. Admin+ only — this permanently removes the card for every user on the tab (no restore UI), not just the caller.

Request body

json
{
  "properties": {
    "key": {
      "type": "string",
      "maxLength": 128,
      "minLength": 1,
      "title": "Key"
    },
    "deleted": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Deleted"
    }
  },
  "type": "object",
  "required": [
    "key",
    "deleted"
  ],
  "title": "CardDeletedIn"
}

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

GET /api/v1/erp/section-title

Get Section Title

The site-wide custom section titles for one layout key, or {} if none.

Parameters

NameInRequiredTypeDescription
keyqueryyesstring

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

PUT /api/v1/erp/section-title

Put Section Title

Replace the site-wide section-title overrides for one layout key. Admin+ only — renames the section for every user on the tab. Blank entries are dropped (that section reverts to its default label).

Request body

json
{
  "properties": {
    "key": {
      "type": "string",
      "maxLength": 128,
      "minLength": 1,
      "title": "Key"
    },
    "titles": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "title": "Titles"
    }
  },
  "type": "object",
  "required": [
    "key",
    "titles"
  ],
  "title": "SectionTitleIn"
}

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

GET /api/v1/erp/canvas-layout

Get Canvas Layout

This user's saved canvas layout for one layout key, or {} if none.

Parameters

NameInRequiredTypeDescription
keyqueryyesstring

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

PUT /api/v1/erp/canvas-layout

Put Canvas Layout

Replace this user's canvas layout for one layout key.

Request body

json
{
  "properties": {
    "key": {
      "type": "string",
      "maxLength": 160,
      "minLength": 1,
      "title": "Key"
    },
    "layout": {
      "additionalProperties": {
        "$ref": "#/components/schemas/CanvasCell"
      },
      "type": "object",
      "title": "Layout"
    }
  },
  "type": "object",
  "required": [
    "key",
    "layout"
  ],
  "title": "CanvasLayoutIn"
}

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

DELETE /api/v1/erp/stale-records

Delete Stale Records

Cancel every stale record backing one of the dashboard's stale-item cards.

card_key must be quotes_stale or orders_stale. Admin+ only — this is a bulk write across all customer-scoped rows the current user can see, so it needs the same guard as card-admin-hidden / card-deleted.

Returns the number of records cancelled, or 0 if none matched.

Request body

json
{
  "properties": {
    "card_key": {
      "type": "string",
      "maxLength": 64,
      "minLength": 1,
      "title": "Card Key"
    }
  },
  "type": "object",
  "required": [
    "card_key"
  ],
  "title": "StaleRecordsDeleteIn"
}

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

Lubb ERP Documentation