curl --request PUT \
--url https://api-dev.narrative.io/admin/contracts/{company_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"payment_method": {
"type": "credit_card"
},
"rates": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sku": "<string>",
"end": "2023-11-07T05:31:56Z",
"rate": {
"type": "per_unit",
"unit_price": {
"value": 123,
"expressed_in": "cents",
"currency": "USD"
}
}
}
],
"internal_notes": "<string>",
"revision_notes": "<string>"
}
'{
"createdContract": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payable_company_id": 123,
"payment_method": {
"type": "credit_card"
},
"revision": 123,
"revision_start": "2023-11-07T05:31:56Z",
"updated_by": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"internal_notes": "<string>",
"revision_notes": "<string>",
"revision_end": "2023-11-07T05:31:56Z"
},
"createdRates": [
{
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contract_revision": 123,
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rate": {
"type": "per_unit",
"unit_price": {
"value": 123,
"expressed_in": "cents",
"currency": "USD"
}
},
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}Update active contract for a company
curl --request PUT \
--url https://api-dev.narrative.io/admin/contracts/{company_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"payment_method": {
"type": "credit_card"
},
"rates": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sku": "<string>",
"end": "2023-11-07T05:31:56Z",
"rate": {
"type": "per_unit",
"unit_price": {
"value": 123,
"expressed_in": "cents",
"currency": "USD"
}
}
}
],
"internal_notes": "<string>",
"revision_notes": "<string>"
}
'{
"createdContract": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payable_company_id": 123,
"payment_method": {
"type": "credit_card"
},
"revision": 123,
"revision_start": "2023-11-07T05:31:56Z",
"updated_by": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"internal_notes": "<string>",
"revision_notes": "<string>",
"revision_end": "2023-11-07T05:31:56Z"
},
"createdRates": [
{
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contract_revision": 123,
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rate": {
"type": "per_unit",
"unit_price": {
"value": 123,
"expressed_in": "cents",
"currency": "USD"
}
},
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Unique identifier for a company.
Start date of a contract. If not specified it will be set to now
Optional end date of a contract
Payment Method
Show child attributes
Optional rates associated to a contract
Show child attributes