1. Supervisor Contracts
My Project
    • 🐶 Walk through Apidog
    • Sample APIs
      • Find pet by ID
      • Add a new pet to the store
      • Update an existing pet
      • Deletes a pet
      • Finds Pets by status
    • Schemas
      • Sample Schemas
        • Pet
        • Category
        • Tag
  • Hisabin API V1
    • Authentication
      • Register a new user
      • Login with email and password
      • Refresh access token
      • Logout from current device
      • Logout from all devices
      • Request password reset
      • Reset password with token
      • Get current user info
    • Users
      • Get user profile
      • Update user profile
      • Update password
      • List registered devices
      • Remove a device
    • Portfolios
      • List all portfolios
      • Create a portfolio
      • Get a portfolio
      • Update a portfolio
      • Delete a portfolio
    • Accounts
      • List accounts in a portfolio
      • Create an account
      • Get an account
      • Update an account
      • Delete an account
    • Assets
      • List assets in a portfolio
      • Create an asset
      • Get an asset
      • Update an asset
      • Delete an asset
    • Loans
      • List loans in a portfolio
      • Create a loan
      • Get a loan
      • Update a loan
      • Delete a loan
    • Debts
      • List debts in a portfolio
      • Create a debt
      • Get a debt
      • Update a debt
      • Delete a debt
    • Heritages
      • List heritage plans in a portfolio
      • Create a heritage plan
      • Get a heritage plan
      • Update a heritage plan
      • Delete a heritage plan
    • Budgets
      • List budgets in a portfolio
      • Create a budget
      • Get a budget
      • Update a budget
      • Delete a budget
    • Goals
      • List goals in a portfolio
      • Create a goal
      • Get a goal
      • Update a goal
      • Delete a goal
    • Transactions
      • List all transactions
      • Create a transaction
      • List transactions for a specific account
      • Get a transaction
      • Update a transaction
      • Delete a transaction
      • Add attachment to transaction
      • Remove attachment from transaction
      • Create internal transfer between accounts
      • Get monthly transaction summary
    • External Accounts
      • List external accounts
      • Create external account
      • Get external account
      • Update external account
      • Delete external account
    • Subscriptions
      • List subscriptions
      • Create subscription
      • Get subscription summary
      • Get subscription details
      • Update subscription
      • Delete subscription
      • Pause subscription
      • Resume subscription
      • Cancel subscription
      • Record subscription payment
      • Skip subscription payment
      • List subscription payments
    • Schemas
      • Error
      • DeviceInfo
      • TokenResponse
      • UserPlan
      • User
      • AuthResponse
      • UserProfile
      • Device
      • Money
      • Portfolio
      • Account
      • Asset
      • Loan
      • Debt
      • Heritage
      • HeritageBeneficiary
      • HeritageAllocation
      • Budget
      • Goal
      • Transaction
      • Transfer
      • TransactionSummary
      • ExternalAccount
      • Subscription
      • SubscriptionPayment
      • SubscriptionSummary
  • Nukitu API V1
    • Authentication
      • Register a new user
      • Login
      • Verify email with OTP
      • Resend OTP code
      • Refresh access token
      • Request password reset
      • Verify password reset OTP
      • Reset password
      • Logout current device
      • Logout from all devices
      • Get current user info
    • Institutions
      • Search institutions by name
      • Create a new institution
      • Search institutions by location
      • Get all institutions for map display
      • Get user's institutions
      • Get current selected institution
      • Select/choose current institution
      • Clear current institution selection
      • Add institution to user's list
      • Remove institution from user's list
      • Get institution details
      • Update institution
      • List institution work history
    • Settings
      • Get settings
    • Services
      • List all services
      • Get service details with sub-services
      • List competency tests
    • Partners
      • List partners
      • Get partner details
      • Add or remove partner from wishlist (institution)
      • List wishlisted partners
      • Wishlist filter aggregations
      • List partner certifications
      • Register for a certification
      • Get partner certification details
      • List partner certification wishlists
      • Add certification to wishlist
      • Get certification wishlist details
      • Remove certification from wishlist
      • List partner contracts
      • List partner contracts (grouped)
      • Get partner contract details
      • Accept contract (partner)
      • Reject contract (partner)
      • Confirm on route (partner)
      • Start work (partner)
      • Get extension cost estimate (partner)
      • Request time extension (partner)
      • Get QR token end (partner)
      • Get modular (contract details + inspection template)
      • Get modular template only
      • Get contract inspection
      • Create inspection (fixed payload)
      • Update contract inspection
      • Get contract inspection conclusion
      • Create contract inspection conclusion
      • Update contract inspection conclusion
      • Get status of first submitted competency test
      • Upload competency test certificate
      • Update work availability
      • List partner competency tests
      • Get partner competency test details
      • Get basic test info
      • Submit basic test
      • Partner registration
    • Contracts
      • List contracts
      • Create contract (Initial)
      • List institution contracts (grouped)
      • Get contract details
      • Update contract schedule & contacts
      • Update contract details
      • Process payment (Step 3)
      • Upload payment proof
      • Cancel contract (institution)
      • Get QR token start (institution)
      • Get QR token end (institution)
      • Finish work (institution)
      • Approve time extension request (institution)
      • Reject time extension request (institution)
      • List rating items for contract (institution)
      • Get contract inspection (institution)
      • Get contract inspection conclusion (institution)
      • Get contract review (institution)
      • Create contract review (institution)
      • Update contract review (institution)
      • Preview pricing for contract
    • Payment Methods
      • List available payment methods
    • Promotions
      • List available promotions
      • Validate a promotion code
    • Banners
      • List banners
      • Get banner details
    • Certifications
      • List all certifications
      • Get certification details
    • Supervisor Contracts
      • List supervisor contract escalations
        GET
      • Get supervisor contract escalation details
        GET
      • Get contract inspection (supervisor)
        GET
      • Get contract inspection conclusion (supervisor)
        GET
      • Assign replacement partner (supervisor)
        PATCH
      • Reject contract escalation (supervisor)
        PATCH
    • Profile
      • Get user profile
      • Update personal information
      • Update domicile information
      • Change password
      • Get partner certifications
      • Get partner education
      • Get partner competencies
    • Supervisor
      • List services with partner count
      • List partners created by supervisor
      • Create partner
      • Get partner created by supervisor
      • Update partner created by supervisor
      • Delete partner created by supervisor
    • Notifications
      • List current user's notifications
      • Get a notification
      • Mark notification as read
    • Device Token
      • Register or update FCM device token
      • Remove FCM device token
    • Schemas
      • Error
      • SuccessResponse
      • MessageResponse
      • Money
      • PaginationMeta
      • PaginatedResponse
      • User
      • UserDetailed
      • Tokens
      • VerificationInfo
      • DeviceInfo
      • UpdateDeviceTokenRequest
      • RegisterRequest
      • LoginRequest
      • VerifyEmailRequest
      • ResendOtpRequest
      • RefreshTokenRequest
      • ForgotPasswordRequest
      • VerifyResetOtpRequest
      • ResetPasswordRequest
      • AuthResponse
      • RegisterResponse
      • LoginResponse
      • VerifyEmailResponse
      • RefreshTokenResponse
      • VerifyResetOtpResponse
      • BasicTestResponse
      • UserProfileResponse
      • Institution
      • InstitutionMapMarker
      • CreateInstitutionRequest
      • InstitutionResponse
      • InstitutionWorkHistoryEntry
      • InstitutionWorkHistoryListResponse
      • Service
      • SubService
      • ServiceWithSubServices
      • ServicesListResponse
      • ServiceResponse
      • PublicSettingsResponse
      • PartnerRegistration
      • Partner
      • PartnerLocation
      • PartnerDetailed
      • CompetencyTest
      • SubServiceWithTests
      • CompetencyTestsListResponse
      • ServiceWithCompetencyTests
      • ServicesWithCompetencyTestsListResponse
      • ServiceWithCompetencyTestsResponse
      • PartnerCompetencyTestCertificateUpload
      • PartnerCompetencyTest
      • PartnerCompetencyTestResponse
      • PartnerCompetencyTestsListResponse
      • PartnerResponse
      • InstitutionsListResponse
      • InstitutionsMapResponse
      • Banner
      • BannerDetailed
      • NotificationNotifiableRef
      • Notification
      • NotificationsListResponse
      • SendPushNotificationJobNotificationArg
      • SendPushNotificationJobTarget
      • SendPushNotificationJobPerformArgs
      • NotificationShowResponse
      • Certification
      • CertificationDetailed
      • CertificationsListResponse
      • CertificationResponse
      • PartnerCertificationWishlist
      • PartnerCertificationWishlistsListResponse
      • PartnerCertificationWishlistResponse
      • CreateCertificationWishlistRequest
      • PartnerProfileResponse
      • UpdatePersonalInfoRequest
      • UpdateDomicileRequest
      • ChangePasswordRequest
      • PartnerCertification
      • PartnerCertificationsListResponse
      • PartnerEducationResponse
      • PartnerCompetency
      • PartnerCompetenciesListResponse
      • PartnerDetailResponse
      • UpdatePersonalInfoWithPictureRequest
      • PartnersListResponse
      • PartnerListItem
      • WishlistFiltersResponse
      • ContractsListResponse
      • PartnerContractsFlatListResponse
      • PartnerContractsListResponse
      • PartnerContractListItem
      • ContractListItem
      • ContractDetailResponse
      • ContractInspectionDetail
      • ContractInspectionShowResponse
      • ContractInspectionConclusionDetail
      • ContractConclusionShowResponse
      • ContractDetail
      • ContractPartnerAssignment
      • ContractInitialRequest
      • SupervisorAssignPartnerRequest
      • ContractStepOneRequest
      • ContractStepTwoRequest
      • ContractStepThreeRequest
      • ContractUploadPaymentProofRequest
      • PricingPreviewResponse
      • PaymentMethodsResponse
      • RatingsResponse
      • Promotion
      • PromotionsListResponse
      • PromotionValidateRequest
      • PromotionValidateResponse
      • SettingsResponse
  1. Supervisor Contracts

