# Amend contract

POST https://api.letsdeel.com/rest/v2/contracts/{contract_id}/amendments
Content-Type: application/json

Amend the details of a contract. Please note that if the contract is already signed or active, then the update will have to be approved and re-signed for to take effect.
 **Token scopes**: `contracts:write`

Reference: https://developer.deel.com/api/endpoints/contractor-amendments/create-contract-amendment

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Deel HRIS SCIM API
  version: 1.0.0
paths:
  /contracts/{contract_id}/amendments:
    post:
      operationId: create-contract-amendment
      summary: Amend contract
      description: >-
        Amend the details of a contract. Please note that if the contract is
        already signed or active, then the update will have to be approved and
        re-signed for to take effect.
         **Token scopes**: `contracts:write`
      tags:
        - subpackage_contractorAmendments
      parameters:
        - name: contract_id
          in: path
          description: The unique identifier of the employee contract.
          required: true
          schema:
            type: string
        - 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:
        '201':
          description: Successful operation.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/contractor-amendments_createContractAmendment_Response_201
        '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:
        description: Contract object that needs to be amended
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  $ref: >-
                    #/components/schemas/ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaData
                  description: >-
                    You can specify any combination of data points that need
                    changing.
              required:
                - data
servers:
  - url: https://api.letsdeel.com/rest/v2
  - url: https://api-staging.letsdeel.com/rest/v2
