# Add/Edit Bank Details

POST https://api.letsdeel.com/rest/v2/payouts/employees/methods
Content-Type: application/json

Add/Edit Bank Details
 **Token scopes**: `worker:read`, `worker:write`

Reference: https://developer.deel.com/api/reference/endpoints/payouts/add-edit-bank-details

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Deel HRIS SCIM API
  version: 1.0.0
paths:
  /payouts/employees/methods:
    post:
      operationId: add-edit-bank-details
      summary: Add/Edit Bank Details
      description: |-
        Add/Edit Bank Details
         **Token scopes**: `worker:read`, `worker:write`
      tags:
        - subpackage_payouts
      parameters:
        - name: Authorization
          in: header
          description: >
            ## Authentication

            The Deel API uses bearer tokens to authenticate requests. All API
            calls must be made over HTTPS — calls over plain HTTP or without
            authentication will fail.


            ```curl

            curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \
              -H 'Authorization: Bearer YOUR-TOKEN-HERE'
            ```


            [Learn more about authentication](/api/authentication)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Add Bank Details / Edit Bank Details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payouts_addEditBankDetails_Response_200'
        '400':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
        '401':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
        '403':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
        '404':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
        '500':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  $ref: >-
                    #/components/schemas/PayoutsEmployeesMethodsPostRequestBodyContentApplicationJsonSchemaData
                  description: Request data
servers:
  - url: https://api.letsdeel.com/rest/v2
  - url: https://api-staging.letsdeel.com/rest/v2
components:
  schemas:
    PayoutsEmployeesMethodsPostRequestBodyContentApplicationJsonSchemaDataPayload:
      type: object
      properties:
        city:
          type: string
          description: Name of the city
        iban:
          type: string
          description: International Bank Account Number
        postal:
          type: string
          description: Postal code
        bank_name:
          type: string
          description: Name of the bank
        full_name:
          type: string
          description: Full name of the account holder
        swift_bic:
          type: string
          description: SWIFT/BIC code
        country_code:
          type: string
          description: Country code
        address_line1:
          type: string
          description: Address line 1
        original_name:
          type: string
          description: Original name of the account holder
        province_state:
          type: string
          description: Province or state
        bank_country_code:
          type: string
          description: Country code of the bank
      description: Payload containing bank details
      title: >-
        PayoutsEmployeesMethodsPostRequestBodyContentApplicationJsonSchemaDataPayload
    PayoutsEmployeesMethodsPostRequestBodyContentApplicationJsonSchemaData:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the bank details
        payload:
          $ref: >-
            #/components/schemas/PayoutsEmployeesMethodsPostRequestBodyContentApplicationJsonSchemaDataPayload
          description: Payload containing bank details
      description: Request data
      title: PayoutsEmployeesMethodsPostRequestBodyContentApplicationJsonSchemaData
    PayoutsEmployeesMethodsPostResponsesContentApplicationJsonSchemaDataData:
      type: object
      properties:
        city:
          type: string
          description: Name of the city
        iban:
          type: string
          description: International Bank Account Number
        postal:
          type: string
          description: Postal code
        bank_name:
          type: string
          description: Name of the bank
        full_name:
          type: string
          description: Full name of the account holder
        swift_bic:
          type: string
          description: SWIFT/BIC code
        country_code:
          type: string
          description: Country code
        address_line1:
          type: string
          description: Address line 1
        original_name:
          type: string
          description: Original name of the account holder
        province_state:
          type: string
          description: Province or state
        bank_country_code:
          type: string
          description: Country code of the bank
      title: PayoutsEmployeesMethodsPostResponsesContentApplicationJsonSchemaDataData
    PayoutsEmployeesMethodsPostResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the bank details
        data:
          $ref: >-
            #/components/schemas/PayoutsEmployeesMethodsPostResponsesContentApplicationJsonSchemaDataData
        status:
          type: string
          description: Status of the bank details
        version:
          type: string
          description: Version identifier
        created_at:
          type: string
          description: Creation timestamp
        updated_at:
          type: string
          description: Last update timestamp
        is_active_version:
          type: boolean
          description: Indicates if this is the active version
        funds_distribution:
          type: number
          format: double
          description: Funds distribution percentage
      title: PayoutsEmployeesMethodsPostResponsesContentApplicationJsonSchemaData
    Payouts_addEditBankDetails_Response_200:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/PayoutsEmployeesMethodsPostResponsesContentApplicationJsonSchemaData
      title: Payouts_addEditBankDetails_Response_200
    ApiErrorRequest:
      type: object
      properties:
        method:
          type: string
          description: The HTTP method of the failed request
        url:
          type: string
          description: The relative URL of the failed request
        status:
          type: number
          format: double
          description: The status code of the response
        api_req_id:
          type: string
          description: The request ID of the failed request
        docs:
          type: string
          description: >-
            A link to the official documentation for the requested endpoint
            resource
        source:
          type: string
          description: The source handler which produced the returned error
        code:
          type: number
          format: double
          description: The code of the source handler which produced the returned error
      title: ApiErrorRequest
    ApiError:
      type: object
      properties:
        message:
          type: string
          description: A description of the returned error
        path:
          type: string
          description: The JSON path where input validation failed
      title: ApiError
    ApiErrorContainer:
      type: object
      properties:
        request:
          $ref: '#/components/schemas/ApiErrorRequest'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiError'
      title: ApiErrorContainer
  securitySchemes:
    deelToken:
      type: http
      scheme: bearer
      description: >
        ## Authentication

        The Deel API uses bearer tokens to authenticate requests. All API calls
        must be made over HTTPS — calls over plain HTTP or without
        authentication will fail.


        ```curl

        curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \
          -H 'Authorization: Bearer YOUR-TOKEN-HERE'
        ```


        [Learn more about authentication](/api/authentication)
    oauth2:
      type: http
      scheme: bearer
      description: >-
        Standard OAuth2 security scheme based on
        https://swagger.io/docs/specification/authentication/

