Skip to content

Interface contract

An interface contract describes the agreed data exchange. Data structure, responses and their meaning need to fit together for both sides.

Also known asAPI contract
APIs & Integration

An interface contract is the agreed description of how systems should exchange data. It includes expected inputs, responses, errors and the meaning of that feedback. A machine-readable description can express parts of it; business agreements also need to be understandable.

Record what a response means

In a fictional customer portal, successful transmission initially confirms only receipt by an intermediary component. Separate feedback is needed to confirm whether the ERP has created the order. If the sender interprets the first response as full completion, its use does not match the agreement.

Compare the description with the implementation

OpenAPI defines a standardised description for HTTP APIs. Such descriptions help make available operations and responses understandable. They do not alone prove that a running application fulfils the agreed workflow. Check suitable examples and error cases against the implementation. When changes occur, it must also be clear which participating systems rely on which agreement.

Sources

Articles on this topic

APIs & Integration with ASES

ERP, CRM and shop cleanly connected