Contracts | Contract
Service to manage entities of type 'Contract'.
Overview
URL | api/{tenantKey}/{orgKey}/contracts/contracts |
Methods Supported | GET, POST, PUT, DELETE |
All Operations
This service includes the following operations:
- GET:
- POST:
-
PUT:
- PUT Set Custom Attribute Contract
- PUT Set IsActive Contract
- PUT Set ContractKey Contract
- PUT Set Description Contract
- PUT Set ContractType Contract
- PUT Set Date Contract
- PUT Set StartDate Contract
- PUT Set EndDate Contract
- PUT Set SchemaEntityState Contract
- PUT Set Currency Contract
- PUT Set GlobalValue Contract
- PUT Set PersonInCharge Contract
- PUT Set Customer Contract
- PUT Set Supplier Contract
- PUT Set ExternalReference Contract
- PUT Set Remarks Contract
- PUT Set Company Contract
- PUT Set NewStateId Contract
- PUT Set PreviousStateId Contract
- PUT Set TriggerStateId Contract
- DELETE:
All Resources
This service uses the following resources:
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 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 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 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:
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 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:
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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:
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 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:
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. |