```

## SDK Code Examples

```python Add Bank Details
import requests

url = "https://api.letsdeel.com/rest/v2/payouts/employees/methods"

headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Add Bank Details
const url = 'https://api.letsdeel.com/rest/v2/payouts/employees/methods';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: undefined
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Add Bank Details
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.letsdeel.com/rest/v2/payouts/employees/methods"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Add Bank Details
require 'uri'
require 'net/http'

url = URI("https://api.letsdeel.com/rest/v2/payouts/employees/methods")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
```

```java Add Bank Details
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.letsdeel.com/rest/v2/payouts/employees/methods")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .asString();
```

```php Add Bank Details
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.letsdeel.com/rest/v2/payouts/employees/methods', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Add Bank Details
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/v2/payouts/employees/methods");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Add Bank Details
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.letsdeel.com/rest/v2/payouts/employees/methods")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

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()
```

```python Edit Bank Details
import requests

url = "https://api.letsdeel.com/rest/v2/payouts/employees/methods"

headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Edit Bank Details
const url = 'https://api.letsdeel.com/rest/v2/payouts/employees/methods';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: undefined
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Edit Bank Details
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.letsdeel.com/rest/v2/payouts/employees/methods"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Edit Bank Details
require 'uri'
require 'net/http'

url = URI("https://api.letsdeel.com/rest/v2/payouts/employees/methods")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
```

```java Edit Bank Details
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.letsdeel.com/rest/v2/payouts/employees/methods")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .asString();
```

```php Edit Bank Details
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.letsdeel.com/rest/v2/payouts/employees/methods', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Edit Bank Details
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/v2/payouts/employees/methods");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Edit Bank Details
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.letsdeel.com/rest/v2/payouts/employees/methods")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

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()
```

```python Add/Edit Bank Details
import requests

url = "https://api.letsdeel.com/rest/v2/payouts/employees/methods"

