Tereina Integration Service API (1.0.0)

Download OpenAPI specification:

Tereina Development Team: dev@tereina.com License: Proprietary

Controllers exposed to be consumed by ERPs

Customer Integration

APIs for customer payment integration

Upload chunk

Upload a single chunk using streaming. Batch will auto-process when final chunk is received.

path Parameters
batchId
required
string
chunkNumber
required
integer <int32>
Request Body schema: application/json

Stream of data containing chunks of the type of the selected payloadObjectType. Supported object types: COMPANY, COMPANY_CODE, PAYMENT_REQUEST, INVOICE

One of
id
string
createdDate
string <date-time>
lastUpdatedDate
string <date-time>
lastUpdatedBy
string
version
integer <int64>
owningOrganizationId
required
string
counterpartyOrganizationId
required
string
referenceId
required
string
name
required
string
number
string
registeredCountry
string
registeredState
string
Array of objects (Address)
Array of objects (BankAccount)
Array of objects (CorporateIdentifier)
Array of objects (Contact)
Array of objects (CompanyRelationship)
supplier
boolean
customer
boolean

Responses

Request samples

Content type
application/json
Example
{
  • "id": "string",
  • "createdDate": "2019-08-24T14:15:22Z",
  • "lastUpdatedDate": "2019-08-24T14:15:22Z",
  • "lastUpdatedBy": "string",
  • "version": 0,
  • "owningOrganizationId": "string",
  • "counterpartyOrganizationId": "string",
  • "referenceId": "string",
  • "name": "string",
  • "number": "string",
  • "registeredCountry": "string",
  • "registeredState": "string",
  • "addresses": [
    ],
  • "bankAccounts": [
    ],
  • "corporateIdentifiers": [
    ],
  • "contacts": [
    ],
  • "companyRelationships": [
    ],
  • "supplier": true,
  • "customer": true
}

Confirm transfer completion

Confirms that the client has successfully received and processed all items in an outbound batch. This marks all batch items as COMPLETE and the batch status as COMPLETE_SUCCESS. The batch is then removed from the pending queue.

path Parameters
batchId
required
string

Responses

Initiate batch job with chunked transfer

Creates a new batch job and returns chunking parameters. Batch will auto-process when all chunks are uploaded.

Request Body schema: application/json
required
clientRefId
required
string non-empty

Client reference ID

referenceId
required
string non-empty

Reference ID for the batch

payloadObjectType
required
string
Enum: "COMPANY_CODE" "COMPANY" "INVOICE" "PURCHASE_ORDER" "PAYMENT_REQUEST" "PAYMENT_STATUS"

Type of payload object being uploaded

totalPayloadSize
required
integer <int64>

Total size of the payload in bytes

totalLineItemCount
required
integer <int32>

Total number of the line item objects in this batch

Responses

Request samples

Content type
application/json
{
  • "clientRefId": "client_123",
  • "referenceId": "batch_sap_20241006",
  • "payloadObjectType": "COMPANY",
  • "totalPayloadSize": 104857600,
  • "totalLineItemCount": 200
}

Create and process a batch of records (non-chunked)

Accepts a complete batch of data in various formats (JSON, CSV, XML, ISO) using streaming. The format is determined by client configuration and validated against expected schema. For large payloads, use the chunked transfer endpoints instead.

query Parameters
clientRefId
required
string
referenceId
required
string
payloadObjectType
required
string
totalLineItemCount
required
integer <int32>
totalPayloadSize
required
integer <int64>
Request Body schema: application/json

Stream of data containing the full batch payload.Supported object types: COMPANY, COMPANY_CODE, PAYMENT_REQUEST, INVOICE

One of
id
string
createdDate
string <date-time>
lastUpdatedDate
string <date-time>
lastUpdatedBy
string
version
integer <int64>
owningOrganizationId
required
string
counterpartyOrganizationId
required
string
referenceId
required
string
name
required
string
number
string
registeredCountry
string
registeredState
string
Array of objects (Address)
Array of objects (BankAccount)
Array of objects (CorporateIdentifier)
Array of objects (Contact)
Array of objects (CompanyRelationship)
supplier
boolean
customer
boolean

Responses

Request samples

Content type
application/json
Example
{
  • "id": "string",
  • "createdDate": "2019-08-24T14:15:22Z",
  • "lastUpdatedDate": "2019-08-24T14:15:22Z",
  • "lastUpdatedBy": "string",
  • "version": 0,
  • "owningOrganizationId": "string",
  • "counterpartyOrganizationId": "string",
  • "referenceId": "string",
  • "name": "string",
  • "number": "string",
  • "registeredCountry": "string",
  • "registeredState": "string",
  • "addresses": [
    ],
  • "bankAccounts": [
    ],
  • "corporateIdentifiers": [
    ],
  • "contacts": [
    ],
  • "companyRelationships": [
    ],
  • "supplier": true,
  • "customer": true
}

Get batch for transfer

Retrieves the complete batch with all pending items and their transformed payloads for client pickup. Only returns batches in PENDING status that are ready for transfer.

path Parameters
batchId
required
string

Responses

Get batch job status by batch ID

Returns current status of the batch job including chunking progress, missing chunks, and processing state.

path Parameters
batchId
required
string

Responses

Get batch job status by reference ID

Returns current status of the batch job by external reference ID, including chunking progress, missing chunks, and processing state.

path Parameters
referenceId
required
string

Responses

Get pending outbound batches

Returns all outbound batches in PENDING or PARTIAL_PENDING status that are waiting for the client to pick up. Optionally filter by payload object type (e.g., COMPANY, INVOICE).

query Parameters
payloadObjectType
string
Enum: "COMPANY_CODE" "COMPANY" "INVOICE" "PURCHASE_ORDER" "PAYMENT_REQUEST" "PAYMENT_STATUS"

Payload objects supported by the integration service

Responses