Approve or Reject a Change Request
Record your decision on a pending materials or ad-hoc materials change request
These endpoints let the project owner approve or reject a change request that is waiting on its decision: a materials request (MATERIALS), or an ad-hoc materials request (AD_HOC_MATERIALS) for materials the pro buys themselves. These arrive on the project-phase.change-request.created webhook with approvalChannel: EXTERNAL. A change request with approvalChannel: INTERNAL is decided by Sibi; do not call these endpoints for it.
Typical flow
- A pro or Sibi staff submit a change request on a project phase you own.
- Sibi emits a
project-phase.change-request.createdwebhook with achangeRequestId. See Project Phase Events for the payload shape. - You review the proposal in your own systems.
- You call approve or reject here, passing that
changeRequestId.
The decision is implied by the URL path. The request body is optional and only carries a note and/or an external reference.
Request body (optional)
{
"responseNotes": "Approved — confirmed the upgraded condenser with the homeowner.",
"sourceRef": "crm-decision-9f2c"
}
responseNotes
string | undefined — Free-form note explaining the decision (max 2000 characters). Recorded on the change request and surfaced to the pro who proposed it.
sourceRef
string | undefined — External identifier for this decision in the caller’s own system (max 256 characters).
The body may be omitted entirely — a bodyless POST still records the decision.
Approve a change request
Endpoint: https://api.sibipro.com/projects/v1/change-requests/{changeRequestId}/approve
Authentication: Bearer token with the write:change-requests scope (Authorization: Bearer {accessToken})
Approves the change request. The proposed lines become the phase’s approved materials (for a materials CR) or approved ad-hoc materials (for an ad-hoc materials CR), which is what the phase is billed from.
Path parameters
changeRequestId
string — Required. ID of the change request you are approving (from the webhook).
Request body
Optional — see Request body (optional) above.
Response
Status: 200 OK
{
"projectPhaseId": "phase_xyz789",
"status": "AWAITING_MATERIALS"
}
See Response fields below for field meanings.
Reject a change request
Endpoint: https://api.sibipro.com/projects/v1/change-requests/{changeRequestId}/reject
Authentication: Bearer token with the write:change-requests scope (Authorization: Bearer {accessToken})
Rejects the change request. The proposed changes are discarded and the phase’s approved lines are left as they were. A new change request can be submitted to try again.
Path parameters
changeRequestId
string — Required. ID of the change request you are rejecting (from the webhook).
Request body
Optional — see Request body (optional) above.
Response
Status: 200 OK
{
"projectPhaseId": "phase_xyz789",
"status": "AWAITING_MATERIALS"
}
The fields match the approve response above.
Response fields
projectPhaseId
string — The project phase the change request belongs to.
status
string — The phase’s status after the decision.
How this behaves depends on where the phase is in its lifecycle:
| Situation | What status means |
|---|---|
Pre-checkout materials or ad-hoc materials CR (phase still in early workflow, e.g. AWAITING_PRODUCT_SELECTION) |
The phase was never moved into CHANGE_REQUEST_PENDING; external approval runs in parallel with its normal workflow. Approving a materials CR on a phase in AWAITING_PRODUCT_SELECTION moves it on to READY_FOR_CHECKOUT when no other materials CR is pending on the phase, because the approval settles what is being bought. Otherwise the phase keeps its status. |
Post-checkout CR (phase was AWAITING_MATERIALS or IN_PROGRESS) |
If this was the last pending change request on the phase, the phase returns to the status it held before the queue opened (usually AWAITING_MATERIALS or IN_PROGRESS). If other change requests are still pending, it stays CHANGE_REQUEST_PENDING. |
Queue rules
Each phase maintains a separate queue per type of change request. A CR must be at the head of its type’s queue before it can be approved or rejected. A pending ad-hoc materials CR on the same phase does not block a materials decision, and vice versa.
If you call approve or reject on a CR that is not at the head of its queue, the API returns 409 INVALID_STATE.
Error responses
All errors follow this shape:
{
"code": "FORBIDDEN",
"message": "Not allowed to approve change requests for this phase"
}
Validation errors may also include a details array:
{
"code": "VALIDATION_ERROR",
"message": "Invalid input parameters",
"details": [{ "field": "responseNotes", "error": "String must contain at most 2000 character(s)" }]
}
| Status | code |
Condition |
|---|---|---|
| 400 | VALIDATION_ERROR |
Invalid request body (for example, responseNotes longer than 2000 characters or sourceRef longer than 256). |
| 401 | UNAUTHORIZED |
Missing or invalid Bearer token. |
| 403 | INSUFFICIENT_SCOPE |
The token does not carry write:change-requests. |
| 403 | FORBIDDEN |
The authenticated user lacks permission to approve or reject change requests for this phase. |
| 404 | NOT_FOUND |
No change request exists with that changeRequestId. |
| 409 | INVALID_STATE |
The change request is no longer pending, is not at the head of its type’s queue, or could not be applied. The message field carries the specific reason. |
| 500 | INTERNAL_ERROR |
Unhandled server error. |
| 503 | AUTH_UNAVAILABLE |
The authentication service is temporarily unavailable. Retry shortly. |
Calling approve on an already-approved CR, or reject on an already-rejected CR, succeeds with 200 and returns the current phase status.