Skip to main content
POST
/
api
/
v1
/
contracts
Create contract
curl --request POST \
  --url https://api.contracting.kukkingu.software/api/v1/contracts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'tenant-id: <tenant-id>' \
  --data '
{
  "clientId": "clnt_z2b3mo8qa5kzptgsu26q2wmh",
  "name": "Standard Service Contract",
  "amountMinor": 5000,
  "currencyCode": "EUR",
  "description": "This contract covers standard service terms and conditions.",
  "order": 13,
  "validFrom": "2023-10-05T14:48:00.000Z",
  "validTo": "2023-10-05T14:48:00.000Z"
}
'
{
  "data": {
    "id": "ctr_z23aoo8naxk68ewcr64tchh5",
    "client": "clnt_z2b3mo8qa5kzptgsu26q2wmh",
    "name": "Standard Service Contract",
    "amountMinor": 5000,
    "currencyCode": "EUR",
    "createdAt": "2023-10-05T14:48:00.000Z",
    "updatedAt": "2023-10-05T14:48:00.000Z",
    "description": "This contract covers standard service terms and conditions.",
    "order": 13,
    "validFrom": "2023-10-05T14:48:00.000Z",
    "validTo": "2023-10-05T14:48:00.000Z"
  }
}

Authorizations

Authorization
string
header
required

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

Headers

tenant-id
string
required

Specifies the tenant context for the request. All endpoints operate within this tenant scope.

Example:

"tnt_pfh0haxfpzowht3oi213cqos"

Body

application/json

Request body used to create a contract resource.

Request body used to create a contract resource.

clientId
string
required

Unique identifier of the client.

Example:

"clnt_z2b3mo8qa5kzptgsu26q2wmh"

name
string
required

Contract name.

Required string length: 1 - 255
Example:

"Standard Service Contract"

amountMinor
integer
required

Monetary amount in minor units (e.g., cents).

Required range: 0 <= x <= 9007199254740991
Example:

5000

currencyCode
string
required

ISO 4217 currency code.

Required string length: 3
Example:

"EUR"

description
string

Detailed contract description.

Example:

"This contract covers standard service terms and conditions."

order
integer

Order of the resource for sorting purposes.

Required range: 0 <= x <= 9007199254740991
Example:

13

validFrom
string<date-time>

Contract validity start date.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2023-10-05T14:48:00.000Z"

validTo
string<date-time>

Contract validity end date.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2023-10-05T14:48:00.000Z"

Response

Default Response

Standard success response payload wrapped in a data property.

data
object
required

Contract resource returned by the API.