Authenticates a user and returns a JWT token if the credentials are valid.
This endpoint allows clients to authenticate using their API key and API secret.
If the credentials are valid, a JWT token is generated and returned.
The login data containing API key and API secret.
apiKey required | string non-empty The provided Api Key |
apiSecret required | string non-empty The provided Api Secret |
{- "apiKey": "eca3be92-4b5a-4fb8-ac53-3ac9561ff952",
- "apiSecret": "8c0b88e3-bdcb-4b49-be4f-951b188cc46e"
}
"string"
This API method allows you to create a new company entity in the system.
A company entity represents a business organization within the system, which may include details such as company name, identifiers, ERP system information, and related notes.
Authentication
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
The company data to create.
licenseId required | integer <int32> Foreign key to License |
name required | string [ 1 .. 200 ] characters Company Name |
erpCompanyName | string or null <= 60 characters ERP Company Name |
internalCode | string or null <= 50 characters Company Internal Code on Casulo Software ERP System. This is the internal code for the client within the Casulo system. |
erpSystem | string or null <= 20 characters ERP System Name |
erpVersion | string or null <= 20 characters ERP Version |
notes | string or null Notes about the company |
{- "licenseId": 1,
- "name": "Acme Corporation",
- "erpCompanyName": "SAGE",
- "internalCode": "000001",
- "erpSystem": "SAGE",
- "erpVersion": "CRTL",
- "notes": "Some notes about the company"
}
{- "id": 0,
- "licenseId": 0,
- "name": "Acme Corporation",
- "erpCompanyName": "SAGE",
- "internalCode": "000001",
- "erpSystem": "SAGE",
- "erpVersion": "CRTL",
- "notes": "Some notes about the company",
- "isActive": true
}
Retrieves all companies in the system.
This API method retrieves all companies stored in the system.
Companies represent business entities within the system with details such as company name, identifiers, ERP system information, and related notes.
Authentication
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
[- {
- "id": 0,
- "licenseId": 0,
- "name": "Acme Corporation",
- "erpCompanyName": "SAGE",
- "internalCode": "000001",
- "erpSystem": "SAGE",
- "erpVersion": "CRTL",
- "notes": "Some notes about the company",
- "isActive": true
}
]
Updates an existing company by its unique identifier (ID).
This API method allows you to update an existing company entity in the system.
A company entity represents a business organization within the system, which may include details such as company name, identifiers, ERP system information, and related notes.
Authentication
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
id required | integer <int32> The ID of the company to update. |
The updated company data.
name | string or null Company Name |
erpCompanyName | string or null <= 60 characters ERP Company Name |
internalCode | string or null <= 50 characters Company Internal Code on Casulo Software ERP System. This is the internal code for the client within the Casulo system. |
erpSystem | string or null <= 20 characters ERP System Name |
erpVersion | string or null <= 20 characters ERP Version |
notes | string or null Notes about the company |
isActive | boolean Indicates if the company is active |
{- "name": "Acme Corporation",
- "erpCompanyName": "SAGE",
- "internalCode": "000001",
- "erpSystem": "SAGE",
- "erpVersion": "CRTL",
- "notes": "Some notes about the company",
- "isActive": true
}
"string"
Deletes a company from the system by its unique identifier (ID).
This API method allows you to delete a company entity from the system based on its unique identifier (ID).
If the company with the specified ID does not exist, a 404 Not Found response is returned.
Authentication
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
id required | integer <int32> The ID of the company to delete. |
"string"
Retrieves a company by its unique identifier (ID), including its preferences.
This API method retrieves a company from the system based on its unique identifier (ID).
If the company with the specified ID does not exist, a 404 Not Found response is returned.
Authentication
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
id required | integer <int32> The ID of the company to retrieve. |
{- "id": 0,
- "licenseId": 0,
- "name": "Acme Corporation",
- "erpCompanyName": "SAGE",
- "internalCode": "000001",
- "erpSystem": "SAGE",
- "erpVersion": "CRTL",
- "notes": "Some notes about the company",
- "isActive": true
}
Retrieves all companies associated with a specified license ID.
This API method retrieves all companies associated with a specified license ID.
If the license with the specified ID does not exist, a 404 Not Found response is returned.
Authentication
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
licenseId required | integer <int32> The ID of the license to retrieve companies for. |
[- {
- "id": 0,
- "licenseId": 0,
- "name": "Acme Corporation",
- "erpCompanyName": "SAGE",
- "internalCode": "000001",
- "erpSystem": "SAGE",
- "erpVersion": "CRTL",
- "notes": "Some notes about the company",
- "isActive": true
}
]
Retrieves all customers stored in the system for a specific company.
The response includes details such as customer code, name, address, and contact information.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company to retrieve customers for. |
page | integer <int32> Default: 1 The page number to retrieve. |
pageSize | integer <int32> Default: 10 The number of customers per page. |
[- {
- "code": "C123",
- "name": "John Doe",
- "address": "123 Main St",
- "address2": "Apt 4B",
- "zipCode": "12345",
- "city": "Springfield",
- "country": "Portugal",
- "district": "District 9",
- "municipality": "Central Municipality",
- "vatNumber": "123456789",
- "phone1": "+1234567890",
- "phone2": "+0987654321",
- "phone3": "+1122334455",
- "phone4": "+5566778899",
- "fax": "+1234567899",
- "mobilePhone1": "+1987654321",
- "mobilePhone2": "+1098765432",
- "email": "customer@example.com",
- "website": "www.customerwebsite.com",
- "lineDiscount": 10,
- "globalDiscount": 5,
- "sellerCode": "SELL001",
- "sellerName": "John Seller",
- "zoneCode": "Z001",
- "zoneName": "North Zone",
- "transportCode": "T001",
- "transportName": "Fast Transport",
- "defaultPaymentCondition": "Net 30",
- "defaultPaymentMethod": "Credit Card",
- "priceTable": "Standard",
- "createdDateTime": "2024-06-19T09:00:00",
- "sourceSystemId": "123"
}
]
Retrieves a customer stored in the system for a specific company by customer code.
The response includes details such as customer code, name, address, and contact information.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company to retrieve the customer for. |
customerCode required | string The code of the customer to retrieve. |
{- "code": "C123",
- "name": "John Doe",
- "address": "123 Main St",
- "address2": "Apt 4B",
- "zipCode": "12345",
- "city": "Springfield",
- "country": "Portugal",
- "district": "District 9",
- "municipality": "Central Municipality",
- "vatNumber": "123456789",
- "phone1": "+1234567890",
- "phone2": "+0987654321",
- "phone3": "+1122334455",
- "phone4": "+5566778899",
- "fax": "+1234567899",
- "mobilePhone1": "+1987654321",
- "mobilePhone2": "+1098765432",
- "email": "customer@example.com",
- "website": "www.customerwebsite.com",
- "lineDiscount": 10,
- "globalDiscount": 5,
- "sellerCode": "SELL001",
- "sellerName": "John Seller",
- "zoneCode": "Z001",
- "zoneName": "North Zone",
- "transportCode": "T001",
- "transportName": "Fast Transport",
- "defaultPaymentCondition": "Net 30",
- "defaultPaymentMethod": "Credit Card",
- "priceTable": "Standard",
- "createdDateTime": "2024-06-19T09:00:00",
- "sourceSystemId": "123"
}
This endpoint retrieves the list of customers in queue for a specific company.
It returns a list of CustomerQueueResponse objects containing decrypted customer details.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company for which to retrieve the customer queue. |
[- {
- "uid": "7a123e45-12ab-1234-abcd-1234567890ab",
- "vatNumber": "123456789",
- "name": "John Doe",
- "address": "123 Main St",
- "address2": "Apt 4B",
- "zipCode": "12345",
- "city": "Springfield",
- "country": "USA",
- "billingAddress": "456 Billing St",
- "billingAddress2": "Suite 100",
- "billingZipCode": "67890",
- "billingCity": "Shelbyville",
- "billingCountry": "USA",
- "mobilePhone": "+1987654321",
- "email": "customer@example.com",
- "notes": "This is a sample note.",
- "status": "WaitingPendingProcessing",
- "entryDate": "2024-07-05T12:34:56"
}
]
This endpoint retrieves the list of customer history queue entries for a specific company.
It returns a list of CustomerQueueHistoryResponse objects containing decrypted customer details and integration error logs.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company for which to retrieve the customer history queue. |
[- {
- "uid": "7a123e45-12ab-1234-abcd-1234567890ab",
- "vatNumber": "123456789",
- "name": "John Doe",
- "address": "123 Main St",
- "address2": "Apt 4B",
- "zipCode": "12345",
- "city": "Springfield",
- "country": "USA",
- "billingAddress": "456 Billing St",
- "billingAddress2": "Suite 100",
- "billingZipCode": "67890",
- "billingCity": "Shelbyville",
- "billingCountry": "USA",
- "mobilePhone": "+1987654321",
- "email": "customer@example.com",
- "notes": "This is a sample note.",
- "status": "WaitingPendingProcessing",
- "erpReference": "ERP12345",
- "errors": [
- {
- "ReferenceHeaderId": "12345",
- "Message": "Product with ID 67890 not found."
}
]
}
]
This endpoint retrieves the status of a customer queue entry identified by its UID for a specific company.
It returns a CustomerQueueStatusResponse object containing decrypted customer details, integration error logs, and ERP reference.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company for which to retrieve the customer queue detail. |
uid required | string <uuid> The UID of the customer queue entry to retrieve. |
{- "uid": "7a123e45-12ab-1234-abcd-1234567890ab",
- "vatNumber": "123456789",
- "name": "John Doe",
- "address": "123 Main St",
- "address2": "Apt 4B",
- "zipCode": "12345",
- "city": "Springfield",
- "country": "USA",
- "billingAddress": "456 Billing St",
- "billingAddress2": "Suite 100",
- "billingZipCode": "67890",
- "billingCity": "Shelbyville",
- "billingCountry": "USA",
- "mobilePhone": "+1987654321",
- "email": "customer@example.com",
- "notes": "This is a sample note.",
- "status": "WaitingPendingProcessing",
- "erpReference": "ERP12345",
- "errors": [
- {
- "ReferenceHeaderId": "12345",
- "Message": "Product with ID 67890 not found."
}
]
}
Creates a new customer entry in the queue
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> Company ID associated with the customer. |
Customer information.
vatNumber | string or null <= 100 characters Customer VAT Number. |
name required | string non-empty Gets or sets the customer name. |
address | string or null <= 300 characters Address of the client. |
address2 | string or null <= 300 characters Address line 2 of the customer. |
zipCode | string or null <= 50 characters Zip code of the customer. |
city | string or null <= 150 characters Customer city. |
country | string or null <= 100 characters Customer country. |
billingAddress | string or null <= 300 characters Customer billing address. |
billingAddress2 | string or null <= 300 characters Customer billing address line 2. |
billingZipCode | string or null <= 50 characters Customer billing zip code. |
billingCity | string or null <= 150 characters Customer billing city. |
billingCountry | string or null <= 100 characters Customer billing country. |
mobilePhone | string or null <= 100 characters Customer mobile phone number. |
string or null <= 300 characters Customer email. | |
notes | string or null Notes related to the customer. |
{- "vatNumber": "123456789",
- "name": "John Doe",
- "address": "123 Main St",
- "address2": "Apt 4B",
- "zipCode": "12345",
- "city": "Springfield",
- "country": "PRT",
- "billingAddress": "456 Billing St",
- "billingAddress2": "Suite 100",
- "billingZipCode": "67890",
- "billingCity": "Shelbyville",
- "billingCountry": "PRT",
- "mobilePhone": "+1987654321",
- "email": "customer@example.com",
- "notes": "This is a sample note."
}
{- "uid": "7a123e45-12ab-1234-abcd-1234567890ab",
- "vatNumber": "123456789",
- "name": "John Doe",
- "address": "123 Main St",
- "address2": "Apt 4B",
- "zipCode": "12345",
- "city": "Springfield",
- "country": "USA",
- "billingAddress": "456 Billing St",
- "billingAddress2": "Suite 100",
- "billingZipCode": "67890",
- "billingCity": "Shelbyville",
- "billingCountry": "USA",
- "mobilePhone": "+1987654321",
- "email": "customer@example.com",
- "notes": "This is a sample note.",
- "status": "WaitingPendingProcessing",
- "entryDate": "2024-07-05T12:34:56"
}
Creates a new document entry in the queue for a specified company.
If the company with the specified ID does not exist, a 400 Bad Request response is returned.
A unique id (UID) referring to the document in the queue is returned, save this UID as it will be required in subsequent invocations
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company associated with the document. |
The document information to be added to the queue.
type required | string [ 1 .. 350 ] characters Type of the document. |
series | string or null <= 300 characters Series of the document. |
customerVatNumber | string or null <= 200 characters VAT number of the Customer. |
customerCode | string or null Code of the Customer. |
customerName | string or null Name of the Customer. |
customerAddress | string or null Address of the Customer. |
customerAddress2 | string or null Address line 2 of the Customer. |
customerZipCode | string or null <= 300 characters Zip code of the Customer. |
customerCity | string or null City of the Customer. |
sellerCode | string or null Code of the seller. |
sellerName | string or null Name of the seller. |
paymentMethodCode | string or null Code of type of payment. |
paymentMethod | string or null The type of payment. |
notes | string or null Notes related to the document. |
sourceReference | string or null Reference to the source system of the document. |
Array of objects or null (DocumentLineQueue) Collection navigation property to associated document lines. |
{- "type": "NE",
- "series": "A2024",
- "customerVatNumber": "123456789",
- "customerCode": "C12345",
- "customerName": "John Doe",
- "customerAddress": "123 Main St",
- "customerAddress2": "Apt 4B",
- "customerZipCode": "12345",
- "customerCity": "Springfield",
- "sellerCode": "S123",
- "sellerName": "Jane Smith",
- "paymentMethodCode": "2",
- "paymentMethod": "Credit Card",
- "notes": "This is a sample note.",
- "sourceReference": "SYSTEM123",
- "documentLines": [
- {
- "productCode": "PD123",
- "productName": "Widget A",
- "quantity": 5,
- "price": 10.5,
- "discount": 2,
- "sourceReference": "SYSTEM456"
}
]
}
{- "uid": "12345-abcde",
- "date": "2024-06-21T10:00:00",
- "type": "NE",
- "series": "A2024",
- "customerVatNumber": "123456789",
- "customerCode": "C12345",
- "customerName": "John Doe",
- "customerAddress": "123 Main St",
- "customerAddress2": "Apt 4B",
- "customerZipCode": "12345",
- "customerCity": "Springfield",
- "sellerCode": "S123",
- "sellerName": "Jane Smith",
- "paymentMethodCode": "2",
- "paymentMethod": "Credit Card",
- "notes": "This is a sample note.",
- "sourceReference": "SYSTEM123",
- "status": "WaitingPendingProcessing",
- "processedDate": "2024-06-21T10:00:00",
- "erpReference": "ERP12345",
- "documentLines": [
- {
- "uid": "07cc67f4-45d6-494b-adac-09b5cbc7e2b5",
- "productCode": "PD123",
- "productName": "Widget A",
- "quantity": 5,
- "price": 10.5,
- "discount": 2,
- "sourceReference": "SYSTEM456"
}
]
}
Updates an existing document and its lines for a specified company.
If the company with the specified ID does not exist, a 400 Bad Request response is returned.
If the document with the specified UID is not found, a 404 Not Found response is returned.
The document and line data are encrypted before being saved to the database.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company associated with the document. |
The document update request containing the document UID and updated information.
uid | string <uuid> Gets or sets the unique identifier of the document. |
type | string or null Gets or sets the type of the document. |
series | string or null Gets or sets the series of the document. |
customerVatNumber | string or null Gets or sets the VAT number of the Customer. |
customerCode | string or null Gets or sets the code of the Customer. |
customerName | string or null Gets or sets the name of the Customer. |
customerAddress | string or null Gets or sets the address of the Customer. |
customerAddress2 | string or null Gets or sets the secondary address of the Customer. |
customerZipCode | string or null Gets or sets the zip code of the Customer. |
customerCity | string or null Gets or sets the city of the Customer. |
sellerCode | string or null Gets or sets the code of the seller. |
sellerName | string or null Gets or sets the name of the seller. |
paymentMethodCode | string or null Code of type of payment. |
paymentMethod | string or null The type of payment. |
notes | string or null Gets or sets the notes associated with the document. |
sourceReference | string or null Gets or sets the source reference of the document. |
Array of objects or null (UpdateDocumentLineRequest) Gets or sets the lines of the document. |
{- "uid": "8c54bc33-30f5-4e6e-a5d8-1c3bb36b805f",
- "type": "NE",
- "series": "A2024",
- "customerVatNumber": "123456789",
- "customerCode": "C12345",
- "customerName": "John Doe",
- "customerAddress": "123 Main St",
- "customerAddress2": "Apt 4B",
- "customerZipCode": "12345",
- "customerCity": "Springfield",
- "sellerCode": "S123",
- "sellerName": "Jane Smith",
- "paymentMethodCode": "2",
- "paymentMethod": "Credit Card",
- "notes": "This is a sample note.",
- "sourceReference": "SYSTEM123",
- "documentLines": [
- {
- "uid": "041d2e06-d2d6-4b0b-b7fe-f23aea6606fa",
- "productCode": "PD123",
- "productName": "Widget A",
- "quantity": 5,
- "price": 10.5,
- "discount": 2,
- "sourceReference": "SYSTEM456"
}
]
}
"string"
Reprocesses a document by unmarking it as pending and requeuing it for processing.
Reprocesses an existing document by setting its status to waiting and requeuing it for processing for a specified company.
If the company with the specified ID does not exist, a 400 Bad Request response is returned.
If the document with the specified UID is not found, a 404 Not Found response is returned.
The document and related ERP integration logs are updated within a database transaction.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company. |
uid required | string <uuid> The UID of the document to be reprocessed. |
Retrieves the document queue for a specific company.
This API method allows you to retrieve the document queue for a company based on its unique identifier (ID).
If no documents are found for the given company ID, a 404 Not Found response is returned.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company. |
[- {
- "uid": "12345-abcde",
- "date": "2024-06-21T10:00:00",
- "type": "NE",
- "series": "A2024",
- "customerVatNumber": "123456789",
- "customerCode": "C12345",
- "customerName": "John Doe",
- "customerAddress": "123 Main St",
- "customerAddress2": "Apt 4B",
- "customerZipCode": "12345",
- "customerCity": "Springfield",
- "sellerCode": "S123",
- "sellerName": "Jane Smith",
- "paymentMethodCode": "2",
- "paymentMethod": "Credit Card",
- "notes": "This is a sample note.",
- "sourceReference": "SYSTEM123",
- "status": "WaitingPendingProcessing",
- "processedDate": "2024-06-21T10:00:00",
- "erpReference": "ERP12345",
- "documentLines": [
- {
- "uid": "07cc67f4-45d6-494b-adac-09b5cbc7e2b5",
- "productCode": "PD123",
- "productName": "Widget A",
- "quantity": 5,
- "price": 10.5,
- "discount": 2,
- "sourceReference": "SYSTEM456"
}
]
}
]
Retrieves the document queue that requires attention for a specific company based on its unique identifier (ID).
This API method allows you to retrieve documents that need attention for a company.
If no documents needing attention are found for the given company ID, a 404 Not Found response is returned.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company. |
[- {
- "uid": "12345-abcde",
- "date": "2024-06-21T10:00:00",
- "type": "NE",
- "series": "A2024",
- "customerVatNumber": "123456789",
- "customerCode": "C12345",
- "customerName": "John Doe",
- "customerAddress": "123 Main St",
- "customerAddress2": "Apt 4B",
- "customerZipCode": "12345",
- "customerCity": "Springfield",
- "sellerCode": "S123",
- "sellerName": "Jane Smith",
- "paymentMethodCode": "2",
- "paymentMethod": "Credit Card",
- "notes": "This is a sample note.",
- "sourceReference": "SYSTEM123",
- "headerErrors": [
- {
- "message": "Product with ID 67890 not found.",
- "logLevel": "Error",
- "isActive": true
}
], - "documentLines": [
- {
- "uid": "07cc67f4-45d6-494b-adac-09b5cbc7e2b5",
- "productCode": "PD123",
- "productName": "Widget A",
- "quantity": 5,
- "price": 10.5,
- "discount": 2,
- "sourceReference": "SYSTEM456",
- "message": "Product with ID 67890 not found.",
- "logLevel": "Error",
- "isActive": true
}
]
}
]
Retrieves a specific document queue by its unique identifier (ID) for a given company.
If the document with the specified ID is not found in the active queue, it attempts to retrieve it from the historical queue.
If the company with the specified ID does not exist, a 400 Bad Request response is returned.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company. |
uid required | string <uuid> The unique identifier of the document. |
{- "uid": "12345-abcde",
- "date": "2024-06-21T10:00:00",
- "type": "NE",
- "series": "A2024",
- "customerVatNumber": "123456789",
- "customerCode": "C12345",
- "customerName": "John Doe",
- "customerAddress": "123 Main St",
- "customerAddress2": "Apt 4B",
- "customerZipCode": "12345",
- "customerCity": "Springfield",
- "sellerCode": "S123",
- "sellerName": "Jane Smith",
- "paymentMethodCode": "2",
- "paymentMethod": "Credit Card",
- "notes": "This is a sample note.",
- "sourceReference": "SYSTEM123",
- "status": "WaitingPendingProcessing",
- "processedDate": "2024-06-21T10:00:00",
- "erpReference": "ERP12345",
- "documentLines": [
- {
- "uid": "07cc67f4-45d6-494b-adac-09b5cbc7e2b5",
- "productCode": "PD123",
- "productName": "Widget A",
- "quantity": 5,
- "price": 10.5,
- "discount": 2,
- "sourceReference": "SYSTEM456"
}
]
}
This endpoint first checks if the document is available in the active document queue. If the document is not found, it then searches the historical queue.
If the company with the specified ID is invalid or inactive, a 400 Bad Request response is returned.
If the document with the specified ID is not found in either the active or historical queues, a 404 Not Found response is returned.
Authentication
This endpoint requires a valid Bearer token included in the Authorization header of the request. Ensure that you have obtained a valid token before making the request.
companyId required | integer <int32> The ID of the company. |
uid required | string <uuid> The unique identifier of the document. |
{- "uid": "12345-abcde",
- "b64": ""
}
Retrieves the document history queue for a specific company based on its unique identifier (ID).
This API method allows you to retrieve the document history queue for a company.
If no documents are found for the given company ID, a 404 Not Found response is returned.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company. |
page | integer <int32> Default: 1 The page number to retrieve. |
pageSize | integer <int32> Default: 10 The number of stocks per page. |
[- {
- "id": 1,
- "uid": "3962b67f-805d-41c2-bb73-ad2e86a2d30c",
- "date": "2024-06-21T10:00:00",
- "type": "NE",
- "series": "A2024",
- "customerVatNumber": "123456789",
- "customerCode": "C12345",
- "customerName": "John Doe",
- "customerAddress": "123 Main St",
- "customerAddress2": "Apt 4B",
- "customerZipCode": "12345",
- "customerCity": "Springfield",
- "sellerCode": "S123",
- "sellerName": "Jane Smith",
- "paymentMethodCode": "2",
- "paymentMethod": "Credit Card",
- "notes": "This is a sample note.",
- "sourceReference": "SYSTEM123",
- "processedDate": "2024-06-21T10:00:00",
- "erpReference": "ERP12345",
- "documentLines": [
- {
- "id": 0,
- "uid": "7a123e45-12ab-1234-abcd-1234567890ab",
- "documentQueueHistoryId": 0,
- "productCode": "PD123",
- "productName": "Widget A",
- "quantity": 5,
- "price": 10.5,
- "discount": 2,
- "sourceReference": "SYSTEM456"
}
]
}
]
This API method allows you to create a new license in the system.
Service licenses are used to manage access to your API or services. When creating a new license, an API key and secret will be generated automatically.
Authentication
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
The data to create a new license.
name required | string [ 1 .. 100 ] characters License Name |
licenseNumber required | string [ 1 .. 10 ] characters License Number |
dataJobInterval required | integer <int32> Interval in seconds for the API run job. Default: 60 seconds (1 minute). |
notes | string or null Notes about the license |
{- "name": "License A",
- "licenseNumber": "SAGE001",
- "dataJobInterval": 60,
- "notes": "Some notes about the license"
}
{- "id": 0,
- "name": "License A",
- "licenseNumber": "SAGE001",
- "apiKey": "ws_key_123",
- "apiSecret": "ws_secret_456",
- "notes": "Some notes about the license",
- "isActive": true,
- "preferences": {
- "dataJobInterval": 0
}
}
This API method retrieves all service licenses available in the system.
The retrieved licenses contain details such as API key, secret, and associated information.
Authentication
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
[- {
- "id": 0,
- "name": "License A",
- "licenseNumber": "SAGE001",
- "apiKey": "ws_key_123",
- "apiSecret": "ws_secret_456",
- "notes": "Some notes about the license",
- "isActive": true,
- "preferences": {
- "dataJobInterval": 0
}
}
]
Updates an existing license by ID
This API method allows you to update an existing service license in the system.
Service licenses are used to manage access to your API or services. When updating a license, you can modify properties such as name, notes, API key, API secret, and activation status.
Authentication
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
id required | integer <int32> The ID of the license to update. |
The data to update the license.
name | string or null <= 100 characters License Name |
licenseNumber | string or null <= 10 characters License Number |
apiKey | string or null <= 80 characters API Key |
apiSecret | string or null <= 80 characters API Secret |
dataJobInterval | integer or null <int32> Interval in seconds for the API run job. Default: 60 seconds (1 minute). |
notes | string or null Notes about the license |
isActive | boolean or null Indicates if the license is active |
{- "name": "License A",
- "licenseNumber": "SAGE001",
- "apiKey": "ws_key_123",
- "apiSecret": "ws_secret_456",
- "dataJobInterval": 60,
- "notes": "Some notes about the license",
- "isActive": true
}
"string"
Delete a service license by ID
This API method allows you to delete a service license from the system based on its unique identifier (ID). Once deleted, the license and its associated API key and secret will no longer be available for use.
Authentication
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
id required | integer <int32> The ID of the license to delete. |
"string"
This API method allows you to retrieve a specific service license by its unique identifier (ID).
The retrieved license contains details such as API key, secret, and associated information.
Authentication
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
id required | integer <int32> The ID of the license to retrieve. |
{- "id": 0,
- "name": "License A",
- "licenseNumber": "SAGE001",
- "apiKey": "ws_key_123",
- "apiSecret": "ws_secret_456",
- "notes": "Some notes about the license",
- "isActive": true,
- "preferences": {
- "dataJobInterval": 0
}
}
Retrieves all log entries in the master database.
This API method retrieves all log entries stored in the master database.
Authentication
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
page | integer <int32> Default: 1 The page number to retrieve. |
pageSize | integer <int32> Default: 10 The number of stocks per page. |
[- {
- "id": 1,
- "logLevel": 0,
- "logDate": "2024-06-19T09:00:00",
- "apiEndpoint": "/api/companies",
- "httpMethod": "GET",
- "requestContent": "{\"name\": \"Acme Corporation\"}",
- "responseContent": "{\"id\": 1, \"name\": \"Acme Corporation\"}",
- "notes": "Request processed without issues."
}
]
Retrieves a specific log entry from the master database.
This API method retrieves a specific log entry stored in the system using the log ID. It decrypts sensitive fields before returning the log.
Authentication
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
logid required | integer <int32> The ID of the log entry to be retrieved. |
{- "id": 1,
- "logLevel": 0,
- "logDate": "2024-06-19T09:00:00",
- "apiEndpoint": "/api/companies",
- "httpMethod": "GET",
- "requestContent": "{\"name\": \"Acme Corporation\"}",
- "responseContent": "{\"id\": 1, \"name\": \"Acme Corporation\"}",
- "notes": "Request processed without issues."
}
Retrieves all log entries for a specific company from the company database.
This API method retrieves all log entries stored in the system for the specified company. It decrypts sensitive fields before returning the logs.
Authentication
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company whose logs are being retrieved. |
page | integer <int32> Default: 1 The page number to retrieve. |
pageSize | integer <int32> Default: 10 The number of stocks per page. |
[- {
- "id": 1,
- "logLevel": 0,
- "logDate": "2024-06-19T09:00:00",
- "apiEndpoint": "/api/companies",
- "httpMethod": "GET",
- "requestContent": "{\"name\": \"Acme Corporation\"}",
- "responseContent": "{\"id\": 1, \"name\": \"Acme Corporation\"}",
- "notes": "Request processed without issues."
}
]
Retrieves a specific log entry from the company database.
This API method retrieves a specific log entry stored in the system using the log ID. It decrypts sensitive fields before returning the log.
Authentication
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company. |
logId required | integer <int32> The ID of the log entry to be retrieved. |
{- "id": 1,
- "logLevel": 0,
- "logDate": "2024-06-19T09:00:00",
- "apiEndpoint": "/api/companies",
- "httpMethod": "GET",
- "requestContent": "{\"name\": \"Acme Corporation\"}",
- "responseContent": "{\"id\": 1, \"name\": \"Acme Corporation\"}",
- "notes": "Request processed without issues."
}
This method retrieves all payment methods stored in the system for a specific company.
The response includes details such as code and name for each payment method.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company to retrieve payment methods for. |
[- {
- "code": "1",
- "name": "Cash",
- "createdDateTime": "2024-06-19T09:00:00"
}
]
This API method retrieves all pending documents stored in the system for a specific company and client.
Pending documents represent invoices or other documents that are due for payment. The response includes details such as document type, serial, number, dates, and amounts.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company to retrieve pending documents for. |
customercode required | string The code of the customer to retrieve pending documents. |
[- {
- "customerCode": "123",
- "customerName": "Acme Corporation",
- "documentTypeCode": "FT",
- "documentType": "Invoice",
- "documentSerial": "2004",
- "documentNumber": "12345",
- "documentDate": "2024-06-19",
- "dueDate": "2024-07-19",
- "documentValue": 1500,
- "unpaidValue": 500,
- "createdDateTime": "2024-06-19T09:00:00",
- "sourceSystemId": "SageSystem1"
}
]
This method retrieves all product families stored in the system for a specific company.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company to retrieve product families for. |
page | integer <int32> Default: 1 |
pageSize | integer <int32> Default: 10 |
[- {
- "familyCode": "string",
- "description": "string",
- "level": 0,
- "parentDescription": "string",
- "parentCode": "string",
- "fullPath": "string",
- "createdDateTime": "2019-08-24T14:15:22Z"
}
]
This method retrieves product families by level stored in the system for a specific company.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company to retrieve product families for. |
level required | integer <int32> |
page | integer <int32> Default: 1 |
pageSize | integer <int32> Default: 10 |
[- {
- "familyCode": "string",
- "description": "string",
- "level": 0,
- "parentDescription": "string",
- "parentCode": "string",
- "fullPath": "string",
- "createdDateTime": "2019-08-24T14:15:22Z"
}
]
This method retrieves product families by parent code stored in the system for a specific company.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company to retrieve product families for. |
parentCode required | string |
page | integer <int32> Default: 1 |
pageSize | integer <int32> Default: 10 |
[- {
- "familyCode": "string",
- "description": "string",
- "level": 0,
- "parentDescription": "string",
- "parentCode": "string",
- "fullPath": "string",
- "createdDateTime": "2019-08-24T14:15:22Z"
}
]
This method retrieves product families by parent code stored in the system for a specific company.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company to retrieve product families for. |
familyCode required | string |
[- {
- "familyCode": "string",
- "description": "string",
- "level": 0,
- "parentDescription": "string",
- "parentCode": "string",
- "fullPath": "string",
- "createdDateTime": "2019-08-24T14:15:22Z"
}
]
This API method retrieves all products stored in the system for a specific company.
The response includes details such as code, name, prices and others product information
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company to retrieve customers for. |
page | integer <int32> Default: 1 The page number to retrieve. |
pageSize | integer <int32> Default: 10 The number of products per page. |
[- {
- "code": "P123",
- "name": "Example Product",
- "shortName": "Ex Prod",
- "type": "Electronics",
- "category": "Mobile Phones",
- "familyCode": "string",
- "family": "Smartphones",
- "barcode": "1234567890123",
- "baseUnit": "Piece",
- "capacityValue": 16,
- "capacityType": "GB",
- "taxType": "VAT",
- "supplierCode": "S123",
- "supplierName": "Example Supplier",
- "costPriceWithoutTax": 100,
- "costPrice": 123,
- "pvp1WithoutTax": 150,
- "pvp1": 184.5,
- "pvp2WithoutTax": 200,
- "pvp2": 246,
- "pvp3WithoutTax": 250,
- "pvp3": 307.5,
- "createdDateTime": "2024-06-19T09:00:00",
- "sourceSystemId": "123"
}
]
Retrieves all products stored in the system for a specific company.
The response includes details such as product code, name, prices, and other information.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company to retrieve the products for. |
productCode required | string The product code to be retrieved. |
[- {
- "code": "P123",
- "name": "Example Product",
- "shortName": "Ex Prod",
- "type": "Electronics",
- "category": "Mobile Phones",
- "familyCode": "string",
- "family": "Smartphones",
- "barcode": "1234567890123",
- "baseUnit": "Piece",
- "capacityValue": 16,
- "capacityType": "GB",
- "taxType": "VAT",
- "supplierCode": "S123",
- "supplierName": "Example Supplier",
- "costPriceWithoutTax": 100,
- "costPrice": 123,
- "pvp1WithoutTax": 150,
- "pvp1": 184.5,
- "pvp2WithoutTax": 200,
- "pvp2": 246,
- "pvp3WithoutTax": 250,
- "pvp3": 307.5,
- "createdDateTime": "2024-06-19T09:00:00",
- "sourceSystemId": "123"
}
]
Creates a new receipt entry in the queue.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company. |
type | string or null The type of the receipt. |
series | string or null The series of the receipt. |
customerCode | string or null Code of the Customer. |
notes | string or null Additional notes or comments about the receipt. |
sourceReference | string or null Reference to the source system of the document. |
Array of objects or null (ReceiptLineQueue) List of receipt line items. | |
Array of objects or null (ReceiptPaymentQueue) List of receipt payments. |
{- "type": "Invoice",
- "series": "A",
- "customerCode": "C12345",
- "notes": "This receipt is for the purchase of goods.",
- "sourceReference": "SYSTEM123",
- "lines": [
- {
- "type": "FT",
- "series": "V1",
- "number": "00001",
- "paidAmount": 50
}
], - "payments": [
- {
- "paymentMethodCode": "2",
- "paymentMethod": "Credit Card",
- "ammount": 100
}
]
}
{- "uid": "12345-abcde",
- "date": "2023-07-01",
- "type": "Invoice",
- "series": "A",
- "customerCode": "C12345",
- "notes": "This receipt is for the purchase of goods.",
- "sourceReference": "SYSTEM123",
- "status": "WaitingPendingProcessing",
- "lines": [
- {
- "uid": "7a123e45-12ab-1234-abcd-1234567890ab",
- "type": "FT",
- "series": "V1",
- "number": "00001",
- "paidAmount": 50
}
], - "payments": [
- {
- "uid": "7a123e45-12ab-1234-abcd-1234567890ab",
- "paymentMethodCode": "2",
- "paymentMethod": "Credit Card",
- "ammount": 100
}
]
}
Updates a receipt and its lines.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company. |
uid | string <uuid> Unique identifier for the document. |
date | string <date-time> The date of the receipt. |
type | string or null The type of the receipt. |
series | string or null The series of the receipt. |
customerCode | string or null <= 50 characters Code of the Customer. |
notes | string or null Additional notes or comments about the receipt. |
sourceReference | string or null <= 100 characters Reference to the source system of the document. |
Array of objects or null (UpdateReceiptLineRequest) Gets or sets the lines of the receipt. | |
Array of objects or null (UpdateReceiptPaymentRequest) Gets or sets the payments of the receipt. |
{- "uid": "12345-abcde",
- "date": "2023-07-01",
- "type": "Invoice",
- "series": "A",
- "customerCode": "C12345",
- "notes": "This receipt is for the purchase of goods.",
- "sourceReference": "SYSTEM123",
- "lines": [
- {
- "uid": "7a123e45-12ab-1234-abcd-1234567890ab",
- "type": "FT",
- "series": "V1",
- "number": "00001",
- "paidAmount": 50
}
], - "payments": [
- {
- "uid": "7a123e45-12ab-1234-abcd-1234567890ab",
- "paymentMethodCode": "2",
- "paymentMethod": "Credit Card",
- "ammount": 100
}
]
}
"string"
Reprocesses a receipt by unmarking it as pending and requeuing it for processing.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company. |
uid required | string <uuid> |
"string"
Retrieves receipts in queue for a specific company.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company. |
[- {
- "uid": "12345-abcde",
- "date": "2023-07-01",
- "type": "Invoice",
- "series": "A",
- "customerCode": "C12345",
- "notes": "This receipt is for the purchase of goods.",
- "sourceReference": "SYSTEM123",
- "status": "WaitingPendingProcessing",
- "lines": [
- {
- "uid": "7a123e45-12ab-1234-abcd-1234567890ab",
- "type": "FT",
- "series": "V1",
- "number": "00001",
- "paidAmount": 50
}
], - "payments": [
- {
- "uid": "7a123e45-12ab-1234-abcd-1234567890ab",
- "paymentMethodCode": "2",
- "paymentMethod": "Credit Card",
- "ammount": 100
}
]
}
]
Retrieves receipt queue that needs attention for a specific company.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company. |
[- {
- "uid": "12345-abcde",
- "date": "2023-07-01",
- "type": "Invoice",
- "series": "A",
- "customerCode": "C12345",
- "notes": "This receipt is for the purchase of goods.",
- "sourceReference": "SYSTEM123",
- "status": "WaitingPendingProcessing",
- "headerErrors": [
- {
- "message": "Product with ID 67890 not found.",
- "logLevel": "Error",
- "isActive": true
}
], - "lines": [
- {
- "uid": "07cc67f4-45d6-494b-adac-09b5cbc7e2b5",
- "type": "FT",
- "series": "V1",
- "number": "00001",
- "paidAmount": 50,
- "message": "Product with ID 67890 not found.",
- "logLevel": "Error",
- "isActive": true
}
]
}
]
Retrieves receipt history queue for a specific company.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company. |
page | integer <int32> Default: 1 The page number to retrieve. |
pageSize | integer <int32> Default: 10 The number of stocks per page. |
[- {
- "uid": "3962b67f-805d-41c2-bb73-ad2e86a2d30c",
- "date": "2023-07-01",
- "type": "Invoice",
- "series": "A",
- "customerCode": "C12345",
- "notes": "This receipt is for the purchase of goods.",
- "sourceReference": "SYSTEM123",
- "processedDate": "2024-06-21T10:00:00",
- "erpReference": "ERP12345",
- "lines": [
- {
- "receiptQueueHistoryId": 0,
- "type": "FT",
- "series": "V1",
- "number": "00001",
- "paidAmount": 50
}
], - "payments": [
- {
- "receiptQueueHistoryId": 0,
- "paymentMethodCode": "2",
- "paymentMethod": "Credit Card",
- "ammount": 100
}
]
}
]
Retrieves a specific receipt queue by its ID.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company. |
uid required | string <uuid> |
{- "uid": "12345-abcde",
- "date": "2023-07-01",
- "type": "Invoice",
- "series": "A",
- "customerCode": "C12345",
- "notes": "This receipt is for the purchase of goods.",
- "sourceReference": "SYSTEM123",
- "status": "WaitingPendingProcessing",
- "lines": [
- {
- "uid": "7a123e45-12ab-1234-abcd-1234567890ab",
- "type": "FT",
- "series": "V1",
- "number": "00001",
- "paidAmount": 50
}
], - "payments": [
- {
- "uid": "7a123e45-12ab-1234-abcd-1234567890ab",
- "paymentMethodCode": "2",
- "paymentMethod": "Credit Card",
- "ammount": 100
}
]
}
This API method allows you to check if the Casulo Web API is online and functioning correctly. It is useful for monitoring and ensuring the availability of the service. When invoked, it returns a simple status message indicating that the API is online.
Purpose: This endpoint is primarily used for health checks and to verify that the API service is running.
Usage: You can use this endpoint as part of a monitoring system to automatically check the status of the API at regular intervals.
Response: The response will contain a status message indicating that the API is online.
This API method allows you to retrieve the current version of the Casulo Web API.
Purpose: This endpoint provides information about the version of the API currently deployed. It can be useful for debugging, documentation, and ensuring compatibility.
Usage: Call this endpoint to get the version number of the API. This can help in identifying which version of the API is running in different environments (e.g., development, staging, production).
Response: The response will contain the version number of the API.
This method retrieves all stocks stored in the system for a specific company with pagination support.
The response includes details such as code, name and stock information.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company to retrieve stocks for. |
page | integer <int32> Default: 1 The page number to retrieve. |
pageSize | integer <int32> Default: 10 The number of stocks per page. |
[- {
- "productCode": "P123",
- "productName": "Example Product",
- "customerOrders": 5,
- "supplierOrders": 8,
- "customerConsigned": 3,
- "supplierConsigned": 2,
- "stockAvailable": 50,
- "stockExistence": 75,
- "createdDateTime": "2024-06-19T09:00:00"
}
]
This API method retrieves all stocks stored in the system for a specific company.
The response includes details such as code, name and stock information.
This endpoint requires a valid Bearer token to be included in the Authorization header of the request. Make sure to obtain a valid token before making requests to this endpoint.
companyId required | integer <int32> The ID of the company to retrieve customers for. |
productcode required | string |
[- {
- "productCode": "P123",
- "productName": "Example Product",
- "customerOrders": 5,
- "supplierOrders": 8,
- "customerConsigned": 3,
- "supplierConsigned": 2,
- "stockAvailable": 50,
- "stockExistence": 75,
- "createdDateTime": "2024-06-19T09:00:00"
}
]