Valuekeep Developers - Web API Reference

GET Operations

GET Contracts (odata)

Returns a page of the list of all the entity records available.

The following elements are optional:

opts (ODataQueryOptions) OData query option.

Response:

When successful, the response body contains the list of records available. See ContractResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

GET /contracts/contracts/odata

GET Contract by identifier

Returns the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body contains the entity record. See ContractResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /contracts/contracts/{id}

GET Contract by key

Returns the entity record that matches the specified key.

The following elements are required:

companyKey (string) The company key.
contractKey (string) Contract.

Response:

When successful, the response body contains the entity record. See ContractResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /contracts/contracts/{companyKey}/{contractKey}

GET Get State Transitions

Custom operation 'GetStateTransitions'.

The following elements are required:

contractKey (string) ContractKey.

Response:

When successful, the response body contains a list of resources of type 'ContractResource'. See ContractResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

GET /contracts/contracts/getStateTransitions/{contractKey}

POST Operations

POST Contracts

Creates a new entity record.

The following elements are required:

contractResource (ApiContractResource) The request body should contain the entity record that should be created.
See ApiContractResource.

The following elements are optional:

customAttributes (JSON Document) A key-value pair in JSON format that represents the extensibility custom attributes for this entity.
The key should be the custom attribute name prefixed with "custom_", e.g. "custom_attributeName".
While the "customAttributes" element is optional, please notice that specific custom attributes might be marked as required.

Response:

When successful, the response body contains the new entity record identifier. The resource header location property contains the URL for the new entity record. See ApiContractResource.

Response status codes:

201 Created. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /contracts/contracts

POST Change Schema Entity State

Custom operation 'ChangeSchemaEntityState'.

The following elements are required:

companyKey (string) CompanyKey.
contractKey (string) ContractKey.
schemaEntityStateKey (string) SchemaEntityStateKey.
changeSchemaEntityStateParams (ChangeSchemaEntityStateParamsResource) ChangeSchemaEntityStateParams.

The following elements are optional:

customAttributes (JSON Document) A key-value pair in JSON format that represents the extensibility custom attributes for this entity.
The key should be the custom attribute name prefixed with "custom_", e.g. "custom_attributeName".
While the "customAttributes" element is optional, please notice that specific custom attributes might be marked as required.

Response:

When successful, the response body contains a resource of type 'ChangeSchemaEntityStateParamsResource'. See ChangeSchemaEntityStateParamsResource.

Resource URL:

POST /contracts/contracts/changeSchemaEntityState/{companyKey}/{contractKey}/{schemaEntityStateKey}

PUT Operations

PUT Set Company Contract

Updates the value of attribute 'Company' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/company

PUT Set ContractKey Contract

Updates the value of attribute 'ContractKey' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/contractKey

PUT Set ContractType Contract

Updates the value of attribute 'ContractType' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/contractType

PUT Set Currency Contract

Updates the value of attribute 'Currency' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/currency

PUT Set Customer Contract

Updates the value of attribute 'Customer' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/customer

PUT Set Date Contract

Updates the value of attribute 'Date' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (DateTimeOffset) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/date

PUT Set Description Contract

Updates the value of attribute 'Description' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/description

PUT Set EndDate Contract

Updates the value of attribute 'EndDate' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (DateTime) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/endDate

PUT Set ExternalReference Contract

Updates the value of attribute 'ExternalReference' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/externalReference

PUT Set GlobalValue Contract

Updates the value of attribute 'GlobalValue' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/globalValue

PUT Set IsActive Contract

Updates the value of attribute 'IsActive' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/isActive

PUT Set NewStateId Contract

Updates the value of attribute 'NewStateId' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (Guid) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/newStateId

PUT Set PersonInCharge Contract

Updates the value of attribute 'PersonInCharge' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/personInCharge

PUT Set PreviousStateId Contract

Updates the value of attribute 'PreviousStateId' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (Guid) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/previousStateId

PUT Set Remarks Contract

Updates the value of attribute 'Remarks' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/remarks

PUT Set SchemaEntityState Contract

Updates the value of attribute 'SchemaEntityState' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/schemaEntityState

PUT Set StartDate Contract

Updates the value of attribute 'StartDate' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (DateTime) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/startDate

PUT Set Supplier Contract

Updates the value of attribute 'Supplier' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/supplier

PUT Set TriggerStateId Contract

Updates the value of attribute 'TriggerStateId' in the specified entity record.

The following elements are required:

contractKey (string) Contract.
companyKey (string) The company key.
value (Guid) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/triggerStateId

PUT Set Custom Attribute Contract

Updates the value of 'CustomAttribute' in the specified entity record.

The following elements are required:

companyKey (string) The company key.
contractKey (string) Contract
customAttributeName (string) The custom attribute name.
value (ExtensibilityCustomAttributeValueResource) The request body should contain the new value for the custom attribute.
See ExtensibilityCustomAttributeValueResource.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /contracts/contracts/{companyKey}/{contractKey}/{customAttributeName}

DELETE Operations

DELETE Contract by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /contracts/contracts/{id}

DELETE Contract by key

Deletes the entity record that matches the specified key.

The following elements are required:

companyKey (string) The company key.
contractKey (string) Contract.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /contracts/contracts/{companyKey}/{contractKey}

Resources


ApiContractResource

The following elements are required:

contractKey (string) Contract.
description (string) Description.
contractType (string) Contract Type.
date (DateTimeOffset) Date.
startDate (DateTime) Start Date.
schemaEntityState (string) State.
currency (string) Currency.
globalValue (MoneyResource) Global Value.
See MoneyResource .
company (string) Company.
newStateId (Guid) New State Id.

The following elements are optional:

endDate (DateTime) End Date.
personInCharge (string) Person In Charge.
customer (string) Customer.
supplier (string) Supplier.
externalReference (string) External Reference.
remarks (string) Remarks.
previousStateId (Guid) Previous State Id.
triggerStateId (Guid) Trigger State Id.


ChangeSchemaEntityStateParamsResource

The following elements are required:

schemaEntityState (string) State.

The following elements are optional:

stateJustificationKey (string) State Justification Key.
stateJustificationTypeKey (string) State Justification Type Key.
stateJustificationRemarks (string) State Justification Remarks.


ContractResource

The following elements are required:

contractKey (string) Contract.
description (string) Description.
contractType (string) Contract Type.
date (DateTimeOffset) Date.
startDate (DateTime) Start Date.
schemaEntityState (string) State.
currency (string) Currency.
globalValue (MoneyResource) Global Value.
See MoneyResource .
company (string) Company.
newStateId (Guid) New State Id.

The following elements are optional:

endDate (DateTime) End Date.
personInCharge (string) Person In Charge.
customer (string) Customer.
supplier (string) Supplier.
externalReference (string) External Reference.
remarks (string) Remarks.
previousStateId (Guid) Previous State Id.
triggerStateId (Guid) Trigger State Id.


MoneyResource

The following elements are required:

amount (decimal) The amount.

The following elements are optional:

baseAmount (decimal) The base amount.
reportingAmount (decimal) The reporting amount.
fractionDigits (int) The fraction digits.
symbol (string) The symbol.

Notes: For the POST operation it is not necessary to send the fields: BaseAmount, ReportingAmount, FractionDigits and Symbol. Will be ignored.



ExtensibilityCustomAttributeValueResource

The following elements are required:

value (object) The custom attribute value.