Skip to main content
POST
/
api
/
v1
/
documents
/
{id}
/
approval
/
reject
Reject a document
curl --request POST \
  --url https://app.sajn.se/api/v1/documents/{id}/approval/reject \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '
{
  "comment": "<string>"
}
'
{
  "id": "<string>",
  "documentId": "<string>",
  "approver": {
    "id": "<string>",
    "firstName": "<string>",
    "lastName": "<string>",
    "email": "<string>"
  },
  "requestedBy": {
    "id": "<string>",
    "firstName": "<string>",
    "lastName": "<string>",
    "email": "<string>"
  },
  "resolvedBy": {
    "id": "<string>",
    "firstName": "<string>",
    "lastName": "<string>",
    "email": "<string>"
  },
  "comment": "<string>",
  "customMessage": "<string>",
  "createdAt": "<unknown>",
  "resolvedAt": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.sajn.se/llms.txt

Use this file to discover all available pages before exploring further.

Headers

authorization
string
required

Bearer token for API authentication

Path Parameters

id
string
required

Body

application/json

Body

Reject a document

comment
string
required

Required comment explaining why the document was rejected

Minimum string length: 1

Response

Document approval status

Document approval status

id
string
required

Approval ID

documentId
string
required

Document ID

status
enum<string>
required

Approval status

Available options:
PENDING,
APPROVED,
REJECTED
approver
object
required

The designated approver

requestedBy
object
required

The user who submitted for approval

resolvedBy
object
required

A workspace member eligible to approve documents

comment
string | null
required

Comment from the approver

customMessage
string | null
required

Custom message for signing invitation

createdAt
any
required

When the approval was requested

resolvedAt
string | null
required

When the approval was resolved