API - Contracts
This page supports access to contracts. Via the expand query parameter contract lines can be handled together with the contract header when the GET and POST methods are used.
Object Definition
Object Type | Page |
Object ID | 70299112 |
Object Name | QWEPR API - Contracts |
Source Table | QWEPR Contract Header |
API Definition
APIPublisher | smartApps |
APIGroup | parrot |
APIVersion | v1.0 |
EntitySetName | contracts |
EntityName | contract |
Service Enabled Procedures
Name | Description |
---|---|
Release(WebServiceActionContext) | Release a Contract. |
Reopen(WebServiceActionContext) | Reopen a Contract. |
Example
Read
Get a list of Contract.
GET businesscentralPrefix/companies({id})/contracts?$schemaversion=2.0
Get a single Contract and its lines.
GET businesscentralPrefix/companies({id})/contracts({id})?$expand=contractLines&$schemaversion=2.0
Create
Create a new Contract and a Contract Line.
POST businesscentralPrefix/companies({id})/contratcs?$expand=contractLines&$schemaversion=2.0
Content-Type: application/json
{
"sellToCustomerNumber": "20000",
"startingDate": "2023-11-01",
"invoicingInterval": "1M",
"billToAddress": "Address",
"contractLines": [
{
"type": "Item",
"number": "1896-S",
"quantity": 6
},
{
"type": "Item",
"number": "1908-S",
"quantity": 7
}
]
}
Update
Update a Contract.
PATCH businesscentralPrefix/companies({id})/contracts({id})?$schemaversion=2.0
If-Match: {@odata.etag from the POST response}
Content-Type: application/json
{
"contractDate": "2023-11-03",
"advancedMode": true,
"billToAddress": "New Address"
}
Controls
Type | Name | Data Type | Read-only |
---|---|---|---|
Field | id | Guid | Yes |
Field | number | Code[20] | |
Field | sellToCustomerNumber | Code[20] | |
Field | billToCustomerNumber | Code[20] | |
Field | shipToCode | Code[10] | |
Field | create | Enum "QWEPR Contract Create Type" | |
Field | jobNumber | Code[20] | |
Field | jobTaskNumber | Code[20] | |
Field | shippingAdvice | Enum "Sales Header Shipping Advice" | Yes |
Field | externalDocumentNumber | Code[35] | |
Field | yourReference | Text[35] | |
Field | contractDate | Date | |
Field | startingDate | Date | |
Field | endingDate | Date | |
Field | latestPostingDate | Date | Yes |
Field | invoicingInterval | DateFormula | |
Field | nextPostingDate | Date | |
Field | numberOfInvoicesPerPosting | Integer | |
Field | customerPriceGroup | Code[10] | |
Field | customerDiscGroup | Code[20] | |
Field | currencyCode | Code[10] | |
Field | languageCode | Code[10] | |
Field | salespersonCode | Code[20] | |
Field | responsibilityCenter | Code[10] | |
Field | status | Enum "QWEPR Contract Document Status" | Yes |
Field | blocked | Boolean | |
Field | shortcutDimension1Code | Code[20] | |
Field | shortcutDimension2Code | Code[20] | |
Field | dimensionSetId | Integer | Yes |
Field | contractCategoryCode | Code[10] | |
Field | contractGroupCode | Code[20] | |
Field | advancedMode | Boolean | |
Field | collectiveInvoicing | Boolean | |
Field | locationCode | Code[10] | |
Field | includeConsumptionLines | Enum "QWEPR Incl. Consumption Lines" | |
Field | errorWhenCreatingDocument | Boolean | Yes |
Field | errorMessageWhenCreatingDocument | Text[2048] | Yes |
Field | errorCreated | DateTime | Yes |
Field | updateAddressesfromCustomer | Boolean | |
Field | billToAddress | Text[100] | |
Field | billToAddress2 | Text[50] | |
Field | billToCity | Text[30] | |
Field | billToCountryRegionCode | Code[10] | |
Field | billToCounty | Text[30] | |
Field | billToName | Text[100] | |
Field | billToName2 | Text[50] | |
Field | billToPostCode | Code[20] | |
Field | sellToAddress | Text[100] | |
Field | sellToAddress2 | Text[50] | |
Field | sellToCity | Text[30] | |
Field | sellToCountryRegionCode | Code[10] | |
Field | sellToCounty | Text[30] | |
Field | sellToCustomerName | Text[100] | |
Field | sellToCustomerName2 | Text[50] | |
Field | sellToPostCode | Code[20] | |
Field | shipToAddress | Text[100] | |
Field | shipToAddress2 | Text[50] | |
Field | shipToCity | Text[30] | |
Field | shipToCountryRegionCode | Code[10] | |
Field | shipToCounty | Text[30] | |
Field | shipToName | Text[100] | |
Field | shipToName2 | Text[50] | |
Field | shipToPostCode | Code[20] | |
Field | systemCreatedAt | DateTime | Yes |
Field | systemCreatedBy | Guid | Yes |
Field | lastModifiedDateTime | DateTime | Yes |
Field | systemModifiedBy | Guid | Yes |
Sub page | contractLines |
This documentation is generated from Parrot v23.0.208813.0