GET /api/quotations
List quotations
Needs the quotations.read permission on the API key's role.
No request-body schema is supplied for this operation in the registry.
Documented responses
200— OK400— The body is not valid; `error` says why401— No valid API key403— The key's role lacks the permission, or the module is off
POST /api/quotations
Create a quotation
Needs the quotations.write permission on the API key's role.
JSON request schema
{
"type": "object",
"properties": {
"clientId": {
"type": "string",
"minLength": 1
},
"projectId": {
"type": "string",
"minLength": 1
},
"status": {
"type": "string",
"enum": [
"DRAFT",
"SENT",
"ACCEPTED",
"REJECTED",
"EXPIRED",
"CONVERTED"
]
},
"issueDate": {
"type": "string"
},
"expiryDate": {
"type": [
"string",
"null"
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"description": {
"type": "string",
"maxLength": 10000
},
"quantity": {
"type": "number",
"minimum": 0,
"maximum": 1000000
},
"unitPrice": {
"type": "number",
"minimum": 0,
"maximum": 1000000000
},
"amount": {
"type": "number",
"minimum": 0
},
"itemType": {
"type": "string",
"enum": [
"standard",
"payment",
"section"
]
},
"percentage": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"taxInclusive": {
"type": "boolean"
},
"taxCode": {
"type": "string",
"maxLength": 50
},
"taxCodeId": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"classificationCode": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{3}$"
},
{
"type": "string",
"const": ""
}
]
},
"unitCode": {
"type": "string",
"maxLength": 3
},
"taxRate": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"appliedTaxRate": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"taxAmount": {
"type": "number",
"minimum": 0
},
"discountAmount": {
"type": "number",
"minimum": 0
},
"notes": {
"type": "string"
}
},
"required": [
"id",
"description",
"quantity",
"unitPrice",
"amount"
]
}
},
"subtotal": {
"type": "number"
},
"taxRate": {
"default": 0,
"type": "number"
},
"taxAmount": {
"default": 0,
"type": "number"
},
"discount": {
"default": 0,
"type": "number"
},
"total": {
"type": "number"
},
"currency": {
"default": "MYR",
"type": "string"
},
"fxRate": {
"anyOf": [
{
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000
},
{
"type": "null"
}
]
},
"notes": {
"type": "string"
},
"terms": {
"type": "string"
},
"internalNotes": {
"type": "string"
}
},
"required": [
"clientId",
"projectId",
"issueDate",
"items",
"subtotal",
"total"
]
}Documented responses
200— OK201— Created400— The body is not valid; `error` says why401— No valid API key403— The key's role lacks the permission, or the module is off
GET /api/quotations/{id}
Read a quotation
Needs the quotations.read permission on the API key's role.
Path parameters
id— required path parameter
No request-body schema is supplied for this operation in the registry.
Documented responses
200— OK400— The body is not valid; `error` says why401— No valid API key403— The key's role lacks the permission, or the module is off404— Not found in this company
PATCH /api/quotations/{id}
Change a quotation
Needs the quotations.write permission on the API key's role.
Path parameters
id— required path parameter
JSON request schema
{
"type": "object",
"properties": {
"clientId": {
"type": "string",
"minLength": 1
},
"projectId": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"DRAFT",
"SENT",
"ACCEPTED",
"REJECTED",
"EXPIRED",
"PARTIALLY_CONVERTED",
"CONVERTED"
]
},
"issueDate": {
"type": "string"
},
"expiryDate": {
"type": [
"string",
"null"
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"description": {
"type": "string",
"maxLength": 10000
},
"quantity": {
"type": "number",
"minimum": 0,
"maximum": 1000000
},
"unitPrice": {
"type": "number",
"minimum": 0,
"maximum": 1000000000
},
"amount": {
"type": "number",
"minimum": 0
},
"itemType": {
"type": "string",
"enum": [
"standard",
"payment",
"section"
]
},
"percentage": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"taxInclusive": {
"type": "boolean"
},
"taxCode": {
"type": "string",
"maxLength": 50
},
"taxCodeId": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"classificationCode": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{3}$"
},
{
"type": "string",
"const": ""
}
]
},
"unitCode": {
"type": "string",
"maxLength": 3
},
"taxRate": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"appliedTaxRate": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"taxAmount": {
"type": "number",
"minimum": 0
},
"discountAmount": {
"type": "number",
"minimum": 0
},
"notes": {
"type": "string"
}
},
"required": [
"id",
"description",
"quantity",
"unitPrice",
"amount"
]
}
},
"subtotal": {
"type": "number"
},
"taxRate": {
"type": "number"
},
"taxAmount": {
"type": "number"
},
"discount": {
"type": "number"
},
"total": {
"type": "number"
},
"currency": {
"type": "string"
},
"fxRate": {
"anyOf": [
{
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000
},
{
"type": "null"
}
]
},
"notes": {
"type": "string"
},
"terms": {
"type": "string"
},
"internalNotes": {
"type": "string"
}
}
}Documented responses
200— OK400— The body is not valid; `error` says why401— No valid API key403— The key's role lacks the permission, or the module is off404— Not found in this company
DELETE /api/quotations/{id}
Delete a quotation
Needs the quotations.write permission on the API key's role.
Path parameters
id— required path parameter
No request-body schema is supplied for this operation in the registry.
Documented responses
200— OK400— The body is not valid; `error` says why401— No valid API key403— The key's role lacks the permission, or the module is off404— Not found in this company
Other policy and state errors may also apply. See API key permissions and limits and the complete OpenAPI document.