payload = { "data": {
        "id": "230e7bf0-6c3e-426a-992c-7cff124561ff",
        "payload": {
            "city": "City",
            "iban": "IT60X0542811101000000123456",
            "postal": "102030",
            "bank_name": "BANK NAME",
            "full_name": "FULL NAME",
            "swift_bic": "FIXXXXFI",
            "country_code": "IT",
            "address_line1": "Address Line",
            "original_name": "EDITED ORIGINAL NAME",
            "province_state": "Province",
            "bank_country_code": "IT"
        }
    } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Add/Edit Bank Details
const url = 'https://api.letsdeel.com/rest/v2/payouts/employees/methods';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"data":{"id":"230e7bf0-6c3e-426a-992c-7cff124561ff","payload":{"city":"City","iban":"IT60X0542811101000000123456","postal":"102030","bank_name":"BANK NAME","full_name":"FULL NAME","swift_bic":"FIXXXXFI","country_code":"IT","address_line1":"Address Line","original_name":"EDITED ORIGINAL NAME","province_state":"Province","bank_country_code":"IT"}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Add/Edit Bank Details
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.letsdeel.com/rest/v2/payouts/employees/methods"

	payload := strings.NewReader("{\n  \"data\": {\n    \"id\": \"230e7bf0-6c3e-426a-992c-7cff124561ff\",\n    \"payload\": {\n      \"city\": \"City\",\n      \"iban\": \"IT60X0542811101000000123456\",\n      \"postal\": \"102030\",\n      \"bank_name\": \"BANK NAME\",\n      \"full_name\": \"FULL NAME\",\n      \"swift_bic\": \"FIXXXXFI\",\n      \"country_code\": \"IT\",\n      \"address_line1\": \"Address Line\",\n      \"original_name\": \"EDITED ORIGINAL NAME\",\n      \"province_state\": \"Province\",\n      \"bank_country_code\": \"IT\"\n    }\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Add/Edit Bank Details
require 'uri'
require 'net/http'

url = URI("https://api.letsdeel.com/rest/v2/payouts/employees/methods")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"data\": {\n    \"id\": \"230e7bf0-6c3e-426a-992c-7cff124561ff\",\n    \"payload\": {\n      \"city\": \"City\",\n      \"iban\": \"IT60X0542811101000000123456\",\n      \"postal\": \"102030\",\n      \"bank_name\": \"BANK NAME\",\n      \"full_name\": \"FULL NAME\",\n      \"swift_bic\": \"FIXXXXFI\",\n      \"country_code\": \"IT\",\n      \"address_line1\": \"Address Line\",\n      \"original_name\": \"EDITED ORIGINAL NAME\",\n      \"province_state\": \"Province\",\n      \"bank_country_code\": \"IT\"\n    }\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Add/Edit Bank Details
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.letsdeel.com/rest/v2/payouts/employees/methods")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"data\": {\n    \"id\": \"230e7bf0-6c3e-426a-992c-7cff124561ff\",\n    \"payload\": {\n      \"city\": \"City\",\n      \"iban\": \"IT60X0542811101000000123456\",\n      \"postal\": \"102030\",\n      \"bank_name\": \"BANK NAME\",\n      \"full_name\": \"FULL NAME\",\n      \"swift_bic\": \"FIXXXXFI\",\n      \"country_code\": \"IT\",\n      \"address_line1\": \"Address Line\",\n      \"original_name\": \"EDITED ORIGINAL NAME\",\n      \"province_state\": \"Province\",\n      \"bank_country_code\": \"IT\"\n    }\n  }\n}")
  .asString();
```

```php Add/Edit Bank Details
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.letsdeel.com/rest/v2/payouts/employees/methods', [
  'body' => '{
  "data": {
    "id": "230e7bf0-6c3e-426a-992c-7cff124561ff",
    "payload": {
      "city": "City",
      "iban": "IT60X0542811101000000123456",
      "postal": "102030",
      "bank_name": "BANK NAME",
      "full_name": "FULL NAME",
      "swift_bic": "FIXXXXFI",
      "country_code": "IT",
      "address_line1": "Address Line",
      "original_name": "EDITED ORIGINAL NAME",
      "province_state": "Province",
      "bank_country_code": "IT"
    }
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Add/Edit Bank Details
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/v2/payouts/employees/methods");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"data\": {\n    \"id\": \"230e7bf0-6c3e-426a-992c-7cff124561ff\",\n    \"payload\": {\n      \"city\": \"City\",\n      \"iban\": \"IT60X0542811101000000123456\",\n      \"postal\": \"102030\",\n      \"bank_name\": \"BANK NAME\",\n      \"full_name\": \"FULL NAME\",\n      \"swift_bic\": \"FIXXXXFI\",\n      \"country_code\": \"IT\",\n      \"address_line1\": \"Address Line\",\n      \"original_name\": \"EDITED ORIGINAL NAME\",\n      \"province_state\": \"Province\",\n      \"bank_country_code\": \"IT\"\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Add/Edit Bank Details
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["data": [
    "id": "230e7bf0-6c3e-426a-992c-7cff124561ff",
    "payload": [
      "city": "City",
      "iban": "IT60X0542811101000000123456",
      "postal": "102030",
      "bank_name": "BANK NAME",
      "full_name": "FULL NAME",
      "swift_bic": "FIXXXXFI",
      "country_code": "IT",
      "address_line1": "Address Line",
      "original_name": "EDITED ORIGINAL NAME",
      "province_state": "Province",
      "bank_country_code": "IT"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.letsdeel.com/rest/v2/payouts/employees/methods")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```