API
Xago Contract Parking exposes its data and actions through OData V4, SOAP (XML) and the standard
Business Central REST API. Endpoint names carry the xcp prefix.
Unless stated otherwise, the OData action endpoints take Basic authentication, a JSON body, and
a company=[CompanyName] query parameter. All parameters containing special characters must be
URL-encoded.
Contracts and lines
Section titled “Contracts and lines”Get contract lines
Section titled “Get contract lines”Returns the active contract lines for a customer.
GET https://api.businesscentral.dynamics.com/v2.0/[TENANTGUID]/[ENVIRONMENT]/api/xagoSoftwareAS/xcpData/v2.0/Companies([COMPANYGUID])/xcpContractLines- Supports OData filters, for example
$filter=customerWebshopID eq '1'. - Nested structures — periods, quantities and permits — must be requested with
$expand.
Set and delete a contract line quantity
Section titled “Set and delete a contract line quantity”| Endpoint | Body |
|---|---|
POST /XCP_API_setContractLineQuantity?company=[CompanyName] |
API key, contract no., line no., quantity, start date. |
POST /XCP_API_deleteContractLineQuantity?company=[CompanyName] |
API key, contract no., line no., start date. |
Cancel a contract line
Section titled “Cancel a contract line”| Endpoint | Body |
|---|---|
POST /XCP_API_cancelContractLine?company=[CompanyName] |
Contract no., contract line no. |
POST /XCP_API_cancelContractLineOnDate?company=[CompanyName] |
Contract no., contract line no., and aDate for the cancellation date. |
Order confirmation
Section titled “Order confirmation”POST /XCP_API_getOrderConfirmation?company=[CompanyName] returns the order confirmation as a
Base64-encoded PDF. The same document is available through the webshop SOAP endpoint
WS/[CompanyName]/Codeunit/XCP_Webshop.
Freezing periods
Section titled “Freezing periods”| Endpoint | Purpose |
|---|---|
GET /xcpContractLineFuturePeriods?$filter=ContractNo eq '1' and ContractLineNo eq 10000 |
Lists the upcoming periods for a line. |
POST /XCP_API_freezeContractLinePeriod?company=[CompanyName] |
Freezes a period. Body: contract no., line no., start date, end date. |
Customers
Section titled “Customers”| Operation | Endpoint | Notes |
|---|---|---|
| Get customers | GET .../xcpCustomersV2?$filter=No eq '1' |
Standard customer properties plus the Contract Parking fields. |
| Insert customer | POST /xcpCustomersInsert |
Used for initial creation. Templates have to be handled by the caller, since applying them through the API is complicated. |
| Update customer | PATCH /xcpCustomersV2([CUSTOMER_SYSTEM_ID]) |
Send If-Match with the ETag for concurrency control. Also used to update fields such as the webshop ID and contact details. |
| Delete customer | DELETE /xcpCustomersV2([CUSTOMER_SYSTEM_ID]) |
Products
Section titled “Products”GET .../xcpProducts?$filter=userIDFilter eq '1590|1592' returns products, filtered by user
IDs to show which products are available per customer.
Parking facilities
Section titled “Parking facilities”GET .../xcpedparkingFacilities?$format=json returns parking facilities. Requires the Xago
Contract Parking Extended Data add-on.
Billing and post-ordering
Section titled “Billing and post-ordering”POST /XCP_API_postOrder?company=[CompanyName] is the main integration endpoint. It processes
payments and generates invoices from webshop orders.
https://[Server]:[Port]/[BCInstanceName]/ODataV4/XCP_API_postOrder?company='CRONUS%20Norge%20AS'| Body field | Content |
|---|---|
aAPIKey |
A fixed value. Do not change it. |
aData |
A JSON array of order details: customer information, billing address, order type, and the products with their periods and pricing. |
The response is an array of customers with URLs to their contract lines, for verification.
Documents
Section titled “Documents”| Interface | Endpoint | Notes |
|---|---|---|
| SOAP | /WS/[CompanyName]/Codeunit/XCP_Webshop, action urn:microsoft-dynamics-schemas/codeunit/XCP_Webshop:getDocumentPDF |
Document types: POSTEDSALESINVOICE, POSTEDSALESCREDITMEMO, WEBSHOPORDERCONFIRMATION. |
| OData | POST /XCP_API_getDocumentPDF?company=[CompanyName] |
Body: documentType, documentNo. |
Campaigns and waiting lists
Section titled “Campaigns and waiting lists”The Product Campaign API manages and retrieves product campaigns, and the Product Waiting List API handles waiting lists for products that are unavailable.
