# Change approvers PUT https://api-sandbox.payabli.com/api/Bill/approval/{idBill} Content-Type: application/json Modify the list of users the bill is sent to for approval. Reference: https://docs.payabli.com/developers/api-reference/bill/change-bill-approvers ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Change bill approvers version: endpoint_bill.ModifyApprovalBill paths: /Bill/approval/{idBill}: put: operationId: modify-approval-bill summary: Change bill approvers description: Modify the list of users the bill is sent to for approval. tags: - - subpackage_bill parameters: - name: idBill in: path description: >- Payabli ID for the bill. Get this ID by querying `/api/Query/bills/` for the entrypoint or the organization. required: true schema: type: integer - name: requestToken in: header required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/type_bill:ModifyApprovalBillResponse' '400': description: Bad request/ invalid data content: {} '401': description: Unauthorized request. content: {} '500': description: Internal API Error content: {} '503': description: Database connection error content: {} requestBody: content: application/json: schema: type: array items: type: string components: schemas: type_:IsSuccess: type: boolean type_:ResponseText: type: string type_bill:ModifyApprovalBillResponse: type: object properties: isSuccess: $ref: '#/components/schemas/type_:IsSuccess' responseText: $ref: '#/components/schemas/type_:ResponseText' responseData: type: integer description: >- If `isSuccess` = true, this contains the bill identifier. If `isSuccess` = false, this contains the reason for the error. required: - responseText ``` ## SDK Code Examples ```python from payabli import payabli client = payabli( api_key="YOUR_API_KEY", ) client.bill.modify_approval_bill( id_bill=285, request=["string"], ) ``` ```typescript import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.bill.modifyApprovalBill(285, ["string"]); ``` ```go import ( context "context" option "github.com/payabli/sdk-go/option" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.Bill.ModifyApprovalBill( context.TODO(), 285, []string{ "string", }, ) ``` ```csharp using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.Bill.ModifyApprovalBillAsync(285, new List() { "string" }); ``` ```ruby require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/Bill/approval/285") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["requestToken"] = '' request["Content-Type"] = 'application/json' request.body = "[\n \"string\"\n]" response = http.request(request) puts response.read_body ``` ```java HttpResponse response = Unirest.put("https://api-sandbox.payabli.com/api/Bill/approval/285") .header("requestToken", "") .header("Content-Type", "application/json") .body("[\n \"string\"\n]") .asString(); ``` ```php request('PUT', 'https://api-sandbox.payabli.com/api/Bill/approval/285', [ 'body' => '[ "string" ]', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift import Foundation let headers = [ "requestToken": "", "Content-Type": "application/json" ] let parameters = ["string"] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Bill/approval/285")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PUT" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```