GET
/
v1
/
organizations
/
{organizationId}
/
contracts
/
{contractId}
curl --request GET \
  --url https://live.copilot.fabric.inc/data-customer/v1/organizations/{organizationId}/contracts/{contractId} \
  --header 'Authorization: Bearer <token>' \
  --header 'x-site-context: <x-site-context>'
{
  "_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",
  "priceLists": [
    {
      "_id": "61c21377226c1c625a0d07ef",
      "contractId": "61c21377226c1c625a0d07ec",
      "priceListId": 100000,
      "createdAt": "2021-12-21T17:48:39.030Z",
      "updatedAt": "2021-12-21T17:48:39.030Z"
    }
  ],
  "party": {
    "parentPartyId": "61b121a51d949f0009142ada",
    "name": "PARTY P-1",
    "partyType": "O",
    "isActive": "O",
    "email": "email@address.com.br",
    "additionalAttributes": {}
  }
}

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

organizationId
string
required

Fabric internal id of the record.

Example:

"619fbb95969ceb49d19cd5a8"

contractId
string
required

Fabric internal id of the record or contract id.

Example:

"1234-5678-90123"

Query Parameters

includeDeleted
boolean
default:false

Whether to fetch contracts that have already been deleted or not.

Example:

true

Response

200
application/json

sample response

The response is of type object.