Contract Pricing Service API (1.0.0)

Contract Pricing

List of Contract Pricing

Return the list of Contract Pricing for given Org, only SysAdmin is authorized.

Authorizations:
bearerAuth
query Parameters
page
integer <int64> >= 1
Default: 1
per_page
integer <int64> >= 1
Default: 200
order
string
Default: "desc"
Enum: "asc" "desc"

The direction of the sort

org_id
Array of strings <uuid>

Array of Org IDs

Responses

Response samples

Content type
application/json
Example
{
  • "contract_pricings": [
    ],
  • "meta": {
    }
}

Create Contract Pricing

Create Contract Pricing for given Org

Authorizations:
bearerAuth
Request Body schema: application/json
org_id
required
string <uuid>
currency
required
string
is_active
boolean
Default: true
required
Array of objects (price-table)
is_valid_from
required
string <date-time>
is_valid_to
string <date-time>
Default: "9999-01-01T00:00:00Z"

Responses

Request samples

Content type
application/json
{
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "currency": "SGD",
  • "is_active": true,
  • "price_table": [
    ],
  • "is_valid_from": "2019-08-24T14:15:22Z",
  • "is_valid_to": "9999-01-01T00:00:00Z"
}

Response samples

Content type
application/json
{
  • "contract_pricing": {
    }
}

Read an existing Contract Pricing

Only SysAdmin is authorized.

Authorizations:
bearerAuth
path Parameters
contractPricingID
required
string

ID of the Contract Pricing to be read

Responses

Response samples

Content type
application/json
{
  • "contract_pricing": {
    }
}

Deactivate the Contract Pricing

Only SysAdmin is authorized.

Authorizations:
bearerAuth
path Parameters
contractPricingID
required
string

ID of the Contract Pricing to be deactivated

Request Body schema: application/json
version_rev
required
string

Responses

Request samples

Content type
application/json
{
  • "version_rev": "0-RnVQTn5z"
}

Response samples

Content type
application/json
{
  • "message": "Successfully deactivated the Contract Pricing"
}

Activate the Contract Pricing

Only SysAdmin is authorized.

Authorizations:
bearerAuth
path Parameters
contractPricingID
required
string

ID of the Contract Pricing to be activated

Request Body schema: application/json
version_rev
required
string

Responses

Request samples

Content type
application/json
{
  • "version_rev": "0-RnVQTn5z"
}

Response samples

Content type
application/json
{
  • "message": "Successfully activated the Contract Pricing"
}

Get current price for specific Org

Get the current price by is_active = true and reverse sort by is_valid_from and id. Only SysAdmin is authorized.

Authorizations:
bearerAuth
path Parameters
orgID
required
string

ID of the Org

Responses

Response samples

Content type
application/json
{
  • "contract_pricing": {
    }
}

List of Contract Pricing for Org

Return the list of Contract Pricing of its own Org, only OrgAdmin is authorized.

Authorizations:
bearerAuth
query Parameters
page
integer <int64> >= 1
Default: 1
per_page
integer <int64> >= 1
Default: 200
order
string
Default: "desc"
Enum: "asc" "desc"

The direction of the sort

Responses

Response samples

Content type
application/json
Example
{
  • "contract_pricings": [
    ],
  • "meta": {
    }
}

Read an existing Contract Pricing for Org

Can only see the Contract Pricing of its own Org

Authorizations:
bearerAuth
path Parameters
contractPricingID
required
string

ID of the Contract Pricing to be read

Responses

Response samples

Content type
application/json
{
  • "contract_pricing": {
    }
}

Get current price

Get the current price by is_active = true and reverse sort by is_valid_from and id

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "contract_pricing": {
    }
}