Assign replacement partner (supervisor)

PATCH
/api/v1/supervisor/contracts/{id}/assign-partner
Assign a replacement partner to a contract that has escalated to the supervisor stage.
This is available while the contract has status partner_pending and contract_escalation_stage = supervisor.
The selected partner must be a partner created by the current supervisor and eligible for the contract sub-service.
The assignment must happen before the supervisor deadline in escalation_deadline_at.
Reassigning the contract keeps the already-paid contract pricing and payment amount unchanged, records a reassignment entry in partner_assignments, updates contract.partner to the replacement partner, and immediately transitions the contract to accepted.
Institution contract APIs hide the previous partner while the contract is waiting in the supervisor queue, and start returning the new partner after this assignment succeeds.
Supervisor Authentication Required

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Path Params

Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Supervisor assigned a replacement partner successfully
Bodyapplication/json

🟠400BadRequest
🟠401Unauthorized
🟠403Forbidden
🟠404NotFound
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH '/api/v1/supervisor/contracts//assign-partner' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "contract": {
        "partner_id": 42
    }
}'
Response Response Example
200 - Example 1
{
    "success": true,
    "data": {
        "contract": {
            "id": 0,
            "reference_code": "NKT-00000042",
            "status": "draft",
            "display_status": "draft",
            "step": "string",
            "kind": "string",
            "contract_escalation_stage": "partner",
            "escalation_deadline_at": "2019-08-24T14:15:22.123Z",
            "contract_escalation_countdown_active": true,
            "partner_status": "assigned",
            "description": "string",
            "tool_brand": "string",
            "tool_type": "string",
            "tool_images": [
                "http://example.com"
            ],
            "partner": {
                "id": 0,
                "full_name": "string",
                "picture": "http://example.com",
                "competencies": [
                    {
                        "id": 0,
                        "name": "string",
                        "sub_services": [
                            {
                                "id": 0,
                                "name": "string",
                                "status": "active",
                                "kinds": [
                                    "installation",
                                    "maintenance",
                                    "repair"
                                ]
                            }
                        ]
                    }
                ]
            },
            "institution": {
                "id": 0,
                "name": "string",
                "address": "string",
                "city": "string",
                "province": "string"
            },
            "sub_service": {
                "id": 0,
                "name": "string",
                "service": {
                    "id": 0,
                    "name": "string"
                }
            },
            "contract_start_date": "2019-08-24",
            "contract_start_time": "09:30",
            "contract_end_date": "2019-08-24",
            "contract_end_time": "17:00",
            "schedule_start_date": "2019-08-24",
            "schedule_start_time": "09:30",
            "schedule_end_date": "2019-08-24",
            "schedule_end_time": "17:00",
            "schedules": [
                {
                    "id": 0,
                    "date": "2019-08-24",
                    "start_time": "string",
                    "end_time": "string",
                    "status": "pending"
                }
            ],
            "contact_persons": [
                {
                    "id": 0,
                    "name": "string",
                    "phone": "string"
                }
            ],
            "pricing_items": [
                {
                    "pricing_schema_id": 0,
                    "name": "string",
                    "code": "string",
                    "kind": "string",
                    "amount": {
                        "value": 50000000,
                        "currency": "IDR"
                    },
                    "unit": "string",
                    "is_partner_pricing": true,
                    "effect": "add"
                }
            ],
            "pricing_total": {
                "value": 50000000,
                "currency": "IDR",
                "effect": "add"
            },
            "payment": {
                "id": 0,
                "amount": {
                    "value": 50000000,
                    "currency": "IDR"
                },
                "status": "string",
                "payment_method_id": 0,
                "proof": "http://example.com",
                "payment_deadline_at": "2019-08-24T14:15:22.123Z",
                "discount_amount": {
                    "value": 50000000,
                    "currency": "IDR",
                    "effect": "subtract"
                },
                "promotion": {
                    "id": 0,
                    "code": "PROMO10",
                    "name": "New User Discount",
                    "description": "Get 10% off on your first order",
                    "discount_type": "percentage",
                    "discount_value": {
                        "value": 50000000,
                        "currency": "IDR"
                    },
                    "min_order_amount": {
                        "value": 50000000,
                        "currency": "IDR"
                    },
                    "max_discount_amount": {
                        "value": 50000000,
                        "currency": "IDR"
                    },
                    "start_date": "2019-08-24",
                    "end_date": "2019-08-24"
                }
            },
            "partner_assignments": [
                {
                    "id": 0,
                    "sequence": 0,
                    "assignment_kind": "initial",
                    "status": "pending",
                    "status_reason": "string",
                    "assigned_at": "2019-08-24T14:15:22.123Z",
                    "responded_at": "2019-08-24T14:15:22.123Z",
                    "partner": {
                        "id": 0,
                        "full_name": "string",
                        "picture": "http://example.com"
                    },
                    "assigned_by": {
                        "id": 0,
                        "full_name": "string",
                        "role": "institution"
                    }
                }
            ],
            "work_started_at": "2019-08-24T14:15:22.123Z",
            "effective_scheduled_end_at": "2019-08-24T14:15:22.123Z",
            "can_request_extension": true,
            "pending_time_adjustment": {
                "id": 0,
                "additional_hours": "string",
                "reason": "string",
                "requested_at": "2019-08-24T14:15:22.123Z"
            },
            "time_adjustments": [
                {
                    "id": 0,
                    "value": "string",
                    "additional_hours": "string",
                    "reason": "string",
                    "status": "pending",
                    "requested_at": "2019-08-24T14:15:22.123Z",
                    "approved_at": "2019-08-24T14:15:22.123Z"
                }
            ]
        }
    }
}
Modified at 2026-06-08 00:59:16
Previous
Get contract inspection conclusion (supervisor)
Next
Reject contract escalation (supervisor)
Built with