PATCH
/
v1
/
contracts
/
{contractId}
curl --request PATCH \
  --url https://live.copilot.fabric.inc/data-customer/v1/contracts/{contractId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-site-context: <x-site-context>' \
  --data '{
  "partyId": "61a77df3941da90009fd35db",
  "addressId": "6182ae91c67c61932b38c382",
  "accountId": "6182aeb6c67c61932b38c38b",
  "status": "ACTIVE",
  "contractType": "TYPE-A",
  "onContract": true,
  "promotionStacking": true,
  "priceListId": 100000,
  "startDate": "2021-08-19T15:16:20.630Z",
  "endDate": "2021-12-20T15:16:20.630Z",
  "additionalAttributes": {}
}'
{
  "_id": "61604a30fdfacd0009816e44",
  "contractId": 201000000000013,
  "partyId": "61a77df3941da90009fd35db",
  "addressId": "6182ae91c67c61932b38c382",
  "accountId": "6182aeb6c67c61932b38c38b",
  "contractType": "TYPE-A",
  "status": "ACTIVE",
  "startDate": "2021-08-19T15:16:20.630Z",
  "endDate": "2021-12-20T15:16:20.630Z",
  "onContract": true,
  "promotionStacking": true,
  "additionalAttributes": {},
  "isDeleted": false,
  "createdAt": "2021-08-30T23:20:42.822Z",
  "updatedAt": "2021-08-30T23:20:42.822Z",
  "contractPriceList": {
    "_id": "61bcf8f0e30b090008c4cfd5",
    "contractId": "61bcf8f0e30b090008c4cfd2",
    "priceListId": 100000,
    "createdAt": "2021-08-30T23:20:42.822Z",
    "updatedAt": "2021-08-30T23:20:42.822Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-site-context
string
required

The x-site-context header is a JSON object that contains information about the source you wish to pull from. The mandatory account is the 24 character identifier found in Copilot. The channel (Sales channel ID), stage (environment name), and date attributes can be used to further narrow the scope of your data source.

Example:

"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"

Path Parameters

contractId
string
required

contractId of the contract to delete

Example:

201040000000018

Body

application/json
A sample request to update a contract.

The body is of type object.

Response

200
application/json
OK

The response is of type object.