components:
  schemas:
    ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataScale:
      type: string
      enum:
        - hourly
        - daily
        - weekly
        - monthly
        - biweekly
        - semimonthly
        - custom
      description: >-
        Defines the scale at which the amount is paid. For example, enter
        'hourly' to define the amount per hour. This field can be excluded when
        creating a Pay-as-you-go task-based or Milestone contracts.
      title: >-
        ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataScale
    ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataFrequency:
      type: string
      enum:
        - weekly
        - monthly
        - biweekly
        - semimonthly
        - calendar-month
      description: Scale of the invoice cycle.
      title: >-
        ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataFrequency
    ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataJobTitleId:
      oneOf:
        - type: string
        - type: integer
          format: int64
      title: >-
        ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataJobTitleId
    ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataSeniorityId:
      oneOf:
        - type: string
        - type: integer
          format: int64
      title: >-
        ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataSeniorityId
    ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataCycleEndType:
      type: string
      enum:
        - DAY_OF_WEEK
        - DAY_OF_LAST_WEEK
        - DAY_OF_MONTH
      description: Cycle end can be weekly 1-7 (Monday = 1) or monthly 1-31.
      title: >-
        ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataCycleEndType
    ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataPaymentDueType:
      type: string
      enum:
        - REGULAR
        - WITHIN_MONTH
      default: REGULAR
      description: >-
        Type of payment due. If the payment is due on the last day of month,
        enter 'WITHIN_MONTH'.
      title: >-
        ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataPaymentDueType
    ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaData:
      type: object
      properties:
        scale:
          $ref: >-
            #/components/schemas/ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataScale
          description: >-
            Defines the scale at which the amount is paid. For example, enter
            'hourly' to define the amount per hour. This field can be excluded
            when creating a Pay-as-you-go task-based or Milestone contracts.
        amount:
          type: number
          format: double
          description: Amount to be paid per scale.
        cycle_end:
          type: number
          format: double
          description: Day of the month when the cycle ends.
        frequency:
          $ref: >-
            #/components/schemas/ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataFrequency
          description: Scale of the invoice cycle.
        start_date:
          type: string
          format: date
          description: >-
            The contract start date in ISO-8601 format (YYYY-MM-DD). Updates the
            contract's effective date.
        job_title_id:
          $ref: >-
            #/components/schemas/ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataJobTitleId
        seniority_id:
          $ref: >-
            #/components/schemas/ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataSeniorityId
        currency_code:
          type: string
          description: Currency code in ISO 4217 format.
        first_payment:
          type: number
          format: double
          description: Amount to be paid as the first payment.
        scope_of_work:
          type: string
          description: Text to describe the scope of work of the contract.
        cycle_end_type:
          $ref: >-
            #/components/schemas/ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataCycleEndType
          description: Cycle end can be weekly 1-7 (Monday = 1) or monthly 1-31.
        effective_date:
          type: string
          format: date
          description: 'Short date in format ISO-8601 (YYYY-MM-DD). For example: 2022-12-31.'
        job_title_name:
          type: string
          description: You can enter new job title.
        special_clause:
          type: string
          description: Text to describe any special clause in contract.
        payment_due_days:
          type: number
          format: double
          description: Number of days after the invoice is sent that the payment is due.
        payment_due_type:
          $ref: >-
            #/components/schemas/ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaDataPaymentDueType
          description: >-
            Type of payment due. If the payment is due on the last day of month,
            enter 'WITHIN_MONTH'.
        first_payment_date:
          type: string
          format: date
          description: 'Short date in format ISO-8601 (YYYY-MM-DD). For example: 2022-12-31.'
        pay_before_weekends:
          type: boolean
          description: If the payment due is on a weekend, pay on Friday.
      description: You can specify any combination of data points that need changing.
      title: >-
        ContractsContractIdAmendmentsPostRequestBodyContentApplicationJsonSchemaData
    ContractsContractIdAmendmentsPostResponsesContentApplicationJsonSchemaDataScale:
      type: string
      enum:
        - hourly
        - daily
        - weekly
        - monthly
        - biweekly
        - semimonthly
        - custom
      description: Payment scale for the amended work statement.
      title: >-
        ContractsContractIdAmendmentsPostResponsesContentApplicationJsonSchemaDataScale
    ContractsContractIdAmendmentsPostResponsesContentApplicationJsonSchemaDataStatus:
      type: string
      enum:
        - initial
        - pending
        - active
        - outdated
        - approved
        - declined
      description: Status of the amended work statement.
      title: >-
        ContractsContractIdAmendmentsPostResponsesContentApplicationJsonSchemaDataStatus
    ContractsContractIdAmendmentsPostResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the created amendment.
        rate:
          type:
            - number
            - 'null'
          format: double
          description: Rate/amount for the amended work statement.
        scale:
          oneOf:
            - $ref: >-
                #/components/schemas/ContractsContractIdAmendmentsPostResponsesContentApplicationJsonSchemaDataScale
            - type: 'null'
          description: Payment scale for the amended work statement.
        status:
          $ref: >-
            #/components/schemas/ContractsContractIdAmendmentsPostResponsesContentApplicationJsonSchemaDataStatus
          description: Status of the amended work statement.
        created:
          type: boolean
          description: Contract has been successfully amended.
        job_title:
          type:
            - string
            - 'null'
          description: Job title for the amended work statement.
        worker_id:
          type: string
          format: uuid
          description: The unique identifier of the worker.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the work statement was created.
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the work statement was last updated.
        currency_code:
          type: string
          description: Currency code for the amended work statement.
        scope_of_work:
          type:
            - string
            - 'null'
          description: Scope of work for the amended work statement.
        special_clause:
          type:
            - string
            - 'null'
          description: Special clause for the amended work statement.
        termination_notice_days:
          type: integer
          description: >-
            Number of days notice required for termination. Defaults to 10 if
            not provided.
      required:
        - id
        - status
        - created
        - worker_id
        - created_at
        - updated_at
      title: >-
        ContractsContractIdAmendmentsPostResponsesContentApplicationJsonSchemaData
    contractor-amendments_createContractAmendment_Response_201:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/ContractsContractIdAmendmentsPostResponsesContentApplicationJsonSchemaData
      required:
        - data
      title: contractor-amendments_createContractAmendment_Response_201
    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
import requests

url = "https://api.letsdeel.com/rest/v2/contracts/37nex2x/amendments"

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

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

print(response.json())
```

```javascript
const url = 'https://api.letsdeel.com/rest/v2/contracts/37nex2x/amendments';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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

```go
package main

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

func main() {

	url := "https://api.letsdeel.com/rest/v2/contracts/37nex2x/amendments"

	payload := strings.NewReader("{}")

	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
require 'uri'
require 'net/http'

url = URI("https://api.letsdeel.com/rest/v2/contracts/37nex2x/amendments")

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 = "{}"

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.letsdeel.com/rest/v2/contracts/37nex2x/amendments")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.letsdeel.com/rest/v2/contracts/37nex2x/amendments', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/v2/contracts/37nex2x/amendments");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.letsdeel.com/rest/v2/contracts/37nex2x/amendments")! 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()
```