Create approval request
Delete approval request by ID
createApprovalRequest
Creates a new approval request. The authenticated user is automatically associated as the tenant owner. Returns the created ApprovalRequest object.
Method
POST
Path
/graphql
Authentication
Bearer Token
Request Body Schema
Content-type: application/json
Variables
| Name | Type | Required | Description |
|---|---|---|---|
input.sales_contact | String | Optional | Name of the sales contact |
input.request_type | String | Optional | Type of request (e.g. "standard") |
input.request_date | Date | Optional | Date of the request (Y-m-d) |
input.sales_region | String | Optional | Sales region (e.g. "NA", "EMEA") |
input.validity_period | String | Optional | How long the approval remains valid |
input.customer_name | String | Optional | Customer name |
input.project_name | String | Optional | Project name |
input.account_number | String | Optional | Customer account number |
input.end_customer_name | String | Optional | End customer name (if different from customer) |
input.rep_firm | String | Optional | Representative firm name |
input.expected_delivery_date | Date | Optional | Expected delivery date (Y-m-d) |
input.other_details | JSON | Optional | Arbitrary additional data |
Example Payload
{
"query": "mutation ($input: CreateApprovalRequestInput!) { createApprovalRequest(input: $input) { id customer_name status created_at } }",
"variables": {
"input": {
"sales_contact": "John Smith",
"request_type": "standard",
"request_date": "2026-06-03",
"sales_region": "NA",
"customer_name": "Acme Corp",
"project_name": "Q2 Expansion",
"account_number": "ACME-001",
"end_customer_name": "Acme Industries",
"expected_delivery_date": "2026-09-01"
}
}
}
Response
Returns the newly created ApprovalRequest object.
Example Response
{
"data": {
"createApprovalRequest": {
"id": "01JNQX4KZB7WNVR3MPXT6A0010",
"customer_name": "Acme Corp",
"status": "pending",
"created_at": "2026-06-03 08:00:00"
}
}
}
Errors
Example Response
{
"errors": [
{
"message": "Unauthenticated."
}
]
}
Method
POSTPath
/graphqlAuthentication
Bearer TokenPath Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Required | User identifier |