Skip to content

Get a project

POST
/projects.get
curl --request POST \
--url https://api.sancho-wms.pl/v1/projects.get \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "id": 1, "integrationId": 1 }'

Returns one project with its sub-projects, people and the documents booked against it. Identify it by integrationId and the id the list gives it, or the integrationId and id of a document’s relatedDocuments entry of type: "project".

Media typeapplication/json
object
id
required
number | string
integrationId
required
number

Example generated

{
"id": 1,
"integrationId": 1
}

Successful response

Media typeapplication/json
Project
object
id
required
number
code
required
string | null
name
required
string
description
required
string | null
status
required
string | null
startDate
required
string | null
endDate
required
string | null
createdAt
required
string | null
updatedAt
required
string | null
integrationId
required
number
integrationType
required
string
Allowed value: comarch-bmp
subProjects
required
Array<object>
object
id
required
number
code
required
string | null
name
required
string
description
required
string | null
status
required
string | null
startDate
required
string | null
endDate
required
string | null
createdAt
required
string | null
updatedAt
required
string | null
assignee
required
string | null
people
required
Array<object>
default:
object
id
required
number | string | null
code
required
string | null
name
required
string
surname
required
string | null
email
required
string | null
phone
required
string | null
role
required
string
Allowed values: responsible designDocumentation prefabrication siteConstruction materialOrdering authorized budgetAuthorized
relatedDocuments
required
Array<object>
default:
RelatedDocumentOutput
One of: discriminator: integrationType
IntegrationRelatedDocumentOutput
One of: discriminator: integrationType
object
label
required
string | null
linkId
required
number | null
integrationType
required
string
Allowed values: comarch-optima erp-next fakturownia comarch-bmp custom
integrationId
required
number
id
required
number | string
type
required
string
Allowed value: goodsReceivedNote
kind
required
string
Allowed values: external internal

Example

{
"createdAt": null,
"updatedAt": null,
"integrationType": "comarch-bmp",
"subProjects": [
{
"createdAt": null,
"updatedAt": null
}
],
"people": [],
"relatedDocuments": []
}

Bad request

Media typeapplication/json
error.BAD_REQUEST

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "BAD_REQUEST",
"message": "Bad request",
"issues": []
}

Unauthorized

Media typeapplication/json
error.UNAUTHORIZED

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "UNAUTHORIZED",
"message": "Unauthorized",
"issues": []
}

Payment required

Media typeapplication/json
error.PAYMENT_REQUIRED

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "PAYMENT_REQUIRED",
"message": "Payment required",
"issues": []
}

Forbidden

Media typeapplication/json
error.FORBIDDEN

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "FORBIDDEN",
"message": "Forbidden",
"issues": []
}

Not found

Media typeapplication/json
error.NOT_FOUND

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}

Unprocessable content

Media typeapplication/json
error.UNPROCESSABLE_CONTENT

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "UNPROCESSABLE_CONTENT",
"message": "Unprocessable content",
"issues": []
}

Too many requests

Media typeapplication/json
error.TOO_MANY_REQUESTS

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests",
"issues": []
}

Internal server error

Media typeapplication/json
error.INTERNAL_SERVER_ERROR

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}

Service unavailable

Media typeapplication/json
error.SERVICE_UNAVAILABLE

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "SERVICE_UNAVAILABLE",
"message": "Service unavailable",
"issues": []
}