Transaction Management (1.0)

Download OpenAPI specification:Download

Public API that deals with transactions

Transactions

Get Transactions

Used to retrieve a collection of transactions

Authorizations:
XCompleatApiKey
path Parameters
tenantId
required
string <guid>

The tenant id

pageNumber
required
integer

The page number of results

companyId
required
string <guid>

The company id - optional (pass NULL value when unavailable)

userId
required
string <guid>

The user id - optional (pass NULL value when unavailable)

status
required
string <guid>

The transaction status - optional (pass NULL value when unavailable)

transactionType
required
string <guid>

The transaction type - optional (pass NULL value when unavailable)

header Parameters
x-api-version
required
integer
Value: 1
Example: 1

Indicates the version of this API to be used.

x-api-compleat-key
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

The header containing compleat api key.

Responses

Response samples

Content type
application/json
{
  • "Transactions": [
    ],
  • "PageNumber": 1,
  • "Count": 8,
  • "PageSize": 20,
  • "MetaData": {
    }
}

Transaction

Get Transaction

Used to retrieve a transaction

Authorizations:
XCompleatApiKey
path Parameters
tenantId
required
string <guid>

The tenant id

transactionId
required
integer

The page number of results

userId
required
string <guid>

The user id - optional (pass NULL value when unavailable)

header Parameters
x-api-version
required
integer
Value: 1
Example: 1

Indicates the version of this API to be used.

x-api-compleat-key
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

The header containing compleat api key.

Responses

Response samples

Content type
{
  • "Transaction": {
    },
  • "MetaData": {
    }
}

Create Transaction

Used to create new purchase order, invoice or credit note in iCompleat

Authorizations:
XCompleatApiKey
path Parameters
tenantId
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

Id of the tenant to post transaction into. The account requesting the data must have access to this tenant Id.

companyId
required
string <guid>
Example: 8d4bb975-eade-42fd-a064-bf448e493c1e

Id of the company to post transactions into. Must be a valid company within the tenant.

transactionType
required
string
Enum: "ORD" "INV" "CRD"

The type of transaction being created within the company.

header Parameters
x-api-version
required
integer
Value: 1
Example: 1

Indicates the version of this API to be used.

x-api-compleat-key
required
string <guid>
Example: d025eedc-5ea0-4de8-be9f-f8873545add9

The header containing compleat api key.

Request Body schema: application/json
LayoutId
required
string <guid>

The unique ID of the layout you wish to create the order against.

TransactionStatus
required
string
Enum: "SAV" "APPR"

The status of transaction being created within the company.

Reference
required
string <= 50 characters

The ID of the order from your accounting software.

PoNumber
string <= 20 characters

The purchase order number associated with the order.

DateCreated
required
string

The date the order was created.

DateApproved
string

The date the order was approved.

SupplierId
required
string <= 36 characters

The unique identifier of the supplier.

SupplierName
required
string <= 255 characters

The name of the supplier.

CurrencyCode
required
string

The currency code of the transaction.

DeliveryDate
string

The expected delivery date of a transaction. Optional.

DeliverySiteCode
string

The delivery site code of the transaction. Optional

required
Array of objects

Array of Analysis Fields to be used on the transaction Header.

required
Array of objects

Array of Analysis Fields to be used on the transaction header.

required
Array of objects

Line items of the order.

Responses

Request samples

Content type
application/json

This will create transactions in the company specified.

{
  • "LayoutId": "23e25c09-2af9-410c-8c14-2e429fb557ce",
  • "TransactionStatus": "Approved",
  • "Reference": "REQABC",
  • "PoNumber": "POABC123",
  • "DateCreated": "2020-08-06T14:32:11.345Z",
  • "DateApproved": "2020-08-08T14:35:16.541Z",
  • "SupplierId": "AW1",
  • "SupplierName": "Andy's Widgets",
  • "CurrencyCode": "GBP",
  • "AnalysisItems": [
    ],
  • "CustomItems": [
    ],
  • "LineItems": [
    ]
}

Response samples

Content type
application/json
{
  • "TransactionId": "string",
  • "MetaData": {
    }
}

Patch Transaction

Used to patch a transaction

Authorizations:
XCompleatApiKey
path Parameters
tenantId
required
string <guid>
Example: eaa81226-e2e6-47e9-82b1-df58b2a5067c

The tenant's id that the transaction belongs to

transactionId
required
string <guid>
Example: 12409644-1c2c-4058-8ca4-35b7d4acd972
userId
required
string <guid>
Example: 478f9871-4e1a-4067-a406-14fcffc859ee

The user making the request to patch the transaction

lastUpdatedGuid
required
string <guid>
Example: 196df9a7-0bd6-4669-9603-294c07860e30

The token saved upon the last change made against the record, can be obtained from the GET Transaction call

Request Body schema: application/json

The body sent with the details for the patch

Command
string
Enum: "APPROVE - Approve the transaction" "DENY - Deny the transaction" "SUBMIT - Submit the transaction" "UPDATE - Update the transaction" "RECEIPT - Receipt the lines or transaction"

The action to be taken against the transaction

Comment
string

Comment provided when approving or denying a transaction

Array of objects

Payload for receipting multiple line items

LineId
string <guid>

The line's unique id provided when updating a field on the transaction line

TITLE (string) or QUANTITY (string) or DELIVERYDATE (string) or DELIVERYSITE (string) or SUPPLIERCOMMENT (string) or JUSTIFICATION (string) or PAYMENTSTATUS (string) or POSTINGFAIL (string) or JOURNALNUMBER (string) or GUID (string)

The key to be updated

Value
string

The value to be updated for the selected key

Responses

Request samples

Content type
application/json
Example

Update analysis field on the header

{
  • "Command": "UPDATE",
  • "Comment": "",
  • "LineId": "",
  • "Key": "3BC9E1E0-259D-4A54-9E43-2FB7E697F131",
  • "Value": "ACCTCD2"
}

Response samples

Content type
application/json
{
  • "Command": "DENY",
  • "LastUpdatedToken": "b8e1e905-7e3f-4c19-80ce-854661d5dc1a",
  • "User": {
    },
  • "MetaData": {
    }
}