Skip to main content

Update SMS Payment (v1)

Method & Path

PATCH /api/v1/workspace/:workspaceId/sms/payments/:paymentId

Description

Update an existing SMS payment record. All fields are optional.

Authentication

Required: Workspace authentication. User must be authenticated as Workspace Owner or Staff with workspace permissions.

Headers

Authorization: Bearer <workspace_token>
Content-Type: application/json

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier
paymentIdstringYesPayment identifier

Request Body

{
"amount": 60.00,
"notes": "Updated payment amount"
}

Request Body Schema

FieldTypeRequiredDescription
amountnumberNoPayment amount (must be positive)
paymentMethodstringNoPayment method (cash, bank-transfer, card, other)
descriptionstringNoPayment description
notesstringNoAdditional notes
paymentDatestringNoPayment date (ISO 8601 datetime format)

Response 200 OK

{
"id": "507f1f77bcf86cd799439011",
"workspaceId": "507f1f77bcf86cd799439012",
"amount": 60.00,
"paymentMethod": "bank-transfer",
"description": "SMS payment for January 2025",
"notes": "Updated payment amount",
"paymentDate": "2025-01-15T10:30:00.000Z",
"receiptImage": null,
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T11:00:00.000Z"
}

Common Errors

400 Bad Request: Invalid request body

401 Unauthorized: Missing or invalid authentication token

403 Forbidden: User does not have permission to update SMS payments

404 Not Found: Workspace or payment not found

422 Unprocessable Entity: Validation error

500 Internal Server Error: Server error occurred while processing the request