Projects
Create a project
Creates a project in DRAFT: the container of the work, with its name, its dates and optionally its customer and its type.
projects:writeResult
generated from the schema
The name needs at least three characters.
It does not accept status, images, tags, additional contacts or location: decorating the project is up to the application. The customer and the project type are checked against the account of the API key before creating anything. Returns the full project, the same projection as its GET.
Arguments
Project name. At least three characters, as the domain requires.
Limits: min length 3, max length 200
Project start (ISO 8601 with offset).
Project end (ISO 8601 with offset). It cannot be earlier than startDate; the same instant is a one-day project.
Project customer. It must belong to the account of the API key.
Limits: min length 1, max length 100
Project type. Resolve it against /api; it must belong to the account of the API key.
Limits: min length 1, max length 100
Free-form reference to match the project with an external system.
Limits: max length 200
Physical location of the project (a stage, a client site). Only the fields sent are recorded.
Show child attributesHide child attributes
Name of the place, for example "Main stage".
Limits: max length 200
Street address.
Limits: max length 500
City.
Limits: max length 200
Postal code.
Limits: max length 20
Province or region.
Limits: max length 200
Country.
Limits: max length 200
Latitude in decimal degrees.
Limits: min -90, max 90
Longitude in decimal degrees.
Limits: min -180, max 180
Idempotency key chosen by the client (a UUID is recommended). Repeating the same key with the same arguments within 24 h returns the stored response without executing again; with different arguments it responds 422. It is the safe way to retry after a network failure.
Limits: min length 1, max length 255
Optimistic locking: the meta.etag you got from the detail read of this resource (or "*"). If the resource changed since, the call fails with 412 precondition_failed before writing anything; read it again and retry. Omit it to write unconditionally.
Limits: min length 1
Result
On success the result carries structuredContent with data and meta. These are the attributes of data.
Show the attributes of data
Unique project identifier.
Human-readable project number; null if not numbered.
Project name.
Color associated with the project (for the UI); null if none.
External reference of the project (for example, from the customer system); null if not recorded.
Project type identifier; null if the project has no type.
Compact reference to the project type; null if none.
Show child attributesHide child attributes
Unique project type identifier.
Project type name.
Color associated with the project type (for the UI); null if none.
Compact reference to the project contact; null if none.
Show child attributesHide child attributes
Unique contact identifier.
Contact name.
Project location; its inner fields are null when not recorded.
Show child attributesHide child attributes
Name of the place/location; null if not recorded.
Address of the location; null if not recorded.
City of the location; null if not recorded.
Postal code of the location; null if not recorded.
Province or region of the location; null if not recorded.
Country of the location; null if not recorded.
Latitude of the location; null if not recorded.
Longitude of the location; null if not recorded.
Project start date in ISO 8601 with offset.
Project end date in ISO 8601 with offset.
Project status: draft, budgeted, confirmed, in_progress, invoiced, completed, cancelled or archived. archived is a LEGACY status that appears in old data; the current archived state is expressed by the archived boolean of this same DTO.
Available options: draft, budgeted, confirmed, in_progress, invoiced, completed, cancelled, archived
Whether the project is archived.
Identifiers of the project orders. Order details are obtained from GET /api?projectId=.
Total number of orders in the project (equals orderIds.length).
Custom field values by custom field identifier; the definitions are in /api.
Source the project was created from; null if not recorded.
Creation date in ISO 8601 with offset.
Last update date in ISO 8601 with offset.
An error is a result with isError: true and the problem in content[0].; there is no structuredContent. See Errors.
Sample prompts
Create a project called Spring catalogue shoot for this customer.
The same operation by REST
This tool runs POST /api/v1/projects.
Related pages
Link to this section: Related pagesProjects
Create a project
Creates a project in DRAFT: the container of the work, with its name, its dates and optionally its customer and its type.
Guides
Safe writes
An assistant that can write can also write the wrong thing. Decide which tools need a person, retry without duplicating, and know what a write sets in motion.
Guides
Errors
A tool error is a result with
isError: trueand the problem in the first text block. Branch on itscode.
Was this page helpful?