Domain concepts
Create an order from a route
Build a new order for a project by applying a route, which brings the route’s whole structure with it. This is the normal way to start work that follows a standard process.
POST
/
concepts
/
orders
/
from-route
Create an order from a route
curl --request POST \
--url https://{instance}/api/v2/concepts/orders/from-route \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"routeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"identifier": "<string>",
"quantity": 1,
"dueDate": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
routeId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
projectId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
identifier: '<string>',
quantity: 1,
dueDate: '2023-11-07T05:31:56Z'
})
};
fetch('https://{instance}/api/v2/concepts/orders/from-route', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/concepts/orders/from-route"
payload = {
"routeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"identifier": "<string>",
"quantity": 1,
"dueDate": "2023-11-07T05:31:56Z"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"name": "<string>",
"type": "order",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rootParentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123,
"cycleTimeSec": 123,
"durationSec": 123,
"peopleNum": 123,
"costCode": "<string>",
"data": {},
"computed": {
"rootType": "order",
"fullName": [
"<string>"
],
"fullPath": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phasesPath": [
"<string>"
],
"phase": "<string>",
"currentChildren": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"stageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "order"
}
],
"containedStageIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"containedPhaseNames": [
"<string>"
],
"containedCurrentStageIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"containedCurrentPhaseNames": [
"<string>"
],
"currentStageIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"currentPhaseNames": [
"<string>"
],
"combinedWorkerIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"combinedTagIds": [
"<string>"
],
"workerIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"tags": [
"<string>"
],
"isLeaf": true,
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"date": "<string>",
"isAtRisk": false,
"isLate": false,
"effectiveDueDate": "<string>",
"effectiveDueDateIsInherited": false,
"effectiveDueDateIsLate": false,
"hasReworkedStages": false,
"groupIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
},
"rollup": {
"nodeCount": 123,
"byType": {},
"byStatus": {},
"edges": 123,
"late": 123,
"atRisk": 123,
"onHold": 123,
"currentPhases": [
"<string>"
],
"currentStageIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}Authorizations
Organization-scoped API key. Create one in the BuildingSwell app under Organization settings, API keys.
Body
application/json
Route to instantiate.
Project the order belongs to.
Name for the new order.
Your own identifier. Generated as ORD- when you leave it out.
How many the order covers.
When the order is due.
⌘I
Create an order from a route
curl --request POST \
--url https://{instance}/api/v2/concepts/orders/from-route \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"routeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"identifier": "<string>",
"quantity": 1,
"dueDate": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
routeId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
projectId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
identifier: '<string>',
quantity: 1,
dueDate: '2023-11-07T05:31:56Z'
})
};
fetch('https://{instance}/api/v2/concepts/orders/from-route', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/concepts/orders/from-route"
payload = {
"routeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"identifier": "<string>",
"quantity": 1,
"dueDate": "2023-11-07T05:31:56Z"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"name": "<string>",
"type": "order",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rootParentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123,
"cycleTimeSec": 123,
"durationSec": 123,
"peopleNum": 123,
"costCode": "<string>",
"data": {},
"computed": {
"rootType": "order",
"fullName": [
"<string>"
],
"fullPath": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phasesPath": [
"<string>"
],
"phase": "<string>",
"currentChildren": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"stageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "order"
}
],
"containedStageIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"containedPhaseNames": [
"<string>"
],
"containedCurrentStageIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"containedCurrentPhaseNames": [
"<string>"
],
"currentStageIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"currentPhaseNames": [
"<string>"
],
"combinedWorkerIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"combinedTagIds": [
"<string>"
],
"workerIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"tags": [
"<string>"
],
"isLeaf": true,
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"date": "<string>",
"isAtRisk": false,
"isLate": false,
"effectiveDueDate": "<string>",
"effectiveDueDateIsInherited": false,
"effectiveDueDateIsLate": false,
"hasReworkedStages": false,
"groupIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
},
"rollup": {
"nodeCount": 123,
"byType": {},
"byStatus": {},
"edges": 123,
"late": 123,
"atRisk": 123,
"onHold": 123,
"currentPhases": [
"<string>"
],
"currentStageIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}